Limited webpage list identification method and device based on LLM, equipment and medium

By injecting custom scripts and screenshot characters into web pages, combined with LLM recognition, the illusion and high token consumption problems of LLM in web page list recognition are solved, realizing automated and accurate web page list positioning and lowering the technical threshold.

CN121834031APending Publication Date: 2026-04-10FUJIAN ZIXUN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-07
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing Large Language Models (LLMs) are prone to illusions when recognizing lists of web pages, have difficulty accurately identifying list boundaries, and have high token consumption costs, especially when processing large lists.

Method used

A customized webpage data extraction script is injected into the webpage via the CDP protocol, a list of a set number of items is filtered out and the index is highlighted, and LLM is used to identify the characters input from the screenshot, reducing token consumption and improving recognition accuracy.

Benefits of technology

It achieves low-illusion, low-token-consumption webpage list recognition, combining automated filtering and LLM verification, which improves recognition speed and accuracy, lowers the technical threshold, and enables non-technical personnel to efficiently locate webpage lists.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121834031A_ABST
    Figure CN121834031A_ABST
Patent Text Reader

Abstract

The invention provides a method, a device and equipment for identifying a limited webpage list based on LLM, and a medium. The method comprises the following steps: starting a browser and navigating to a webpage where a target list is located; a customized webpage data extraction script is injected into the webpage through a CDP protocol, the webpage data extraction script is used for screening out lists with the set number in the webpage, the lists are subjected to highlight setting, corresponding indexes are displayed, and the lists comprise the indexes and a selector; intercepting a current complete webpage to obtain screenshot characters; according to the method, the list with the set number, the screenshot characters and the set prompt words are input into the LLM specified by the user, and the corresponding target list selector is obtained from the list, so that the LLM is quickly recognized, and Token consumption is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of large language model, and particularly relates to a method and device for identifying a limited webpage list based on an LLM, and a medium. BACKGROUND

[0002] In order to extract webpage information and reduce Token cost, mainstream LLMs often directly convert webpage content into Markdown or convert the entire webpage into character information with an index of interactive elements. Although this solution reduces Token cost, it is only suitable for extracting pure webpage text or simple interactive scenarios because it cannot preserve complete page structure information.

[0003] When it is necessary to efficiently identify a webpage list, the loss of page structure information can cause the following problems: first, the LLM can easily hallucinate and confuse list items with similar content or fabricate non-existent items; second, it is difficult to accurately identify list boundaries, and non-list content such as advertisements and sidebars may be misjudged as list items; third, when processing items one by one, the complete context needs to be repeatedly transmitted, resulting in linear growth of Token consumption and a sharp increase in cost when processing large lists. SUMMARY

[0004] The technical problem to be solved by the present application is to provide a method and device for identifying a limited webpage list based on an LLM, which reduces the Token cost of a large language model and improves the recognition speed of the LLM.

[0005] In a first aspect, the present application provides a method for identifying a webpage list with low hallucination and low Token consumption by an LLM, comprising the following steps: Step 1: starting a browser and navigating to a webpage where a target list is located; Step 2: injecting a customized webpage data extraction script into the webpage through a CDP protocol, the webpage data extraction script being used to filter a set number of lists in the webpage, highlight the lists, and display corresponding indexes, the lists including indexes and selectors; Step 3: intercepting the current complete webpage to obtain screenshot characters; Step 4: inputting the set number of lists, screenshot characters, and set prompt words into a user-specified LLM to obtain a corresponding target list selector from the lists.

[0006] In a second aspect, the present application provides a device for identifying a webpage list with low hallucination and low Token consumption by an LLM, comprising: a webpage opening module configured to start a browser and navigate to a webpage where a target list is located; An extraction list module injects a customized web data extraction script into a web page through a CDP protocol, the web data extraction script is used to filter a set number of lists in the web page, and the lists include indexes and selectors. A screenshot module intercepts a complete web page to obtain screenshot characters. An LLM recognition module inputs a set number of lists, screenshot characters, and a set of prompt words into a user-specified LLM to obtain a corresponding target list selector from the lists.

[0007] In a third aspect, the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method of the first aspect.

[0008] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the program is executed by a processor to implement the method of the first aspect.

[0009] The one or more technical solutions provided by the present application have at least the following technical effects or advantages: Compared with the prior art of converting a web page into Markdown or interactive characters, only a small amount of selector and index information is needed, which greatly reduces the consumption of Token. At the same time, the LLM only needs to determine the index of the list to be recognized according to the index and the complete page screenshot, and after recognition, the selector corresponding to the index is returned by the traditional code, which effectively reduces the illusion of the LLM for web list recognition.

