CN116150517A - Page processing method and device, electronic equipment and medium - Google Patents
Page processing method and device, electronic equipment and medium Download PDFInfo
- Publication number
- CN116150517A CN116150517A CN202211571495.4A CN202211571495A CN116150517A CN 116150517 A CN116150517 A CN 116150517A CN 202211571495 A CN202211571495 A CN 202211571495A CN 116150517 A CN116150517 A CN 116150517A
- Authority
- CN
- China
- Prior art keywords
- page
- node
- folding
- target
- address information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/957—Browsing optimisation, e.g. caching or content distillation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/958—Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Data Mining & Analysis (AREA)
- Human Computer Interaction (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The disclosure provides a page processing method and device, electronic equipment and media, relates to the technical field of Internet, and particularly relates to the technical field of intelligent search. The implementation scheme is as follows: acquiring first address information of a target page accessed by a user and a rule set for identifying folding nodes in the target page, wherein the folding nodes correspond to invisible folding content in the target page and are configured to expand the folding content in response to a target event, and the rule set comprises a plurality of second address information and a plurality of folding node identifications respectively corresponding to the plurality of second address information; determining the folding node in the target page based on a folding node identifier corresponding to the target address information in response to the first address information being matched with the target address information in the plurality of second address information; and triggering the target event of the folding node to unfold the folded content.
Description
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to the field of intelligent search technologies, and in particular, to a page processing method and apparatus, an electronic device, a computer readable storage medium, and a computer program product.
Background
The user obtains information he or she needs by browsing pages (i.e., web pages) in the internet. The quality of pages in the internet varies. The quality of the page affects the efficiency with which the user can obtain information.
The approaches described in this section are not necessarily approaches that have been previously conceived or pursued. Unless otherwise indicated, it should not be assumed that any of the approaches described in this section qualify as prior art merely by virtue of their inclusion in this section. Similarly, the problems mentioned in this section should not be considered as having been recognized in any prior art unless otherwise indicated.
Disclosure of Invention
The present disclosure provides a page processing method and apparatus, an electronic device, a computer-readable storage medium, and a computer program product.
According to an aspect of the present disclosure, there is provided a page processing method, including: acquiring first address information of a target page accessed by a user and a rule set for identifying folding nodes in the target page, wherein the folding nodes correspond to invisible folding content in the target page and are configured to expand the folding content in response to a target event, and the rule set comprises a plurality of second address information and a plurality of folding node identifications respectively corresponding to the plurality of second address information; determining the folding node in the target page based on a folding node identifier corresponding to the target address information in response to the first address information being matched with the target address information in the plurality of second address information; and triggering the target event of the folding node to unfold the folded content.
According to an aspect of the present disclosure, there is provided a page processing method, including: acquiring address information of a sample page and identification of candidate folding nodes in the sample page; loading the sample page; triggering a target event of the candidate folding node in response to the sample page including the candidate folding node; judging whether the candidate folding node is used for unfolding folding content in the sample page or not based on the response condition of the sample page to the target event; and generating rules for identifying the collapsed nodes in the page based on the address information of the sample page and the identification of the candidate collapsed nodes in response to the candidate collapsed nodes being used to expand the collapsed content.
According to an aspect of the present disclosure, there is provided a page processing apparatus including: a page processing apparatus comprising: a first acquisition module configured to acquire first address information of a target page accessed by a user and a rule set for identifying a folding node in the target page, wherein the folding node corresponds to invisible folding content in the target page and is configured to expand the folding content in response to a target event, and the rule set comprises a plurality of second address information and a plurality of folding node identifications respectively corresponding to the plurality of second address information; the first determining module is configured to determine the folding node in the target page based on a folding node identifier corresponding to the target address information in response to the first address information being matched with the target address information in the plurality of second address information; and an unfolding module configured to trigger the target event of the folding node to unfold the folded content.
According to an aspect of the present disclosure, there is provided a page processing apparatus including: the acquisition module is configured to acquire address information of a sample page and identification of candidate folding nodes in the sample page; a loading module configured to load the sample page; a triggering module configured to trigger a target event for the candidate folding node in response to the sample page including the candidate folding node; a judging module configured to judge whether the candidate folding node is used for unfolding folding content in the sample page based on a response condition of the sample page to the target event; and a generation module configured to generate a rule for identifying a collapsed node in a page based on address information of the sample page and an identification of the candidate collapsed node in response to the candidate collapsed node for expanding the collapsed content.
According to an aspect of the present disclosure, there is provided an electronic apparatus including: at least one processor; and a memory communicatively coupled to the at least one processor, the memory storing instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of the above aspects.
According to an aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the method of any one of the above aspects.
According to an aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the method of any of the above aspects.
According to one or more embodiments of the present disclosure, the efficiency of a user to obtain information can be improved.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The accompanying drawings illustrate exemplary embodiments and, together with the description, serve to explain exemplary implementations of the embodiments. The illustrated embodiments are for exemplary purposes only and do not limit the scope of the claims. Throughout the drawings, identical reference numerals designate similar, but not necessarily identical, elements.
FIG. 1 illustrates a schematic diagram of an exemplary system in which various methods described herein may be implemented, in accordance with an embodiment of the present disclosure;
FIG. 2 shows a flow chart of a page processing method according to an embodiment of the present disclosure;
FIG. 3 shows a schematic diagram of a folded content unfolding process according to an embodiment of the present disclosure;
FIG. 4 shows a schematic diagram of a search process according to an embodiment of the present disclosure;
FIG. 5 shows a schematic diagram of a candidate folded node detection process according to an embodiment of the disclosure;
FIG. 6 shows a flow chart of a page processing method according to an embodiment of the present disclosure;
FIG. 7 shows a block diagram of a page processing apparatus according to an embodiment of the present disclosure;
FIG. 8 shows a block diagram of a page processing apparatus according to further embodiments of the present disclosure; and
fig. 9 illustrates a block diagram of an exemplary electronic device that can be used to implement embodiments of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
In the present disclosure, the use of the terms "first," "second," and the like to describe various elements is not intended to limit the positional relationship, timing relationship, or importance relationship of the elements, unless otherwise indicated, and such terms are merely used to distinguish one element from another. In some examples, a first element and a second element may refer to the same instance of the element, and in some cases, they may also refer to different instances based on the description of the context.
The terminology used in the description of the various illustrated examples in this disclosure is for the purpose of describing particular examples only and is not intended to be limiting. Unless the context clearly indicates otherwise, the elements may be one or more if the number of the elements is not specifically limited. Furthermore, the term "and/or" as used in this disclosure encompasses any and all possible combinations of the listed items.
In the technical scheme of the disclosure, the acquisition, storage, application and the like of the related user personal information all conform to the regulations of related laws and regulations, and the public sequence is not violated.
The quality of pages in the internet varies. In the related art, many pages fold text content (hereinafter, the folded text content is referred to as "folded content"). When a user browses a page containing folded content, the user needs to manually click buttons such as 'full text expansion', 'residual content viewing', and the like in the page to expand the folded content. Under the above situation, the user needs to execute additional clicking operation to acquire complete information in the page, so that the operation complexity of acquiring information by the user is improved, the information acquisition efficiency of the user is reduced, and the browsing experience of the user is affected.
In view of the above problems, the embodiments of the present disclosure provide a page processing method, which can automatically expand folded content in a page, so as to improve efficiency of obtaining information and browsing experience of a user.
Embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
Fig. 1 illustrates a schematic diagram of an exemplary system 100 in which various methods and apparatus described herein may be implemented, in accordance with an embodiment of the present disclosure. Referring to fig. 1, the system 100 includes one or more client devices 101, 102, 103, 104, 105, and 106, a server 120, and one or more communication networks 110 coupling the one or more client devices to the server 120. Client devices 101, 102, 103, 104, 105, and 106 may be configured to execute one or more applications, for example, to perform page processing method 200 of embodiments of the present disclosure.
In an embodiment of the present disclosure, server 120 may run one or more services or software applications that enable execution of page processing method 600 of an embodiment of the present disclosure.
In some embodiments, server 120 may also provide other services or software applications that may include non-virtual environments and virtual environments. In some embodiments, these services may be provided as web-based services or cloud services, for example, provided to users of client devices 101, 102, 103, 104, 105, and/or 106 under a software as a service (SaaS) model.
In the configuration shown in fig. 1, server 120 may include one or more components that implement the functions performed by server 120. These components may include software components, hardware components, or a combination thereof that are executable by one or more processors. A user operating client devices 101, 102, 103, 104, 105, and/or 106 may in turn utilize one or more client applications to interact with server 120 to utilize the services provided by these components. It should be appreciated that a variety of different system configurations are possible, which may differ from system 100. Accordingly, FIG. 1 is one example of a system for implementing the various methods described herein and is not intended to be limiting.
The user may navigate using client devices 101, 102, 103, 104, 105, and/or 106. The client device may provide an interface that enables a user of the client device to interact with the client device. The client device may also output information to the user via the interface. Although fig. 1 depicts only six client devices, those skilled in the art will appreciate that the present disclosure may support any number of client devices.
The server 120 may include one or more general purpose computers, special purpose server computers (e.g., PC (personal computer) servers, UNIX servers, mid-end servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and/or combination. The server 120 may include one or more virtual machines running a virtual operating system, or other computing architecture that involves virtualization (e.g., one or more flexible pools of logical storage devices that may be virtualized to maintain virtual storage devices of the server). In various embodiments, server 120 may run one or more services or software applications that provide the functionality described below.
The computing units in server 120 may run one or more operating systems including any of the operating systems described above as well as any commercially available server operating systems. Server 120 may also run any of a variety of additional server applications and/or middle tier applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, etc.
In some implementations, server 120 may include one or more applications to analyze and consolidate data feeds and/or event updates received from users of client devices 101, 102, 103, 104, 105, and 106. Server 120 may also include one or more applications to display data feeds and/or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105, and 106.
In some implementations, the server 120 may be a server of a distributed system or a server that incorporates a blockchain. The server 120 may also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology. The cloud server is a host product in a cloud computing service system, so as to solve the defects of large management difficulty and weak service expansibility in the traditional physical host and virtual private server (VPS, virtual Private Server) service.
The system 100 may also include one or more databases 130. In some embodiments, these databases may be used to store data and other information. For example, one or more of the databases 130 may be used to store information such as music files. Database 130 may reside in various locations. For example, the database used by the server 120 may be local to the server 120, or may be remote from the server 120 and may communicate with the server 120 via a network-based or dedicated connection. Database 130 may be of different types. In some embodiments, the database used by server 120 may be, for example, a relational database. One or more of these databases may store, update, and retrieve the databases and data from the databases in response to the commands.
In some embodiments, one or more of databases 130 may also be used by applications to store application data. The databases used by the application may be different types of databases, such as key value stores, object stores, or conventional stores supported by the file system.
The system 100 of fig. 1 may be configured and operated in various ways to enable application of the various methods and apparatus described in accordance with the present disclosure.
For purposes of embodiments of the present disclosure, in the example of FIG. 1, client devices 101, 102, 103, 104, 105, and 106 may include a client application for browsing web pages, which may be, for example, a browser, or an application containing WebView web page view controls, or the like. The client application may be implemented as any form of application program. For example, the client application may be a stand-alone application program that needs to be downloaded and installed before it is run, or may be a lightweight applet that runs in a host application.
The server 120 may be a server corresponding to a client application for web browsing in the client device, accordingly. The server 120 may include a service program that provides web browsing services to users based on web resources (including HTML files, images, audio, video, etc.) stored in the database 130. For example, a user may initiate a search request in a client application to search for a web page containing particular information (typically, the user may enter a search term in the client application to search for a web page containing the search term). Accordingly, the server 120 performs a web search in response to the search request, obtains web pages containing specific information that the user desires to search, and returns the web pages to the client application for presentation to the user.
The client devices 101, 102, 103, 104, 105 and 106 can execute the page processing method of the embodiment of the disclosure to automatically identify and expand the folded content in the page, thereby improving the information acquisition efficiency of the user and optimizing the browsing experience of the user.
Fig. 2 shows a flow chart of a page processing method 200 according to an embodiment of the disclosure. As described above, the method 200 is generally performed at a client device (e.g., the client devices 101-106 shown in FIG. 2). That is, the subject of execution of the various steps of method 200 may be client devices 101-106 shown in FIG. 2. As shown in fig. 2, the method 200 includes steps S210-S230.
In step S210, first address information of a target page accessed by a user and a rule set for identifying a folded node in the target page are acquired. The collapsed node corresponds to invisible collapsed content in the target page and is configured to expand the collapsed content in response to the target event. The rule set comprises a plurality of second address information and a plurality of folding node identifiers respectively corresponding to the plurality of second address information.
In step S220, in response to the first address information matching the target address information in the plurality of second address information, a folding node in the target page is determined based on the folding node identification corresponding to the target address information.
In step S230, a target event of the folding node is triggered to unfold the folded content.
According to the embodiment of the disclosure, when a user accesses a certain page (i.e., a target page), the folding nodes in the page can be automatically identified based on the preset rule set and the target event of the folding nodes is triggered, so that the folding content can be automatically unfolded, the user can browse the page without barriers, the information acquisition efficiency of the user is improved, and the browsing experience of the user is optimized.
The various steps of method 200 are described in detail below.
In step S210, first address information of a target page accessed by a user and a rule set for identifying a folded node in the target page are acquired.
In embodiments of the present disclosure, a target page refers to a page that a user is currently accessing. According to some embodiments, the target page may be a page returned by the search engine to search based on the search term specified by the user. According to other embodiments, the target page may also be a page to which the user jumps by entering an address in the address bar of the browser.
The first address information of the target page may be, for example, a URL (uniform resource locator ) of the target page.
The target page may contain folded content, i.e. contain folded text content. The folded content is in a hidden state and is not visible to the user.
In the case that the target page contains folded content, a folding node for unfolding the folded content is also included in the target page. The collapsed node is an element node in the DOM (Document Object Model ) tree of the target page, and the HTML (Hyper Text Markup Language ) tag corresponding to the element node may be, for example, < button >, < div >, < a >, etc.
The folding node is bound with the target event. The target event is typically a Click event (Click) or a Touch event (Touch). When a target event of a folding node is triggered, the folding content is unfolded. For example, this node may be a button labeled with text such as "expand full text", "expand folded content", "click view full text", "view remaining content", etc., to which a click event is bound. When a click event on the button is triggered, the folded content is unfolded, i.e., the folded content changes from a hidden state to a display state, and accordingly, the user can browse the folded content.
In the case where the target page contains a folder node and folder content, according to an embodiment of the present disclosure, the folder node can be automatically identified and the folder content can be expanded.
In an embodiment of the present disclosure, the rule set is preset, which includes a plurality of rules for identifying folding nodes in the page. Each rule comprises second address information and a folding node identifier corresponding to the second address information, wherein the node with the folding node identifier is a folding node for unfolding folding content in the page corresponding to the second address information.
The second address information may be, for example, a domain name of the site, or may be a URL address including a wild card. It is understood that one second address information may correspond to a plurality of web pages.
The collapsed node identification may be, for example, a node name (id) or class name (class) of the collapsed node.
By matching the first address information of the target page with the plurality of second address information, a rule applicable to the target page can be determined from the rule set, and further, the folding node in the target page can be identified based on the folding node identification in the rule.
In step S220, in response to the first address information matching with the target address information in the plurality of second address information, the rule corresponding to the target address information is taken as the rule applicable to the target node. And determining a folding node in the target page based on the folding node identification corresponding to the target address information, namely determining the node identified as the folding node identification in the target page as the folding node.
In step S230, a target event of the folding node is triggered to unfold the folded content.
The target event is typically a click or touch event. According to some embodiments, the folded content may be automatically unfolded by invoking the dispatchEvent method of the folding node to trigger a target event.
According to some embodiments, the rule set further includes a plurality of sets of folded content style information corresponding to the plurality of folded node identifiers, respectively. That is, each rule in the rule set includes second address information, a folder node identification corresponding to the second address information, and folder content style information corresponding to the folder node identification. The folded content style information may be CSS (Cascading Style Sheets, cascading style sheet) information, for example.
According to some embodiments, in step S220, a folder node in the target page may be determined based on the folder node identification and the folder content style information corresponding to the target address information, and a target style of the folder content may be determined. Based on the determined target style, in step S230, the folded content may be unfolded and displayed in the target style, whereby the folded content may be unfolded into the target style, ensuring that the unfolded folded content has a good visual effect.
Fig. 3 shows a schematic diagram of a folded content unfolding process according to an embodiment of the present disclosure.
As shown in fig. 3, in step S302, the user accesses the target page 352. The URL of the target page 352 is www.siteA.com.
In step S304, the JS script 354 for expanding the folded content (i.e., the JS script for executing the method 200 of the embodiment of the present disclosure) is injected into the WebView of the target page. The JS script includes a rule set for identifying a folding node in a page.
In step S306, the JS script is executed to obtain the first address information www.siteA.com of the target page 352, and the first address information is matched with the value of the "host/url pattern" field (i.e., the second address information) in the rule set 356 to determine the folding node identification rule 358 to which the target page 352 is applied. The collapsed node identification "show_more" is obtained from the "id/class" field of rule 358.
In step S308, a node 360 with id "show_more" is found from the DOM tree of the target page 352, and the node 360 is the folding node in the target page 352. The display text 362 of the collapsed node 360 in the target page 352 is an "expand full text button".
In step S310, a click (click) event of the folder node 360 may be triggered by a dispatchEvent or the like, thereby automatically expanding the folded content.
According to some embodiments, the method 200 further comprises: and in response to unfolding the folding content, marking a folding label for the target page, and uploading the first address information of the target page and the folding label to a server. The folder tab indicates that the target page contains folded content. Since folded content is not beneficial to the user in obtaining information, the page marked with the folded tab is a low quality page for the user. According to the embodiment, the first address information of the target page and the folding label are uploaded to the server, so that the server can identify the low-quality page containing the folding content, and the low-quality page containing the folding content is prevented from being returned to the user by intervening in the subsequent page search result of the user.
According to some embodiments, the method 200 further comprises: sending a page search request; and receiving a search result corresponding to the page search request returned by the server. The search results include a first page and a second page. The first page and the second page have the same text content, the first page is marked with a fold tag, the second page is not marked with a fold tag, and the order of the first page in the search result is located after the second page. According to the embodiment, the page search request for the user can preferentially return the page which does not contain the folded content to the user, so that the information acquisition efficiency and browsing experience of the user are improved.
Fig. 4 shows a schematic diagram of a search process according to an embodiment of the present disclosure.
As shown in fig. 4, in step S402, the client device 452 marks the page www.site1.com/page with a fold label to indicate that the page has text folding problems, and reports its address and fold label to the server 454.
In step S404, the server 454 performs a page search in response to the page search request sent from the client device 452. The page search request includes the search term "what the birth date of the virginator is," and accordingly, the server 454 performs a page search based on the search term, resulting in initial search results 456.
As shown in FIG. 4, initial search results 456 include page 458 with a URL www.site1.com/page and page 462 with a URL www.site2.com/page, with pages 458 and 462 in the order of 1 and 18, respectively, in initial search results 456.
As described above, in step S402, the client device 452 has reported the text folding problem of the page 458 to the server 454, i.e., the page 458 is a folded page. Page 462 is not reported of a text folding problem, i.e., page 462 is an unfolded page.
By triggering a click event of the folding node 460 in the page 458, the folded content in the page 458 is unfolded, resulting in an unfolded page 458'. As shown in fig. 4, the expanded page 458' is identical to the page 462, i.e., the page 458 has the same text content as the page 462. However, since page 458 is a collapsed page, it is not beneficial for the user to obtain information, and thus page 458 is a low quality page, requiring a reduced order in the search results.
For example, in step S406, the positions of the collapsed pages 458 and the non-collapsed pages 462 in the initial search results 456 may be interchanged to obtain search results 464. Compared with the initial search result 456, the search result 464 has the advantages that the position of the non-folded page 462 is earlier, and the position of the folded page 458 is later, so that the user can access the non-folded page 462 preferentially, the user is prevented from accessing the low-quality folded page 458, and the information acquisition efficiency of the user is improved.
According to some embodiments, in step S408, the server 454 may cluster the folded pages reported by the client device 452 by sites and send the folded pages of each site to the corresponding site length (i.e., administrator) so that the site length modifies the folded pages to optimize the page quality.
It should be noted that the rules in the rule set are limited. In some cases, it may be that the target page does contain a collapsed node and collapsed content, but the rule set does not include rules that match the first address information. Thus, based on the rule set, the folded node in the target page cannot be identified, and thus the folded content cannot be automatically unfolded by operating the folded node.
According to some embodiments, the method 200 further comprises the following steps S240 and S250.
In step S240, in response to the first address information of the target page not matching with the plurality of second address information in the rule set, a first node in the target page is obtained, and a label of the first node belongs to a preset label set.
In step S250, in response to the static feature information of the first node satisfying the preset condition, the first node is determined as a candidate folding node, and the identification of the first node and the first address information are uploaded to the server.
According to the above embodiment, the client device may automatically detect the node in the target page that may be a folding node, i.e., the candidate folding node. The server may further verify the candidate collapsed node according to page processing method 600 of the following embodiments to determine if it is a collapsed node for expanding collapsed content. If so, the server may generate a new rule for identifying the collapsed node based on the identification of the candidate collapsed node and the first address information of the target page.
The preset tag set may be, for example, a tag set composed of HTML tags of < button >, < div >, < a >, etc. The tag set is obtained by performing statistical analysis on a large number of existing folding nodes. For example, the label of each existing folding node can be obtained, the occurrence frequency of each label in the existing folding node is counted, and one or more labels with highest occurrence frequency are added into the label set. Based on a preset label set, a first node which is possibly a folding node in the target page can be screened out.
The static feature information of the first node refers to information which can be determined by only reading codes related to the first node without performing interactive operation on the target page. According to some embodiments, the static feature information of the first node includes event information to which the first node is bound, attribute information (e.g., coordinates, color, etc.) of the first node, and text information displayed by the first node.
And responding to the static characteristic information of the first node meeting a preset condition, determining the first node as a candidate folding node, and reporting the candidate folding node to a server. According to some embodiments, the preset conditions may include at least one of the following three:
1. the first node or a parent node of the first node is bound with a target event (e.g., a click event).
2. The abscissa of the first node is located within the abscissa of the browser viewable area. That is, the first node can enter the viewable area of the browser through a user's up-and-down sliding operation (rather than a left-and-right sliding operation), as seen by the user.
3. The text of the first node includes prompt information for guiding the user to trigger a target event (e.g., a click event). The prompt information may be, for example, "click to view the full text", "expand the full text", etc.
By combining the above three conditions, a node (i.e., a candidate collapsed node) that is likely to be a collapsed node in the target page can be automatically detected. It will be appreciated that the more conditions are employed, the more accurate the detection result, the more likely the detected candidate folding node is a true folding node.
Fig. 5 shows a schematic diagram of a candidate folded node detection process 500 according to an embodiment of the disclosure. As shown in fig. 5, process 500 includes steps S502-S520.
In step S502, the user accesses the target page through the client device.
In step S504, the JS script for detecting candidate folding nodes is injected into the WebView of the target page.
In step S506, nodes with high probability of being collapsed nodes in the target page, such as nodes labeled < button >, < div >, < a >, etc., are acquired to form a node set. Each node in the set of nodes is the first node in the above embodiments.
In steps S508-S518, nodes in the node set are traversed, and whether each node in the node set is a candidate folding node is determined.
In step S508, it is determined whether the node set has been traversed. If not, step S510 is performed to obtain the next node from the node set.
In step S512, it is determined whether the current node or its parent node is bound to an event, for example, a click event. If yes, go to step S514.
In step S514, it is determined whether the current node is within the visible area of the browser. Specifically, it is determined whether the abscissa of the current node is within the abscissa range of the visual area of the browser. If so, it means that the user can make the current node displayed in the browser through the up-down sliding operation, and continue to execute the judgment of step S516.
In step S516, it is determined whether the text of the current node contains specified information, such as "click view full text", "expand full text", or the like. If yes, the current node is taken as a candidate folding node, and step S518 is executed.
In step S518, the identity of the current node (i.e., the candidate collapsed node) and the address information of the target page are stored in association, forming a candidate rule for identifying the collapsed node in the page, and adding the candidate rule to the local rule set.
If any one of the judging results in the steps S512-S516 is negative, step S508 is executed to judge whether the node set is traversed. If yes, step S520 is executed, where the local rule set is reported to the server, that is, the locally detected identifiers of the candidate folding nodes and the address information of the target page are uploaded to the server.
After receiving the candidate rule (including the address information of the target page and the identification of the candidate folding node) uploaded by the client device, the server may check the candidate rule to verify whether the candidate folding node is really a folding node for expanding the folded content. If so, the server may generate a new rule for identifying the collapsed node based on the identification of the candidate collapsed node and the address information of the target page. Whereby dynamic updating of the rule set used in method 200 may be implemented.
Fig. 6 shows a flow chart of a page processing method 600 according to an embodiment of the disclosure. The subject of execution of method 600 is a server (e.g., server 120 in FIG. 1) for verifying whether a candidate collapsed node in a sample page is a collapsed node for expanding a collapsed page in the sample page. The sample page may be, for example, a target page accessed by the user in the embodiment described above in connection with fig. 2, or any of a plurality of pages stored in the server.
As shown in fig. 6, the method 600 includes steps S610-S650.
In step S610, address information of a sample page and identification of candidate folding nodes in the sample page are acquired.
In step S620, a sample page is loaded.
In step S630, in response to the sample page including the candidate collapsed node, a target event of the candidate collapsed node is triggered.
In step S640, it is determined whether the candidate folding node is used to unfold the folding content in the sample page based on the response of the sample page to the target event.
In step S650, in response to the candidate collapsed node being used to expand the collapsed content, a rule for identifying the collapsed node in the page is generated based on the address information of the sample page and the identification of the candidate collapsed node.
According to an embodiment of the present disclosure, whether a candidate folder node is used to expand the folder content is determined by loading a sample page and triggering a target event of the candidate folder node therein. If yes, generating rules for identifying the folding nodes in the page based on the candidate folding nodes, so that automatic creation and maintenance of the rules are realized, and effectiveness of the rules is ensured.
According to the embodiment of the disclosure, the new rule generated based on the sample page and the candidate folding nodes therein can be added into the rule set used by the method 200 in the above embodiment, so that the dynamic update of the rule set is realized, the correctness and the validity of the rule set are ensured, the folding nodes in the page can be correctly identified and the folding content can be unfolded based on the rule set, and the efficiency of acquiring information by a user is improved.
The steps of method 600 are described in detail below.
In step S610, address information of a sample page and identification of candidate folding nodes in the sample page are acquired.
According to some embodiments, the candidate folding node may be detected by the client device when the user accesses the sample page. Specifically, when the user accesses the sample page (corresponding to the target page in the above embodiment), the client device may detect the candidate folding node in the sample page through steps S240 and S250 of the above embodiment, and upload the address information of the sample page and the identification of the candidate folding node to the server. Accordingly, in step S610, the server may acquire address information of the sample page uploaded by the client device and the identification of the candidate folding node in the sample page.
According to other embodiments, the candidate folding node may also be obtained by offline detection of any stored page by the server. The sample page may be any of a plurality of pages stored at the server.
It will be appreciated that there is typically a vast amount of page resources stored at the server. If all the stored pages are detected offline, a significant amount of time and computing resources are consumed. Moreover, in the stored massive pages, a large part of the pages may not be accessed by the user, and detection of the pages belongs to invalid calculation, so that time and calculation resources are wasted. Therefore, it is preferable that the candidate folding node is detected by the client device, whereby the calculation efficiency can be improved, and invalid calculation can be avoided.
According to some embodiments, the method 600 further comprises step S660 and step S670 for detecting candidate folded nodes in the sample page.
In step S660, a first node in the sample page is obtained, where a label of the first node belongs to a preset label set.
In step S670, the first node is determined as a candidate folded node in response to the static feature information of the first node satisfying a preset condition.
According to some embodiments, the static feature information includes event information, attribute information, and text information, and the preset condition includes at least one of: the first node or a parent node of the first node has a target event (e.g., click event) bound thereto; the abscissa of the first node is located in the abscissa range of the visual area of the browser; or the text of the first node includes prompt information for guiding the user to trigger the target event, such as "click to view full text", "expand full text", etc.
It should be noted that, the operation of step S660 is the same as the operation of "obtaining the first node in the target page in step S240, where the label of the first node belongs to the preset label set", and the operation of "determining the first node as the candidate folding node in response to the static feature information of the first node satisfying the preset condition" in step S670 is the same as the operation of "determining the first node as the candidate folding node" in step S250. Steps S660-S670 differ from steps S240-S250 in that the execution subject of steps S660-S670 is a server and the execution subject of steps S240-S250 is a client device.
Specific embodiments of steps S660-S670 may refer to corresponding descriptions of steps S240-S250, which are not repeated here.
The candidate folding node may have errors. For example, after detecting a candidate collapsed node in a sample page, the contents of the sample page may change, resulting in the sample page no longer including the candidate collapsed node. In addition, because the candidate collapsed node is recalled based on static feature information of the node, rather than based on a real click action of the node by the user, the recalled candidate collapsed node may not be used to expand the collapsed content, but rather trigger unexpected behavior such as popup, page skip, and the like. Through step S630 and step S640, it is possible to verify the correctness of the candidate folding node, that is, to verify whether there is a candidate folding node in the sample page, and further verify whether the candidate folding node is used to expand the folding content in the sample page in the case where there is a candidate folding node in the sample page.
According to some embodiments, step S640 may include: responding to the response condition of the sample page to the target event, wherein the response condition comprises the following three contents, and judging that the candidate folding node is used for unfolding folding contents in the sample page:
1. The candidate collapsed node is hidden or the text of the candidate collapsed node changes. For example, the text of the candidate collapsed node is changed from "expanded full text" to "collapsed content".
2. The address of the sample page is unchanged. That is, after clicking on the candidate folding node, no page jump occurs.
3. No popup appears on the sample page.
According to the three items of content, whether the candidate folding node is used for unfolding the folding content in the sample page can be accurately judged, so that the folding node in the sample page can be accurately identified.
According to some embodiments, the method 600 further comprises: and responding to the candidate folding nodes for unfolding the folding content, and acquiring style information of the folding content. Accordingly, step S650 may include: rules for identifying the collapsed nodes in the page are generated based on address information of the sample page, identification of candidate collapsed nodes, and style information of the collapsed content. The rule set can further store style information of the folded content, so that the visual effect of the client device after the folded content is unfolded is guaranteed.
According to some embodiments, the validity of each rule in the rule set may be verified according to steps S620-S640 at a preset frequency (e.g., once a day, once a week, etc.). Rules that are invalid or that cause unexpected behavior (e.g., popup, page jump) are deleted from the rule set.
According to some embodiments, the method 600 further comprises: and responding to the access frequency of the site to which the sample page belongs being lower than a threshold value, and judging that the rule corresponding to the sample page is invalid. The access frequency of a site may be represented by the Page View (PV) of the site in a unit time (e.g., one week, one month, etc.), and accordingly, the threshold may be set to, for example, 100, 200, etc. According to this embodiment, the rules of the low frequency visited sites can be filtered out from the rule set to reduce the size of the rule set that is ultimately validated, thereby reducing the search time and the time to periodically validate the rule set.
According to the embodiment of the disclosure, when the user accesses the page, the folded content in the page can be automatically unfolded, so that the information acquisition efficiency of the user is improved, and the browsing experience of the user is optimized.
According to an embodiment of the present disclosure, there is also provided a page processing apparatus applied to a client device. Fig. 7 shows a block diagram of a page processing apparatus 700 according to an embodiment of the present disclosure. As shown in fig. 7, the apparatus 700 includes a first acquisition module 710, a first determination module 720, and a deployment module 730.
The first obtaining module 710 is configured to obtain first address information of a target page accessed by a user and a rule set for identifying a folding node in the target page, wherein the folding node corresponds to invisible folding content in the target page and is configured to expand the folding content in response to a target event, and the rule set comprises a plurality of second address information and a plurality of folding node identifications respectively corresponding to the plurality of second address information.
The first determining module 720 is configured to determine, in response to the first address information and the target address information in the plurality of second address information being matched, the folding node in the target page based on a folding node identifier corresponding to the target address information.
The unfolding module 730 is configured to trigger the target event of the folding node to unfold the folded content.
According to the embodiment of the disclosure, when a user accesses a certain page (i.e., a target page), the folding nodes in the page can be automatically identified based on the preset rule set and the target event of the folding nodes is triggered, so that the folding content can be automatically unfolded, the user can browse the page without barriers, the information acquisition efficiency of the user is improved, and the browsing experience of the user is optimized.
According to some embodiments, the apparatus 700 further comprises: a tagging module configured to tag the target page with a folding tag in response to unfolding the folded content, wherein the folding tag indicates that the target page contains folded content; and an uploading module configured to upload the first address information and the folded tag to a server.
According to some embodiments, the apparatus 700 further comprises: a transmitting module configured to transmit a page search request; and a receiving module configured to receive a search result corresponding to the page search request, wherein the search result comprises a first page and a second page, the first page and the second page have the same text content, the first page is marked with a folding label, the second page is not marked with a folding label, and the order of the first page in the search result is behind the second page.
According to some embodiments, the apparatus 700 further comprises: the second acquisition module is configured to acquire a first node in the target page in response to the fact that the first address information is not matched with the plurality of second address information, wherein a label of the first node belongs to a preset label set; and the second determining module is configured to determine the first node as the folding node in response to the static characteristic information of the first node meeting a preset condition, and upload the identification of the first node and the first address information to a server.
It should be appreciated that the various modules or units of the apparatus 700 shown in fig. 7 may correspond to the various steps in the method 200 described with reference to fig. 2. Thus, the operations, features and advantages described above with respect to method 200 apply equally to apparatus 700 and the modules and units comprised thereof. For brevity, certain operations, features and advantages are not described in detail herein.
According to an embodiment of the present disclosure, there is also provided a page processing apparatus applied to a server. Fig. 8 shows a block diagram of a page processing apparatus 800 according to an embodiment of the present disclosure. As shown in fig. 8, the apparatus 800 includes an acquisition module 810, a loading module 820, a triggering module 830, a judging module 840, and a generating module 850.
The acquisition module 810 is configured to acquire address information of a sample page and an identification of candidate folding nodes in the sample page.
The load module 820 is configured to load the sample page.
The triggering module 830 is configured to trigger a target event for the candidate collapsed node in response to the sample page including the candidate collapsed node.
The determination module 840 is configured to determine whether the candidate folding node is to be used to unfold folded content in the sample page based on a response of the sample page to the target event.
The generation module 850 is configured to generate rules for identifying the collapsed nodes in the page based on the address information of the sample page and the identification of the candidate collapsed nodes in response to the candidate collapsed nodes for expanding the collapsed content.
According to an embodiment of the present disclosure, whether a candidate folder node is used to expand the folder content is determined by loading a sample page and triggering a target event of the candidate folder node therein. If yes, generating rules for identifying the folding nodes in the page based on the candidate folding nodes, so that automatic creation and maintenance of the rules are realized, and effectiveness of the rules is ensured.
According to the embodiment of the disclosure, the new rule generated based on the sample page and the candidate folding nodes therein can be added into the rule set used by the device 700 in the above embodiment, so that the dynamic update of the rule set is realized, the correctness and the validity of the rule set are ensured, the folding nodes in the page can be correctly identified and the folding content can be unfolded based on the rule set, and the information acquisition efficiency of the user is improved.
It should be appreciated that the various modules or units of the apparatus 800 shown in fig. 8 may correspond to the various steps in the method 600 described with reference to fig. 6. Thus, the operations, features and advantages described above with respect to method 600 apply equally to apparatus 800 and the modules and units it comprises. For brevity, certain operations, features and advantages are not described in detail herein.
It should be appreciated that various techniques may be described herein in the general context of software hardware elements or program modules. The various modules described above with respect to fig. 7, 8 may be implemented in hardware or in hardware in combination with software and/or firmware. For example, the modules may be implemented as computer program code/instructions configured to be executed in one or more processors and stored in a non-transitory computer-readable storage medium. Alternatively, these modules may be implemented as hardware logic/circuitry. For example, in some embodiments, one or more of the modules 710-850 may be implemented together in a System on Chip (SoC). The SoC may include an integrated circuit chip including one or more components of a processor (e.g., a central processing unit (Central Processing Unit, CPU), microcontroller, microprocessor, digital signal processor (Digital Signal Processor, DSP), etc.), memory, one or more communication interfaces, and/or other circuitry, and may optionally execute received program code and/or include embedded firmware to perform functions.
There is also provided, in accordance with an embodiment of the present disclosure, an electronic device including: at least one processor; and a memory communicatively coupled to the at least one processor, the memory storing instructions executable by the at least one processor to enable the at least one processor to perform the page processing method 200 and/or the page processing method 600 of embodiments of the present disclosure.
According to an embodiment of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the page processing method 200 and/or the page processing method 600 of the embodiments of the present disclosure is provided.
According to an embodiment of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the page processing method 200 and/or the page processing method 600 of embodiments of the present disclosure.
Referring to fig. 9, a block diagram of an electronic device 900 that may be a server or a client of the present disclosure, which is an example of a hardware device that may be applied to aspects of the present disclosure, will now be described. Electronic devices are intended to represent various forms of digital electronic computer devices, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. The electronic device may also represent various forms of mobile apparatuses, such as personal digital assistants, cellular telephones, smartphones, wearable devices, and other similar computing apparatuses. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 9, the electronic device 900 includes a computing unit 901 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 902 or a computer program loaded from a storage unit 908 into a Random Access Memory (RAM) 903. In the RAM903, various programs and data required for the operation of the device 900 can also be stored. The computing unit 901, the ROM902, and the RAM903 are connected to each other by a bus 904. An input/output (I/O) interface 905 is also connected to the bus 904.
A number of components in the electronic device 900 are connected to the I/O interface 905, including: an input unit 906, an output unit 907, a storage unit 908, and a communication unit 909. Input unit 906 may be any type of device capable of inputting information to device 900The input unit 906 may receive input numeric or character information and generate key signal inputs related to user settings and/or function controls of the electronic device, and may include, but is not limited to, a mouse, a keyboard, a touch screen, a trackpad, a trackball, a joystick, a microphone, and/or a remote control. The output unit 907 may be any type of device capable of presenting information and may include, but is not limited to, a display, speakers, video/audio output terminals, vibrators, and/or printers. Storage unit 908 may include, but is not limited to, magnetic disks, optical disks. Communication unit 909 allows device 900 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers, and/or chipsets, such as bluetooth TM Devices, 802.11 devices, wi-Fi devices, wiMAX devices, cellular communication devices, and/or the like.
The computing unit 901 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 901 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 901 performs the various methods and processes described above, such as method 200 or method 600. For example, in some embodiments, the methods 200 and 600 may be implemented as computer software programs tangibly embodied on a machine-readable medium, such as the storage unit 908. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 900 via the ROM 902 and/or the communication unit 909. When the computer program is loaded into RAM 903 and executed by computing unit 901, one or more steps of method 200 and method 600 described above may be performed. Alternatively, in other embodiments, computing unit 901 may be configured to perform method 200 or method 600 by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), complex Programmable Logic Devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server incorporating a blockchain.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel, sequentially or in a different order, provided that the desired results of the disclosed aspects are achieved, and are not limited herein.
Although embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it is to be understood that the foregoing methods, systems, and apparatus are merely exemplary embodiments or examples, and that the scope of the present invention is not limited by these embodiments or examples but only by the claims following the grant and their equivalents. Various elements of the embodiments or examples may be omitted or replaced with equivalent elements thereof. Furthermore, the steps may be performed in a different order than described in the present disclosure. Further, various elements of the embodiments or examples may be combined in various ways. It is important that as technology evolves, many of the elements described herein may be replaced by equivalent elements that appear after the disclosure.
Claims (20)
1. A method of page processing, comprising:
acquiring first address information of a target page accessed by a user and a rule set for identifying folding nodes in the target page, wherein the folding nodes correspond to invisible folding content in the target page and are configured to expand the folding content in response to a target event, and the rule set comprises a plurality of second address information and a plurality of folding node identifications respectively corresponding to the plurality of second address information;
Determining the folding node in the target page based on a folding node identifier corresponding to the target address information in response to the first address information being matched with the target address information in the plurality of second address information; and
triggering the target event of the folding node to unfold the folded content.
2. The method of claim 1, wherein the rule set further comprises a plurality of sets of folded content style information corresponding to the plurality of fold node identifications, respectively;
the determining the folding node in the target page based on the folding node identifier corresponding to the target address information includes:
determining the folding node in the target page based on the folding node identification and folding content style information corresponding to the target address information, and determining a target style of the folding content;
the expanding the folded content includes:
and unfolding the folded content and displaying the folded content according to the target style.
3. The method of claim 1 or 2, further comprising:
marking a folding tag for the target page in response to unfolding the folded content, wherein the folding tag indicates that the target page contains folded content; and
And uploading the first address information and the folding label to a server.
4. A method according to claim 3, further comprising:
sending a page search request; and
and receiving a search result corresponding to the page search request, wherein the search result comprises a first page and a second page, the first page and the second page have the same text content, the first page is marked with a folding label, the second page is not marked with a folding label, and the sequence of the first page in the search result is positioned behind the second page.
5. The method of any of claims 1-4, further comprising:
responding to the fact that the first address information is not matched with the plurality of second address information, and acquiring a first node in the target page, wherein a label of the first node belongs to a preset label set;
and responding to the static characteristic information of the first node to meet a preset condition, determining the first node as a candidate folding node, and uploading the identification of the first node and the first address information to a server.
6. The method of claim 5, wherein the static feature information includes event information, attribute information, and text information, and the preset condition includes at least one of:
The target event is bound to the first node or a parent node of the first node;
the abscissa of the first node is located in the abscissa range of the visual area of the browser; or alternatively
The text of the first node includes prompt information for guiding a user to trigger the target event.
7. A method of page processing, comprising:
acquiring address information of a sample page and identification of candidate folding nodes in the sample page;
loading the sample page;
triggering a target event of the candidate folding node in response to the sample page including the candidate folding node;
judging whether the candidate folding node is used for unfolding folding content in the sample page or not based on the response condition of the sample page to the target event; and
and generating rules for identifying the folding nodes in the page based on the address information of the sample page and the identification of the candidate folding nodes in response to the candidate folding nodes being used for unfolding the folding content.
8. The method of claim 7, wherein the determining whether the candidate folding node is to be used to unfold folding content in the sample page based on a response of the sample page to the target event comprises:
Determining that the candidate folding node is used to unfold folded content in the sample page in response to the response condition comprising:
the candidate folding node is hidden or the text of the candidate folding node is changed;
the address of the sample page is unchanged; and
and no popup window appears on the sample page.
9. The method of claim 7 or 8, further comprising:
responding to the candidate folding nodes for unfolding the folding content, and acquiring style information of the folding content;
the generating a rule for identifying a folding node in a page based on the address information of the sample page and the identification of the candidate folding node includes:
rules for identifying the collapsed nodes in the page are generated based on the address information of the sample page, the identification of the candidate collapsed nodes, and the style information of the collapsed content.
10. The method of any of claims 7-9, further comprising:
and responding to the access frequency of the sites to which the sample page belongs is lower than a threshold value, and judging that the rule is invalid.
11. The method of any of claims 7-10, further comprising:
acquiring a first node in the sample page, wherein a label of the first node belongs to a preset label set;
And determining the first node as the candidate folding node in response to the static characteristic information of the first node meeting a preset condition.
12. The method of claim 11, wherein the static feature information includes event information, attribute information, and text information, and the preset condition includes at least one of:
the target event is bound to the first node or a parent node of the first node;
the abscissa of the first node is located in the abscissa range of the visual area of the browser; or alternatively
The text of the first node includes prompt information for guiding a user to trigger the target event.
13. A page processing apparatus comprising:
a first acquisition module configured to acquire first address information of a target page accessed by a user and a rule set for identifying a folding node in the target page, wherein the folding node corresponds to invisible folding content in the target page and is configured to expand the folding content in response to a target event, and the rule set comprises a plurality of second address information and a plurality of folding node identifications respectively corresponding to the plurality of second address information;
The first determining module is configured to determine the folding node in the target page based on a folding node identifier corresponding to the target address information in response to the first address information being matched with the target address information in the plurality of second address information; and
an unfolding module configured to trigger the target event of the folding node to unfold the folded content.
14. The apparatus of claim 13, further comprising:
a tagging module configured to tag the target page with a folding tag in response to unfolding the folded content, wherein the folding tag indicates that the target page contains folded content; and
and the uploading module is configured to upload the first address information and the folding labels to a server.
15. The apparatus of claim 14, further comprising:
a transmitting module configured to transmit a page search request; and
the receiving module is configured to receive a search result corresponding to the page search request, wherein the search result comprises a first page and a second page, the first page and the second page have the same text content, the first page is marked with a folding label, the second page is not marked with a folding label, and the sequence of the first page in the search result is located behind the second page.
16. The apparatus of any of claims 13-15, further comprising:
the second acquisition module is configured to acquire a first node in the target page in response to the fact that the first address information is not matched with the plurality of second address information, wherein a label of the first node belongs to a preset label set;
and the second determining module is configured to determine the first node as the folding node in response to the static characteristic information of the first node meeting a preset condition, and upload the identification of the first node and the first address information to a server.
17. A page processing apparatus comprising:
the acquisition module is configured to acquire address information of a sample page and identification of candidate folding nodes in the sample page;
a loading module configured to load the sample page;
a triggering module configured to trigger a target event for the candidate folding node in response to the sample page including the candidate folding node;
a judging module configured to judge whether the candidate folding node is used for unfolding folding content in the sample page based on a response condition of the sample page to the target event; and
A generation module configured to generate a rule for identifying a collapsed node in a page based on address information of the sample page and an identification of the candidate collapsed node in response to the candidate collapsed node for expanding the collapsed content.
18. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the method comprises the steps of
The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-12.
19. A non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the method of any one of claims 1-12.
20. A computer program product comprising computer program instructions, wherein the computer program instructions, when executed by a processor, implement the method of any one of claims 1-12.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211571495.4A CN116150517A (en) | 2022-12-08 | 2022-12-08 | Page processing method and device, electronic equipment and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211571495.4A CN116150517A (en) | 2022-12-08 | 2022-12-08 | Page processing method and device, electronic equipment and medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116150517A true CN116150517A (en) | 2023-05-23 |
Family
ID=86338019
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211571495.4A Pending CN116150517A (en) | 2022-12-08 | 2022-12-08 | Page processing method and device, electronic equipment and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116150517A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117370689A (en) * | 2023-09-04 | 2024-01-09 | 中电云计算技术有限公司 | Page content processing method, device, equipment and medium |
-
2022
- 2022-12-08 CN CN202211571495.4A patent/CN116150517A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117370689A (en) * | 2023-09-04 | 2024-01-09 | 中电云计算技术有限公司 | Page content processing method, device, equipment and medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10970097B2 (en) | Adaptive web-based robotic process automation | |
EP3518124A1 (en) | Webpage rendering method and related device | |
EP3796155B1 (en) | Improving acquisition process of gui elements using user input | |
WO2022086872A1 (en) | Distributed systems and methods for facilitating website remediation and promoting assistive technologies and detecting compliance issues | |
CN108399072B (en) | Application page updating method and device | |
US12079298B2 (en) | Methods and systems for browser extension used to generate relative XPath, absolute XPath and/or CSS selectors | |
EP3848824A1 (en) | Landing page processing method, apparatus, device and medium | |
CN113535587B (en) | Target application detection method and device and computer equipment | |
CN115309470B (en) | Method, device, equipment and storage medium for loading widget | |
CN112835579A (en) | Method and device for determining interface code, electronic equipment and storage medium | |
US20160191338A1 (en) | Retrieving content from an application | |
CN111666220A (en) | Method and device for generating Web page object test file | |
CN109634579A (en) | Code generating method, device, computer installation and storage medium | |
US20060059247A1 (en) | Automatic simultaneous entry of values in multiple web page fields | |
US11550990B2 (en) | Machine first approach for identifying accessibility, non-compliances, remediation techniques and fixing at run-time | |
JP2011039668A (en) | Method for displaying web page, computer system and program | |
CN116150517A (en) | Page processing method and device, electronic equipment and medium | |
CN113641933B (en) | Abnormal webpage identification method, abnormal site identification method and device | |
CN113326418A (en) | Method and device for determining webpage information source and webpage quality | |
CN112612469A (en) | Interface element processing method and device and electronic equipment | |
CN114327459A (en) | Page processing method, page processing device, electronic equipment, page processing medium and program product | |
CN118568006B (en) | Application interface awakening method, device, equipment, storage medium and program product | |
CN116301869B (en) | Front-end page configuration management and control system, method, equipment and medium | |
US20230393871A1 (en) | Method and system of intelligently generating help documentation | |
CN114969610B (en) | Page processing method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |