A search result display method and device, a computer device and a storage medium

By calculating the relevance of search information to key and structured information and selecting appropriate display formats, the problem of monotonous search result display formats is solved, resulting in more flexible and accurate search result display and improved user experience.

CN115730158BActive Publication Date: 2026-07-31BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING ZITIAO NETWORK TECH CO LTD
Filing Date
2022-12-01
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

In existing technologies, the display format of search results is too simplistic, making it difficult for users to accurately determine whether the webpage content meets their search needs, especially since key information and structured information are not effectively presented.

Method used

By acquiring key and structured information that matches the search results, a neural network model is used to calculate the relevance. Based on the relevance, the display format is selected to highlight key or structured information, including the structured display of key fields.

Benefits of technology

It improves the flexibility and adaptability of search results display, enabling users to more accurately determine whether search results meet their needs and improving browsing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115730158B_ABST
    Figure CN115730158B_ABST
Patent Text Reader

Abstract

This disclosure provides a method, apparatus, computer device, and storage medium for displaying search results. The method includes: in response to receiving search information, obtaining search results matching the search information; the search results include one of key information and structured information of a target webpage; and displaying the search results in a display format matching the search results. The display format corresponding to the key information includes highlighting keywords matching the search information within the key information, and the display format corresponding to the structured information includes structurally displaying field information of multiple key fields of the target webpage content.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and more specifically, to a method, apparatus, computer device, and storage medium for displaying search results. Background Technology

[0002] With the continuous development of internet technology, users can search for web pages that interest them using search engines.

[0003] When displaying web search results, the format of each search result on the search results page is often the same. Under the same display format, the content displayed in some search results may not meet the user's search needs, leading to misjudgment by the user regarding whether the search results satisfy their search requirements. For example, a webpage may contain relevant information that closely matches the user's search needs, but due to the limitations of the display format, part of the webpage's content displayed in the search results may not reflect this relevant information well. Summary of the Invention

[0004] This disclosure provides at least one method, apparatus, computer device, and storage medium for displaying search results.

[0005] In a first aspect, embodiments of this disclosure provide a method for displaying search results, including:

[0006] In response to receiving search information, obtain search results that match the search information; the search results include one of key information and structured information of the target webpage content;

[0007] The search results are displayed in a format that matches the search results.

[0008] The display format corresponding to the key information includes highlighting the keywords in the key information that match the search information, and the display format corresponding to the structured information includes displaying the field information of multiple key fields of the target webpage content in a structured manner.

[0009] In one possible implementation, the search results matching the search information are determined according to the following method:

[0010] Obtain each search result; each search result includes the key information and the structured information;

[0011] Based on the first relevance between the key information and the search information, and the second relevance between the structured information and the search information, information with higher relevance is selected from the key information and the structured information as the search result that matches the search information.

[0012] In one possible implementation, the structured information is predetermined according to the following manner:

[0013] For the target webpage content, based on the key field combination set for the webpage category to which the target webpage content belongs, the structured information corresponding to the target webpage content is extracted; the structured information includes field information under multiple key fields indicated by the key field combination.

[0014] In one possible implementation, the key information is determined according to the following method:

[0015] Extract each text segment from the content of the target webpage;

[0016] Determine the relevance of each text segment to the search information;

[0017] Select the text segment with the highest relevance as the key information; or, select at least one text segment with a relevance greater than a first set threshold, and integrate the at least one text segment into the key information.

[0018] In one possible implementation, based on a first relevance between the key information and the search information, and a second relevance between the structured information and the search information, information with higher relevance is selected from the key information and the structured information as the search result matching the search information, including:

[0019] The search information, the key information corresponding to the search information, and the structured information are input into a pre-trained neural network model to obtain a first relevance score, which is used to characterize the first relevance, and a second relevance score, which is used to characterize the second relevance, output by the neural network model.

[0020] Based on the first relevance score and the second relevance score, information with higher relevance scores is displayed as the search results that match the search information.

[0021] In one possible implementation, the neural network model is trained according to the following steps:

[0022] The system acquires sample search information, sample key information and sample structured information of the webpage content corresponding to the sample search information, and sample tags; wherein, the sample tags are used to mark the first sample relevance between the sample key information and the sample search information, and the second sample relevance between the sample structured information and the sample search information;

[0023] The sample search information, the sample key information, and the sample structured information are input into the neural network model to be trained to obtain the first sample relevance score, which is used to characterize the first relevance, and the second sample relevance score, which is used to characterize the second relevance, output by the neural network model.

[0024] Based on the first sample relevance score, the second sample relevance score, and the sample label, the loss value for this training is determined, and the parameters of the neural network model to be trained are adjusted based on the loss value.

[0025] In one possible implementation, highlighting keywords in the key information that match the search information includes:

[0026] The key information is segmented into individual words.

[0027] The relevance between each word segment and the search information is calculated, and the word segments in the key information whose relevance to the search information is greater than a second set threshold are set as highlighted.