[0010] The above description is only a summary of the technical solutions of the present application. In order to more clearly understand the technical means of the present application, the content of the specification can be implemented, and in order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the following specific embodiments of the present application are described. BRIEF DESCRIPTION OF DRAWINGS

[0011] The present application will be further described below with reference to the accompanying drawings and embodiments.

[0012] Figure 1 The flowchart in the method of the first embodiment of the present application is shown. Figure 2 The structure of the device in the second embodiment of the present application is shown. DETAILED DESCRIPTION

[0013] The technical solutions in the embodiments of the present application have the following general idea: Step 1: Start the browser and jump to the web page A of the list to be recognized; Step 2: Use CDP to inject a custom list selector into webpage A to generate script B. The core code is as follows: function findTables() { var tables = []; var bodySize = getElementSize(document.body); var bodyArea = bodySize.area; var maxTables = 20; var minArea = 0.005 * bodyArea; var allElements = document.querySelectorAll("body *"); allElements.forEach(function(element) { var elementSize = getElementSize(element); var area = elementSize.area; if (!isNaN(area) && area >= minArea) { var structure = analyzeElementStructure(element); var children = structure.children; var childrenCount = children.length; if (!isNaN(childrenCount) && childrenCount >= 3) { / / Consider multiple factors when calculating scores var score = area * childrenCount * childrenCount; / / Check the consistency of child elements (elements of the same type score higher). var childTags = {}; children.forEach(function(child) { var tag = child.tagName.toLowerCase(); childTags[tag] = (childTags[tag] || 0) + 1; }); / / If most of the child element tags are the same, increase the score var maxSameTag = Math.max.apply(null, Object.values(childTags)); if (maxSameTag >= childrenCount * 0.6) { score *= 1.5; } tables.push({ element: element, goodClasses: structure.goodClasses, area: area, children: children, score: score, selector: generateSelector(element), type: "selector" }); } } }); tables = tables.sort(function(a, b) { return b.score - a.score; }); / / Remove completely duplicate entries (same element) var uniqueTables = []; var seenElements = new Set(); tables.forEach(function(table) { if (!seenElements.has(table.element)) { seenElements.add(table.element); uniqueTables.push(table); } }); uniqueTables.forEach(function(table, index) { table.hasParentInList = false; table.hasChildrenInList = false; uniqueTables.forEach(function(otherTable) { if (table.element!== otherTable.element) { if (otherTable.element.contains(table.element)) { table.hasParentInList = true; } if (table.element.contains(otherTable.element)) { table.hasChildrenInList = true; } } }); }); / / Take the first N, and preferentially display the top-level list and meaningful sub-lists var resultTables = uniqueTables.slice(0, maxTables); return resultTables; } function getElementSize(element) { return { width: element.offsetWidth || 0, height: element.offsetHeight || 0, area: (element.offsetWidth || 0) * (element.offsetHeight || 0) }; } function generateSelector(element) { var path = []; var current = element; while (current && current.nodeType === Node.ELEMENT_NODE &¤t.tagName.toLowerCase() !== 'html' && current.tagName.toLowerCase() !== 'body') { var tag = current.tagName.toLowerCase(); var id = current.id; var className = current.className; if (typeof id === "string" && id.trim() && !id.match( / \d+ / g)) { tag += escapeSelector(id, "#"); } else if (typeof className === "string" && className.trim()) { tag += escapeSelector(className).replace( / \s+ / g, "."); } path.unshift(tag); current = current.parentElement; } return path.join(" > "); } function analyzeElementStructure(element) { var children = Array.from(element.children); var classCounts = {}; var classCombinations = {}; children.forEach(function(child) { if (!["script", "img", "meta", "style"].includes(child.nodeName.toLowerCase()) && (child.textContent || "").trim().length) { var classes = getClasses(child).sort(); var classKey = classes.join(" "); if (!(classKey in classCombinations)) { classCombinations[classKey] = 0; } classCombinations[classKey]++; classes.forEach(function(cls) { if (!(cls in classCounts)) { classCounts[cls] = 0; } classCounts[cls]++; }); } }); / / Find the most frequent class combinations var frequentCombinations = Object.keys(classCombinations).filter(function(combo) { return classCombinations[combo] >= children.length / 2 - 2; }); if (!frequentCombinations.length) { frequentCombinations = Object.keys(classCounts).filter(function(cls) { return classCounts[cls] >= children.length / 2 - 2; }); } / / Check if the element is large enough and contains enough content var elementSize = getElementSize(element); var bodySize = getElementSize(document.body); if (elementSize.area > 50000 && bodySize.area > 0 && children.length >= 3) { return { children: children.filter(function(child) { return child.nodeName && !["script", "img", "meta", "style"].includes(child.nodeName.toLowerCase()) && !!(child.textContent || "").trim().length; }), goodClasses: frequentCombinations }; } return { children: children.filter(function(child) { var hasGoodClass = false; var childClasses = getClasses(child); frequentCombinations.forEach(function(combo) { var classes = combo.split(" "); var hasAllClasses = true; classes.forEach(function(cls) { if (!childClasses.includes(cls)) { hasAllClasses = false; } }); if (hasAllClasses) { hasGoodClass = true; } }); return hasGoodClass; }), goodClasses: frequentCombinations }; } function getClasses(element) { var className = element.className || ""; if (typeof className !== 'string') { className = className.baseVal || ""; } return className.trim().split( / \s+ / ).filter(function(cls) { return cls.length > 0; }); } function escapeSelector(str, prefix) { return (prefix || ".") + str.replace( / [!"#$%&'()*+,.\ / :;<=>?@[\\\]^`{|}~] / g, "\\$&").trim(); } The list selector generation script primarily uses an algorithm to filter out the top 20 possible lists on the page and highlights these lists with their corresponding indices. The final data is called list selector data C, and the data has a structure similar to the following: [ { "index": 0, "selector": "div.list > div.item", }, { "index": 1, "selector": "div.menu > div.menu-item", } ] Step 3: Use the CDP protocol to capture the current complete webpage and obtain the base64 screenshot character 'D'. The key code is: const buffer = await page.screenshot({ fullPage: true}); const image_base64str = buffer.toString('base64'); Step 4: Add the list selector data C and the screenshot character D together to the prompt word and feed it to the LLM, then let it recognize and return the matching index.

[0014] The advantages of the above steps are automation, accuracy, and low barrier to entry. By combining "technical screening + LLM confirmation," the problem of locating webpages in a list is solved efficiently. Specific advantages are as follows: 1. Automated screening significantly reduces manual operations. Without the need for manual analysis of the webpage's DOM structure, script B can automatically traverse all elements on the page and select the 20 most likely list elements using multi-dimensional algorithms such as area, number of child elements, and structural regularity.

[0015] Automatically generate CSS selectors for each candidate list, avoiding the tediousness and errors of manually writing selectors (such as difficulty in locating when the DOM structure is complex).

[0016] Automatically highlight the candidate list and label the index, presenting the filtering results intuitively without the need for manual searching or labeling.

[0017] 2. The screening process is logically sound, resulting in a high-quality candidate list. Script B's filtering rules take into account "scale" (area meets the standard), "structure" (sufficient number of child elements, consistent tag / class names), and "content" (excluding meaningless tags and empty content), and the filtered candidate list has a high degree of matching with the "real list / table".

[0018] By ranking and deduplication, and hierarchical analysis, high-quality candidates (high scores, no duplication, and regular structure) are prioritized and retained to reduce the interference of invalid candidates on subsequent judgments.

[0019] 3. Solve the problem of localization in "fuzzy scenes" by combining LLM. The script filtering is responsible for "quantitative filtering," while the LLM is responsible for "semantic confirmation": when the structure of the web page list is not standard (such as inconsistent class names or complex nesting), the LLM can accurately match the target index by combining the visual information of the screenshot D with the business scenario (such as "need to locate the product list").

[0020] Without the need to write complex conditional statements to adapt to different web pages, LLM's natural language understanding capabilities are compatible with diverse list styles, reducing adaptation costs.

[0021] 4. The process is lightweight, efficient, and highly reusable. Scripts are injected based on the CDP protocol, without requiring modification of the target webpage code, and are compatible with the vast majority of webpages (including dynamically rendered pages).

[0022] Screenshot D (base64 format) is easy to transmit and LLM recognize, eliminating the need for additional image file storage and ensuring a highly efficient closed-loop process.

[0023] The filtering rules of script B (such as area threshold, maximum number of candidates) can be flexibly adjusted to adapt to different scenarios (such as mobile / PC web pages, small lists / large tables).

[0024] 5. Lowering the technical barrier allows non-technical personnel to use it. Ultimately, the LLM only needs to return the matching index, without needing to concern itself with the underlying DOM structure, selector writing, or other technical details. Even non-technical personnel can complete the location by describing their needs in natural language (such as "select a list of products").

[0025] The process is standardized and can be embedded into automation tools, data crawling, page testing and other scenarios without the need to repeatedly develop the core filtering logic. Example

[0026] like Figure 1 As shown, this embodiment provides a method for identifying a list of web pages using LLM low-illusion, low-consumption tokens, including the following steps: Step 1: Launch your browser and navigate to the webpage containing the target list; Step 2: Inject a customized webpage data extraction script into the webpage via the CDP protocol. The webpage data extraction script is used to filter out a set number of lists in the webpage, highlight the list, and display the corresponding index. The list includes an index and a selector. Step 3: Capture the entire current webpage and obtain the screenshot characters; Step 4: Input the set number of lists, screenshot characters, and set prompt words into the user-specified LLM, and obtain the corresponding target list selector from the list.

[0027] In this embodiment, preferably, the screening method is as follows: First, determine the main body area of ​​the webpage, then obtain all elements within the body; Calculate the area of ​​each element; if it is less than a first set percentage of the main body area, filter it; otherwise, keep the element. Filter the child elements of each element, excluding child elements whose tag type is script, img, meta, or style; exclude child elements with empty text content; Determine the number of child elements in each element. If the number is less than or equal to a predefined number, exclude the element; otherwise, keep it. If the number of frequently occurring class names or combinations of class names among the child elements of an element is greater than half the total number of child elements of that element, then that element is retained; otherwise, that element is excluded. The remaining elements are given a base score; the base score is equal to the area of ​​the element multiplied by the square of the number of its child elements; if the number of a certain type of tag of the element's child elements accounts for more than or equal to the total number of tags of the element's child elements, then the final score of the element is the base score * 1.5; otherwise, the final score of the element is equal to the base score. Remove duplicates from the remaining elements; then sort the remaining elements according to their final scores and set corresponding indices; finally, select the second-highest number of elements with the highest scores as a list.

[0028] In this embodiment, preferably, step 3 specifically involves: using the Page.captureScreenshot interface of the CDP protocol to capture the current webpage and obtain screenshot characters encoded in base64 format.

[0029] Based on the same inventive concept, this application also provides an apparatus corresponding to the method in Embodiment 1, as detailed in Embodiment 2. Example

[0030] like Figure 2 As shown, this embodiment provides a device for identifying a limited list of web pages based on LLM, including: Open the webpage module, launch your browser, and navigate to the webpage containing the target list; The extract list module injects a customized web page data extraction script into the web page via the CDP protocol. The web page data extraction script is used to filter out a set number of lists in the web page, highlight the lists, and display the corresponding indexes. The lists include indexes and selectors. The screenshot module captures the entire current webpage and retrieves the screenshot characters. The LLM recognition module takes a set number of characters, a screenshot, and a set prompt word as input into the user-specified LLM and retrieves the corresponding target list selector from the list.

[0031] In this embodiment, preferably, the screening method is as follows: First, determine the main body area of ​​the webpage, then obtain all elements within the body; Calculate the area of ​​each element; if it is less than a first set percentage of the main body area, filter it; otherwise, keep the element. Filter the child elements of each element, excluding child elements whose tag type is script, img, meta, or style; exclude child elements with empty text content; Determine the number of child elements in each element. If the number is less than or equal to a predefined number, exclude the element; otherwise, keep it. If the number of frequently occurring class names or combinations of class names among the child elements of an element is greater than half the total number of child elements of that element, then that element is retained; otherwise, that element is excluded. The remaining elements are given a base score; the base score is equal to the area of ​​the element multiplied by the square of the number of its child elements; if the number of a certain type of tag of the element's child elements accounts for more than or equal to the total number of tags of the element's child elements, then the final score of the element is the base score * 1.5; otherwise, the final score of the element is equal to the base score. Remove duplicates from the remaining elements; then sort the remaining elements according to their final scores and set corresponding indices; finally, select the second-highest number of elements with the highest scores as a list.

[0032] In this embodiment, preferably, the screenshot module specifically uses the Page.captureScreenshot interface of the CDP protocol to capture the current webpage and obtain screenshot characters encoded in base64 format.

[0033] Since the apparatus described in Embodiment 2 of the present invention is an apparatus used to implement the method of Embodiment 1 of the present invention, those skilled in the art can understand the specific structure and variations of the apparatus based on the method described in Embodiment 1 of the present invention, and therefore will not be described again here. All apparatuses used in the method of Embodiment 1 of the present invention fall within the scope of protection of the present invention.

[0034] Based on the same inventive concept, this application provides an electronic device embodiment corresponding to Embodiment 1, as detailed in Embodiment 3. Example

[0035] This embodiment provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it can implement any of the implementation methods in Embodiment 1.

[0036] Since the electronic device described in this embodiment is the device used to implement the method in Embodiment 1 of this application, those skilled in the art can understand the specific implementation method and various variations of the electronic device in this embodiment based on the method described in Embodiment 1 of this application. Therefore, how the electronic device implements the method in the embodiment of this application will not be described in detail here. Any device used by those skilled in the art to implement the method in the embodiment of this application falls within the scope of protection of this application.

[0037] Based on the same inventive concept, this application provides a storage medium corresponding to Embodiment 1, as detailed in Embodiment 4. Example

[0038] This embodiment provides a computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it can implement any of the implementation methods in Embodiment 1.

[0039] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0040] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0041] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0042] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0043] While specific embodiments of the present invention have been described above, those skilled in the art should understand that the specific embodiments described are merely illustrative and not intended to limit the scope of the present invention. Equivalent modifications and variations made by those skilled in the art in accordance with the spirit of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A method for identifying a limited list of web pages based on LLM, characterized in that: Includes the following steps: Step 1: Launch your browser and navigate to the webpage containing the target list; Step 2: Inject a customized webpage data extraction script into the webpage via the CDP protocol. The webpage data extraction script is used to filter out a set number of lists in the webpage, highlight the list, and display the corresponding index. The list includes an index and a selector. Step 3: Capture the entire current webpage and obtain the screenshot characters; Step 4: Input the set number of lists, screenshot characters, and set prompt words into the user-specified LLM, and obtain the corresponding target list selector from the list.

