Intention-enhanced action cache reuse and DOM self-repair method and system for web page intelligent agent

CN122884743APending Publication Date: 2026-10-09SHANDONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611398314.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-10
Publication Date
2026-10-09

AI Technical Summary

Technical Problem

但网页页面具有较强的动态性,同一页面在不同时间加载时,DOM结构、可交互元素顺序、节点索引、页面弹窗以及局部布局均可能发生变化,导致缓存动作中的DOM节点索引失效或指向错误元素

Benefits of technology

[0013]本发明的有益效果是,(1)本发明通过为网页智能体执行成功的浏览器动作增加意图字段,并将动作类型、动作参数、页面状态和目标DOM节点结构描述关联缓存,使缓存动作具有可解释的语义信息,能够在相同或相似网页任务中实现动作级复用,减少重复调用大语言模型进行动作规划的次数,提高网页自动化任务执行效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122884743A_ABST
    Figure CN122884743A_ABST
Patent Text Reader

Abstract

The application discloses a webpage intelligent agent-oriented intention enhanced action cache reuse and DOM self-repairing method and system, relates to the computer technical field, constructs the mapping table of the interactive DOM node in the current page, and caches the browser action which is successfully executed in association with the action intention, the action parameter, the target DOM node structure description and the verification script; in subsequent task execution, the candidate cache action is recalled according to the current page address, semantic selection is carried out based on the action intention, and the target DOM node index in the cache action is self-repaired by using the current DOM node mapping table before the execution of the DOM cache action, and the page state is confirmed by the verification script to confirm whether the expected state is met; when the cache action fails and causes the abnormal page state, the page replay recovery mechanism is used to restore the executable state. The application improves the execution efficiency of the webpage automation task, the cache reuse reliability and the fault tolerance in the dynamic webpage environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a method and system for intent-enhanced action caching reuse and DOM self-repair for web page intelligent agents. Background Technology

[0002] In recent years, with the development of large language models and browser automation technologies, web intelligent agents have been increasingly applied to scenarios such as information retrieval, form filling, web page operations, data collection, and automation of complex business processes. Web intelligent agents typically need to perceive the current web page state, invoke large language models to generate the next browser action, and complete user tasks through actions such as clicking, inputting, jumping, and scrolling. However, in actual execution, web intelligent agents often need to repeatedly execute highly similar action sequences in the same or similar web page scenarios. If the large language model is invoked again for planning at each step, it will not only increase response latency and computational costs but also reduce task execution efficiency.

[0003] Existing automated webpage caching or history replay mechanisms typically only record the action type and parameters, such as recording the index of a clicked element on the page. However, webpages are highly dynamic; the DOM structure, order of interactive elements, node indices, pop-ups, and partial layouts can all change when the same page is loaded at different times, causing DOM node indices in cached actions to become invalid or point to incorrect elements. Furthermore, traditional caching mechanisms lack descriptions of action semantics, making it difficult to determine whether a historical action is applicable to a new user task; they also lack verification mechanisms for the execution results of cached actions. When erroneous cached actions are reused, it may cause the browser to enter an abnormal page state, further affecting the execution of subsequent tasks. Summary of the Invention

[0004] To overcome the aforementioned problems in the prior art, this invention proposes a method and system for intent-enhanced action caching reuse and DOM self-repair for web page intelligent agents.

[0005] The technical solution adopted by this invention to solve its technical problem is: an intent-enhanced action cache reuse and DOM self-repair method for web page intelligent agents, comprising the following steps: Step 1: The web page agent obtains the current web page's page address, page title, DOM tree, and interactive node information, assigns interactive indexes to the visible interactive nodes in the DOM tree, and constructs a DOM node mapping table that maps interactive indexes to DOM node objects. Step 2: The web page agent generates an action to be executed based on the user task and the current page state, and then executes the action after locating the target DOM node in the action parameters through the DOM node mapping table obtained in Step 1. Step 3: After the action to be executed is successfully executed, store the action type, action parameters, intent field, target DOM node structure description, and verification script association as an action cache record; Step 4: When the web page agent executes a new user task, retrieve candidate cached actions from the action cache record based on the current page address, and select reusable cached actions based on the current user task, the current page state, historical execution results, and the intent field of the candidate cached actions. Step 5: Before performing reusable DOM caching actions, rebuild the DOM node mapping table based on the current page, and determine new interaction indexes in the current DOM node mapping table based on the target DOM node structure description, so as to repair invalid DOM node indexes in the caching actions. Step 6: Execute the repaired cache action and run the verification script to determine whether the page state after execution meets expectations; if the verification fails or the execution fails, delete or update the corresponding action cache record, and restore the executable state of the web page agent through the page replay recovery mechanism.

[0006] The aforementioned method for intent-enhanced action caching reuse and DOM self-repair for web page intelligent agents, specifically includes step 1: Step 1.1: Obtain the DOM tree, accessibility tree, and page snapshot information of the current webpage, and generate an enhanced DOM node object. The enhanced DOM node object includes node type, node name, node attributes, node text, node boundary information, backend node identifier, frame identifier, and XPath information. Step 1.2: Filter out interactive DOM nodes based on whether they are visible, clickable, input-enabled, scrollable, or have interactive roles. Step 1.3: Assign an interaction index to each interactive DOM node according to the order of the interactive DOM nodes in the serialized DOM tree; Step 1.4: Use the interaction index as the key and the corresponding enhanced DOM node object as the value to construct a DOM node mapping table; Step 1.5: Synchronize the DOM node mapping table to the browser session of the web page agent for subsequent action execution and cache action repair.

[0007] The above-mentioned intent-enhanced action caching reuse and DOM self-repair method for web page intelligent agents includes an action type, action parameters, and an intent field used to describe the current page state, task progress, and the goal of this action in step 2.

[0008] The aforementioned intention-enhanced action cache reuse and DOM self-repair method for web-based intelligent agents, wherein the action cache record in step 3 includes at least: Action type, used to represent the browser action performed by the web-based intelligent agent; Action parameters, which represent the parameters required to perform the browser action; The intent field is used to describe the current webpage state, the current user task, the progress made, and the specific action goal in natural language. The target DOM node structure description is used to describe the tag, attributes, XPath, text context, child node structure, frame information, or position information of the DOM node being manipulated. The verification script is used to verify whether the current page has reached the expected state corresponding to the action cache record after reusing the cached action; Historical model state is used to record the historical evaluation information, memory information, and next step target information of the web page agent when generating the action to be executed; The most recent usage time is used to manage the eviction of action cache records.

[0009] The aforementioned method for intent-enhanced action caching reuse and DOM self-repair for web-based intelligent agents includes, in step 4: Step 4.1: Generate a cache bucket key based on the domain name and path of the current page address, and recall candidate cache actions from the corresponding cache bucket; Step 4.2: Group the candidate cache actions according to their action types, and select a preset number of candidates from each group of candidate cache actions; Step 4.3: Input the current user task, current page address, current page title, previous action execution result, previous action intent, and the intent fields of candidate cached actions into the semantic selection model; Step 4.4: The semantic selection model determines whether the candidate caching actions can advance the current user task and outputs the caching actions to be reused. Step 4.5: For input text actions, search actions, and page navigation actions, allow the text, search terms, or URLs in the action parameters to be replaced according to the current user task; for other actions, keep the cached action parameters unchanged.

[0010] The aforementioned method for intent-enhanced action caching reuse and DOM self-repair for web-based intelligent agents includes, in step 5, the following: Step 5.1: When the caching action involves DOM node indexes, check if the DOM node indexes exist in the current DOM node mapping table; Step 5.2: When the DOM node index does not exist or needs to be verified, determine the current DOM node that matches the cache target DOM node based on the target DOM node structure description in the caching action and the current DOM node mapping table. Step 5.3: When a unique matching current DOM node exists, update the DOM node index in the cached action to the interaction index corresponding to the current DOM node, and persist the updated action cache record. Step 5.4: When there is no matching node or multiple candidate matching nodes, delete the corresponding action cache record and fall back to real-time action planning; Step 5.5: After the caching action is executed, run the verification script to determine whether the page state meets expectations based on the current page's structural features, node attributes, and node relationships. Step 5.6: When the cached action fails and causes the page state to deviate from the state before execution, open a new page context, return the page address before the failure, and replay the action queue that has been successfully executed in the same page context to restore the executable state of the web page agent.