[0028] Secondly, embodiments of this disclosure also provide a search result display device, including:

[0029] The acquisition module is used to acquire search results that match the received search information in response to receiving search information; the search results include one of key information and structured information of the target webpage content;

[0030] The display module is used to display the search results in a display format that matches the search results.

[0031] The display format corresponding to the key information includes highlighting the keywords in the key information that match the search information, and the display format corresponding to the structured information includes displaying the field information of multiple key fields of the target webpage content in a structured manner.

[0032] In one possible implementation, the acquisition module is configured to determine the search results that match the search information according to the following method:

[0033] Obtain each search result; each search result includes the key information and the structured information;

[0034] Based on the first relevance between the key information and the search information, and the second relevance between the structured information and the search information, information with higher relevance is selected from the key information and the structured information as the search result that matches the search information.

[0035] In one possible implementation, the acquisition module is further configured to pre-determine the structured information according to the following manner:

[0036] For the target webpage content, based on the key field combination set for the webpage category to which the target webpage content belongs, the structured information corresponding to the target webpage content is extracted; the structured information includes field information under multiple key fields indicated by the key field combination.

[0037] In one possible implementation, the acquisition module is further configured to determine the key information according to the following method:

[0038] Extract each text segment from the content of the target webpage;

[0039] Determine the relevance of each text segment to the search information;

[0040] Select the text segment with the highest relevance as the key information; or, select at least one text segment with a relevance greater than a first set threshold, and integrate the at least one text segment into the key information.

[0041] In one possible implementation, the acquisition module, when selecting information with higher relevance from the key information and the structured information as the search result matching the search information based on a first relevance between the key information and the search information, and a second relevance between the structured information and the search information, is configured to:

[0042] The search information, the key information corresponding to the search information, and the structured information are input into a pre-trained neural network model to obtain a first relevance score, which is used to characterize the first relevance, and a second relevance score, which is used to characterize the second relevance, output by the neural network model.

[0043] Based on the first relevance score and the second relevance score, information with higher relevance scores is displayed as the search results that match the search information.

[0044] In one possible implementation, the acquisition module is further configured to train the neural network model according to the following steps:

[0045] The system acquires sample search information, sample key information and sample structured information of the webpage content corresponding to the sample search information, and sample tags; wherein, the sample tags are used to mark the first sample relevance between the sample key information and the sample search information, and the second sample relevance between the sample structured information and the sample search information;

[0046] The sample search information, the sample key information, and the sample structured information are input into the neural network model to be trained to obtain the first sample relevance score, which is used to characterize the first relevance, and the second sample relevance score, which is used to characterize the second relevance, output by the neural network model.

[0047] Based on the first sample relevance score, the second sample relevance score, and the sample label, the loss value for this training is determined, and the parameters of the neural network model to be trained are adjusted based on the loss value.

[0048] In one possible implementation, the display module, when highlighting keywords in the key information that match the search information, is used to:

[0049] The key information is segmented into individual words.

[0050] The relevance between each word segment and the search information is calculated, and the word segments in the key information whose relevance to the search information is greater than a second set threshold are set as highlighted.

[0051] Thirdly, embodiments of this disclosure also provide a computer device, including: a processor, a memory, and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor communicates with the memory via the bus, and when the machine-readable instructions are executed by the processor, the steps of the first aspect above, or any possible implementation of the first aspect, are performed.

[0052] Fourthly, embodiments of this disclosure also provide a computer-readable storage medium storing a computer program that, when executed by a processor, performs the steps of the first aspect or any possible implementation of the first aspect.

[0053] The search result display method, apparatus, computer equipment, and storage medium provided in this disclosure allow search results matching search information to include either key information or structured information from webpage content, and to display the search results in a format matching the search results. In this disclosure, by structurally displaying the field information of key fields in webpage content, or highlighting key information matching the search information, the information in the webpage can be effectively extracted and displayed, improving the user's browsing efficiency of search results. Furthermore, in this disclosure, the information that best matches the search needs between the key information and structured information corresponding to the webpage content can be used as the search result and displayed in its corresponding format, rather than limiting the display to either key information or structured information in a single format. This approach makes the display format of search results more flexible and allows the displayed search results to better adapt to the search information, thereby better meeting the user's search needs.

[0054] To make the above-mentioned objects, features and advantages of this disclosure more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0055] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the accompanying drawings used in the embodiments will be briefly described below. These drawings are incorporated in and constitute a part of this specification. They illustrate embodiments conforming to this disclosure and, together with the specification, serve to explain the technical solutions of this disclosure. It should be understood that the following drawings only show some embodiments of this disclosure and should not be considered as limiting the scope. Those skilled in the art can obtain other related drawings based on these drawings without creative effort.

[0056] Figure 1 A flowchart of a search result display method provided by an embodiment of this disclosure is shown;

[0057] Figure 2a The illustration shows a schematic diagram of a search result display page in the search result display method provided in the embodiments of this disclosure;

[0058] Figure 2b This illustration shows another search result display page in the search result display method provided in the embodiments of this disclosure;

[0059] Figure 3 This diagram illustrates the architecture of a search result display device provided in an embodiment of the present disclosure;

[0060] Figure 4A schematic diagram of the structure of a computer device provided in an embodiment of this disclosure is shown. Detailed Implementation

[0061] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. The components of the embodiments of this disclosure described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this disclosure provided in the accompanying drawings is not intended to limit the scope of the claimed disclosure, but merely represents selected embodiments of this disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without inventive effort are within the scope of protection of this disclosure.

[0062] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0063] In this document, the term "and / or" merely describes a relationship, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. Furthermore, the term "at least one" in this document means any combination of at least two of any one or more elements. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.

[0064] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0065] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.

[0066] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0067] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.

[0068] This disclosure provides a method, apparatus, computer device, and storage medium for displaying search results. When it is necessary to present search results related to webpage content, it can determine which of the pre-extracted key information and structured information of the webpage content best matches the search information. The final presented search result can be the one that best matches the search information from the key information and structured information of the webpage content, and the search result is displayed in a display format that matches the search result. This method, by structurally displaying the field information of key fields in the webpage or highlighting keywords that match the search information, can effectively extract and display the information in the webpage, improving the user's browsing efficiency of search results. Moreover, in this disclosure, the most matching information can be selected from the key information and structured information corresponding to the webpage content as the search result, rather than limiting the display to a single key information or structured information. This approach makes the display format of search results more flexible and allows the displayed search results to better adapt to the search information, thereby better meeting the user's search needs.

[0069] To facilitate understanding of this embodiment, a search result display method disclosed in this disclosure will first be described in detail. The executing entity of the search result display method provided in this disclosure is generally a computer device with a certain computing power. This computer device may include, for example, a terminal device, a server, or other processing devices. The terminal device may be a smart terminal device with display capabilities, such as a smartphone, tablet computer, or smart wearable device. In some possible implementations, the search result display method can be implemented by a processor calling computer-readable instructions stored in memory.

[0070] See Figure 1 The diagram shows a flowchart of a search result display method provided in an embodiment of this disclosure. The method includes steps S101 to S102, wherein:

[0071] S101: In response to receiving search information, obtain search results that match the search information; the search results include one of key information and structured information of the target webpage content.

[0072] S102: Display the search results in a display format that matches the search results;

[0073] The display format corresponding to the key information includes highlighting the keywords in the key information that match the search information, and the display format corresponding to the structured information includes displaying the field information of multiple key fields of the target webpage content in a structured manner.

[0074] By following the steps described above, key information and structured information corresponding to the webpage content can be extracted in advance. Upon receiving the search information, the most relevant information can be selected from the key and structured information to serve as the search result, displayed in a corresponding format. If key information is selected, the keywords answering the search question can be highlighted (e.g., in red). If structured information is selected, the field information of multiple key fields from the pre-extracted webpage content can be displayed according to a pre-configured structured style. This approach allows for more flexible display of search results and ensures that the displayed results better adapt to the search information, thereby better meeting the user's search needs.

[0075] The following is a detailed explanation of the steps described above.

[0076] Regarding the above S101:

[0077] The search information mentioned above can be information entered by the user in the search bar of the search page, or it can be search information determined based on recommended search terms; the target webpage content is the webpage content of the target webpage that matches the search information, and the webpage content of the target webpage may contain the answer information corresponding to the search information.

[0078] The key information may include general information such as the title and summary of the target webpage content; the structured information is used to display information from multiple key fields in the webpage content in a structured manner. The key fields may include cover, title, category, author, update status, table of contents, etc. The structured information may be displayed in the form of structured information cards, etc.

[0079] In practical applications, before users use search information to search, the key information and structured information of each webpage can be determined in advance, so that when users use search information to search, they can quickly obtain the key information and structured information of the webpage content in the search results.

[0080] The methods for determining structured information and key information will be introduced below:

[0081] 1. For structured information:

[0082] For the target webpage content, the structured information corresponding to the target webpage content can be extracted based on the combination of key fields set for the webpage category to which the target webpage content belongs.

[0083] The structured information includes field information under multiple key fields indicated by the key field combination.

[0084] Specifically, different fields correspond to different positions of webpage content within the webpage. Different webpage categories can have different fields to extract different webpage content from different categories of webpages.

[0085] Furthermore, since it is necessary to extract structured information based on the combination of key fields set according to the webpage category to which the target webpage content belongs, it is also necessary to predetermine the webpage category of the target webpage and determine the combination of key fields from the multiple fields corresponding to the target webpage.

[0086] One possible implementation is to use a pre-trained webpage category determination model to identify the category of each webpage, thereby determining the category of each webpage in batches.