2. The method for identifying a limited list of web pages based on LLM according to claim 1, characterized in that: The filtering method is as follows: First, determine the main body area of ​​the webpage, then obtain all elements within the body; Calculate the area of ​​each element; if it is less than a first set percentage of the main body area, filter it; otherwise, keep the element. Filter the child elements of each element, excluding child elements whose tag type is script, img, meta, or style; exclude child elements with empty text content; Determine the number of child elements in each element. If the number is less than or equal to a predefined number, exclude the element; otherwise, keep it. If the number of frequently occurring class names or combinations of class names among the child elements of an element is greater than half the total number of child elements of that element, then that element is retained; otherwise, that element is excluded. The remaining elements are given a base score; the base score is equal to the area of ​​the element multiplied by the square of the number of its child elements; if the number of a certain type of tag of the element's child elements accounts for more than or equal to the total number of tags of the element's child elements, then the final score of the element is the base score * 1.5; otherwise, the final score of the element is equal to the base score. Remove duplicates from the remaining elements; then sort the remaining elements according to their final scores and set corresponding indices; finally, select the second-highest number of elements with the highest scores as a list.

3. The method for identifying a limited list of web pages based on LLM according to claim 1, characterized in that: Step 3 specifically involves using the Page.captureScreenshot interface of the CDP protocol to capture the current webpage and obtain screenshot characters encoded in base64 format.