[0011] The aforementioned method for intent-enhanced action caching reuse and DOM self-repair for web-based intelligent agents includes, in step 6: Step 6.1: Execute the caching action processed in step 5, and run the verification script after the caching action is executed to determine whether the page state after execution meets expectations based on the structure check items in the current page. Step 6.2: If the page state after execution meets expectations, the caching action is determined to be successful; if the caching action fails or the page state after execution does not meet expectations, the caching action is determined to have failed or the verification failed, and the corresponding action cache record is deleted or updated. Step 6.3: Record the queue of actions that were successfully executed before the cache action failed in the same page context; when the cache action fails and causes the current page address or page state to deviate from the state before the failure, open a new page context and return the page address before the failure. Step 6.4: Re-execute the successfully executed actions according to the order of actions in the action queue, and restore the web-based agent to a state where it can continue to execute after the replay is complete, so that the real-time action planning can continue to complete the user task.

[0012] A web-based intelligent agent intent-enhanced action cache reuse and DOM self-repair system is provided to implement the aforementioned web-based intelligent agent intent-enhanced action cache reuse and DOM self-repair methods, including: The page status acquisition module is used to obtain the current webpage's page address, page title, DOM tree, accessibility tree, and page snapshot information; The DOM mapping building module is used to identify visible and interactive DOM nodes, assign interactive indexes to the visible and interactive DOM nodes, and build a DOM node mapping table that maps interactive indexes to DOM node objects. The action generation module is used to generate an action to be executed based on the user task and the current page state. The action to be executed includes an action type, action parameters, and intent field. The action caching module is used to store the action type, action parameters, intent fields, target DOM node structure description, verification script and historical model state as action cache records after the action is successfully executed; The cache selection module is used to recall candidate cache actions based on the current page address and select reusable cache actions based on the intent field of the candidate cache actions. The DOM node repair module is used to repair DOM node indexes in cached actions based on the target DOM node structure description and the current DOM node mapping table. The verification module is used to run a verification script after the caching action is executed, and to determine whether the page state after execution meets expectations. The failure recovery module is used to delete or update the action cache record when the cached action fails, and to restore the execution state of the web page agent through the page replay recovery mechanism.

[0013] The beneficial effects of the present invention are: (1) The present invention adds an intent field to the browser action successfully executed by the web page agent and associates the action type, action parameters, page state and target DOM node structure description with cache, so that the cached action has interpretable semantic information, and can realize action-level reuse in the same or similar web page tasks, reduce the number of times the large language model is repeatedly called for action planning, and improve the execution efficiency of web page automation tasks.

[0014] (2) This invention constructs a DOM node mapping table of visible and interactive DOM nodes in the current webpage, establishes a correspondence between the interactive index and the enhanced DOM node object, and enables the webpage intelligent agent to accurately locate the action target based on the DOM node mapping table, providing a structured basis for cached action execution and subsequent DOM node repair.

[0015] (3) When reusing cache actions, the present invention performs self-repair on the invalid or drifting DOM node index based on the target DOM node structure description in the cache action and the current DOM node mapping table. This can solve the problem of cache action failure caused by DOM structure changes, node order changes or local page reordering in dynamic web pages, and improve the reliability of cache actions in dynamic web page environment.

[0016] (4) This invention generates and executes a verification script to perform structured verification of the page state after the cache action is executed, thereby preventing the continuous reuse of erroneous cache actions and being able to delete or update cache records when verification fails, thus improving the accuracy and maintainability of the cache library.

[0017] (5) When the cached action fails and causes the page state to be abnormal, the present invention returns to the page before the failure and replays the successful action through the page replay recovery mechanism, so that the web page agent can recover from the continueable state and fall back to the real-time action plan, reducing the impact of the erroneous cached action on the execution of subsequent tasks. Attached Figure Description

[0018] Figure 1 This is a schematic diagram of the process of this invention. Detailed Implementation