[0087] Here, the webpage category determination model can be a neural network model capable of performing classification tasks, such as the Bidirectional Encoder Representations from Transformers (BERT) model.

[0088] The input data for the webpage category determination model can be obtained by constructing data from the webpage content of the target webpage. The input data obtained by data construction is used to characterize the content and attribute information of each content node in the network content. The attribute information includes depth information and position information. The depth information is used to characterize the hierarchical relationship between the content node and other content nodes, and the position information is used to characterize the layout position of the content node in the webpage.

[0089] Specifically, during data construction, the node tree corresponding to the target webpage can be traversed first using a depth-first traversal algorithm to determine the depth and position information of each content node; wherein, the node tree is generated based on the webpage code corresponding to the target webpage; according to a preset data construction order, the content of each content node, the depth information and position information corresponding to each content node are concatenated to obtain the input data corresponding to the target webpage.

[0090] Furthermore, when training the webpage category determination model, sample input data generated after data construction of sample webpages can be input into the webpage category determination model to be trained to obtain the sample webpage category output by the webpage category recognition model. Based on the sample webpage category and the webpage category label corresponding to the sample webpage, the loss value for this training is determined, and the network parameters of the webpage category determination model are adjusted based on the loss value until the number of parameter adjustments reaches a preset number of adjustments, and / or the network accuracy of the webpage category determination model meets the preset accuracy requirements.

[0091] Furthermore, after determining the webpage category of each webpage according to the above webpage category determination model, the key field combination corresponding to each webpage can be configured so as to extract the structured information corresponding to the webpage content in each webpage according to the field access path corresponding to each key field in the key field combination. In order to improve the configuration efficiency of key field combination, the same key field combination can also be configured for webpages belonging to the same webpage group. The webpage group can be composed of webpages that have some of the same webpage addresses.

[0092] In this way, when extracting the structured information corresponding to the webpage content, the target webpage content can be extracted according to the combination of key fields corresponding to the webpage category to which the target webpage belongs, thereby obtaining the structured information corresponding to the target webpage content.

[0093] 2. Regarding key information:

[0094] Here, when identifying key information, the following steps A1 to A3 can be used:

[0095] A1: Extract each text segment from the content of the target webpage.

[0096] Here, the target webpage content can be segmented into text segments to obtain the individual text segments within the target webpage content.

[0097] Specifically, when performing text segmentation on the target webpage content, text processing can be performed according to a preset text segmentation length to obtain each text segment in the target webpage content;

[0098] Alternatively, when performing text segmentation on the target webpage content, text segmentation can also be performed according to the target punctuation marks in the target webpage content. The text content between the Nth target punctuation mark and the (N+1)th target punctuation mark can be considered as a text segment, where N is a positive integer. The text content before the first target punctuation mark can be considered as a text segment. The target punctuation mark can be, for example, a comma, a period, or other symbols.

[0099] Alternatively, when performing text segmentation on the target webpage content, a pre-trained text segmentation model can be used to segment the text from a semantic perspective, obtaining various text segments within the target webpage content. That is, the text segmentation model performs semantic recognition, dividing indivisible semantic content within the target webpage content into a single text segment, and segmenting content with different semantic meanings into different text segments. Furthermore, the text can be pre-segmented into words. The input data for the text segmentation model can be the word segmentation results corresponding to the webpage content, i.e., multiple words to be combined after segmenting the webpage content. The text segmentation model can perform semantic recognition on these words and combine words with the same, and / or similar, and / or related meanings that are adjacent in position within the webpage content, obtaining at least one word combination. Each of these word combinations constitutes a text segment.

[0100] A2: Determine the relevance between each of the text segments and the search information.

[0101] Here, the relevance between the text segment and the search information can be determined by calculating the Euclidean distance between their feature representation vectors, the edit distance between their characters, etc., or by directly calculating their semantic relevance using a semantic recognition model. This disclosure does not impose specific limitations on the method used to calculate similarity.

[0102] A3: Select the text segment with the highest relevance as the key information; or, select at least one text segment with a relevance greater than a first set threshold, and integrate the at least one text segment into the key information.

[0103] For example, taking the relevance of text segments 1 to 5 to the search information as 0.6, 0.7, 0.5, 0.4, and 0.9 respectively, text segment 5 with the highest relevance can be used as the key information; or, text segments 2 and 5 with a relevance greater than the first set threshold of 0.65 can be selected, and text segments 2 and 5 can be integrated according to the order of their arrangement in the webpage content, and the integrated text content can be used as the key information.

[0104] In practical applications, the target webpage content may correspond to both key information and structured information. If both key information and structured information corresponding to the target webpage content are displayed on the search results page, the amount of content displayed may be too large, thus affecting the display effect of subsequent search results.

[0105] In one possible implementation, when obtaining search results that match the search information, the following steps B1 to B2 can be used:

[0106] B1: Obtain each search result; the search results include the key information and the structured information.

[0107] Here, for any of the aforementioned search results, the search result may contain key information of the webpage content corresponding to the search result, as well as structured information of the webpage content corresponding to the search result.

[0108] B2: Based on the first relevance between the key information and the search information, and the second relevance between the structured information and the search information, select the information with higher relevance from the key information and the structured information as the search result that matches the search information.

[0109] Here, the first relevance and the second relevance can be textual relevance and / or semantic relevance.

[0110] In one possible implementation, when selecting information with high relevance from the key information and the structured information as the search result matching the search information, the following steps B21-B22 can be used:

[0111] B21: Input the search information, the key information corresponding to the search information, and the structured information into a pre-trained neural network model to obtain a first relevance score, which is used to characterize the first relevance, and a second relevance score, which is used to characterize the second relevance, output by the neural network model.

[0112] Here, the network type of the pre-trained neural network model can be, for example, a (Bidirectional Encoder Representations from Transformer) model.

[0113] B22: Based on the first relevance score and the second relevance score, information with higher relevance scores is displayed as the search results matching the search information.

[0114] For example, if the first relevance score, which represents the first relevance between key information and search information, is 0.6, and the second relevance score, which represents the second relevance between structured information and search information, is 0.8, then the structured information with the higher relevance score can be displayed as the search result that matches the search information.

[0115] Furthermore, the neural network model can be obtained by training through the following steps C1 to C3:

[0116] C1: Obtain sample search information, sample key information and sample structured information of the webpage content corresponding to the sample search information, and sample tags; wherein, the sample tags are used to mark the first sample relevance between the sample key information and the sample search information, and the second sample relevance between the sample structured information and the sample search information.

[0117] C2: Input the sample search information, the sample key information, and the sample structured information into the neural network model to be trained to obtain the first sample relevance score, which is used to characterize the first relevance, and the second sample relevance score, which is used to characterize the second relevance, output by the neural network model.

[0118] C3: Based on the first sample correlation score, the second sample correlation score, and the sample label, determine the loss value for this training, and adjust the parameters of the neural network model to be trained based on the loss value.

[0119] Here, the loss value for this training may include a first loss value and a second loss value; wherein, the first loss value can be used to characterize the difference between the first sample relevance score and the first sample relevance labeled by the sample label, that is, whether the first sample relevance score and the labeled relevance are the same; the second loss value can be used to characterize the difference between the second sample relevance score and the second sample relevance labeled by the sample label, that is, whether the second sample relevance score and the labeled relevance are the same.

[0120] Specifically, when determining the loss value, the first loss value, the second loss value, and the preset weight parameters can be used to perform a weighted summation of the first loss value and the second loss value, and the parameters of the neural network model can be adjusted based on the loss value obtained after the weighted summation until the number of parameter adjustments reaches the preset number of adjustments, and / or the network accuracy of the neural network model meets the preset accuracy requirements.

[0121] In this way, by using a pre-trained neural network model, information with a higher relevance to the search information can be selected from the key and structured information corresponding to the webpage content as the search results that match the search information. This makes the final search results more relevant to the search information and improves the user's search result browsing efficiency.

[0122] Regarding S102:

[0123] Here, when displaying the field information of multiple key fields of the target webpage content in a structured manner, the field information of multiple key fields of the target webpage content can be displayed in a structured manner according to a structured display template that matches the network type of the target webpage.

[0124] For example, a diagram of a search results display page can be shown as follows: Figure 2a As shown, Figure 2a The user inputs the novel search information "Struggling in the XX Era". The target webpage matching the search information is the webpage corresponding to the target novel. When displaying the search results, a structured display template (i.e., a novel card) matching the webpage category of the target webpage is used to display the structured information of the target webpage. The displayed structured information includes author information, status information, and synopsis information. The novel card also displays the most recently updated novel content. Users can browse the content of the corresponding novel chapter by triggering the corresponding chapter.

[0125] In one possible implementation, when highlighting keywords in the key information that match the search information, the following steps D1 to D2 can be used:

[0126] D1: Perform word segmentation on the key information to obtain individual words.

[0127] Here, when performing word segmentation on the key information, a Chinese WordSegmentation (CWS) model can be used to segment the key information to obtain each segmented word.

[0128] It should be noted that the embodiments disclosed herein do not limit how the key information is segmented, but only to the extent that it can be implemented.

[0129] D2: Calculate the relevance between each word segment and the search information, and set the words in the key information whose relevance to the search information is greater than the second set threshold as highlighted.

[0130] Here, the relevance between the word segmentation and the search information may include text relevance such as Euclidean distance and edit distance, and / or semantic relevance. When determining the relevance between the word segmentation and the search information, it can be calculated according to a preset relevance calculation formula. This embodiment of the disclosure does not limit which relevance calculation formula to choose, but is subject to what can be achieved in actual application. The highlighted display form may include bolding the font, changing the font color, changing the background color of the area where the font is located, increasing the font size, etc.

[0131] Specifically, after calculating the relevance between each word segment and the search information, words with a relevance greater than a second set threshold, or the top M words in the relevance ranking queue, can be highlighted; where M is a preset positive integer.

[0132] For example, if the relevance of word segment 1 to word segment 5 to the search information is 0.6, 0.8, 0.5, 0.4, and 0.2 respectively, then word segment 1 and word segment 2, which have a relevance greater than the second set threshold of 0.55, can be selected as words that need to be highlighted, and their display format can be set to highlight them when the search results are displayed. Alternatively, the words can be sorted from high to low relevance, and the top three words "word segment 1", "word segment 2", and "word segment 3" in the resulting relevance queue can be selected as words that need to be highlighted, and their display format can be set to highlight them when the search results are displayed.

[0133] For example, the illustration of the search results display page can also be as follows: Figure 2b As shown, Figure 2b The user inputs the search information "XX Travelogue". The target web pages that match the search information include web pages corresponding to the target film and television works. When displaying the search results, a display style that matches the web page type of the target web page is used. The key information of the target web page is displayed, and the keywords "XX Travelogue" and "TV series" that match the search information are highlighted. Among them, the key information displayed by the film and television work card includes episode number information, synopsis information, etc.

[0134] The search result display method provided in this disclosure can effectively extract and display information from web pages by structurally displaying key field information in web page content or highlighting key information that matches the search information, thereby improving the user's browsing efficiency of search results. Furthermore, in this disclosure, the most relevant information from the key and structured information corresponding to the web page content can be used as the search result, rather than simply limiting the display to either key or structured information. This approach allows for more flexible display of search results and ensures that the displayed search results better adapt to the search information, thus better meeting the user's search needs.

[0135] In other words, in this embodiment of the disclosure, if different search information matches the same webpage content, the search results displayed on the search results page may contain either key information from that webpage content or structured information from that webpage content. By selecting a search result that better suits the search information from both key and structured information within the same webpage content and displaying it in a matching format, the displayed search results better meet the search needs. This allows users to accurately predict whether the webpage content meets their search requirements and make decisions about whether to further consume the webpage details, thereby improving the efficiency of browsing search results.

[0136] Those skilled in the art will understand that, in the above-described method of the specific implementation, the order in which each step is written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.

[0137] Based on the same inventive concept, this disclosure also provides a search result display device corresponding to the search result display method. Since the principle of the device in this disclosure for solving the problem is similar to the search result display method described above in this disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.

[0138] Reference Figure 3 The diagram shown is an architectural schematic of a search result display device provided in an embodiment of this disclosure. The device includes: an acquisition module 301 and a display module 302; wherein,

[0139] The acquisition module 301 is configured to, in response to receiving search information, acquire search results that match the search information; the search results include one of key information and structured information of the target webpage content;

[0140] The display module 302 is used to display the search results in a display format that matches the search results;

[0141] The display format corresponding to the key information includes highlighting the keywords in the key information that match the search information, and the display format corresponding to the structured information includes displaying the field information of multiple key fields of the target webpage content in a structured manner.

[0142] In one possible implementation, the acquisition module 301 is configured to determine the search results matching the search information according to the following manner:

[0143] Obtain each search result; each search result includes the key information and the structured information;

[0144] Based on the first relevance between the key information and the search information, and the second relevance between the structured information and the search information, information with higher relevance is selected from the key information and the structured information as the search result that matches the search information.

[0145] In one possible implementation, the acquisition module 301 is further configured to pre-determine the structured information according to the following manner:

[0146] For the target webpage content, based on the key field combination set for the webpage category to which the target webpage content belongs, the structured information corresponding to the target webpage content is extracted; the structured information includes field information under multiple key fields indicated by the key field combination.

[0147] In one possible implementation, the acquisition module 301 is further configured to determine the key information according to the following method:

[0148] Extract each text segment from the content of the target webpage;

[0149] Determine the relevance of each text segment to the search information;

[0150] Select the text segment with the highest relevance as the key information; or, select at least one text segment with a relevance greater than a first set threshold, and integrate the at least one text segment into the key information.

[0151] In one possible implementation, when the acquisition module 301 selects information with higher relevance from the key information and the structured information as the search result matching the search information based on a first relevance between the key information and the search information, and a second relevance between the structured information and the search information, it is configured to:

[0152] The search information, the key information corresponding to the search information, and the structured information are input into a pre-trained neural network model to obtain a first relevance score, which is used to characterize the first relevance, and a second relevance score, which is used to characterize the second relevance, output by the neural network model.

[0153] Based on the first relevance score and the second relevance score, information with higher relevance scores is displayed as the search results that match the search information.

[0154] In one possible implementation, the acquisition module 301 is further configured to train the neural network model according to the following steps:

[0155] The system acquires sample search information, sample key information and sample structured information of the webpage content corresponding to the sample search information, and sample tags; wherein, the sample tags are used to mark the first sample relevance between the sample key information and the sample search information, and the second sample relevance between the sample structured information and the sample search information;

[0156] The sample search information, the sample key information, and the sample structured information are input into the neural network model to be trained to obtain the first sample relevance score, which is used to characterize the first relevance, and the second sample relevance score, which is used to characterize the second relevance, output by the neural network model.

[0157] Based on the first sample relevance score, the second sample relevance score, and the sample label, the loss value for this training is determined, and the parameters of the neural network model to be trained are adjusted based on the loss value.

[0158] In one possible implementation, the display module 302, when highlighting keywords in the key information that match the search information, is used to:

[0159] The key information is segmented into individual words.

[0160] The relevance between each word segment and the search information is calculated, and the word segments in the key information whose relevance to the search information is greater than a second set threshold are set as highlighted.

[0161] The search result display device provided in this disclosure allows search results matching search information to include one of key information and structured information of the webpage content, and displays the search results according to a display format matching the search results (key information and structured information each correspond to different display formats). This approach enables search results to better adapt to different search information, allowing users to accurately predict whether the webpage content meets their search needs, and thus make decisions on whether to further consume the webpage details, improving the browsing efficiency of search results.

[0162] The processing flow of each module in the device and the interaction flow between each module can be referred to the relevant descriptions in the above method embodiments, and will not be detailed here.

[0163] Based on the same technical concept, this disclosure also provides a computer device. (See also...) Figure 4 The diagram shows the structure of a computer device 400 provided in this embodiment, including a processor 401, a memory 402, and a bus 403. The memory 402 stores execution instructions and includes main memory 4021 and external memory 4022. The main memory 4021, also called internal memory, is used to temporarily store computational data in the processor 401 and data exchanged with external memory 4022 such as a hard disk. The processor 401 exchanges data with the external memory 4022 through the main memory 4021. When the computer device 400 is running, the processor 401 and the memory 402 communicate through the bus 403, causing the processor 401 to execute the following instructions:

[0164] In response to receiving search information, obtain search results that match the search information; the search results include one of key information and structured information of the target webpage content;

[0165] The search results are displayed in a format that matches the search results.

[0166] The display format corresponding to the key information includes highlighting the keywords in the key information that match the search information, and the display format corresponding to the structured information includes displaying the field information of multiple key fields of the target webpage content in a structured manner.

[0167] In one possible implementation, the search result matching the search information in the instructions of the processor 401 is determined according to the following method:

[0168] Obtain each search result; each search result includes the key information and the structured information;

[0169] Based on the first relevance between the key information and the search information, and the second relevance between the structured information and the search information, information with higher relevance is selected from the key information and the structured information as the search result that matches the search information.

[0170] In one possible implementation, the structured information in the instructions of the processor 401 is predetermined according to the following manner:

[0171] For the target webpage content, based on the key field combination set for the webpage category to which the target webpage content belongs, the structured information corresponding to the target webpage content is extracted; the structured information includes field information under multiple key fields indicated by the key field combination.

[0172] In one possible implementation, the key information in the instructions of the processor 401 is determined according to the following method:

[0173] Extract each text segment from the content of the target webpage;

[0174] Determine the relevance of each text segment to the search information;

[0175] Select the text segment with the highest relevance as the key information; or, select at least one text segment with a relevance greater than a first set threshold, and integrate the at least one text segment into the key information.

[0176] In one possible implementation, the instructions of the processor 401, based on a first relevance between the key information and the search information, and a second relevance between the structured information and the search information, select information with higher relevance from the key information and the structured information as the search result matching the search information, including:

[0177] The search information, the key information corresponding to the search information, and the structured information are input into a pre-trained neural network model to obtain a first relevance score, which is used to characterize the first relevance, and a second relevance score, which is used to characterize the second relevance, output by the neural network model.

[0178] Based on the first relevance score and the second relevance score, information with higher relevance scores is displayed as the search results that match the search information.

[0179] In one possible implementation, the processor 401's instructions train the neural network model according to the following steps:

[0180] The system acquires sample search information, sample key information and sample structured information of the webpage content corresponding to the sample search information, and sample tags; wherein, the sample tags are used to mark the first sample relevance between the sample key information and the sample search information, and the second sample relevance between the sample structured information and the sample search information;

[0181] The sample search information, the sample key information, and the sample structured information are input into the neural network model to be trained to obtain the first sample relevance score, which is used to characterize the first relevance, and the second sample relevance score, which is used to characterize the second relevance, output by the neural network model.

[0182] Based on the first sample relevance score, the second sample relevance score, and the sample label, the loss value for this training is determined, and the parameters of the neural network model to be trained are adjusted based on the loss value.

[0183] In one possible implementation, the instruction of the processor 401, which highlights the keywords in the key information that match the search information, includes:

[0184] The key information is segmented into individual words.

[0185] The relevance between each word segment and the search information is calculated, and the word segments in the key information whose relevance to the search information is greater than a second set threshold are set as highlighted.

[0186] This disclosure also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the search result display method described in the above-described method embodiments. The storage medium can be a volatile or non-volatile computer-readable storage medium.

[0187] This disclosure also provides a computer program product carrying program code. The program code includes instructions that can be used to execute the steps of the search result display method described in the above method embodiments. For details, please refer to the above method embodiments, which will not be repeated here.

[0188] The aforementioned computer program product can be implemented through hardware, software, or a combination thereof. In one optional embodiment, the computer program product is specifically embodied in a computer storage medium; in another optional embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.

[0189] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and devices described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. In the several embodiments provided in this disclosure, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division; in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection may be through some communication interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.

[0190] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0191] In addition, the functional units in the various embodiments of this disclosure can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0192] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0193] Finally, it should be noted that the above-described embodiments are merely specific implementations of this disclosure, used to illustrate the technical solutions of this disclosure, and not to limit it. The protection scope of this disclosure is not limited thereto. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this disclosure. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this disclosure, and should all be covered within the protection scope of this disclosure. Therefore, the protection scope of this disclosure should be determined by the protection scope of the claims.

Claims

1. A method for displaying search results, characterized in that, include: In response to receiving search information, a search result matching the search information is obtained; the search result includes one of key information and structured information of the target webpage content, wherein the key information contains a summary of the target webpage content, and the structured information is used to display the field information of multiple key fields in the target webpage content in a structured manner. The search results are displayed in a format that matches the search results. The display format corresponding to the key information includes highlighting the keywords in the key information that match the search information, and the display format corresponding to the structured information includes displaying the field information of the multiple key fields of the target webpage content in a structured manner.

2. The method according to claim 1, characterized in that, The search results that match the search information are determined according to the following method: Obtain each search result; each search result includes the key information and the structured information; Based on the first relevance between the key information and the search information, and the second relevance between the structured information and the search information, information with higher relevance is selected from the key information and the structured information as the search result that matches the search information.

3. The method according to claim 1, characterized in that, The structured information is predetermined according to the following method: For the target webpage content, based on the key field combination set for the webpage category to which the target webpage content belongs, the structured information corresponding to the target webpage content is extracted; the structured information includes field information under multiple key fields indicated by the key field combination.

4. The method according to claim 1, characterized in that, The key information was determined in the following manner: Extract each text segment from the content of the target webpage; Determine the relevance of each text segment to the search information; Select the text segment with the highest relevance as the key information; or, select at least one text segment with a relevance greater than a first set threshold, and integrate the at least one text segment into the key information.

5. The method according to claim 2, characterized in that, Based on the first relevance between the key information and the search information, and the second relevance between the structured information and the search information, information with higher relevance is selected from the key information and the structured information as the search result matching the search information, including: The search information, the key information corresponding to the search information, and the structured information are input into a pre-trained neural network model to obtain a first relevance score, which is used to characterize the first relevance, and a second relevance score, which is used to characterize the second relevance, output by the neural network model. Based on the first relevance score and the second relevance score, information with higher relevance scores is displayed as the search results that match the search information.

6. The method according to claim 5, characterized in that, The neural network model is trained according to the following steps: The system acquires sample search information, sample key information and sample structured information of the webpage content corresponding to the sample search information, and sample tags; wherein, the sample tags are used to mark the first sample relevance between the sample key information and the sample search information, and the second sample relevance between the sample structured information and the sample search information; The sample search information, the sample key information, and the sample structured information are input into the neural network model to be trained to obtain the first sample relevance score, which is used to characterize the first relevance, and the second sample relevance score, which is used to characterize the second relevance, output by the neural network model. Based on the first sample relevance score, the second sample relevance score, and the sample label, the loss value for this training is determined, and the parameters of the neural network model to be trained are adjusted based on the loss value.

7. The method according to claim 1, characterized in that, The step of highlighting keywords in the key information that match the search information includes: The key information is segmented into individual words. The relevance between each word segment and the search information is calculated, and the word segments in the key information whose relevance to the search information is greater than a second set threshold are set as highlighted.

8. A search result display device, characterized in that, include: The acquisition module is used to acquire search results that match the search information in response to receiving search information; the search results include one of key information and structured information of the target webpage content, wherein the key information includes a summary of the target webpage content, and the structured information is used to display the field information of multiple key fields in the target webpage content in a structured manner. The display module is used to display the search results in a display format that matches the search results. The display format corresponding to the key information includes highlighting the keywords in the key information that match the search information, and the display format corresponding to the structured information includes displaying the field information of the multiple key fields of the target webpage content in a structured manner.

9. A computer device, characterized in that, include: The computer device includes a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the computer device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, the steps of the search result display method as described in any one of claims 1 to 7 are performed.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the search result display method as described in any one of claims 1 to 7.