4. A device for identifying a limited list of web pages based on LLM, characterized in that: include: Open the webpage module, launch your browser, and navigate to the webpage containing the target list; The extract list module injects a customized web page data extraction script into the web page via the CDP protocol. The web page data extraction script is used to filter out a set number of lists in the web page, highlight the lists, and display the corresponding indexes. The lists include indexes and selectors. The screenshot module captures the entire current webpage and retrieves the screenshot characters. The LLM recognition module takes a set number of characters, a screenshot, and a set prompt word as input into the user-specified LLM and retrieves the corresponding target list selector from the list.

5. The LLM-based limited webpage list recognition device according to claim 4, characterized in that: The filtering method is as follows: First, determine the main body area of ​​the webpage, then obtain all elements within the body; Calculate the area of ​​each element; if it is less than a first set percentage of the main body area, filter it; otherwise, keep the element. Filter the child elements of each element, excluding child elements whose tag type is script, img, meta, or style; exclude child elements with empty text content; Determine the number of child elements in each element. If the number is less than or equal to a predefined number, exclude the element; otherwise, keep it. If the number of frequently occurring class names or combinations of class names among the child elements of an element is greater than half the total number of child elements of that element, then that element is retained; otherwise, that element is excluded. The remaining elements are given a base score; the base score is equal to the area of ​​the element multiplied by the square of the number of its child elements; if the number of a certain type of tag of the element's child elements accounts for more than or equal to the total number of tags of the element's child elements, then the final score of the element is the base score * 1.5; otherwise, the final score of the element is equal to the base score. Remove duplicates from the remaining elements; then sort the remaining elements according to their final scores and set corresponding indices; finally, select the second-highest number of elements with the highest scores as a list.

6. The LLM-based limited webpage list recognition device according to claim 4, characterized in that: The screenshot module specifically uses the Page.captureScreenshot interface of the CDP protocol to capture the current webpage and obtain screenshot characters encoded in base64 format.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 3.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 3.