CN115730158A - Search result display method and device, computer equipment and storage medium - Google Patents

Search result display method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN115730158A
CN115730158A CN202211531138.5A CN202211531138A CN115730158A CN 115730158 A CN115730158 A CN 115730158A CN 202211531138 A CN202211531138 A CN 202211531138A CN 115730158 A CN115730158 A CN 115730158A
Authority
CN
China
Prior art keywords
information
search
key
sample
search result
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211531138.5A
Other languages
Chinese (zh)
Inventor
严林
乔超
余鑫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Zitiao Network Technology Co Ltd
Original Assignee
Beijing Zitiao Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Zitiao Network Technology Co Ltd filed Critical Beijing Zitiao Network Technology Co Ltd
Priority to CN202211531138.5A priority Critical patent/CN115730158A/en
Publication of CN115730158A publication Critical patent/CN115730158A/en
Pending legal-status Critical Current

Links

Images

Abstract

The present disclosure provides a search result display method, apparatus, computer device and storage medium, wherein the method comprises: responding to the received search information, and acquiring a search result matched with the search information; the search result comprises one of key information and structural information of the target webpage content; displaying the search result according to a display form matched with the search result; the display form corresponding to the key information comprises highlighted display of key words matched with the search information in the key information, and the display form corresponding to the structured information comprises structured display of field information of a plurality of key fields of the target webpage content.

Description

Search result display method and device, computer equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a search result display method and apparatus, a computer device, and a storage medium.
Background
With the continuous development of internet technology, users can search web page contents which are interested in the users in a search engine.
When web page search results are displayed, the display forms of the search results in a search result display page are often the same, and under the same display form, the content displayed by some search results may not meet the search requirements of the user, so that the user may make a wrong judgment on whether the search results meet the search requirements of the user. For example, the web page content of a certain web page may contain effective information that well matches the search requirement of the user, but because of the limitation of the presentation form, the partial content of the web page presented in the search result does not well embody the effective information.
Disclosure of Invention
The embodiment of the disclosure at least provides a search result display method, a search result display device, computer equipment and a storage medium.
In a first aspect, an embodiment of the present disclosure provides a search result display method, including:
responding to received search information, and acquiring a search result matched with the search information; the search result comprises one of key information and structural information of the target webpage content;
displaying the search result according to a display form matched with the search result;
the display form corresponding to the key information comprises highlighted display of key words matched with the search information in the key information, and the display form corresponding to the structured information comprises structured display of field information of a plurality of key fields of the target webpage content.
In a possible implementation, the search result matching the search information is determined according to the following manner:
obtaining each search result; each search result comprises the key information and the structured information;
and selecting information with higher corresponding correlation degree from the key information and the structured information as a search result matched with the search information based on a first correlation degree between the key information and the search information and a second correlation degree between the structured information and the search information.
In one possible embodiment, the structured information is predetermined according to the following:
aiming at the target webpage content, extracting the structural information corresponding to the target webpage content based on a key field combination set for the webpage category to which the target webpage content belongs; the structured information comprises field information under a plurality of key fields indicated by the key field combination.
In a possible embodiment, the key information is determined according to the following:
extracting each text segment in the target webpage content;
determining a degree of correlation between each of the text segments and the search information;
selecting the corresponding text segment with the highest degree of correlation as the key information; or selecting at least one text segment with the corresponding correlation degree larger than a first set threshold value, and integrating the at least one text segment into the key information.
In one possible embodiment, selecting, from the key information and the structured information, information with a higher corresponding degree of correlation as a search result matching the search information based on a first degree of correlation between the key information and the search information and a second degree of correlation between the structured information and the search information, includes:
inputting the search information, the key information corresponding to the search information and the structural information into a pre-trained neural network model to obtain a first correlation score which is output by the neural network model and used for representing a first correlation degree and a second correlation score which is output by the neural network model and used for representing a second correlation degree;
and displaying the information with higher correlation score as the search result matched with the search information according to the first correlation score and the second correlation score.
In one possible implementation, the neural network model is trained according to the following steps:
obtaining sample searching information, sample key information and sample structural information of webpage content corresponding to the sample searching information, and a sample label; the sample label is used for marking a first sample correlation degree of the sample key information and the sample search information and a second sample correlation degree of the sample structured information and the sample search information;
inputting the sample searching information, the sample key information and the sample structural information into the neural network model to be trained to obtain a first sample correlation score which is output by the neural network model and used for representing a first correlation degree and a second sample correlation score which is output by the neural network model and used for representing a second correlation degree;
and determining a loss value of the training based on the first sample correlation score, the second sample correlation score and the sample label, and performing parameter adjustment on the neural network model to be trained based on the loss value.
In a possible implementation manner, the highlighting the keyword in the key information that matches the search information includes:
performing word segmentation processing on the key information to obtain each word segmentation;
and calculating the correlation degree between each participle and the search information, and setting the participle with the correlation degree between the key information and the search information larger than a second set threshold value as a highlighted display form.
In a second aspect, an embodiment of the present disclosure further provides a search result display apparatus, including:
the acquisition module is used for responding to the received search information and acquiring a search result matched with the search information; the search result comprises one of key information and structural information of the target webpage content;
the display module is used for displaying the search results according to the display form matched with the search results;
the display form corresponding to the key information comprises highlighted display of key words matched with the search information in the key information, and the display form corresponding to the structured information comprises structured display of field information of a plurality of key fields of the target webpage content.
In a possible implementation manner, the obtaining module is configured to determine a search result matching the search information according to the following manner:
obtaining each search result; each search result comprises the key information and the structured information;
and selecting information with higher corresponding correlation degree from the key information and the structured information as a search result matched with the search information based on a first correlation degree between the key information and the search information and a second correlation degree between the structured information and the search information.
In a possible embodiment, the obtaining module is further configured to determine the structured information in advance according to the following:
aiming at the target webpage content, extracting structural information corresponding to the target webpage content based on a key field combination set for a webpage category to which the target webpage content belongs; the structured information includes field information under a plurality of key fields indicated by the key field combination.
In a possible implementation, the obtaining module is further configured to determine the key information according to the following:
extracting each text segment in the target webpage content;
determining a degree of correlation between each of the text segments and the search information;
selecting the corresponding text segment with the highest degree of correlation as the key information; or selecting at least one text segment with the corresponding correlation degree larger than a first set threshold value, and integrating the at least one text segment into the key information.
In one possible implementation manner, the obtaining module, when selecting, based on a first correlation between the key information and the search information and a second correlation between the structured information and the search information, information with a higher corresponding correlation from the key information and the structured information as a search result matching the search information, is configured to:
inputting the search information, the key information corresponding to the search information and the structural information into a pre-trained neural network model to obtain a first correlation score which is output by the neural network model and used for representing a first correlation degree and a second correlation score which is output by the neural network model and used for representing a second correlation degree;
and displaying the information with higher correlation score as the search result matched with the search information according to the first correlation score and the second correlation score.
In a possible implementation, the obtaining module is further configured to train and obtain the neural network model according to the following steps:
obtaining sample searching information, sample key information and sample structural information of webpage content corresponding to the sample searching information, and a sample label; the sample label is used for marking a first sample correlation degree of the sample key information and the sample search information and a second sample correlation degree of the sample structured information and the sample search information;
inputting the sample searching information, the sample key information and the sample structural information into the neural network model to be trained to obtain a first sample correlation score which is output by the neural network model and used for representing a first correlation degree and a second sample correlation score which is output by the neural network model and used for representing a second correlation degree;
and determining a loss value of the training based on the first sample correlation score, the second sample correlation score and the sample label, and performing parameter adjustment on the neural network model to be trained based on the loss value.
In a possible embodiment, the presentation module, when highlighting the keyword in the key information that matches the search information, is configured to:
performing word segmentation processing on the key information to obtain each word segmentation;
and calculating the correlation degree between each participle and the search information, and setting the participle with the correlation degree between the key information and the search information larger than a second set threshold value as a highlighted display form.
In a third aspect, an embodiment of the present disclosure further provides a computer device, including: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating via the bus when the computer device is running, the machine-readable instructions when executed by the processor performing the steps of the first aspect or any one of the possible implementations of the first aspect.
In a fourth aspect, this disclosed embodiment also provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform the steps in the first aspect or any one of the possible implementation manners of the first aspect.
According to the search result display method, the search result display device, the computer equipment and the storage medium provided by the embodiment of the disclosure, the search result matched with the search information can comprise one of key information and structural information of webpage content, and the search result is displayed according to the display form matched with the search result. In the embodiment of the disclosure, by performing structured display on the field information of the key field in the webpage content or performing prominent display on the key information matched with the search information, the information in the webpage can be well extracted and displayed, and the browsing efficiency of the user on the search result is improved. Moreover, in the embodiment of the disclosure, one of the key information and the structured information corresponding to the web page content, which can best match the search requirement, can be used as the search result and displayed according to the display form corresponding to the key information and the structured information, instead of displaying the key information or the structured information in a single limited manner according to a single display form, so that the display form of the search result can be more flexible, and the displayed search result can be better adapted to the search information, thereby better meeting the search requirement of the user.
In order to make the aforementioned objects, features and advantages of the present disclosure more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required in the embodiments will be briefly described below, and the drawings herein incorporated in and forming a part of the specification illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the technical solutions of the present disclosure. It is to be understood that the following drawings depict only certain embodiments of the disclosure and are therefore not to be considered limiting of its scope, for those skilled in the art to which the disclosure pertains without the benefit of the inventive faculty, and that additional related drawings may be derived therefrom.
FIG. 1 is a flowchart illustrating a method for presenting search results provided by an embodiment of the present disclosure;
fig. 2a is a schematic diagram illustrating a search result presentation page in the search result presentation method provided by the embodiment of the present disclosure;
fig. 2b is a schematic diagram illustrating another search result presentation page in the search result presentation method provided in the embodiment of the present disclosure;
FIG. 3 is a schematic diagram illustrating an architecture of a search result presentation apparatus provided in an embodiment of the present disclosure;
fig. 4 shows a schematic structural diagram of a computer device provided by an embodiment of the present disclosure.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are only a part of the embodiments of the present disclosure, not all of the embodiments. The components of the embodiments of the present disclosure, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the disclosure, provided in the accompanying drawings, is not intended to limit the scope of the disclosure, as claimed, but is merely representative of selected embodiments of the disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the disclosure without making creative efforts, shall fall within the protection scope of the disclosure.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The term "and/or" herein merely describes an associative relationship, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of a, B, and C, and may mean including any one or more elements selected from the group consisting of a, B, and C.
It is understood that before the technical solutions disclosed in the embodiments of the present disclosure are used, the type, the use range, the use scene, etc. of the personal information related to the present disclosure should be informed to the user and obtain the authorization of the user through a proper manner according to the relevant laws and regulations.
For example, in response to receiving an active request from a user, a prompt message is sent to the user to explicitly prompt the user that the requested operation to be performed would require the acquisition and use of personal information to the user. Thus, the user can autonomously select whether to provide personal information to software or hardware such as an electronic device, an application program, a server, or a storage medium that performs the operations of the disclosed technical solution, according to the prompt information.
As an alternative but non-limiting implementation manner, in response to receiving an active request from the user, the manner of sending the prompt information to the user may be, for example, a pop-up window manner, and the prompt information may be presented in a text manner in the pop-up window. In addition, a selection control for providing personal information to the electronic device by the user's selection of "agreeing" or "disagreeing" can be carried in the pop-up window.
It is understood that the above notification and user authorization process is only illustrative and not limiting, and other ways of satisfying relevant laws and regulations may be applied to the implementation of the present disclosure.
The embodiment of the disclosure provides a search result display method, a search result display device, computer equipment and a storage medium, when a search result related to webpage content needs to be displayed, which of key information and structural information of the webpage content extracted in advance is most matched with the search information can be determined, the finally displayed search result can be one of the key information and the structural information of the webpage content which is most matched with the search information, and the search result is displayed according to a display form matched with the search result. By means of the method, the field information of the key fields in the webpage is displayed in a structured mode, or the key words matched with the search information are displayed in a highlighted mode, the information in the webpage can be well extracted and displayed, and the browsing efficiency of a user on the search results is improved. In addition, in the embodiment of the disclosure, one piece of information which can best match with the search requirement can be selected from the key information and the structural information corresponding to the webpage content as the search result, rather than singly limiting and displaying the key information or the structural information according to a single display form, so that the display form of the search result can be more flexible, and the displayed search result can be better adapted to the search information, thereby better meeting the search requirement of the user.
To facilitate understanding of the present embodiment, first, a search result presentation method disclosed in the embodiments of the present disclosure is described in detail, where an execution subject of the search result presentation method provided in the embodiments of the present disclosure is generally a computer device with certain computing capability, and the computer device includes, for example: the terminal device may be an intelligent terminal device with a display function, for example, a smart phone, a tablet computer, an intelligent wearable device, or the like. In some possible implementations, the search result presentation method may be implemented by a processor calling computer readable instructions stored in a memory.
Referring to fig. 1, a flowchart of a search result display method provided in the embodiment of the present disclosure is shown, where the method includes S101 to S102, where:
s101: responding to received search information, and acquiring a search result matched with the search information; the search results include one of key information and structured information of the target web page content.
S102: displaying the search result according to a display form matched with the search result;
the display form corresponding to the key information comprises highlighted display of key words matched with the search information in the key information, and the display form corresponding to the structured information comprises structured display of field information of a plurality of key fields of the target webpage content.
By adopting the steps, the key information and the structural information corresponding to the webpage content can be extracted in advance; after receiving the search information, selecting information which can best match with the search requirement from key information and structural information corresponding to the webpage content as a search result, and displaying the search result according to a display form corresponding to the search result, wherein if the key information is selected to be displayed, a keyword in which a search information problem is solved can be prominently displayed, for example, a drifting display, and if the structural information is selected to be displayed, field information of a plurality of key fields of the webpage content which is extracted in advance can be displayed according to a configured structural style. In this way, the display form of the search result can be more flexible, and the displayed search result can be better adapted to the search information, so that the search requirement of the user can be better met.
The following is a detailed description of the above steps.
For the above S101:
the search information may be information input by a user in a search bar of a search page, or may be search information determined based on recommended search terms; the target webpage content is the webpage content in the target webpage matched with the search information, and the webpage content of the target webpage can contain answer information corresponding to the search information.
The key information may include the title, the content introduction and other general contents of the target webpage content; the structured information is used for performing structured display on information of a plurality of key fields in the webpage content, the key fields can comprise covers, titles, categories, authors, update states, catalogs and the like, and the structured information can be displayed in the form of structured information cards and the like.
In practical application, before a user uses search information to search, key information and structural information of each webpage content can be determined in advance, so that when the user uses the search information to search, the key information and the structural information of the webpage content in a search result can be rapidly acquired.
The determination of the structured information and the key information will be described below separately:
1. for structured information:
for the target webpage content, the structural information corresponding to the target webpage content can be extracted based on the key field combination set for the webpage category to which the target webpage content belongs.
Wherein, the structured information includes field information under a plurality of key fields indicated by the key field combination.
Specifically, the different field information corresponds to the web page contents of the web page contents at different positions in the web page, and different web page categories may correspond to different fields, so as to extract different web page contents from different categories of web pages.
In addition, since structured information extraction needs to be performed based on the key field combination set by the web page category to which the target web page content belongs, the web page category of the target web page needs to be determined in advance, and the key field combination needs to be determined from a plurality of fields corresponding to the target web page.
In a possible implementation manner, the web page category identification may be performed on each web page through a pre-trained web page category determination model, so that the web page category of each web page may be determined in batch.
Here, the web page category determination model may be a neural network model that can be used to perform a classification task, such as a transform-based Bidirectional Encoder Representation (BERT) model or the like.
The input data of the webpage category determination model can be obtained by performing data construction on webpage content of the target webpage; the input data obtained by data construction is used for representing the content and attribute information of each content node in the network content; the attribute information comprises depth information and position information, the depth information is used for representing the hierarchical relationship between the content nodes and other content nodes, and the position information is used for representing the layout positions of the content nodes in the webpage.
Specifically, when data is constructed, a node tree corresponding to the target webpage may be traversed based on a depth-first traversal algorithm, and depth information and position information corresponding to each content node are determined; the node tree is generated based on a webpage code corresponding to the target webpage; and splicing the content of each content node, the depth information and the position information corresponding to each content node according to a preset data construction sequence to obtain the input data corresponding to the target webpage.
In addition, when the web page category determination model is trained, sample input data generated after data construction is performed on a sample web page may be input into the web page category determination model to be trained, a sample web page category output by the web page category identification model is obtained, a loss value of the current training is determined based on the sample web page category and a web page category label corresponding to the sample web page, and a network parameter of the web page category determination model is adjusted based on the loss value until the number of parameter adjustment times reaches a preset adjustment time, and/or a network precision of the web page category determination model meets a preset precision requirement.
Further, after determining the web page category of each web page according to the web page category determination model, a key field combination corresponding to each web page can be configured, so as to extract structured information corresponding to the web page content in each web page according to a field access path corresponding to each key field in the key field combination; in order to improve the configuration efficiency of the key field combinations, the same key field combinations can be configured for the webpages belonging to the same webpage group, and the webpage group can be formed by the webpages corresponding to part of the same webpage addresses.
Therefore, when the structural information corresponding to the webpage content is extracted, the target webpage content of the target webpage can be extracted according to the key field combination corresponding to the webpage category to which the webpage category of the target webpage belongs, and therefore the structural information corresponding to the target webpage content is obtained.
2. Aiming at the key information:
here, in determining the key information, the key information may be determined by the following steps A1 to A3:
a1: and extracting each text segment in the target webpage content.
Here, the target web content may be subjected to text segmentation processing to obtain each text segment in the target web content.
Specifically, when the target web page content is subjected to text segmentation processing, the text processing may be performed according to a preset text segmentation length to obtain each text segment in the target web page content;
or, when text segmentation is performed on the target web page content, text segmentation may be performed according to target punctuations in the target web page content, and text content between an nth target punctuation and an N +1 th target punctuation may be used as a text segment, where N is a positive integer, and text content before a first target punctuation is coincident may be used as a text segment, and the target punctuation may be, for example, a comma, a period, or other symbols;
or when the target webpage content is subjected to text segmentation processing, text segmentation processing can be further performed from the perspective of text semantics through a pre-trained text segmentation model, so that each text segment in the target webpage content is obtained. That is, the text segmentation model segments the contents of the target web page into a text segment by performing semantic recognition, and segments the contents of different semantics into different text segments. The text segmentation model can perform semantic recognition on the words to be combined, combine the words to be combined which have the same semantic meaning and/or similar semantic meaning and/or are related in semantic meaning and are adjacent in position in the web page content to obtain at least one word combination, and each word combination can form a text segment.
A2: determining a degree of correlation between each of the text segments and the search information.
Here, the degree of correlation between the text segment and the search information may be determined by calculating a euclidean distance between feature expression vectors of both, an edit distance between characters of both, or the like, or may be calculated directly by a semantic recognition model. The embodiment of the present disclosure does not specifically limit what way to select the similarity calculation.
A3: selecting the corresponding text segment with the highest degree of correlation as the key information; or selecting at least one text segment with the corresponding correlation degree larger than a first set threshold value, and integrating the at least one text segment into the key information.
For example, taking the relevance of the text segments 1 to 5 to the search information as 0.6, 0.7, 0.5, 0.4, and 0.9, respectively, the text segment 5 with the highest relevance may be used as the key information; or, the text segment 2 and the text segment 5 with the correlation degree greater than the first set threshold 0.65 may be selected, and the text segment 2 and the text segment 5 are integrated according to the arrangement sequence of the text segments in the web page content, and the integrated text content is used as the key information.
In practical application, the target web page content may correspond to the key information and the structural information at the same time, and if the key information and the structural information corresponding to the target web page content are displayed in the search result display page at the same time, the display content may be more, so that the display effect of other subsequent search results is affected.
In one possible embodiment, when obtaining the search result matching the search information, the following steps B1 to B2 may be performed:
b1: obtaining each search result; the respective search results include the key information and the structured information.
Here, for any of the search results, the search result may include key information of the web content corresponding to the search result and structural information of the web content corresponding to the search result.
B2: and selecting information with higher corresponding correlation degree from the key information and the structured information as a search result matched with the search information based on a first correlation degree between the key information and the search information and a second correlation degree between the structured information and the search information.
Here, the first degree of correlation and the second degree of correlation may be a text degree of correlation and/or a semantic degree of correlation.
In one possible embodiment, when selecting information with a high degree of correlation from the key information and the structured information as a search result matching the search information, the following steps B21 to B22 may be performed:
b21: inputting the search information, the key information corresponding to the search information and the structural information into a pre-trained neural network model to obtain a first correlation score for representing a first correlation degree and a second correlation score for representing a second correlation degree, which are output by the neural network model.
Here, the network type of the pre-trained neural network model may be, for example, a (bidirectional encoder representation based on Transformer) model.
B22: and displaying the information with higher correlation score as the search result matched with the search information according to the first correlation score and the second correlation score.
For example, taking the example that the first correlation score representing the first correlation between the key information and the search information is 0.6, and the second correlation score representing the second correlation between the structured information and the search information is 0.8, the structured information with a higher correlation score may be displayed as a search result matched with the search information.
Further, the neural network model can be obtained through the following steps C1 to C3:
c1: obtaining sample searching information, sample key information and sample structural information of webpage content corresponding to the sample searching information, and a sample label; the sample label is used for marking a first sample correlation degree of the sample key information and the sample search information and a second sample correlation degree of the sample structured information and the sample search information.
C2: and inputting the sample searching information, the sample key information and the sample structural information into the neural network model to be trained to obtain a first sample correlation score which is output by the neural network model and used for representing a first correlation degree and a second sample correlation score which is output by the neural network model and used for representing a second correlation degree.
C3: and determining a loss value of the training based on the first sample correlation score, the second sample correlation score and the sample label, and performing parameter adjustment on the neural network model to be trained based on the loss value.
Here, the loss value of the present training may include a first loss value and a second loss value; wherein the first loss value can be used to characterize the first sample correlation score, the difference between the first sample correlation score and the first sample correlation degree of the sample label, that is, whether the first sample correlation score is the same as the labeled correlation degree; the second loss value can be used to characterize the difference between the second sample correlation score and the second sample correlation degree labeled by the sample label, i.e. whether the second sample correlation score is the same as the labeled correlation degree.
Specifically, when determining the loss value, the first loss value and the second loss value may be weighted and summed based on the first loss value, the second loss value, and a preset weight parameter, and the neural network model may be parameter-adjusted based on the loss value obtained after weighted and summed until the number of parameter adjustments reaches a preset number of adjustments, and/or the network precision of the neural network model meets a preset precision requirement.
Therefore, through the pre-trained neural network model, the information with higher correlation degree with the search information can be selected from the key information and the structural information corresponding to the webpage content to serve as the search result matched with the search information, so that the correlation degree of the finally displayed search result and the search information is higher, and the search result browsing efficiency of the user is improved.
For S102:
here, when the field information of the plurality of key fields of the target web page content is structurally displayed, the field information of the plurality of key fields of the target web page content may be structurally displayed according to a structural display template matching with the network type of the target web page.
For example, as shown in fig. 2a, the search information input by the user in fig. 2a is novel search information "struggling in the XX era", the target web page matched with the search information is a web page corresponding to the target novel, when the search result is displayed, a structured display template (namely, a novel card) matched with the web page category of the target web page is used, the structured information of the target web page is displayed, the displayed structured information includes author information, state information, brief introduction information, and the like, recently updated novel content is also displayed in the novel card, and the user can browse the content of the corresponding novel chapter by triggering the corresponding chapter.
In one possible embodiment, when highlighting the keyword in the key information that matches the search information, the following steps D1 to D2 may be performed:
d1: and performing word segmentation processing on the key information to obtain each word segmentation.
Here, when performing Word Segmentation processing on the key information, word Segmentation processing may be performed on the key information using a Chinese Word Segmentation model (CWS) to obtain each segmented Word after the Word Segmentation processing.
It should be noted that, in the embodiment of the present disclosure, how to perform the word segmentation processing on the key information is not limited, and the implementation is subject to the standard.
D2: and calculating the correlation degree between each participle and the search information, and setting the participle of which the correlation degree with the search information in the key information is greater than a second set threshold value as a highlighted display form.
Here, the relevancy between the participle and the search information may include text relevancy such as euclidean distance, edit distance, and the like, and/or semantic relevancy; when the relevancy between the participles and the search information is determined, calculation can be performed according to a preset relevancy calculation formula, and the embodiment of the disclosure does not limit which relevancy calculation formula is selected, so that the relevancy calculation formula can be realized in practical application; the highlighting form may include a bold font, a change in the color of the background of the area in which the font is located, an increase in the size of the font, and the like.
Specifically, after the correlation between each participle and the search information is calculated, the participle of which the correlation with the search information is greater than a second set threshold value may be set, or the top M participles in the correlation sorting queue may be set to be in a highlighted form; wherein M is a preset positive integer.
Exemplarily, if the relevance between the participle 1 to the participle 5 and the search information is 0.6, 0.8, 0.5, 0.4, and 0.2 in sequence, the participle 1 and the participle 2 larger than a second set threshold value of 0.55 may be used as the participles to be prominently displayed, and the display form of the participle 1 and the participle 2 is set to be a prominent display form, so that the participle 1 and the participle 2 are prominently displayed when the search result is displayed; or, the participles may be ranked according to the relevance from high to low, the top 3 participles "participle 1", "participle 2" and "participle 3" in the relevance queue obtained after ranking are taken as the participles to be prominently displayed, and the display forms of the participle 1, the participle 2 and the participle 3 are set as the prominently display forms, so that the participle 1, the participle 2 and the participle 3 are prominently displayed when the search result is displayed.
As an example, the schematic diagram of the search result display page may also be as shown in fig. 2b, the search information input by the user is "XX travel notes," the target web page matched with the search information includes a web page corresponding to the target movie and television work, when the search result is displayed, a display style matched with the web page type of the target web page is used to display the key information of the target web page, and the keywords "XX travel notes" and "drama" matched with the search information in the key information are prominently displayed; the key information displayed by the film and television work card comprises album number information, brief introduction information and the like.
According to the search result display method provided by the embodiment of the disclosure, by performing structured display on field information of key fields in webpage content or performing prominent display on key information matched with search information, information in a webpage can be well extracted and displayed, and the browsing efficiency of a user on search results is improved. Moreover, in the embodiment of the disclosure, one of the key information and the structured information corresponding to the web page content, which can best match with the search requirement, can be used as the search result instead of singly limiting to display the key information or the structured information.
That is, for different search information, if the same web page content is matched, the search result finally presented in the search result page may be key information of the web page content in some cases, or may be structured information of the web page content in some cases. Therefore, a search result which is more adaptive to the search information is selected from the key information and the structural information of the same webpage content and displayed according to the matched display form, so that the displayed search result can be better adaptive to the search requirement, a user can accurately predict whether the webpage content meets the search requirement of the user, a decision whether to further consume the detailed webpage content is made, and the browsing efficiency of the search result of the user is improved.
It will be understood by those skilled in the art that in the method of the present invention, the order of writing the steps does not imply a strict order of execution and any limitations on the implementation, and the specific order of execution of the steps should be determined by their function and possible inherent logic.
Based on the same inventive concept, a search result display device corresponding to the search result display method is also provided in the embodiments of the present disclosure, and because the principle of solving the problem of the device in the embodiments of the present disclosure is similar to the search result display method in the embodiments of the present disclosure, the implementation of the device can refer to the implementation of the method, and repeated details are not repeated.
Referring to fig. 3, a schematic diagram of an architecture of a search result display apparatus provided in the embodiment of the present disclosure is shown, where the apparatus includes: an acquisition module 301 and a display module 302; wherein the content of the first and second substances,
an obtaining module 301, configured to obtain, in response to receiving search information, a search result matching the search information; the search result comprises one of key information and structural information of the target webpage content;
a display module 302, configured to display the search result according to a display form matched with the search result;
the display form corresponding to the key information comprises highlighted display of key words matched with the search information in the key information, and the display form corresponding to the structured information comprises structured display of field information of a plurality of key fields of the target webpage content.
In a possible implementation manner, the obtaining module 301 is configured to determine a search result matching the search information according to the following manner:
obtaining each search result; each search result comprises the key information and the structured information;
and selecting information with higher corresponding correlation degree from the key information and the structured information as a search result matched with the search information based on a first correlation degree between the key information and the search information and a second correlation degree between the structured information and the search information.
In a possible implementation, the obtaining module 301 is further configured to determine the structured information in advance according to the following manner:
aiming at the target webpage content, extracting structural information corresponding to the target webpage content based on a key field combination set for a webpage category to which the target webpage content belongs; the structured information comprises field information under a plurality of key fields indicated by the key field combination.
In a possible implementation, the obtaining module 301 is further configured to determine the key information according to the following manner:
extracting each text segment in the target webpage content;
determining a degree of correlation between each of the text segments and the search information;
selecting the corresponding text segment with the highest degree of correlation as the key information; or selecting at least one text segment with the corresponding correlation degree larger than a first set threshold value, and integrating the at least one text segment into the key information.
In one possible implementation manner, the obtaining module 301, when selecting, based on a first correlation degree between the key information and the search information and a second correlation degree between the structured information and the search information, information with a higher corresponding correlation degree from the key information and the structured information as a search result matching the search information, is configured to:
inputting the search information, the key information corresponding to the search information and the structural information into a pre-trained neural network model to obtain a first correlation score which is output by the neural network model and used for representing a first correlation degree and a second correlation score which is output by the neural network model and used for representing a second correlation degree;
and displaying the information with higher correlation score as the search result matched with the search information according to the first correlation score and the second correlation score.
In a possible implementation, the obtaining module 301 is further configured to train to obtain the neural network model according to the following steps:
obtaining sample searching information, sample key information and sample structural information of webpage content corresponding to the sample searching information, and a sample label; the sample label is used for marking a first sample correlation degree of the sample key information and the sample search information and a second sample correlation degree of the sample structured information and the sample search information;
inputting the sample searching information, the sample key information and the sample structural information into the neural network model to be trained to obtain a first sample correlation score which is output by the neural network model and used for representing a first correlation degree and a second sample correlation score which is output by the neural network model and used for representing a second correlation degree;
and determining a loss value of the training based on the first sample correlation score, the second sample correlation score and the sample label, and performing parameter adjustment on the neural network model to be trained based on the loss value.
In a possible implementation manner, the presenting module 302, when highlighting the keyword in the key information that matches the search information, is configured to:
performing word segmentation processing on the key information to obtain each word segmentation;
and calculating the correlation degree between each participle and the search information, and setting the participle of which the correlation degree with the search information in the key information is greater than a second set threshold value as a highlighted display form.
According to the search result display device provided by the embodiment of the disclosure, the search result matched with the search information may include one of key information and structural information of the web content, and the search result is displayed according to a display form matched with the search result (the key information and the structural information respectively correspond to different display forms). The method can enable the search result to be better adapted to different search information, and enable the user to accurately prejudge whether the webpage content meets the search requirement of the user, so as to make a decision whether to further consume the detailed webpage content and improve the browsing efficiency of the search result of the user.
The description of the processing flow of each module in the apparatus and the interaction flow between the modules may refer to the relevant description in the above method embodiments, and will not be described in detail here.
Based on the same technical concept, the embodiment of the disclosure also provides computer equipment. Referring to fig. 4, a schematic structural diagram of a computer device 400 provided in the embodiment of the present disclosure includes a processor 401, a memory 402, and a bus 403. The memory 402 is used for storing execution instructions and includes a memory 4021 and an external memory 4022; the memory 4021 is also referred to as an internal memory, and is configured to temporarily store operation data in the processor 401 and data exchanged with an external memory 4022 such as a hard disk, the processor 401 exchanges data with the external memory 4022 through the memory 4021, and when the computer device 400 operates, the processor 401 communicates with the memory 402 through the bus 403, so that the processor 401 executes the following instructions:
responding to received search information, and acquiring a search result matched with the search information; the search result comprises one of key information and structural information of the target webpage content;
displaying the search result according to a display form matched with the search result;
the display form corresponding to the key information comprises highlighted display of key words matched with the search information in the key information, and the display form corresponding to the structured information comprises structured display of field information of a plurality of key fields of the target webpage content.
In a possible implementation manner, in the instructions of the processor 401, the search result matching the search information is determined according to the following manner:
obtaining each search result; each search result comprises the key information and the structured information;
and selecting information with higher corresponding correlation degree from the key information and the structured information as a search result matched with the search information based on a first correlation degree between the key information and the search information and a second correlation degree between the structured information and the search information.
In a possible implementation, in the instructions of the processor 401, the structured information is predetermined according to the following manner:
aiming at the target webpage content, extracting the structural information corresponding to the target webpage content based on a key field combination set for the webpage category to which the target webpage content belongs; the structured information includes field information under a plurality of key fields indicated by the key field combination.
In a possible implementation manner, in the instructions of the processor 401, the key information is determined according to the following manner:
extracting each text segment in the target webpage content;
determining a degree of correlation between each of the text segments and the search information;
selecting the corresponding text segment with the highest degree of correlation as the key information; or selecting at least one text segment with the corresponding correlation degree larger than a first set threshold value, and integrating the at least one text segment into the key information.
In one possible implementation, the instructions of the processor 401, based on a first correlation between the key information and the search information and a second correlation between the structured information and the search information, selecting information with a higher corresponding correlation from the key information and the structured information as a search result matching the search information, includes:
inputting the search information, the key information corresponding to the search information and the structural information into a pre-trained neural network model to obtain a first correlation score which is output by the neural network model and used for representing a first correlation degree and a second correlation score which is output by the neural network model and used for representing a second correlation degree;
and displaying the information with higher correlation score as the search result matched with the search information according to the first correlation score and the second correlation score.
In one possible implementation, the instructions of the processor 401 train the neural network model according to the following steps:
obtaining sample searching information, sample key information and sample structural information of webpage content corresponding to the sample searching information, and a sample label; the sample label is used for marking a first sample correlation degree of the sample key information and the sample search information and a second sample correlation degree of the sample structured information and the sample search information;
inputting the sample search information, the sample key information and the sample structural information into the neural network model to be trained to obtain a first sample correlation score which is output by the neural network model and used for representing a first correlation degree and a second sample correlation score which is output by the neural network model and used for representing a second correlation degree;
and determining a loss value of the training based on the first sample correlation score, the second sample correlation score and the sample label, and performing parameter adjustment on the neural network model to be trained based on the loss value.
In a possible implementation manner, the highlighting the keyword in the key information that matches the search information in the instructions of the processor 401 includes:
performing word segmentation processing on the key information to obtain each word segmentation;
and calculating the correlation degree between each participle and the search information, and setting the participle with the correlation degree between the key information and the search information larger than a second set threshold value as a highlighted display form.
The embodiment of the present disclosure further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the search result presentation method described in the above method embodiment are executed. The storage medium may be a volatile or non-volatile computer-readable storage medium.
The embodiments of the present disclosure also provide a computer program product, where the computer program product carries a program code, and instructions included in the program code may be used to execute the steps of the search result displaying method in the foregoing method embodiments, which may be referred to specifically in the foregoing method embodiments, and are not described herein again.
The computer program product may be implemented by hardware, software or a combination thereof. In an alternative embodiment, the computer program product is embodied in a computer storage medium, and in another alternative embodiment, the computer program product is embodied in a Software product, such as a Software Development Kit (SDK) or the like.
It can be clearly understood by those skilled in the art that, for convenience and simplicity of description, the specific working process of the system and the apparatus described above may refer to the corresponding process in the foregoing method embodiment, and details are not described herein again. In the several embodiments provided in the present disclosure, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. The above-described apparatus embodiments are merely illustrative, and for example, the division of the units into only one type of logical function may be implemented in other ways, and for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solutions of the present disclosure, which are essential or part of the technical solutions contributing to the prior art, may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the methods described in the embodiments of the present disclosure. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Finally, it should be noted that: the above-mentioned embodiments are merely specific embodiments of the present disclosure, which are used for illustrating the technical solutions of the present disclosure and not for limiting the same, and the scope of the present disclosure is not limited thereto, and although the present disclosure is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive of the technical solutions described in the foregoing embodiments or equivalent technical features thereof within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present disclosure, and should be construed as being included therein. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (10)

1. A search result display method is characterized by comprising the following steps:
responding to received search information, and acquiring a search result matched with the search information; the search result comprises one of key information and structural information of the target webpage content;
displaying the search result according to a display form matched with the search result;
the display form corresponding to the key information comprises highlighted display of key words matched with the search information in the key information, and the display form corresponding to the structured information comprises structured display of field information of a plurality of key fields of the target webpage content.
2. The method of claim 1, wherein the search result that matches the search information is determined according to:
obtaining each search result; each search result comprises the key information and the structured information;
and selecting information with higher corresponding correlation degree from the key information and the structured information as a search result matched with the search information based on a first correlation degree between the key information and the search information and a second correlation degree between the structured information and the search information.
3. The method of claim 1, wherein the structured information is predetermined according to:
aiming at the target webpage content, extracting the structural information corresponding to the target webpage content based on a key field combination set for the webpage category to which the target webpage content belongs; the structured information includes field information under a plurality of key fields indicated by the key field combination.
4. The method of claim 1, wherein the key information is determined according to the following:
extracting each text segment in the target webpage content;
determining a degree of correlation between each of the text segments and the search information;
selecting the corresponding text segment with the highest degree of correlation as the key information; or selecting at least one text segment with the corresponding correlation degree larger than a first set threshold value, and integrating the at least one text segment into the key information.
5. The method according to claim 2, wherein selecting information with a higher corresponding correlation from the key information and the structured information as the search result matching the search information based on a first correlation between the key information and the search information and a second correlation between the structured information and the search information comprises:
inputting the search information, the key information corresponding to the search information and the structural information into a pre-trained neural network model to obtain a first correlation score which is output by the neural network model and used for representing a first correlation degree and a second correlation score which is output by the neural network model and used for representing a second correlation degree;
and displaying the information with higher correlation score as the search result matched with the search information according to the first correlation score and the second correlation score.
6. The method of claim 5, wherein the neural network model is trained according to the following steps:
acquiring sample searching information, sample key information and sample structural information of webpage content corresponding to the sample searching information, and a sample label; the sample label is used for marking a first sample correlation degree of the sample key information and the sample search information and a second sample correlation degree of the sample structured information and the sample search information;
inputting the sample searching information, the sample key information and the sample structural information into the neural network model to be trained to obtain a first sample correlation score which is output by the neural network model and used for representing a first correlation degree and a second sample correlation score which is output by the neural network model and used for representing a second correlation degree;
and determining a loss value of the training based on the first sample correlation score, the second sample correlation score and the sample label, and performing parameter adjustment on the neural network model to be trained based on the loss value.
7. The method of claim 1, wherein highlighting the keywords in the key information that match the search information comprises:
performing word segmentation processing on the key information to obtain each word segmentation;
and calculating the correlation degree between each participle and the search information, and setting the participle with the correlation degree between the key information and the search information larger than a second set threshold value as a highlighted display form.
8. A search result presentation apparatus, comprising:
the acquisition module is used for responding to the received search information and acquiring a search result matched with the search information; the search result comprises one of key information and structural information of the target webpage content;
the display module is used for displaying the search result according to a display form matched with the search result;
the display form corresponding to the key information comprises highlighted display of key words matched with the search information in the key information, and the display form corresponding to the structured information comprises structured display of field information of a plurality of key fields of the target webpage content.
9. A computer device, comprising: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating via the bus when a computer device is running, the machine-readable instructions when executed by the processor performing the steps of the search result presentation method according to any one of claims 1 to 7.
10. A computer-readable storage medium, having stored thereon a computer program for performing, when executed by a processor, the steps of the search result presentation method according to any one of claims 1 to 7.
CN202211531138.5A 2022-12-01 2022-12-01 Search result display method and device, computer equipment and storage medium Pending CN115730158A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211531138.5A CN115730158A (en) 2022-12-01 2022-12-01 Search result display method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211531138.5A CN115730158A (en) 2022-12-01 2022-12-01 Search result display method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115730158A true CN115730158A (en) 2023-03-03

Family

ID=85300296

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211531138.5A Pending CN115730158A (en) 2022-12-01 2022-12-01 Search result display method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115730158A (en)

Similar Documents

Publication Publication Date Title
Bennani-Smires et al. Simple unsupervised keyphrase extraction using sentence embeddings
US9514216B2 (en) Automatic classification of segmented portions of web pages
WO2019229769A1 (en) An auto-disambiguation bot engine for dynamic corpus selection per query
Abdullah et al. Emotions extraction from Arabic tweets
Lev et al. In defense of word embedding for generic text representation
CN111324771B (en) Video tag determination method and device, electronic equipment and storage medium
CN108319583B (en) Method and system for extracting knowledge from Chinese language material library
Yilmaz et al. Improving educational web search for question-like queries through subject classification
CN107506472B (en) Method for classifying browsed webpages of students
CN112989208B (en) Information recommendation method and device, electronic equipment and storage medium
CN111459977B (en) Conversion of natural language queries
Alami et al. Hybrid method for text summarization based on statistical and semantic treatment
CN114443847A (en) Text classification method, text processing method, text classification device, text processing device, computer equipment and storage medium
Shi et al. Mining chinese reviews
Bellare et al. Lightly-supervised attribute extraction
Li et al. A novel methodology for retrieving infographics utilizing structure and message content
Zanibbi et al. Math search for the masses: Multimodal search interfaces and appearance-based retrieval
Breja et al. A survey on non-factoid question answering systems
Sato et al. Text classification and transfer learning based on character-level deep convolutional neural networks
CN110688559A (en) Retrieval method and device
Yasukochi et al. Analyzing font style usage and contextual factors in real images
CN114255067A (en) Data pricing method and device, electronic equipment and storage medium
CN114722174A (en) Word extraction method and device, electronic equipment and storage medium
CN115730158A (en) Search result display method and device, computer equipment and storage medium
WO2014049310A2 (en) Method and apparatuses for interactive searching of electronic documents

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination