Page display method and device, electronic equipment and storage medium
By highlighting the target text that matches the summary text in the target page, the problem of time-consuming users in finding web page summary information is solved, and the convenience of information acquisition and user experience is improved.
Patent Information
- Application Number
- CN202510571836.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2025-07-25
AI Technical Summary
After clicking on the search results, users need to spend a lot of time and effort to find summary information on the web page, resulting in inefficient decision-making and poor user experience.
Improve the visibility of the summary text by highlighting the target text that matches the summary text in the target page and using different display modes to differently process other texts.
Improves the efficiency of users' positioning of summary text in the target page and the convenience of information acquisition, and improves the user experience.
Smart Images

Figure CN120372103A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, and in particular to the fields of intelligent search, intelligent recommendation, large models, etc. More specifically, the present disclosure provides a page display method, apparatus, electronic device, storage medium, and computer program product. Background Art
[0002] Users sometimes perform searches through search engines. For example, a user enters a query information in a search engine, and then the search engine recommends multiple search results with relatively high relevance to the query information to the user. Summary of the Invention
[0003] The present disclosure provides a page display method, apparatus, electronic device, storage medium, and computer program product.
[0004] According to one aspect of the present disclosure, there is provided a page display method, including: in response to receiving an operation on a target search result among at least one search result, determining a summary text for a target page, where the target page is the web page indicated by the target search result; determining a target text that matches the summary text from the page text of the target page; and displaying the target text and other text in the page text except the target text in different display modes.
[0005] According to another aspect of the present disclosure, there is provided a page display apparatus, including: a summary text determination module, a target text determination module, and a display module. The summary text determination module is configured to determine a summary text for a target page in response to receiving an operation on a target search result among at least one search result, where the target page is the web page indicated by the target search result. The target text determination module is configured to determine a target text that matches the summary text from the page text of the target page. The display module is configured to display the target text and other text in the page text except the target text in different display modes.
[0006] According to another aspect of the present disclosure, there is provided an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method provided by the present disclosure.
[0007] According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the method provided by the present disclosure.
[0008] According to another aspect of the present disclosure, there is provided a computer program product including a computer program which, when executed by a processor, implements the method provided by the present disclosure.
[0009] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The drawings are used to better understand the solution and do not constitute a limitation to the present disclosure. Among them:
[0011] Figure 1 is a schematic diagram of an application scenario of a page display method and device according to an embodiment of the present disclosure;
[0012] Figure 2 is a schematic flowchart of a page display method according to an embodiment of the present disclosure;
[0013] Figure 3 is a schematic flowchart of a display method of a positioning element according to an embodiment of the present disclosure;
[0014] Figure 4 is a system architecture diagram of a page display method according to an embodiment of the present disclosure;
[0015] Figure 5 is a schematic principle diagram of positioning and rendering of a target text according to an embodiment of the present disclosure;
[0016] Figures 6A - 6C is a schematic diagram of a display interface according to an embodiment of the present disclosure
[0017] Figure 7 is a schematic structural block diagram of a page display device according to an embodiment of the present disclosure; and
[0018] Figure 8 is a structural block diagram of an electronic device for implementing the page display method according to an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0019] The following makes an explanation of exemplary embodiments of the present disclosure with reference to the accompanying drawings. Various details of the embodiments of the present disclosure are included herein to assist in understanding, and they should be considered merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0020] In the technical solutions of the present disclosure, the collection, storage, use, processing, transmission, provision, and disclosure of the user's personal information comply with the provisions of relevant laws and regulations and do not violate public order and good customs.
[0021] In the technical solutions of the present disclosure, before obtaining or collecting the user's personal information, the user's authorization or consent has been obtained.
[0022] In some technical solutions, the search engine can filter out multiple search results based on the query information input by the user, and then form a search result page with the multiple search results and recommend it to the user. A search result can be a web page. In addition, during actual display, the content of the web page can be parsed through relevant algorithms to extract summary information that highly matches the query information input by the user, and the summary information is displayed on the search result page. The summary information can include content such as key data, core viewpoints, or solutions, thereby helping the user quickly complete information screening and value judgment. When the user determines that the web page is valuable to themselves through the summary information, they will open the web page and view the content of the web page.
[0023] However, due to the difference between the web page content layout logic and the semantic parsing mechanism of the search engine, when the user clicks on a search result and jumps to the web page to view the content of the web page, the summary information may be located in a deeper position on the page. For example, the summary is located in the middle or bottom of the page, resulting in the user spending a lot of time and effort to find the summary information, or even leaving the page directly because they cannot quickly locate the summary information, reducing the user's decision-making efficiency and the credibility of the search results, and affecting the user experience.
[0024] The embodiments of the present disclosure aim to provide a page display method. After determining several search results based on the query information input by the user, if the user clicks on the target search result, the target text that matches the summary text can be determined from the target page indicated by the target search result, and then the target text and other texts are displayed differently. For example, the target text is highlighted, making the target text more obvious. In this way, the summary text seen by the user in the search results can be highlighted on the target page, improving the user's positioning efficiency of the summary text on the target page and enhancing the convenience of information acquisition and the reading experience.
[0025] The technical solutions provided by the present disclosure will be elaborated in detail below in conjunction with the accompanying drawings and specific embodiments.
[0026] Figure 1 It is a schematic diagram of the application scenario of the page display method and device according to the embodiments of the present disclosure.
[0027] It should be noted that Figure 1The figure shown is only an example of the system architecture to which the embodiments of the present disclosure can be applied, to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.
[0028] As Figure 1 shown, the system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.
[0029] Users can use the terminal devices 101, 102, 103 to interact with the server 105 through the network 104 to receive or send messages, etc. The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, and desktop computers, etc.
[0030] The server 105 may be a server that provides various services, such as a background management server (only as an example) that supports the websites browsed by users using the terminal devices 101, 102, 103. The background management server may analyze and process data such as received user requests, and feedback the processing results to the terminal devices. For example, determine a search result page according to the query information input by the user and feedback it to the terminal device, and for another example, determine a target page in response to a click operation for a target search result and feedback it to the terminal device, and may also highlight the target text in the target page.
[0031] It should be noted that the page display method provided by the embodiments of the present disclosure can generally be executed by the terminal devices 101, 102, 103. Correspondingly, the page display device provided by the embodiments of the present disclosure can generally be set in the terminal devices 101, 102, 103.
[0032] It should be understood that Figure 1 the numbers of the terminal devices, the network, and the server in
[0033] Figure 2 are only illustrative. According to the implementation requirements, there can be any number of terminal devices, networks, and servers.
[0034] As Figure 2 shown, the page display method 200 may include operation S210 to operation S230.
[0035] In operation S210, in response to receiving an operation on a target search result among at least one search result, a summary text for a target page is determined, where the target page is the web page indicated by the target search result.
[0036] For example, an object can input query information through a front-end page, and then use a search engine to retrieve based on the query information, thereby obtaining a search result page. The search result page can be a web page, and the search result page can include at least one search result. Each search result can include a summary text with a relatively high relevance to the query information. Each search result can indicate a web page, and this web page can be called a landing page, such as the landing page of a third-party application. The object is a user, for example, and hereinafter, the object being a user is taken as an example for illustration.
[0037] For example, the search result page can be displayed through a front-end display interface. The user can perform operations such as clicking and selecting on some of the search results according to actual needs. The search result operated by the user is called the target search result.
[0038] After detecting the user's operation on the target search result, on the one hand, the front-end display interface can jump from the search result page to the target page indicated by the target search result. On the other hand, since the summary text has been displayed during the process of the front-end display interface showing the search result page, the summary text can be obtained from the search result page. In other examples, the corresponding relationship between the summary text and the search result can also be pre-constructed, and the summary text can be obtained based on this corresponding relationship.
[0039] In operation S220, target text that matches the summary text is determined from the page text of the target page.
[0040] For example, the target page includes characters such as Chinese and numbers, and these characters are called page text. The summary text can be part of or all of the page text. The similarity between the summary text and each text segment in the page text can be calculated, and the text segment with a similarity higher than the threshold is determined as the target text.
[0041] In operation S230, different display modes are adopted to display the target text and the other text in the page text except the target text.
[0042] For example, the other text is displayed in a first mode, and the target text is displayed in a second mode. The first mode is different from the second mode. The first mode is, for example, a conventional display mode, and the second mode is, for example, a highlighted display mode, or a mode such as adding an underline, bold, italic, or an external box.
[0043] According to the page display method provided by the embodiment of the present disclosure, after determining a number of search results based on the query information input by the user, if the user clicks on the target search result, the target text matching the summary text can be determined from the target page indicated by the target search result, and then the target text and other texts can be displayed separately, for example, the target text can be highlighted, thereby enhancing the recognition of the target text and making the target text more obvious. In this way, the summary text seen by the user in the search results can be highlighted on the target page, improving the efficiency of the user's positioning of the summary text in the target page, and improving the convenience of information acquisition and reading experience.
[0044] Next, the process of determining the summary text is described.
[0045] In this embodiment, in response to receiving an operation on a target search result in at least one search result, the first page identifier of the target page and the second page identifier of the page after the jump are obtained, and then it is determined whether the first page identifier and the second page identifier are consistent. If they are consistent, the summary text is obtained, and if they are inconsistent, the process is terminated.
[0046] For example, after a user clicks on a target search result on the search results page, on the one hand, relevant information of the target search result can be obtained and stored from the search results page. The relevant information may include the summary text of the target search result, the first page identifier of the target page, etc. The first page identifier may be a URL (Uniform Resource Locator). On the other hand, the display interface will jump from the search results page to another page, which is called the jump page. The jump page can be intercepted and the second page identifier of the jump page can be obtained. The second page identifier may be a URL. Since the acquisition process of the relevant information and the jump process are performed asynchronously, it is necessary to confirm whether the two processes correspond to the same page. The confirmation method in this embodiment is to compare whether the first page identifier of the target page and the second page identifier of the jump page are consistent.
[0047] If they are inconsistent, it means that due to network delays, request errors, etc., the page after the jump is not the target page to jump to, so the process can be ended.
[0048] If they are consistent, it means that the page after the jump is the target page to be jumped. At this time, the summary text can be determined, for example, the summary text is read from the relevant information of the pre-stored target search result, and other subsequent operations are performed to determine the target text and display it.
[0049] In this embodiment, by comparing whether the first page identifier is the same as the second page identifier, it is determined whether the page after the jump is the target page that needs to be jumped. When it is determined that the page after the jump is the target page, the abstract text is obtained and subsequent operations are performed. In this way, the accuracy of the abstract text can be ensured, and the correct abstract text in the target page can be accurately located.
[0050] Next, the process of determining the target text will be described.
[0051] In this embodiment, predetermined processing can be respectively performed on the abstract text, the page text, and multiple text nodes to obtain the processed abstract text, the processed page text, and multiple processed text nodes. The predetermined processing can be to delete predetermined characters, and the predetermined characters can include at least one of the following: spaces, punctuation marks, special characters, and other characters configured in advance, etc.
[0052] For example, the predetermined characters in the abstract text can be deleted to obtain the processed abstract text. For example, the predetermined characters in multiple text nodes can be respectively deleted to obtain multiple processed text nodes. For example, the predetermined characters in the page text of the target page can be deleted to obtain the processed page text. In actual operation, the page text includes multiple text nodes, each text node can include several characters, and each text node can be filtered out through depth-first traversal, the text nodes can be merged, and then the predetermined characters are deleted, so as to obtain the processed page text. The processed text nodes can also be merged to obtain the processed page text.
[0053] In this embodiment, the predetermined characters are deleted first, and then the processed abstract text, the processed page text, and the processed text nodes after deleting the predetermined characters are used for matching to determine the target text. In this way, the problem of matching failure caused by differences in HTML (HyperText Markup Language) writing styles and front-end formatting logics can be effectively alleviated, and the fault tolerance and matching success rate of the abstract text can be improved.
[0054] Next, the process of determining the target text by matching based on the processed abstract text, the processed page text, and the processed text nodes will be described.
[0055] The abstract position information of the processed abstract text in the processed page text can be determined. The abstract position information can include the start position and the end position. For example, by comparing the processed abstract text with the processed page text to find the start position, if the first character of the processed abstract text is at the 100th character of the processed page text, then the start position is 100. If the number of characters in the processed abstract text is 100, adding the start position and the number of characters in the processed abstract text is the end position. It can be seen that the end position is 200.
[0056] Next, for each processed text node among multiple processed text nodes, the node position information of the processed text node in the processed page text can be determined. For example, traverse the processed text nodes, count the text content in the processed text nodes, and then compare the processed text nodes with the page text to determine the node position information of the text nodes. The node position information can include the start position and the end position.
[0057] Based on the abstract position information and the node position information, it can be determined whether the processed text node includes a reference sub-text that matches the processed abstract text. For example, the start position in the abstract position information, the end position in the abstract position information, the start position in the node position information, and the end position in the node position information can be compared. If all of the processed text node is between the start position and the end position of the processed abstract text, it means that all the characters in the processed text node are reference sub-texts. If the first half of the characters of the processed text node is between the start position and the end position of the processed abstract text, it means that the first half of the characters in the processed text node are reference sub-texts. If the second half of the characters of the processed text node is between the start position and the end position of the processed abstract text, it means that the second half of the characters in the processed text node are reference sub-texts.
[0058] Based on the reference sub-texts included in multiple processed text nodes, the target text can be determined from multiple text nodes. For example, the text nodes before processing and the processed text nodes correspond one by one. The difference between them is that the text nodes before processing have predetermined characters relative to the processed text nodes. Therefore, the sub-texts corresponding to the reference sub-texts can be determined in the text nodes before processing, and these sub-texts can be merged to obtain the target text. In other examples, the reference sub-texts can also be merged as the target text.
[0059] In this embodiment, the reference sub-text is determined based on the abstract position information and the node position information, and then the target text is determined. In this way, the accurate reverse mapping from the position interval of the processed abstract text to the actual node range can be realized by using the position, ensuring the accuracy of the target text in the target page with complex structure and multiple node intersections, and realizing the accurate positioning of the target text. It is also applicable to the complex situation where the abstract text spans multiple text nodes, and can also support two modes of "partial highlighting" and "full node highlighting" of text nodes.
[0060] Next, the process of displaying the target page will be described.
[0061] In this embodiment, after obtaining the reference sub-texts included in the processed text node, the sub-texts corresponding to the reference sub-texts can be determined in the text node before processing. If the display mode of the target text is highlight display, these sub-texts are the text contents to be highlighted. Tags can be added to the sub-texts to be highlighted, and the tags can be Labels, and then set attributes through the labels to achieve styling effects such as changing the color of the text. In actual operation, if none of the characters in the text node need to be highlighted, there is no need to process the text node. If some or all of the characters in the text node need to be highlighted, the text node can be replaced with one having The HTML element of the label.
[0062] This embodiment adopts the node-level replacement method, which does not damage the document structure and layout logic of the target page, is applicable to various front-end framework environments, and has good compatibility and scalability.
[0063] Figure 3 It is a schematic flowchart of the display method of the positioning element according to the embodiment of the present disclosure.
[0064] In this embodiment, the positioning element can also be rendered on the display interface to assist the user in quickly jumping to the area where the target text is located through the positioning element. Next, the display method S340 of the positioning element will be described. The method S340 may include operations S341 to S346.
[0065] In operation S341, an anchor point is determined according to the target text. The anchor point indicates the page area of the target text on the target page. The first text node including the sub-text to be highlighted can be used as the anchor point, and the anchor point has an anchor position, which can be the starting position, the middle position or other pre-configured positions of the text node.
[0066] In operation S342, it is determined whether the positioning element meets the generation condition according to at least one of the distance between the anchor position of the anchor point and the boundary position of the target page and the state of the anchor point. If it meets, operation S343 can be executed. If it does not meet, the positioning element may not be generated, and at this time, operation S346 can be executed, that is, the process ends.
[0067] For example, the generation condition includes a first sub-condition, and the first sub-condition includes: the distance between the anchor position and the boundary position is greater than or equal to the target distance. The boundary position can be the upper boundary or the left boundary, and the target distance is determined according to the size of the display interface. For example, the target distance is the distance between the upper boundary and the lower boundary of the display interface, or the distance between the left boundary and the right boundary.
[0068] For another example, the generation condition includes a second sub-condition, and the second sub-condition includes: the state of the anchor point is the unfolded state. It should be noted that some text contents in the target page can be directly displayed, and the state of these text contents is the unfolded state. Some other text contents are hidden under certain headings and need to click the heading or other expansion buttons to display the text contents normally, otherwise the text contents are not displayed, and these text contents are in the folded state.
[0069] For another example, the generation condition includes the first sub-condition and the second sub-condition. In this example, if the distance between the anchor position and the boundary position is less than the target distance, or the state of the anchor point is the folded state, the positioning element will not be generated.
[0070] In operation S343, a positioning element is generated in the display interface for displaying the target page, and the positioning element is used to position the page area indicated by the anchor point.
[0071] In operation S344, it is determined whether an operation on the positioning element is received.
[0072] In operation S345, if an operation on the positioning element is received, the page area is controlled to be in the display interface.
[0073] In operation S346, it ends.
[0074] In this embodiment, the first text node that needs to be highlighted or otherwise prominently displayed is recorded and the anchor point is determined. Then, according to the position and folding state of the anchor point, it is determined whether to render the positioning element. The user can quickly jump to the area where the target text is located by clicking the positioning element in the display interface, thereby further enhancing the user's positioning efficiency and reading experience.
[0075] In some embodiments, if an operation on the positioning element is not received and the display duration of the positioning element is greater than or equal to the predetermined duration, it means that the user wants to browse the target page by himself / herself without positioning to the target text. Therefore, the positioning element can be hidden in the display interface to avoid the positioning element blocking the target page and affecting the user's reading. In other embodiments, the positioning element may not be hidden and is always displayed.
[0076] Figure 4 It is a system architecture diagram of the page display method according to an embodiment of the present disclosure.
[0077] Next, the system architecture will be described. In this embodiment, the system includes a client 410, a search engine 420, and a script management service 430. Among them, the client 410 may include a display interface 411 and an application (APP) 412 deployed on the client 410. The search engine 420 and the script management service 430 may be deployed in the cloud.
[0078] The script management service 430 is used to manage scripts and provide functions such as script uploading, storage, and downloading. The application 412 in the client 410 can download scripts from the script management service 430 regularly or according to a request. The script may include scripts for target text positioning and highlighting display, and the script may be a JS (JavaScript) script.
[0079] The user can input query information through the display interface 411 of the client 410, and then the client 410 can request the online search service of the search engine 420 based on the query information, thereby obtaining multiple search results returned by the search engine 420, and then displaying the multiple search results through the search result page 4111. Next, the user can click on the target search result in the search result page 4111, so as to browse the target page 4112 indicated by the target search result.
[0080] When the search result page 4111 detects that the target search result is clicked, on the one hand, the display interface 411 will jump from the search result page 4111 to the page after the jump. On the other hand, the search result page 4111 can send the relevant information of the target page 4112 to the application 412 based on the native data protocol or other methods, so that the application 412 obtains and stores the relevant information, which may include information such as the summary text and the first page identifier.
[0081] The application 412 can also intercept the page after the jump of the third-party website, so as to obtain the second page identifier of the page after the jump. After that, the application 412 can compare whether the first page identifier and the second page identifier are consistent. If they are inconsistent, it means that the page after the jump is not the target page 4112 that needs to be jumped, so the process can be ended. If they are consistent, it means that the page after the jump is the target page 4112 that needs to be jumped. At this time, the summary text can be read from the stored relevant information, and the script and summary text can be injected into the target page 4112, so that the application 412 can execute the script in the page loading link or other predetermined links, so as to locate and render the target text through the script.
[0082] Figure 5 It is a schematic diagram of the positioning and rendering of target text according to an embodiment of the present disclosure.
[0083] Next, the process of locating and rendering the target text is described.
[0084] In this embodiment, during the script execution, the target page includes multiple text nodes 501, and the summary text 503, page text 502 and multiple text nodes 501 can be processed in a predetermined manner to obtain processed summary text, processed page text and multiple processed text nodes.
[0085] Since the target page may be updated, the update will cause changes in the content of the target page. Therefore, it can be determined whether the processed page text includes the processed abstract text. If not, the process can be ended. If so, the abstract position information 504 of the processed abstract text in the processed page text can be determined, and for each processed text node among multiple processed text nodes, the node position information 505 of the processed text node in the processed page text can be determined.
[0086] Next, the processed text nodes can be traversed. According to the abstract position information 504 and the node position information 505, it can be determined whether the processed text node includes a reference sub - text that matches the processed abstract text. If so, it means that some or all of the characters in the text node 501 need to be displayed in a more prominent way such as highlighting. Otherwise, it means that all the characters in the text node 501 can be displayed in a normal way.
[0087] If the processed text node includes the reference sub - text, then for the pre - processed text node 501 corresponding to the processed text sub - node, the sub - text corresponding to the reference sub - text can be determined from the text node 501, and tags can be added, so as to replace the original text node 501 with the text node 506 after adding tags.
[0088] If the processed text node does not include the reference sub - text, then no tags need to be added to the pre - processed text node 501 corresponding to the processed text sub - node.
[0089] It can be seen that each sub - text with added tags is the target text 507. Next, based on the tags, the target text 507 can be rendered so that the target text 507 is more easily distinguishable from other texts in the target page.
[0090] Figure 6 is a schematic diagram of a display interface according to an embodiment of the present disclosure.
[0091] As Figure 6A shown, the user inputs a query information Query in the display interface, and then the search result page Page_1 can be shown to the user. The search result page Page_1 includes several search results. Figure 6A Search results Result_1~Result_4 are shown, and each search result can indicate a page. The abstract texts of each search result Result_1~Result_4 can also be shown on the search result page Page_1.
[0092] As Figure 6B As shown, the user can click on some of the search results based on the abstract text. The search results clicked by the user are the target search results. For example, the target search result clicked by the user is the above search result Result_3. At this time, the display interface jumps from the search result page Page_1 to the target page Page_2 indicated by the target search result. In addition, if the positioning element meets the generation condition, the positioning element can be rendered at the bottom or other positions of the display interface.
[0093] As Figure 6C shown, if the user clicks on the positioning element within a predetermined time period, the positioning element can be hidden, and at the same time, the target page is scrolled so that the target text Text is in the display interface. In addition, the target text Text can be highlighted, bolded, etc. for prominent display. In addition, the ratio of the distance between the top of the target text Text and the top of the display interface to the total length of the display interface can be a predetermined ratio, and the predetermined ratio can be 0.25. If the user does not click on the positioning element within the predetermined time period, the positioning element can be hidden.
[0094] Figure 7 is a schematic structural block diagram of a page display device according to an embodiment of the present disclosure.
[0095] As Figure 7 shown, the page display device 700 may include an abstract text determination module 710, a target text determination module 720, and a display module 730.
[0096] The abstract text determination module 710 is configured to determine the abstract text for the target page in response to receiving an operation on the target search result among at least one search result, where the target page is the web page indicated by the target search result.
[0097] The target text determination module 720 is configured to determine the target text that matches the abstract text from the page text of the target page.
[0098] The display module 730 is configured to display the target text and other texts in the page text except the target text in different display modes.
[0099] According to another embodiment of the present disclosure, it further includes: an anchor determination module, a judgment module, and a generation module. The anchor determination module is configured to determine an anchor according to the target text, where the anchor indicates the page area of the target text in the target page. The judgment module is configured to determine whether the positioning element meets the generation condition according to at least one of the distance between the anchor position of the anchor and the boundary position of the target page and the state of the anchor. The generation module is configured to generate a positioning element in the display interface for displaying the target page when the positioning element meets the generation condition. Wherein, the positioning element is used to position the page area indicated by the anchor.
[0100] According to another embodiment of the present disclosure, the determination module includes: a first determination sub-module, configured to determine that the positioning element meets the generation condition when the distance between the anchor position and the boundary position is greater than or equal to the target distance and the state of the anchor is the unfolded state, where the target distance is determined according to the size of the display interface.
[0101] According to another embodiment of the present disclosure, it further includes: a control module and a hiding module. The control module is configured to control the page area to be in the display interface in response to receiving an operation on the positioning element. The hiding module is configured to hide the positioning element in the display interface in response to determining that the display duration of the positioning element is greater than or equal to the predetermined duration and no operation on the positioning element is received.
[0102] According to another embodiment of the present disclosure, the page text includes multiple text nodes. The target text determination module includes: a processing sub-module, a second determination sub-module, and a target text determination sub-module. The processing sub-module is configured to perform predetermined processing on the abstract text, the page text, and the multiple text nodes respectively to obtain the processed abstract text, the processed page text, and the multiple processed text nodes. The second determination sub-module is configured to, for each processed text node among the multiple processed text nodes, determine whether the processed text node includes a reference sub-text that matches the processed abstract text according to the abstract position information of the processed abstract text in the processed page text and the node position information of the processed text node in the processed page text. The target text determination sub-module is configured to determine the target text from the multiple text nodes according to the reference sub-texts included in the multiple processed text nodes.
[0103] According to another embodiment of the present disclosure, the processing sub-module includes: a first deletion unit, a second deletion unit, and a third deletion unit. The first deletion unit is configured to delete the predetermined characters in the abstract text to obtain the processed abstract text. The second deletion unit is configured to delete the predetermined characters in the page text of the target page to obtain the processed page text. The third deletion unit is configured to delete the predetermined characters in the multiple text nodes respectively to obtain the multiple processed text nodes.
[0104] According to another embodiment of the present disclosure, the abstract text determination module includes: an acquisition sub-module and an abstract text determination sub-module. The acquisition sub-module is configured to obtain the first page identifier of the target page and the second page identifier of the page after jumping in response to receiving an operation on the target search result in at least one search result. The abstract text determination sub-module is configured to determine the abstract text when it is determined that the first page identifier and the second page identifier are the same.
[0105] According to an embodiment of the present disclosure, the present disclosure further provides an electronic device, including at least one processor; and a memory communicatively connected to the at least one processor; the memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is enabled to execute the above-mentioned page display method.
[0106] According to an embodiment of the present disclosure, the present disclosure further provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the above-mentioned page display method.
[0107] According to an embodiment of the present disclosure, the present disclosure further provides a computer program product, including a computer program which, when executed by a processor, implements the above-mentioned page display method.
[0108] Figure 8 FIG. shows a schematic block diagram of an exemplary electronic device 800 that can be used to implement embodiments of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as, for example, a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, for example, a personal digital processor, a cellular phone, a smart phone, a wearable device, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely exemplary and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0109] As Figure 8 shown, the device 800 includes a computing unit 801 which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0110] A plurality of components in the device 800 are connected to the I / O interface 805, including: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a magnetic disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the device 800 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0111] The computing unit 801 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated 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 801 executes the various methods and processes described above, such as the page display method. For example, in some embodiments, the page display method can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 808. In some embodiments, part or all of the computer program can be loaded and / or installed onto the device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded into the RAM 803 and executed by the computing unit 801, one or more steps of the page display method described above can be executed. Alternatively, in other embodiments, the computing unit 801 can be configured to execute the page display method by any other suitable means (e.g., by means of firmware).
[0112] Various embodiments of the systems and techniques described above in this document can be implemented in digital electronic circuitry, integrated circuit systems, field programmable gate arrays (FPGA), application specific integrated circuits (ASIC), application specific standard products (ASSP), system-on-a-chip systems (SOC), complex programmable logic devices (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special-purpose or general-purpose programmable processor that receives data and instructions from a storage system, at least one input device, and at least one output device, and transmits the data and instructions to the storage system, the at least one input device, and the at least one output device.
[0113] The program code for implementing the methods of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the program codes are executed by the processor or controller, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The program codes can be executed entirely on the machine, partially on the machine, as an independent software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0114] In the context of this disclosure, a machine-readable medium can 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. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, 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.
[0115] In order to provide interaction with a user, the systems and techniques described herein 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 the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0116] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, 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: a local area network (LAN), a wide area network (WAN), and the Internet.
[0117] A computer system can include a client and a server. The client and the server are generally remote from each other and typically interact through a communication network. The relationship of client and server is generated by computer programs running on the respective computers and having a client-server relationship to each other.
[0118] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and no limitations are imposed herein.
[0119] The above specific embodiments do not constitute a limitation on the protection scope of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub - combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the protection scope of this disclosure.
Claims
1. A page display method, comprising: Responding to an operation on a target search result among at least one search result, determining summary text for a target page, where the target page is the web page indicated by the target search result; Determining target text that matches the summary text from the page text of the target page; And Using different display modes to display the target text and other text in the page text except the target text.
2. The method according to claim 1, further comprising: Determining an anchor point according to the target text; wherein the anchor point indicates the page area of the target text in the target page; Determining whether a positioning element meets a generation condition according to at least one of the distance between the anchor position of the anchor point and the boundary position of the target page and the state of the anchor point; Generating the positioning element in a display interface for displaying the target page when the positioning element meets the generation condition; wherein the positioning element is used to position the page area indicated by the anchor point.
3. The method according to claim 2, wherein The determining whether a positioning element meets a generation condition according to at least one of the distance between the anchor position of the anchor point and the boundary position of the target page and the state of the anchor point includes: Determining that the positioning element meets the generation condition when the distance between the anchor point position and the boundary position is greater than or equal to a target distance and the state of the anchor point is an unfolded state; Wherein the target distance is determined according to the size of the display interface.
4. The method according to claim 2, further comprising: Controlling the page area to be in the display interface in response to receiving an operation on the positioning element; And Hiding the positioning element in the display interface in response to determining that the display duration of the positioning element is greater than or equal to a predetermined duration and no operation on the positioning element is received.
5. The method according to claim 1, wherein The page text includes multiple text nodes; the determining target text that matches the summary text from the page text of the target page includes: Performing predetermined processing on the summary text, the page text, and the multiple text nodes respectively to obtain processed summary text, processed page text, and multiple processed text nodes; For each processed text node among the multiple processed text nodes, determining whether the processed text node includes reference sub-text that matches the processed summary text according to the summary position information of the processed summary text in the processed page text and the node position information of the processed text node in the processed page text; and Determining the target text from the multiple text nodes according to the reference sub-text included in the multiple processed text nodes.
6. The method according to claim 5, wherein The performing predetermined processing on the summary text, the page text, and the multiple text nodes respectively to obtain processed summary text, processed page text, and multiple processed text nodes includes: Deleting predetermined characters in the summary text to obtain the processed summary text; Delete the predetermined characters in the page text of the target page to obtain the processed page text; and Delete the predetermined characters in each of the multiple text nodes to obtain the multiple processed text nodes.
7. The method according to claim 1, wherein, The determining of the summary text for the target page in response to receiving an operation on the target search result among at least one search result includes: In response to receiving an operation on the target search result among the at least one search result, obtain the first page identifier of the target page and the second page identifier of the page after jumping; and Determine the summary text when it is determined that the first page identifier and the second page identifier are the same.
8. A page display device, comprising: A summary text determination module, configured to determine the summary text for the target page in response to receiving an operation on the target search result among at least one search result, where the target page is the web page indicated by the target search result; A target text determination module, configured to determine the target text matching the summary text from the page text of the target page; And A display module, configured to display the target text and the other text in the page text except the target text in different display modes.
9. An electronic device, comprising: At least one processor; And A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is enabled to execute the method according to any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 7.
11. A computer program product, comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 7.