[0019] To enable those skilled in the art to better understand the technical solution of the present invention, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0020] This invention provides a method for intent-enhanced action caching reuse and DOM self-repair for web page intelligent agents, such as... Figure 1 As shown, it includes the following steps: S1. Page State Acquisition and DOM Mapping Construction Phase: The webpage agent acquires the current webpage's page address, page title, DOM tree, accessibility tree, and page snapshot information, and identifies visible and interactive DOM nodes on the current page based on this information. For the identified visible and interactive DOM nodes, an interaction index is assigned according to their order in the serialized DOM tree, and a DOM node mapping table M is constructed, as follows: M={i→N i |i∈I} Where i represents the interaction index of the interactive DOM node, and N i This represents the enhanced DOM node object corresponding to the interactive index i, where I represents the set of indices of interactive DOM nodes in the current webpage.

[0021] The DOM node mapping table is used to record the correspondence between interactive indexes and enhanced DOM node objects. The interactive indexes are used for web page agents to generate and execute browser actions, while the enhanced DOM node objects are used to store the structural information and runtime positioning information of the corresponding interactive DOM nodes.

[0022] The page state acquisition and DOM mapping construction phase specifically includes the following processes: S11. The web page intelligent agent obtains the DOM tree, accessibility tree, and page snapshot information of the current web page through the browser debugging protocol.

[0023] S12. Generate enhanced DOM node objects based on the DOM tree, accessibility tree, and page snapshot information. The enhanced DOM node objects include node type, node name, node attributes, node text, node boundary information, backend node identifier, frame identifier, and XPath information.

[0024] S13. Filter out visible and interactive DOM nodes based on whether the node is visible, clickable, input-enabled, scrollable, or has an interactive role.

[0025] S14. According to the order of the visible and interactive DOM nodes in the serialized DOM tree, assign an interaction index to each visible and interactive DOM node, and write the interaction index and the corresponding enhanced DOM node object into the DOM node mapping table.

[0026] S15. Synchronize the DOM node mapping table to the browser session of the web page agent so that it can be queried when the action is executed, the cached action is reused, and the DOM node is self-repaired.

[0027] S2. Action Intent Generation and Execution Phase: The webpage agent generates actions to be executed based on the user task, current page state, and historical execution results. These actions include an action type, action parameters, and an intent field. The action type represents browser operations such as clicking, inputting, searching, jumping, and scrolling; the action parameters represent the DOM node index, input text, search terms, URL, or other parameters required to execute the action; and the intent field describes the current webpage state, the current user task, the progress made, and the objective of this action.

[0028] When the action to be executed contains a DOM node index, the web agent queries the target DOM node object according to the DOM node mapping table and executes the corresponding browser action based on the queried target DOM node object. If the action to be executed does not contain a DOM node index, the web agent directly executes the corresponding action according to the action parameters.

[0029] S3, Action Cache Recording Phase: After the action to be executed is successfully executed, the webpage agent collects the page state after the action is executed, and stores the action type, action parameters, intent field, target DOM node structure description, verification script, historical model state, and most recently used time as an associated action cache record C, represented as follows: C={A,P,Intent,D,J,S,L} Where A represents the action type, P represents the action parameters, Intent represents the intent field, D represents the target DOM node structure description, J represents the validation script, S represents the historical model status, and L represents the most recent usage time.

[0030] The target DOM node structure description may include one or more of the following: the tag name, node attributes, XPath, text context, child node structure, parent node relationship, frame information, and position information of the manipulated DOM node. The page state after the action is executed may include one or more of the following: page address, DOM structure representation, HTML snapshot, and page structure summary. The historical model state may include the webpage agent's historical evaluation information, memory information, and next step target information when generating the action to be executed. The most recently used time is used for eviction management of action cache records.

[0031] In one implementation, the webpage agent asynchronously generates a verification script after a successful action. This verification script is used to perform structured verification on whether the current page has reached the expected page state corresponding to the cached action after subsequent reuse of the cached action. The verification script can check based on tags, attributes, node hierarchy, ancestor-descendant relationships, form structure, button structure, or link structure within the page.

[0032] S4. Cache Action Recall and Semantic Selection Phase: When the webpage agent executes a new user task, it generates a cache bucket key K based on the current page address and recalls candidate cache actions from the corresponding cache bucket. The cache bucket key can be generated based on the domain name and path in the page address, so that historical actions under the same website or the same page path can be recalled preferentially.

[0033] The cache bucket key K is represented as follows: K = H(URL) + P(URL) Where H(URL) represents the domain name in the page address and P(URL) represents the path in the page address; the web page agent selects reusable cache actions from the candidate cache actions based on the current user task, the current page address, the current page title, historical execution results, and the intent field of the candidate cache actions.

[0034] After recalling candidate cached actions, the web agent inputs the current user task, current page address, current page title, previous action execution result, previous action intent, and the intent field of the candidate cached action into the semantic selection model. The semantic selection model determines whether the candidate cached action can advance the current user task based on the intent field of the candidate cached action and outputs the cached action to be reused.

[0035] For text input, search, and page navigation actions, the web agent allows replacing the text, search terms, or URLs in the action parameters based on the current user task; for other actions, the cached action parameters remain unchanged. In this way, cached actions can be reused not only within the same task but also as action templates in scenarios with similar page states but different specific task parameters.

[0036] S5, DOM Node Self-Repair Phase: Due to the dynamic nature of web pages, the order of DOM nodes, the number of interactive nodes, and node indices may change when the same page is loaded at different times. To avoid DOM node index invalidation during caching, the web page agent re-collects the current page state and rebuilds the current DOM node mapping table before executing caching actions.

[0037] When a caching action includes a DOM node index, the web agent first checks if that DOM node index exists in the current DOM node mapping table. If the DOM node index does not exist or requires further verification, the web agent matches the target DOM node structure description in the caching action with the descriptions of each DOM node in the current DOM node mapping table to obtain a new interaction index i*, represented as follows: i*=argmax Sim(D,D i ) Where Sim(D,D) i This represents the cached target DOM node structure description D and the current DOM node description D. i The matching degree between them; when the matching result is unique and the matching degree is greater than the preset threshold, the old DOM node index in the cached action parameters will be updated to the new interaction index i*.

[0038] When a unique matching DOM node exists, the web agent updates the old DOM node index in the cached action parameters to the new interaction index and persists the updated action cache record. When no matching node exists or multiple candidate matching nodes exist, the web agent deletes the corresponding action cache record and reverts to real-time action planning.

[0039] S6. Cache Action Execution Verification and Failure Recovery Phase: The webpage agent executes the repaired cache action and runs the verification script J after the action is executed. The verification script calculates the matching ratio R based on the structural check items in the current page, as follows: R=N p / N t Where, N p N represents the number of structural checks that passed verification. t This indicates the total number of structural check items. When R is greater than or equal to the preset verification threshold, the caching action is considered to have been executed successfully; otherwise, the caching action verification is considered to have failed. If the caching action fails to execute or fails to verify, the corresponding action cache record is deleted or updated. If the page state deviates from the state before execution, the page replay recovery mechanism restores the executable state of the web page agent.

[0040] In one implementation, the web agent records a queue of successfully executed actions within the same page context. This action queue stores actions successfully executed within the same page context before a cached action fails. When a cached action fails and causes the current page address or page state to deviate from its previous state, the web agent opens a new page context, returns to the previous page address, and re-executes the successfully executed actions according to the order in the action queue. After replaying, the web agent is restored to a ready-to-continue state and handed over to real-time action planning to continue completing the user task.

[0041] A web-based intelligent agent intent-enhanced action caching and reuse system and DOM self-repair system, comprising: The page status acquisition module is used to obtain the current webpage's page address, page title, DOM tree, accessibility tree, and page snapshot information; The DOM mapping building module is used to identify visible and interactive DOM nodes, assign interactive indexes to the visible and interactive DOM nodes, and build a DOM node mapping table that maps interactive indexes to enhanced DOM node objects. The action generation module is used to generate an action to be executed based on the user task, the current page state, and the historical execution results. The action to be executed includes an action type, action parameters, and an intent field. The action execution module is used to locate the target DOM node based on the action parameters and the DOM node mapping table, and execute the action to be executed or the cached action. The action caching module is used to store the action type, action parameters, intent fields, target DOM node structure description, verification script and historical model state as action cache records after the action is successfully executed; The cache selection module is used to recall candidate cache actions based on the current page address and select reusable cache actions based on the intent field of the candidate cache actions. The DOM node repair module is used to repair DOM node indexes in cached actions based on the target DOM node structure description and the current DOM node mapping table. The verification module is used to run a verification script after the caching action is executed, and to determine whether the page state after execution meets expectations. The failure recovery module is used to delete or update the action cache record when the cached action fails to execute or verify, and to restore the execution state of the web page agent through the page replay recovery mechanism.

[0042] The above embodiments are merely exemplary embodiments of the present invention and are not intended to limit the present invention. Those skilled in the art can make various modifications or equivalent substitutions to the present invention within its scope and spirit, and such modifications or equivalent substitutions should also be considered to fall within the scope of protection of the present invention.

Claims

1. A method for intent-enhanced action caching reuse and DOM self-repair for web page intelligent agents, characterized in that, Includes the following steps: Step 1: The web page agent obtains the current web page's page address, page title, DOM tree, and interactive node information, assigns interactive indexes to the visible interactive nodes in the DOM tree, and constructs a DOM node mapping table that maps interactive indexes to DOM node objects. Step 2: The web page agent generates an action to be executed based on the user task and the current page state, and then executes the action after locating the target DOM node in the action parameters through the DOM node mapping table obtained in Step 1. Step 3: After the action to be executed is successfully executed, store the action type, action parameters, intent field, target DOM node structure description, and verification script association as an action cache record; Step 4: When the web page agent executes a new user task, retrieve candidate cached actions from the action cache record based on the current page address, and select reusable cached actions based on the current user task, the current page state, historical execution results, and the intent field of the candidate cached actions. Step 5: Before performing reusable DOM caching actions, rebuild the DOM node mapping table based on the current page, and determine new interaction indexes in the current DOM node mapping table based on the target DOM node structure description, so as to repair invalid DOM node indexes in the caching actions. Step 6: Execute the repaired cache action and run the verification script to determine whether the page state after execution meets expectations; if the verification fails or the execution fails, delete or update the corresponding action cache record, and restore the executable state of the web page agent through the page replay recovery mechanism.

2. The method for intent-enhanced action caching reuse and DOM self-repair for web page intelligent agents according to claim 1, characterized in that, Step 1 specifically includes: Step 1.1: Obtain the DOM tree, accessibility tree, and page snapshot information of the current webpage, and generate an enhanced DOM node object. The enhanced DOM node object includes node type, node name, node attributes, node text, node boundary information, backend node identifier, frame identifier, and XPath information. Step 1.2: Filter out interactive DOM nodes based on whether they are visible, clickable, input-enabled, scrollable, or have interactive roles. Step 1.3: Assign an interaction index to each interactive DOM node according to the order of the interactive DOM nodes in the serialized DOM tree; Step 1.4: Use the interaction index as the key and the corresponding enhanced DOM node object as the value to construct a DOM node mapping table; Step 1.5: Synchronize the DOM node mapping table to the browser session of the web page agent for subsequent action execution and cache action repair.

3. The method for intent-enhanced action caching reuse and DOM self-repair for web page intelligent agents according to claim 1, characterized in that, The action to be executed in step 2 includes the action type, action parameters, and intent fields used to describe the current page state, task progress, and the goal of this action.

4. The method for intent-enhanced action caching reuse and DOM self-repair for web page intelligent agents according to claim 1, characterized in that, The action cache records in step 3 include at least: Action type, used to represent the browser action performed by the web-based intelligent agent; Action parameters, which represent the parameters required to perform the browser action; The intent field is used to describe the current webpage state, the current user task, the progress made, and the specific action goal in natural language. The target DOM node structure description is used to describe the tag, attributes, XPath, text context, child node structure, frame information, or position information of the DOM node being manipulated. The verification script is used to verify whether the current page has reached the expected state corresponding to the action cache record after reusing the cached action; Historical model state is used to record the historical evaluation information, memory information, and next step target information of the web page agent when generating the action to be executed; The most recent usage time is used to manage the eviction of action cache records.

5. The method for intent-enhanced action caching reuse and DOM self-repair for web page intelligent agents according to claim 1, characterized in that, Step 4 specifically includes: Step 4.1: Generate a cache bucket key based on the domain name and path of the current page address, and recall candidate cache actions from the corresponding cache bucket; Step 4.2: Group the candidate cache actions according to their action types, and select a preset number of candidates from each group of candidate cache actions; Step 4.3: Input the current user task, current page address, current page title, previous action execution result, previous action intent, and the intent fields of candidate cached actions into the semantic selection model; Step 4.4: The semantic selection model determines whether the candidate caching actions can advance the current user task and outputs the caching actions to be reused. Step 4.5: For input text actions, search actions, and page navigation actions, allow the text, search terms, or URLs in the action parameters to be replaced according to the current user task; for other actions, keep the cached action parameters unchanged.

6. The method for intent-enhanced action caching and DOM self-repair for web page intelligent agents according to claim 1, characterized in that, Step 5 specifically includes: Step 5.1: When the caching action involves DOM node indexes, check if the DOM node indexes exist in the current DOM node mapping table; Step 5.2: When the DOM node index does not exist or needs to be verified, determine the current DOM node that matches the cache target DOM node based on the target DOM node structure description in the caching action and the current DOM node mapping table. Step 5.3: When a unique matching current DOM node exists, update the DOM node index in the cached action to the interaction index corresponding to the current DOM node, and persist the updated action cache record. Step 5.4: When there is no matching node or multiple candidate matching nodes, delete the corresponding action cache record and fall back to real-time action planning; Step 5.5: After the caching action is executed, run the verification script to determine whether the page state meets expectations based on the current page's structural features, node attributes, and node relationships. Step 5.6: When the cached action fails and causes the page state to deviate from the state before execution, open a new page context, return the page address before the failure, and replay the action queue that has been successfully executed in the same page context to restore the executable state of the web page agent.

7. The method for intent-enhanced action caching reuse and DOM self-repair for web page intelligent agents according to claim 1, characterized in that, Step 6 specifically includes: Step 6.1: Execute the caching action processed in step 5, and run the verification script after the caching action is executed to determine whether the page state after execution meets expectations based on the structure check items in the current page. Step 6.2: If the page state after execution meets expectations, the caching action is determined to be successful; if the caching action fails or the page state after execution does not meet expectations, the caching action is determined to have failed or the verification failed, and the corresponding action cache record is deleted or updated. Step 6.3: Record the queue of actions that were successfully executed before the cache action failed in the same page context; when the cache action fails and causes the current page address or page state to deviate from the state before the failure, open a new page context and return the page address before the failure. Step 6.4: Re-execute the successfully executed actions according to the order of actions in the action queue, and restore the web-based agent to a state where it can continue to execute after the replay is complete, so that the real-time action planning can continue to complete the user task.

8. An intent-enhanced action caching and reuse system and DOM self-repair system for web page intelligent agents, characterized in that, A method for implementing intent-enhanced action caching reuse and DOM self-repair for web-based intelligent agents as described in any one of claims 1-7, comprising: The page status acquisition module is used to obtain the current webpage's page address, page title, DOM tree, accessibility tree, and page snapshot information; The DOM mapping building module is used to identify visible and interactive DOM nodes, assign interactive indexes to visible and interactive DOM nodes, and build a DOM node mapping table that maps interactive indexes to DOM node objects. The action generation module is used to generate an action to be executed based on the user task and the current page state. The action to be executed includes an action type, action parameters, and intent field. The action caching module is used to store the action type, action parameters, intent fields, target DOM node structure description, page state, validation script and historical model state as action cache records after the action is successfully executed. The cache selection module is used to recall candidate cache actions based on the current page address and select reusable cache actions based on the intent field of the candidate cache actions. The DOM node repair module is used to repair DOM node indexes in cached actions based on the target DOM node structure description and the current DOM node mapping table. The verification module is used to run a verification script after the caching action is executed, and to determine whether the page state after execution meets expectations. The failure recovery module is used to delete or update the action cache record when the cached action fails, and to restore the execution state of the web page agent through the page replay recovery mechanism.