Method, device and electronic device for determining summary of search results
By evaluating and adjusting the interception position of the web page abstract, the problem of incomplete text information in the last sentence of the web page abstract in the prior art is solved, and the presentation effect of the abstract and the user's reading experience are improved.
Patent Information
- Application Number
- CN202110072051.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-19
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2041-01-19
AI Technical Summary
In the prior art, the text of the last sentence of a web page summary is often very short and the information is incomplete, which leads to the user's reference value for browsing the web page, and the summary presentation effect is not good, affecting the user's reading experience.
By determining a preset length of characters from the starting position of the target paragraph, the last sentence of the text is evaluated, and the interception position is flexibly determined based on the evaluation results, so that the last sentence of the summary of the search results is a semantically complete text.
It improves the presentation effect of web page abstracts, enhances the user's reading experience, and increases the probability of users clicking on the web page corresponding to the abstract.
Smart Images

Figure CN114817520B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet technology, and in particular to a method, device and electronic device for determining a summary of a search result. Background Art
[0002] With the rapid development of Internet technology, people are increasingly accustomed to using search engines to find the information they need. Search engines can provide the URL and summary of the corresponding web page based on the search query submitted by the user. The summary is used to describe the summary content of the web page. Users can determine whether to browse the web page corresponding to the summary by reading the summary.
[0003] In the related art, a text of a certain length of characters is usually extracted from the web page text as a web page summary. The last sentence of the web page summary obtained in this way is sometimes very short and the information expressed is incomplete. It has little reference value for whether the user browses the web page. It also leads to poor summary presentation effect, thereby affecting the user's reading experience. Summary of the invention
[0004] The present application provides a method, device and electronic method for determining the summary of search results, which can flexibly adjust the position of the intercepted text in the web page so that the information expressed by the last sentence of the obtained web page summary is more complete, thereby improving the presentation effect of the web page summary and improving the user's reading experience. The specific scheme is as follows:
[0005] In a first aspect, an embodiment of the present application provides a method for determining a summary of a search result, comprising:
[0006] Determine a preset length of characters starting from the start position of a target paragraph, wherein the target paragraph is the paragraph where the summary of the search result is located;
[0007] Evaluate the last sentence of the text of the preset length of characters to obtain a first evaluation result, wherein the target paragraph is the paragraph where the summary of the search result is located;
[0008] Determine a first clipping position of the target paragraph according to the first evaluation result, wherein the first clipping position is any one of the following: an end position of a text obtained by supplementing the last sentence of text, an end position of the last sentence of text, or an end position of a text obtained by deleting the last sentence of text;
[0009] According to the first interception position, a summary of the search result is determined from the target paragraph, wherein a character length corresponding to the summary of the search result is within a preset length range.
[0010] The method for determining the summary of the search results provided in the embodiment of the present application determines a preset length of characters from the starting position of the target paragraph, evaluates the last sentence of the preset length of characters, and determines the first interception position according to the first evaluation result obtained by the evaluation. It can be seen that the embodiment of the present application flexibly determines the first interception position according to the first evaluation result, so that the last sentence of the summary of the search results determined according to the first interception position can be a sentence with relatively complete semantics, which improves the reference value for whether the user browses the web page. When the summary of the search results is displayed on the client, the presentation effect is better, the amount of invalid reading by the user is reduced, the reading experience of the user is improved, and the probability of the user clicking on the web page corresponding to the summary is increased. In addition, the first interception position determined in the embodiment of the present application is the end position of the text obtained after supplementing the last sentence of the text, the end position of the last sentence of the text, or the end position of the text obtained after deleting the last sentence of the text. It can be seen that the first interception position determined in the embodiment of the present application is different according to the different first evaluation results, and the first interception position is further flexibly determined, so that the presentation effect of the determined summary is better.
[0011] In an optional embodiment, the first evaluation result is: the end of the last sentence of text is incomplete topic information;
[0012] The first interception position is: the end position of the text obtained by completing the subject information at the end of the last sentence of the text.
[0013] In this embodiment, the subject information at the end of the last sentence of the text is evaluated, and the first evaluation result obtained is that the end of the last sentence of the text is incomplete subject information. When users read text, for subject information such as the names of movies, TV series, and books, users usually prefer to read the complete content of these subject information to better understand the text. The first evaluation result obtained in this embodiment is that the end of the last sentence is incomplete subject information. When determining the first interception position, the first interception position can be determined as a position that can make the above subject information complete according to the first evaluation result, so that users can better understand the text.
[0014] In an optional embodiment, the first evaluation result is: the semantics of the last sentence of text is incomplete;
[0015] The first interception position is: the end position of the text obtained after the last sentence of text is supplemented into a complete text.
[0016] In this implementation, the semantics of the last sentence of text is evaluated, and the first evaluation result obtained is that the semantics of the last sentence of text is incomplete. When the semantics of a sentence of text is incomplete, the user usually cannot know the specific content represented by the sentence of text after reading the sentence of text. Therefore, the first evaluation result obtained in this embodiment is that the semantics of the last sentence is incomplete. When determining the first interception position, the last sentence of text can be supplemented according to the first evaluation result to facilitate the user to read the text.
[0017] In an optional embodiment, the first evaluation result is: the character length corresponding to the last sentence of text is less than a first preset length;
[0018] The first clipping position is: the end position of the text obtained after deleting the last sentence of the text.
[0019] This embodiment evaluates the length of characters corresponding to the last sentence of text, and the first evaluation result obtained is that the length of characters corresponding to the last sentence of text is less than the first preset length. Through this embodiment, it can be quickly evaluated that the semantic integrity of the last sentence of text is low and the reference value for the user to understand the web page is small, so that when determining the first interception position, it can be quickly determined to delete the last sentence of the above preset length of characters, and more quickly determine the summary of the search results with better display effect for the user.
[0020] In an optional embodiment, the first evaluation result is: the number of words corresponding to the last sentence of text is less than a second preset number;
[0021] The first clipping position is: the end position of the text obtained after deleting the last sentence of the text.
[0022] This embodiment evaluates the number of words corresponding to the last sentence of text, and the first evaluation result obtained is that the number of words corresponding to the last sentence of text is less than the second preset number. Since the number of words contained in a sentence of text can usually reflect the semantic integrity of a sentence of text, therefore, evaluating the number of words in the last sentence of text can more accurately evaluate the semantic integrity of the last sentence of text and its reference value to the user's understanding of the web page. Through the embodiment of the present application, it can be quickly evaluated that the semantic integrity of the last sentence of text is low and its reference value to the user's understanding of the web page is small, so that when determining the first interception position, it can be quickly determined to delete the last sentence of the above preset length of characters, and more quickly determine the summary of the search results that has a better display effect for the user.
[0023] In an optional embodiment, the first evaluation result is: the proportion of characters other than words and phrases in the last sentence of text is greater than a preset proportion;
[0024] The first clipping position is: the end position of the text obtained after deleting the last sentence of the text.
[0025] In the embodiment of the present application, the proportion of characters other than words and characters in the last sentence of the text is evaluated, and the first evaluation result obtained is that the proportion of characters other than words and characters in the last sentence of the text is greater than a preset ratio. Users usually understand the abstract more fully through words and characters with actual semantics, and the characters other than words and characters in the abstract are usually less helpful for users to understand the content of the abstract. Therefore, the words and characters in the text are usually more effective information for users to understand the abstract. The embodiment of the present application can evaluate that the proportion of effective information in the last sentence of the text is small, and when determining the first interception position, it can quickly determine to delete the last sentence of the text with the above preset length of characters.
[0026] In an optional embodiment, the first evaluation result is: the last sentence of the text ends with a punctuation mark;
[0027] The first interception position is: the end position of the text obtained by deleting the punctuation mark at the end of the last sentence of the text.
[0028] When the summary is displayed, if there is a punctuation mark at the end of the summary, the reference value of this punctuation mark to the user's reading comprehension is very small, and the punctuation mark at the end may also affect the display effect of the summary on the client. Therefore, when it is evaluated that there is a punctuation mark at the end of the last sentence of the text, the punctuation mark at the end can be deleted to make the display effect of the summary better.
[0029] In an optional embodiment, the first interception position is: the end position of the text obtained after deleting the last sentence of the text;
[0030] Determining the summary of the search result from the target paragraph according to the first interception position includes:
[0031] Determining that the character length corresponding to the text located before the first clipping position in the target paragraph is less than a lower limit of the preset length range;
[0032] Determine a second interception position, wherein the second interception position is: the end position of the text obtained after supplementing the last sentence of the text;
[0033] According to the second cut-off position, a summary of the search result is determined from the target paragraph.
[0034] In this embodiment, when the first clipping position is the end position of the text obtained after deleting the last sentence of text, if the character length corresponding to the text before the first clipping position in the target paragraph is less than the lower limit of the preset length range, it means that the character length corresponding to the text before the first clipping position is too small. In this case, the summary of the determined search result may contain very little information, so that the user cannot obtain valid information of the search result from the summary. In this case, the summary of the search result is determined from the target paragraph according to the second clipping position. Since the second clipping position is the end position of the text obtained after supplementing the last sentence of text, the character length corresponding to the summary of the obtained search result can be increased, so that the user can obtain more information about the search result from the summary.
[0035] In an optional embodiment, determining the summary of the search result from the target paragraph according to the second interception position includes:
[0036] Determining that the character length corresponding to the text located before the second cut-off position in the target paragraph is greater than the upper limit of the preset length range;
[0037] The preset length of characters is determined as the summary of the search result.
[0038] If the character length corresponding to the text before the second truncation position in the target paragraph is greater than the lower limit of the preset length range, it means that the character length corresponding to the text before the second truncation position is too long. This may result in too few search results presented on the page, or the determined summary may not be fully displayed, affecting the page layout. In this case, determining the preset length of characters as the summary of the search result can ensure that the determined summary is neither too long nor too short, which is beneficial to the page layout.
[0039] In an optional embodiment, the first interception position is: the end position of the text obtained after supplementing the last sentence of the text;
[0040] Determining the summary of the search result from the target paragraph according to the first interception position includes:
[0041] Determining that the character length corresponding to the text located before the first clipping position in the target paragraph is greater than an upper limit of a preset length range;
[0042] Determine a third clipping position, wherein the third clipping position is: the end position of the text obtained after deleting the last sentence of the text;
[0043] According to the third clipping position, a summary of the search result is determined from the target paragraph.
[0044] In this embodiment, when the first clipping position is the end position of the text obtained after supplementing the last sentence of text, if the character length corresponding to the text before the first clipping position in the target paragraph is greater than the second preset length, it means that the character length corresponding to the text before the first clipping position is too long. In this case, since the display space of each search result in the display page is usually fixed, the summary of the determined search result may not be fully displayed. In this case, the summary of the search result is determined from the target paragraph according to the third clipping position. Since the third clipping position is the end position of the text obtained after deleting the last sentence of text, the character length corresponding to the summary of the obtained search result can be shortened, so that the determined search result can be fully displayed in the display page.
[0045] In an optional embodiment, determining the first clipping position of the target paragraph according to the first evaluation result includes:
[0046] Determine that the first evaluation result is any one of the following: the end of the last sentence of text is complete subject information, the semantics of the last sentence of text is complete, the character length corresponding to the last sentence of text is not less than a first preset length, and the proportion of characters other than words and phrases in the last sentence of text is not greater than a preset proportion;
[0047] Evaluate the last sentence of text to obtain a second evaluation result, wherein the second evaluation result has a different evaluation content from the first evaluation result;
[0048] A first clipping position of the target paragraph is determined according to the second evaluation result.
[0049] When the first evaluation result is that the end of the last sentence of the text is the complete subject information, the semantics of the last sentence of the text is complete, the character length corresponding to the last sentence of the text is not less than the first preset length, or the proportion of characters other than words and phrases in the last sentence of the text is not greater than the preset proportion, it means that when evaluating the last sentence of the text, the last sentence meets the evaluation requirements, that is, the last sentence meets certain completeness requirements. In this case, in order to make the obtained summary more complete and the presentation effect of the summary better, the last sentence of the text can be further evaluated again with different contents to obtain a second evaluation result, and the first cut position is determined based on the second evaluation result.
[0050] In an optional embodiment, determining the summary of the search result from the target paragraph according to the first interception position includes:
[0051] Evaluate the last sentence of the text before the first cut-off position in the target paragraph to obtain a third evaluation result;
[0052] Determining a fourth interception position of the target paragraph according to the third evaluation result;
[0053] According to the fourth clipping position, a summary of the search result is determined from the target paragraph.
[0054] In this embodiment, after the first interception position is determined, the last sentence of the text before the first interception position in the target paragraph may still have a low integrity. In this case, the last sentence of the text before the first interception position in the target paragraph can be further evaluated, and the fourth interception position is determined based on the third evaluation result. According to the fourth interception position, the summary of the search result is determined from the target paragraph. That is, after each interception position is determined, the last sentence of the text before the most recently determined interception position in the target paragraph is evaluated again until the last sentence of the text before the most recently determined interception position meets the requirement for complete summary display, so that the summary of the determined search result can have better integrity and better display effect.
[0055] In a second aspect, an embodiment of the present application further provides a device for determining a summary of a search result, comprising:
[0056] An evaluation module, configured to determine a preset length of characters from the start position of a target paragraph, evaluate the last sentence of the preset length of characters, and obtain a first evaluation result, wherein the target paragraph is the paragraph where the summary of the search result is located;
[0057] A determination module is used to determine a first clipping position of the target paragraph based on the first evaluation result, wherein the first clipping position is any one of the following: the end position of the text obtained after supplementing the last sentence of text, the end position of the last sentence of text, and the end position of the text obtained after deleting the last sentence of text. According to the first clipping position, a summary of the search result is determined from the target paragraph, wherein the character length corresponding to the summary of the search result is within a preset length range.
[0058] In an optional embodiment, the first evaluation result is: the end of the last sentence of text is incomplete topic information;
[0059] The first interception position is: the end position of the text obtained by completing the subject information at the end of the last sentence of the text.
[0060] In an optional embodiment, the first evaluation result is: the semantics of the last sentence of text is incomplete;
[0061] The first interception position is: the end position of the text obtained after the last sentence of text is supplemented into a complete text.
[0062] In an optional embodiment, the first evaluation result is: the character length corresponding to the last sentence of text is less than a first preset length, or the proportion of characters other than words and phrases in the last sentence of text is greater than a preset proportion;
[0063] The first clipping position is: the end position of the text obtained after deleting the last sentence of the text.
[0064] In an optional embodiment, the first interception position is: the end position of the text obtained after deleting the last sentence of the text;
[0065] The determination module is specifically used for:
[0066] Determining that the character length corresponding to the text located before the first clipping position in the target paragraph is less than a lower limit of the preset length range;
[0067] Determine a second interception position, wherein the second interception position is: the end position of the text obtained after supplementing the last sentence of the text;
[0068] According to the second cut-off position, a summary of the search result is determined from the target paragraph.
[0069] In an optional embodiment, the first interception position is: the end position of the text obtained after supplementing the last sentence of the text;
[0070] The determination module is specifically used for:
[0071] Determining that the character length corresponding to the text located before the first clipping position in the target paragraph is greater than an upper limit of a preset length range;
[0072] Determine a third clipping position, wherein the third clipping position is: the end position of the text obtained after deleting the last sentence of the text;
[0073] According to the third clipping position, a summary of the search result is determined from the target paragraph.
[0074] In an optional embodiment, the determining module is specifically used to:
[0075] Determine that the first evaluation result is any one of the following: the end of the last sentence of text is complete subject information, the semantics of the last sentence of text is complete, the character length corresponding to the last sentence of text is not less than a first preset length, and the proportion of characters other than words and phrases in the last sentence of text is not greater than a preset proportion;
[0076] Evaluate the last sentence of text to obtain a second evaluation result, wherein the second evaluation result has a different evaluation content from the first evaluation result;
[0077] A first clipping position of the target paragraph is determined according to the second evaluation result.
[0078] In an optional embodiment, the determining module is specifically used to:
[0079] Evaluate the last sentence of the text before the first cut-off position in the target paragraph to obtain a third evaluation result;
[0080] Determining a fourth interception position of the target paragraph according to the third evaluation result;
[0081] According to the fourth clipping position, a summary of the search result is determined from the target paragraph.
[0082] In a third aspect, an embodiment of the present application further provides an electronic device, including: a processor, a memory, and an interface;
[0083] The processor, the memory and the interface cooperate with each other, and the processor is used to execute any one of the methods in the first aspect.
[0084] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the processor executes any one of the methods described in the first aspect.
[0085] In a fifth aspect, an embodiment of the present application further provides a computer program product, which, when executed on a computer, enables the computer to execute any of the methods described in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0086] Figure 1a is a schematic diagram of a search page of a search engine provided in an embodiment of the present application;
[0087] Figure 1b A schematic diagram of a browser page;
[0088] Figure 2 is a schematic diagram of the content corresponding to the search results displayed by a browser provided in an embodiment of the present application;
[0089] Figure 3 is a schematic diagram of the structure of a search system provided in an embodiment of the present application;
[0090] Figure 4It is a flowchart of a method for determining a summary of a search result provided in an embodiment of the present application;
[0091] Figure 5 This is an example diagram of determining a summary of a search result from a target paragraph provided in an embodiment of the present application;
[0092] Figure 6 This is another example diagram of determining a summary of a search result from a target paragraph provided in an embodiment of the present application;
[0093] Figure 7 is a flowchart of another method for determining a summary of a search result provided in an embodiment of the present application;
[0094] Figure 8 are multiple example diagrams of the last sentence of a preset length of characters provided in an embodiment of the present application;
[0095] Fig. 9 This is a schematic diagram of an example of word segmentation of a text provided in an embodiment of the present application;
[0096] Fig.10 This is another schematic diagram of text segmentation provided in an embodiment of the present application;
[0097] Fig.11 This is an example diagram of determining a summary of a search result from a target paragraph provided in an embodiment of the present application;
[0098] Fig.12 is a flowchart of another method for determining a summary of a search result provided in an embodiment of the present application;
[0099] Fig.13 It is a schematic diagram of displaying the summaries of each search result determined by the method for determining the summaries of search results provided in the embodiment of the present application on a browser;
[0100] Fig.14 A flowchart of another method for determining a summary of a search result provided in an embodiment of the present application;
[0101] Fig.15 is a schematic diagram of a process for determining a target paragraph provided in an embodiment of the present application;
[0102] Fig.16 A schematic diagram of the structure of an example of a device for determining a summary of a search result provided in an embodiment of the present application;
[0103] Fig.17 A structural schematic diagram of an electronic device is provided for an embodiment of the present application. DETAILED DESCRIPTION
[0104] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0105] In the following, the terms "first", "second", and "third" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first", "second", and "third" may explicitly or implicitly include one or more of the features.
[0106] The following is an introduction to the application scenarios of the embodiments of the present application.
[0107] Users usually use search engines to search for the information they need. Specifically, users can enter a search query on a client, which can be an electronic device such as a mobile phone, tablet computer, smart watch, or computer. A browser or an application corresponding to a search engine can be installed on the client. The search query can be one or more keywords, a piece of text, a formula, or other search queries (such as a picture). After obtaining the search query entered by the user, the search engine can query each web page that matches the search query as a search result, and obtain the title, hyperlink, and summary of each queried web page, and send the obtained title, hyperlink, and summary to the client. The client displays the received title, hyperlink, and summary on a display screen for the user to view. The summary of the search result can describe the summary content of the web page, and can reflect why the web page is related to the search query entered by the user.
[0108] Figure 1a A schematic diagram of a browser's search engine page. Figure 1b A schematic diagram of a browser page. Figure 2 A schematic diagram of the content corresponding to the search results displayed by the browser. For example, a user can Figure 1a Enter a search query (e.g., wood flooring) into the search box 102 of the search engine page of the browser shown in FIG. Figure 1b As shown, the user may also enter a search query (eg, type of water heater) in the address bar 101 of the browser. After receiving the search query, the browser may jump to the search engine page and display the search results. Figure 2 For users Figure 1aAfter entering the search query "wood floor" in the search box 102 in [reference], the titles and abstracts of each search result displayed by the browser Figure 2 In [reference], the browser also displays the uniform resource locator (URL) of the search result. When there is an image in the web page corresponding to the search result, the browser also displays the image corresponding to the search result. Figure 2 The last sentence texts of the second, third, and fourth abstracts in [reference] respectively correspond to "with strength", "otherwise", and "here". It can be seen that the last sentence texts of the second, third, and fourth abstracts do not provide valuable reference information for users to browse the web page. When these last sentence texts are displayed on the browser, the presentation effect of the abstract is not good, which will increase the amount of ineffective reading by users and affect the user experience.
[0109] To solve the above problems, the embodiments of the present application provide a method and device for determining an abstract of a search result, which can improve the presentation effect of the web page abstract and improve the user's reading experience.
[0110] The execution subject of the method for determining the abstract of the search result provided by the embodiments of the present application can be a server. This server can be the server of a search engine or the server of other search systems. The server can crawl web pages and store information associated with the web pages in an information database. The server can perform information searches in the information database according to the search query received from the client.
[0111] Next, the method for determining the abstract of the search result provided by the present application will be introduced through the accompanying drawings and embodiments. In the following embodiments, the execution subject is taken as an example of a server for introduction.
[0112] Figure 3 It is a schematic structural diagram of a search system 300 provided by the embodiments of the present application. As Figure 3As shown, the method for determining the summary of search results provided in the embodiment of the present application can be applied to a search system 300, and the search system 300 may include a client 310 and a server 320, wherein the client 310 and the server 320 are connected via a network 330. The server 320 is used to receive a search query sent by the client 310 via the network 330, determine a summary of the search results based on the search query, and send the determined summary to the client 310 via the network 330. The server 320 may also be used to crawl various web pages or other information via the network 330. The client 310 is used to obtain a search query input by a user via the network 330, send the search query to the server 320, receive a summary of the search results sent by the server 320, and display the received summary on a display. The client 310 may be an electronic device. The search system 300 may include one server 320 or multiple servers 320, may include one client 310 or multiple clients 310, and the present application does not limit this. Figure 3 In the example, the search system 300 includes three servers 320 and two clients 310 .
[0113] In one embodiment, a browser 311 may be installed on the client 310, and the browser 311 may provide an interface of a search engine, so that a user can send a search query to the search engine through the browser 311. The server 320 may be a server 320 corresponding to a search engine, and the search engine may search for search results matching the search query input by the user from an index database, and may obtain a web page corresponding to the search result selected by the user from an information database.
[0114] The following is an introduction to the method for determining the summary of the search results provided by the present application through a specific embodiment.
[0115] Embodiment 1
[0116] Figure 4 A flowchart of a method for determining a summary of a search result provided in an embodiment of the present application is shown in FIG. Figure 4 As shown, the summary of the search result can be determined according to the following steps S401 to S416, and the execution subject of steps S401 to S416 is the server.
[0117] Step S401: Acquire text information of the search result, and determine the target paragraph from the text information.
[0118] The target paragraph is the paragraph where the summary of the search result is located.
[0119] Figure 5 , Figure 6 Two examples of determining the summary of search results from the target paragraph are shown. Figure 5 As shown, the determined paragraph where the abstract is located may be the first paragraph 5a below: "Mary is one of the most popular singers and dancers. Mary was born on August 4th, 1969. She is very good at singing and acting. Her songs are always pop music, but there are also country music, hip-hop, and rock. She composed many of her own songs."
[0120] For example, Figure 6 As shown, the paragraph where the abstract is determined can also be the second paragraph 6a below: "The process of injection molding is: at a certain temperature, by stirring the completely molten plastic material, injecting it into the mold cavity with high pressure, and obtaining a molded product after cooling and solidification. The advantages of the injection molding method are fast production speed, high efficiency, good product integrity, the production process can be automated, the output products have various shapes, the product size is accurate, the product is easy to update, and it can form parts with complex shapes. The specific process of injection molding is based on the content of Chapter 3 of "Plastic Product Production Method". The parameters in the injection molding process mainly include injection pressure, injection time, injection temperature, holding time and temperature, and back pressure."
[0121] The first paragraph 5a and the second paragraph 6a are examples for when the paragraph where the abstract is located is in English and Chinese respectively. The specific content and corresponding language of the search results are different, and the content and language of the paragraph where the abstract is located are also different. The first paragraph 5a and the second paragraph 6a are the two paragraphs where the abstract is located corresponding to the search results determined for two different search queries.
[0122] Step S402: Determine a preset length of characters starting from the start position of the target paragraph.
[0123] For example, when the preset length is 140 characters, for the first paragraph 5a, Figure 5 As shown, the preset length characters 5b determined by the server are: "Mary is one of the most popular singers and dancers. Mary is born on August 4th, 1969. She is very good at singing and acting. Her songs are", and the preset length characters determined are non-Chinese characters; for the second paragraph 6a above, such as Figure 6 As shown, the preset length characters 6b determined by the server are: "The process of injection molding is: at a certain temperature, by stirring the completely molten plastic material, injecting it into the mold cavity with high pressure, and obtaining a molded product after cooling and solidification. The advantages of the injection molding method are fast production speed, high efficiency, good product integrity, the production process can be automated, the output products have various shapes, the product size is accurate, the product is easy to update, and it can form complex-shaped parts. The specific process of injection molding is based on "Plastic Products". The preset length characters determined are Chinese characters.
[0124] The determined preset length of characters includes spaces. Since spaces, punctuation marks and other characters will occupy display space when the summary of the search results is displayed on the client, the determined preset length of characters is the actual character length including spaces.
[0125] Step S403: Evaluate whether the number of words corresponding to the last sentence of the above preset length of characters is not less than a second preset number.
[0126] The evaluation result obtained in step S403 is the first evaluation result.
[0127] The number of words corresponding to the last sentence of text can be the sum of the number of Chinese single-word words and the number of non-Chinese words contained in the last sentence of text. Among them, non-Chinese words can include English words, German words, French words, etc., the number of words corresponding to punctuation marks is zero, at least one continuous number is 1 non-Chinese word, and continuous numbers and English characters are 1 non-Chinese word. Continuous means adjacent and not separated by spaces. In this embodiment, single-word words can be understood as single words.
[0128] The second preset number may be any number from 2 to 5, or any smaller number.
[0129] For example, the second preset number is 4. Figure 5 As shown, the last sentence of the text of the preset length characters 5b determined by the server from the starting position of the above-mentioned first paragraph 5a is "Her songs are", and the number of words 3 contained therein is less than the second preset number 4. The server evaluates that the number of words corresponding to the last sentence of the text of the above-mentioned preset length characters 5b is less than the second preset number, that is, the evaluation result of step S403 is no.
[0130] For example, Figure 6As shown, the last sentence of the text of the preset length of characters 6b determined by the server from the starting position of the second paragraph 6a is "The specific process of injection molding is "Plastic Products", and the number of words it contains 15 is greater than the second preset number 4. The server evaluates that the number of words corresponding to the last sentence of the text of the preset length of characters 6b is greater than the second preset number, that is, the evaluation result of step S403 is yes.
[0131] The following are some examples to illustrate how to determine the number of words corresponding to the last sentence of text.
[0132] For example, the last sentence of the text is "It will be re-released in mainland China in 3D version in August 2016". This sentence includes 9 Chinese characters (9 Chinese single-character words) and 3 non-Chinese words (2016, 8, 3D respectively). Therefore, the number of words corresponding to this sentence is 9+3=12 words.
[0133] For another example, the last sentence of the text is "Mary Ly is the name of the protagonist". This sentence includes 7 Chinese characters (7 Chinese single-character words) and 2 English words (2 non-Chinese words). Therefore, the number of words corresponding to this sentence is 7+2=9 words.
[0134] For another example, the last sentence of the text is "Plastic Product Production Method was published in 1995". This sentence includes 12 Chinese characters (12 Chinese single-character words) and 1 non-Chinese word (19995). Therefore, the number of words corresponding to this sentence is 12+1=13 words.
[0135] Step S403 may also be replaced by step S404.
[0136] Step S404: evaluating whether the character length corresponding to the last sentence of the text having the above preset length of characters is not less than the first preset length.
[0137] The evaluation result obtained in step S404 is the first evaluation result. Step S404 is not shown in the figure.
[0138] The last sentence of text may contain Chinese characters, English characters, or other non-Chinese characters. In the embodiment of the present application, the character length corresponding to the last sentence of text can be understood as the total length of each character corresponding to the last sentence of text, that is, the total length of each type of characters contained in the last sentence of text. Specifically, the character length corresponding to the last sentence of text can be the sum of the number of Chinese characters and the number of non-Chinese characters contained in the last sentence of text, wherein one Chinese character is one Chinese character, one English letter is one non-Chinese character, one full-width punctuation mark is one Chinese character, one half-width punctuation mark is one non-Chinese character, one number is one non-Chinese character, and a space is zero characters.
[0139] The first preset length may be any length between 3 and 8 characters, or may be other specific lengths. When the language of the target paragraph is different, the value of the first preset length may be different. For example, when the language of the target paragraph is Figure 5 When the target paragraph is in English as shown in 5a, the first preset length can be any value between 10 and 15. Figure 6 When the Chinese character is shown in 6a, the first preset length can be any value from 3 to 8, because the semantic completeness of Chinese and English corresponding to the same character length is different (Chinese semantics is more complete), so the first preset length corresponding to Chinese is smaller than the first preset length corresponding to English (or other languages with letters forming words). When the first preset length is set to be longer, the shorter and semantically incomplete last sentence of text can be deleted with a greater probability in step S404, so that the end of the summary of the search result obtained at the end is a sentence with more complete semantics; because some short sentences may also express complete semantics, when the first preset length is set to be shorter, the probability of mistakenly deleting the last sentence of text with complete semantics or greater reference value can be reduced in step S404. Those skilled in the art can set the specific value of the first preset length according to the actual scenario.
[0140] For example, the first preset length is 13, such as Figure 5 As shown, the last sentence of the text of the preset length 5b determined by the server from the starting position of the above-mentioned first paragraph 5a is "Her songs are", and its corresponding character length 11 is less than the first preset length 13. The server evaluates that the character length corresponding to the last sentence of the text of the above-mentioned preset length 5b is less than the first preset length, that is, the evaluation result of step S414 is no.
[0141] For another example, the first preset length is 5, such as Figure 6As shown, the last sentence of the text of the preset length of characters 6b determined by the server from the starting position of the second paragraph 6a is "The specific process of injection molding is "Plastic Products", and its corresponding character length 15 is greater than the first preset length 5. The server evaluates that the character length corresponding to the last sentence of the text of the preset length of characters 6b is greater than the first preset length, that is, the evaluation result of step S414 is yes.
[0142] To facilitate understanding, the following are several examples to illustrate how to determine the character length corresponding to the last sentence of text.
[0143] For example, the last sentence of the text is "It will be re-released in mainland China in 3D version in August 2016". This sentence includes 9 Chinese characters (9 Chinese characters), 6 numbers (6 non-Chinese characters), and 1 English letter (1 non-Chinese character). Therefore, the character length corresponding to this sentence is 9+6+1=16 characters.
[0144] For another example, the last sentence is "Mary Ly is the name of the protagonist". This sentence includes 7 Chinese characters (7 Chinese characters) and 6 English letters (6 non-Chinese characters). Therefore, the character length corresponding to this sentence is 7+6=13 characters.
[0145] For another example, the last sentence of the text is "Plastic Products Production Method was published in 1995". This sentence includes 12 Chinese characters (12 Chinese characters), 4 numbers (4 non-Chinese characters), and 2 full-width punctuation marks (2 Chinese characters). Therefore, the character length corresponding to this sentence is 12+4+2=18 characters.
[0146] Step S403 and step S404 can also be understood as evaluating the format of the last sentence. The specific process of determining the last sentence of the preset length of characters in step S403 and step S404 can refer to step S703 in the second embodiment.
[0147] When the evaluation result of step S403 is no, or the evaluation result of step S404 is no, step S405 is executed, and when the evaluation result of step S403 is yes, or the evaluation result of step S404 is yes, step S407 is executed.
[0148] Step S405: Delete the last sentence of text.
[0149] For example, Figure 5As shown, for the first paragraph 5a, the last sentence of the text "Her songs are" of a preset length of characters 5b determined from the starting position of the first paragraph 5a can be deleted, and the text information 5c after deleting "Her songs are" is: "Mary is one of the most popular singers and dancers. Mary isborn on August 4th, 1969. She is very good at singing and acting." The end position of the text after deleting "Hersongs are" is the first truncation position, and the character length of the text information 5c after deleting "Her songs are" is 127.
[0150] Step S406: determining the end position of the text obtained after deleting the last sentence of the text as the first clipping position, and determining the first clipping position as the latest clipping position.
[0151] After step S406 is executed, step S408 may be executed.
[0152] Step S407: determining the end position of the last sentence of the text as the first clipping position, and determining the first clipping position as the latest clipping position.
[0153] After step S407 is completed, step S410 may be executed.
[0154] Step S408: determining whether the character length corresponding to the text before the first clipping position in the target paragraph is not less than the lower limit of a preset length range.
[0155] For example, when the preset length range is 120 to 200 characters, Figure 5 As shown, in the example of step S405, the character length of the text information 5c after deleting "Her songs are" is 127, which is not less than the lower limit of 120 characters between 120 and 200 characters.
[0156] For another example, when the preset length range is 130 to 200 characters, Figure 5 As shown, in the example of step S404, the character length of the text information 5c after deleting "Her songs are" is 127, which is less than the lower limit of 130 between 130 and 200.
[0157] If the judgment result of step S408 is no, then step S409 is executed; if the judgment result of step S408 is yes, then step S410 is executed.
[0158] Step S409: Supplement the last sentence of the text into a complete sentence, and update the latest interception position to the end position of the text obtained after supplementing the complete sentence.
[0159] The most recent intercept position described above is used to determine the summary of the search results.
[0160] After step S409 is completed, step S415 may be executed, or step S413 may be executed directly.
[0161] For example, if the abstract is in paragraph 5a of the first paragraph above, Figure 5 As shown, the server deletes the last sentence of the text of the preset length of characters 5b to obtain text information 5c, which includes 127 characters. If the preset length range is 130 to 200 characters, since 127 is less than 130, the last sentence of the text of the preset length of characters 5b is supplemented as a complete text to obtain text 5d, which is "Mary is one of the most popular singers and dancers. Mary is born on August 4th, 1969. She is very good at singing and acting. Her songs are always pop music." The obtained text includes 158 characters, which is greater than the lower limit of 130.
[0162] Step S410: Evaluate whether the end of the text before the latest interception position is incomplete topic information.
[0163] In this embodiment, step S406 and step S407 determine the latest interception position, and step S409 updates the latest interception position. The server may update and adjust the latest interception position one or more times based on the text before the determined first interception position. For example, step S409 performs one update, so the server evaluates the text before the latest interception position each time.
[0164] For example, Figure 5 As shown, when the text before the latest interception position is 5d, the last sentence of the text is "Hersongs are always pop music," and the server evaluates that the end of "Her songs are always pop music," is not incomplete topic information.
[0165] For example, Figure 6As shown, when the text before the latest truncation position is the preset number of characters 6b determined from the starting position of the target paragraph 6a (since the latest truncation position has not been updated and adjusted yet, the text before the latest truncation position is also the unadjusted preset number of characters 6b), the last sentence of the text 6b obtained after the last text adjustment is "The specific process of injection molding is based on 'Plastic Products". The server evaluates that the end of "The specific process of injection molding is based on 'Plastic Products" is an incomplete topic information 'Plastic Products'.
[0166] If the evaluation result of step S410 is yes, then execute step S411; if the evaluation result of step S410 is no, then execute step S412.
[0167] Step S411: Complete the incomplete topic information according to the target paragraph, and update the latest truncation position to the end position of the text obtained after the topic information is completed.
[0168] For example, as Figure 6 shown, if the text before the latest truncation position is 6b and its last sentence is "The specific process of injection molding is based on 'Plastic Products", then supplement "The specific process of injection molding is based on 'Plastic Products" to "The specific process of injection molding is based on 'Plastic Products Production Method". The supplemented text is as Figure 6 shown in 6c.
[0169] After step S411 is executed, step S412 can be executed.
[0170] Step S412: Evaluate whether the semantics of the last sentence of the text before the latest truncation position is complete.
[0171] For example, as Figure 6 shown, if the text before the new truncation position is Figure 6 the text shown in 6c, and its last sentence is "The specific process of injection molding is based on 'Plastic Products Production Method". The subject in this sentence is "The specific process of injection molding", and there is no predicate after the subject. In this application, it can be determined that there is a predicate after the subject when a verb or adjective appears after the subject. In this sentence, 'yi' after the subject is not a verb or adjective, so it is considered that this sentence lacks a predicate. Therefore, it is determined that the semantics of this sentence "The specific process of injection molding is based on 'Plastic Products Production Method" is incomplete.
[0172] For example, as Figure 5 shown, if the text before the latest truncation position is Figure 5The last sentence of the text shown in 5d is "Her songs are always pop music," and the server evaluates that "Her songs are always pop music," includes the subject "Her songs," the predicate "are," and the object "pop music," so the server considers that the text of this sentence is semantically complete.
[0173] If the evaluation result of step S412 is yes, step S413 is executed, and if the evaluation result of step S412 is no, step S414 is executed.
[0174] Step S413: Determine the text before the latest interception position as the summary of the search result.
[0175] In the process of determining the summary of the search results, the server may update and adjust the latest interception position after evaluating the number of words in the last sentence of text in step S403, evaluating the character length corresponding to the last sentence of text in step S404, evaluating the topic information at the end of the text before the latest interception position in step S410, and evaluating the semantic integrity of the last sentence of text before the latest interception position in step S412. Therefore, the latest interception position may be updated once or multiple times. When the server does not adjust the latest interception position after each evaluation, the latest interception position is the first interception position.
[0176] Step S414: according to the target paragraph, the semantics of the last sentence of the text before the latest clipping position are completed, and the latest clipping position is updated to the end position of the text obtained after the semantics are completed.
[0177] For example, Figure 6 As shown, the text before the latest interception position is Figure 6 The last sentence of the text shown in 6c is "The specific process of injection molding is based on the "Plastic Product Production Method"". The server can add this sentence to "The specific process of injection molding is based on the content of Chapter 3 of the "Plastic Product Production Method"". The resulting text is as follows Figure 6 As shown in 6d. It can be seen that after the semantics are completed, the last sentence becomes "The specific process of injection molding is based on the content of Chapter 3 of "Plastic Product Production Methods"", and the sentence is semantically complete.
[0178] Step S415: Determine whether the character length of the text before the latest clipping position is not greater than the upper limit of a preset length range.
[0179] If the judgment result of step S415 is yes, then step S413 is executed; if the judgment result of step S415 is no, then step S416 is executed.
[0180] Step S416: Update the latest interception position as the first interception position.
[0181] For example, Figure 6 As shown, the text before the latest interception position is Figure 6 The text shown in 6d is: "The process of injection molding is: at a certain temperature, by stirring the completely molten plastic material, injecting it into the mold cavity with high pressure, and obtaining a molded product after cooling and solidification. The advantages of the injection molding method are fast production speed, high efficiency, good product integrity, the production process can be automated, the output products have various shapes, the product size is accurate, the product is easy to update, and it can form complex-shaped parts. The specific process of injection molding is based on the content of Chapter 3 of the "Plastic Product Production Method"". The character length of the text shown in 6d is 153. If the preset length range is 120 to 150 characters, the character length of the obtained text 153 is greater than the upper limit of the preset length range. Therefore, the latest interception position is updated to the end position of 6c (that is, the first interception position), and the obtained text is as follows Figure 6 As shown in 6e.
[0182] After executing step S416, execute step S413.
[0183] If the character length of the text obtained after the deletion operation in step S416 is less than the lower limit of the preset length range, the latest interception position is no longer updated. Figure 6 As shown, Figure 6 The character length of the text 6e obtained after the last deletion operation is 125. If the preset length range is 130 to 160 characters, the lower limit is 130. At this time, even if 125 is less than 130, the latest interception position will not be updated. When the character length of the summary exceeds the preset length range, the summary will occupy a large area displayed on the client, affecting the overall display effect of the web page. Therefore, the summary should not be too long.
[0184] In this embodiment, steps S408 to S416 determine the summary of the search result from the target paragraph according to the first clipping position.
[0185] Fig.13 This is a schematic diagram of the display of the summaries of each search result determined by the search result summary determination method provided in Example 1 on the browser. After the user enters the search query "wood floor", the search result summary determination method provided in this embodiment is used to determine the summaries of each search result, and the browser displays the content corresponding to each search result as shown in the figure. Fig.13As shown. After the user enters a search query of "wood floor", starting from the starting position of the target paragraph of the web page text corresponding to each search result, a preset number of characters are directly intercepted, and the intercepted characters are determined as the web page abstract. The browser displays the content corresponding to each search result as Figure 2 shown.
[0186] Fig.13 Compared with Figure 2 the last sentence of the abstract of the second search result in Figure 2 is "yi qiang". Evaluating "yi qiang", the evaluation result is that the character length corresponding to "yi qiang" (2 characters) is less than the first preset length (the first preset length is 5 characters for example), indicating that the character length of the last sentence text is relatively small. It can be seen that the last sentence text is difficult to convey effective information. Therefore, the last sentence text "yi qiang" is deleted. The abstract of the search result after deletion is as shown in Fig.13 the second search result in; Figure 2 the last sentence texts of the abstracts of the third and fourth search results in Fig.13 are "bu ran" and "zhe li" respectively. Similarly, the character lengths of the last sentence texts of these two abstracts are both relatively small, and the last sentence texts are also difficult to convey effective information. Therefore, the last sentence of these two abstracts is deleted. The abstracts of the search results after deletion are as shown in Fig.13 the third and fourth search results in; Figure 2 the last sentences of the abstracts of the first and fifth search results in are "What does this have to do with what to lay and whether it is good or not" and "Formaldehyde is added during the reproduction of composite wood floors" respectively. Evaluating the last sentences of the abstracts of the first and fifth search results, the evaluation result is that the character length of the last sentence text is not less than the first preset length and the semantics is complete. Therefore, the last sentences of these two are not processed; Figure 2 the last sentence text of the abstract of the sixth search result in is "But it also has wood consumption". Evaluating the last sentence text of the abstract corresponding to the sixth search result, its corresponding character length is not less than the first preset length. Further evaluation shows that the semantics of the last sentence text of the abstract of this search result is incomplete. Therefore, the last sentence text of the abstract of this search result is supplemented.
[0187] It can be seen from Fig.13 that the last sentences of the abstracts of each search result determined by the solution of the embodiment of the present application have better sentence integrity, better presentation effect of the abstract, and more friendly display.
[0188] In this embodiment, it is first evaluated whether the last sentence of the paragraph where the summary is located with a preset length of characters meets the format requirements, and a first clipping position is determined according to the format evaluation result, and the first clipping position is determined as the latest clipping position. Then, the last sentence of the text before the first clipping position is further evaluated, and the latest clipping position is further updated according to the evaluation result. In this embodiment, the text before the latest clipping position is evaluated multiple times. After each evaluation is completed, the latest clipping position is updated and adjusted according to the evaluation result. Multiple updates of the latest clipping position make the semantics of the last sentence of the summary of the determined search result more complete and more user-friendly.
[0189] Embodiment 2
[0190] Figure 7 Another flowchart of the method for determining the summary of the search results provided in the embodiment of the present application is provided. The execution subject of this embodiment may be a server, such as Figure 7 As shown, the summary of the search result may be determined according to the following steps S701 to S708.
[0191] Step S701: Acquire text information of the search result, and determine the target paragraph from the text information.
[0192] Step S702: Determine a set length of characters starting from the start position of the target paragraph.
[0193] The implementation process of step S701 and step S702 is similar to the implementation process of step S401 and step S402, and will not be repeated here.
[0194] Step S703: Determine the last sentence of the text with the preset length of characters.
[0195] In this embodiment, the last sentence of a preset length of characters can be determined in the following manner: the text after the last first punctuation mark in the above preset length of characters is determined as the last sentence of text. Specifically, the first punctuation mark can be a period, wherein the period is one of the punctuation marks, and the period is used to indicate pauses of different lengths in spoken language. In a specific embodiment, the above first punctuation mark can be any one of the following periods: "," (comma), "?" (question mark), "!" (exclamation mark), ";" (semicolon), ":" (colon). When any one of the above periods appears in the text, the sentence before the period is usually a text with relatively complete semantics, so the first punctuation mark is any one of the above periods, which can make the sentence division more reasonable.
[0196] Figure 8 Several examples of the last sentence of the above preset length characters are shown.
[0197] like Figure 8 As shown, if the preset length of characters determined from the starting position of the target paragraph is as follows Figure 8 As shown in a in , the last first punctuation mark is the "," after "we can read the news", so the "," after "understand domestic and foreign affairs" is determined as the last sentence of the preset length of characters. Figure 8 The last sentence of text in a is framed in a box.
[0198] For another example, the preset length of characters determined from the starting position of the target paragraph is as follows: Figure 8 As shown in b in FIG. 1 , the last first punctuation mark is the “,” after “Therefore”. Therefore, the “briging the” after the “,” is determined as the last sentence of the text with a preset length of characters. Figure 8 The last sentence of text in b is framed in a box.
[0199] For another example, the preset length of characters determined from the starting position of the target paragraph is as follows: Figure 8 As shown in c in , the last first punctuation mark is the “,” after “can read Xinwei and watch movies on the Internet”. Therefore, the “,” after “medical treatment and shopping” is determined as the last sentence text of the preset length of characters. Figure 8 In c, the last punctuation mark is "、", which is not the first punctuation mark. Therefore, "、" is not used to determine the last sentence of the text. Figure 8 In c, the last sentence of text is framed in a box.
[0200] Optionally, the server may also determine the last sentence of the preset length of characters in the following manner: determine that the preset length of characters ends with the first punctuation mark, and determine the text after the second to last first punctuation mark of the preset length of characters as the last sentence of text.
[0201] When a preset length of characters ends with a first punctuation mark, there is no character after the last first punctuation mark. At this time, if the text after the last first punctuation mark is determined as the last sentence of text, then the determined last sentence of text is empty, that is, there is no last sentence of text. Therefore, the text after the second to last first punctuation mark in the preset length of characters can be determined as the last sentence of text to obtain the last sentence of text.
[0202] like Figure 8 As shown, if the preset length of characters determined from the starting position of the target paragraph is as follows Figure 8As shown in d, it ends with "," so the last first punctuation mark is the "," at the end, and the second to last first punctuation mark is the "." before "Therefore". In this case, "Therefoer," after the second to last first punctuation mark "." can be determined as the last sentence of text with a preset length of characters. Figure 8 In d, the last sentence of text is framed.
[0203] Step S704: Evaluate whether the end of the last sentence of the text is incomplete topic information.
[0204] If the evaluation result of step S704 is yes, then step S705 is executed; if the evaluation result of step S704 is no, then step S706 is executed.
[0205] The above-mentioned subject information may include: subject name, URL, and other types of subject information. The subject name may include the title of a film or TV series, the name of a character, the name of a book, the name of a musical work, the name of a drama, the name of a folk art performance, etc., and may also include other subject names.
[0206] Specifically, it can be determined whether the end of the last sentence of the text is incomplete topic information according to the following steps S1 to S4.
[0207] Step S1: Segment the last sentence of text to obtain at least one segmented word.
[0208] In this embodiment, a machine algorithm can be used to segment the last sentence of text, for example, a forward maximum matching segmentation algorithm, a bidirectional maximum matching segmentation algorithm, etc., or other algorithms can be used to segment the last sentence of text. This application does not limit the specific segmentation method.
[0209] In step S1, when the last sentence of text contains only one word or one phrase, one word segmentation is obtained, and when the last sentence of text contains multiple words or multiple phrases, multiple word segments are obtained.
[0210] Fig. 9 , Fig.10 , respectively, are schematic diagrams of the word segmentation of the text in this embodiment. For example, the last sentence of the text is "The specific process of injection molding is "Plastic Products", and the result of the word segmentation of this sentence can be as follows Fig. 9 As shown in the figure. For another example, the last sentence is "Technology makes our lives faster and more convenient", and the result of word segmentation for this sentence can be as follows Fig.10 shown.
[0211] Step S2: Determine whether there is topic information including the last segmentation word in each segmentation word in the topic information database.
[0212] The above-mentioned subject information base includes a plurality of subject information. Specifically, the subject information base may include: each subject name, each uniform resource locator, and may also include other subject information. The subject information in the subject information base may be updated regularly or irregularly to make the subject information in the subject information base more comprehensive.
[0213] Specifically, the server may search the subject information database for the last participle, and when the last participle is found, it is determined that the subject information containing the last participle exists in the subject information database.
[0214] Step S3: Determine that the last segmentation is incomplete compared with the topic information including the last segmentation.
[0215] For example, the last participle determined is "plastic products", and the subject information containing "plastic products" in the information database is "plastic product production method". Since "plastic products" is incomplete compared to "plastic product production method", it can be determined that the last participle "plastic products" is incomplete compared to the subject information containing "plastic products" "plastic product production method".
[0216] Step S4: Determine that the end of the last sentence of the text is incomplete subject information.
[0217] The above steps S1 to S4 can determine that the end of the last sentence of text is incomplete topic information.
[0218] In the present application, other methods may also be used to determine that the end of the last sentence of the text is incomplete subject information. For example, when it is determined that the last sentence of the text includes a punctuation mark such as a book title that indicates the name of a work, if the last sentence includes the left half of the punctuation mark but does not include the right half of the punctuation mark, then the end of the last sentence of the text is determined to be incomplete subject information. For example, the last sentence of the text is "The specific process of injection molding is "Plastic Products". Since this sentence contains the left half of the book title "《" but does not include the right half "》", the end of this sentence is determined to be incomplete subject information.
[0219] Other methods may also be used to determine that the end of the last sentence of text is incomplete subject information, which is not specifically limited in this application.
[0220] Fig.11 An example of determining a summary of a search result is shown. Fig.11 As shown, the determined target paragraph (i.e. the paragraph where the abstract is located) 11a is:
[0221] "Movies enrich people's daily lives. This year is a big year for movies. June's "Coming of Age" is a classic, and September's "From Now On" has also received rave reviews. Many movies have left a deep impression on everyone. The rave-worthy "Run to the Sun" is a classic movie. The movie did not win many awards that year, but it left a very deep impression on people. Time will prove that the movie is indeed worth watching."
[0222] If the preset length is 75 characters, then the preset length characters 11b determined from the starting position of the target paragraph 11a is: "Movies have enriched people's daily lives. This year is a big year for movies. June's "Growth Story" is a classic, and September's "From Now On" has also received rave reviews. Many movies have left a deep impression on everyone, including the rave-worthy "Running Towards." The last sentence of the preset length characters 11b is: "The rave-worthy "Running Towards." Then, "The rave-worthy "Running Towards" is evaluated. After evaluation, the evaluation result is that the end of the last sentence text "The rave-worthy "Running Towards" is incomplete theme information.
[0223] Step S705: Complete the incomplete subject information at the end of the last sentence of the text, and determine the end position of the text obtained after the subject information is completed as the first interception position.
[0224] Step S706: Evaluate whether the semantics of the last sentence is complete.
[0225] If the judgment result of step S706 is yes, then step S708 is executed; if the judgment result of step S706 is no, then step S709 is executed.
[0226] Step S708: Determine the end position of the preset length of characters as the first interception position.
[0227] Step S709: Complete the last sentence of the text, and determine the end position of the text obtained after completing the last sentence as the first interception position.
[0228] After step S709 is executed, step S707 is executed.
[0229] The specific implementation process of step S706 and step S709 can refer to step S1203 and step S1204 of embodiment 3, and step S412 and step S414 of embodiment 1, and will not be described in detail here.
[0230] Step S707: Determine the text before the first clipping position in the target paragraph as a summary of the search result.
[0231] For example, the last sentence of the text 11c obtained after the subject information is completed is "The well-received "Running Towards the Sun"". The summary of the search result obtained by supplementing the subject information is as follows: Fig.11 Alternatively, the last sentence can be supplemented with "Running to the Sun", which has received widespread acclaim.
[0232] This embodiment evaluates whether the subject information at the end of the last sentence of a text of a preset length of characters is complete, so as to complete the subject information at the end. For subject information such as film and television drama titles and book titles, when users read incomplete subject information, they usually prefer to continue reading the subject information to better understand the text. This embodiment completes the subject information so that users can read more complete information.
[0233] Embodiment 3
[0234] Fig.12 Another flowchart of the method for determining the summary of the search results provided in the embodiment of the present application is as follows: Fig.12 As shown, the summary of the search result can be determined according to the following steps S1201 to S1206. The execution subject of this embodiment can be a server.
[0235] Step S1201: Obtain text information of the search result, and determine the target paragraph from the text information.
[0236] Step S1202: Determine a set length of characters starting from the start position of the target paragraph.
[0237] The implementation process of step S1201 and step S1202 is similar to the implementation process of step S401 and step S402, and will not be repeated here.
[0238] Step S1203: Evaluate whether the semantics of the last sentence of the text with the preset length of characters is complete.
[0239] If the evaluation result of step S1203 is no, then execute step S1204; if the evaluation result of step S1203 is yes, then execute step S1205.
[0240] In a specific embodiment, when it is determined that the last sentence lacks any one of the subject, predicate and object, it is determined that the semantics of the last sentence is incomplete. For a specific example of evaluating whether the semantics is complete, reference can be made to step S412 of the first embodiment.
[0241] In this embodiment, the semantic incompleteness of the last sentence of text may also be determined in other ways, for example, when the number of words in the last sentence of text is less than a third preset number, the semantic incompleteness of the last sentence of text is determined. For example, the third preset number may be any number from 2 to 6, or other smaller number, wherein the words may include Chinese single words and phrases, English words, and single words and phrases in other languages.
[0242] For example, Fig.11 As shown, the last sentence of the text "The well-received "Running Towards"" with the determined preset length of characters 11b is evaluated, and the evaluation result is that the last sentence of the text "The well-received "Running Towards"" lacks a predicate and an object, and is semantically incomplete.
[0243] Step S1204: Supplement the last sentence of the text into a complete sentence, and determine the end position of the text obtained after supplementing into the complete sentence as the first interception position.
[0244] Step S1205: Determine the end position of the preset length of characters as the first interception position.
[0245] Step S1206: Determine whether the character length of the text before the first clipping position is not greater than an upper limit of a preset length range.
[0246] If the judgment result of step S1206 is yes, then execute step S1207 ; if the judgment result of step S1206 is no, then execute step S1208 .
[0247] Step S1207: Determine the text before the first clipping position in the target paragraph as a summary of the search result.
[0248] For example, Fig.11 As shown in the figure, the last sentence of text is supplemented into a complete text, and the last sentence of text becomes "The well-received "Running to the Sun" is a classic movie". The summary of the search result obtained by supplementing the last sentence of text into a complete text is as follows Fig.11 As shown in 11d.
[0249] Step S1208: Delete the last sentence of text, and determine the end position of the text obtained after deleting the last sentence of text as the third clipping position.
[0250] Step S1209: Determine the text before the third clipping position in the target paragraph as the summary of the search result.
[0251] The specific process of step S1208 and step S1209 can refer to step S415, step S416, and step S413 of embodiment 1, and will not be described in detail here.
[0252] When a user reads a text with incomplete semantics, the user usually hopes to obtain the complete content of the incomplete text to better understand the text. This embodiment completes the sentence so that the user can read more complete information.
[0253] The following is a detailed introduction to the method for determining the summary of the search results provided in the embodiments of the present application.
[0254] Fig.14 A schematic diagram of a flow chart of a method for determining a summary of a search result provided in an embodiment of the present application. Fig.14 As shown, the method for determining the summary of the search results provided in the embodiment of the present application includes the following steps S1410 to S1480. Fig.14 The server in the illustrated embodiment may be the server 320 described above, and the client may be the client 310 described above.
[0255] Step S1410: The server receives the search query sent by the client.
[0256] The user may enter a search query at the client 310. After receiving the search query entered by the user, the client 310 may send the query to the server 320 via the network 330 (e.g., a wired and / or wireless network), and the server 320 may receive the search query. Figure 2 As shown, the user can enter the keyword "wood floor" in the search box 201 of the search page of the browser. The keyword is the search query, and the search box 201 of the search page is the interface of the search engine for the user to input information.
[0257] Step S1420: The server searches for at least one search result that matches the search query.
[0258] In the embodiment of the present application, the search results may be any machine-readable and storable document, for example, the search results may be emails, news, blogs, corporate directories, electronic versions of printed texts, web pages, etc. When a user searches for information through the Internet, the search results are usually web pages. The search results usually include text information, and may also include embedded information such as images, hyperlinks, audio, video, etc., and embedded instructions such as scripting languages.
[0259] In an embodiment of the present application, the server can search for at least one search result that matches the above search query from the index database of the search engine. The index database stores index information of each web page, and the web page that meets specific conditions can be quickly found based on the index information. For example, the index information may include the URL of the web page corresponding to each word segmentation and the keywords of the web page, and may also include other information of the web page corresponding to each word segmentation. In the process of searching for web pages, the server may store various information of the web page such as the URL of each crawled web page, the hypertext markup language (HTML) code of the web page, the title of the web page, etc. in the information database, and establish the index information of each web page in the index database. The information database stores the complete information of the web page. When a user views a web page, the server can obtain the complete information of the web page from the information database, and send the complete information of the web page to the client, so that the client displays the complete content of the web page.
[0260] The server may search for search results after receiving the above search query. The search results may be web pages that match the search query entered by the user. The search results may match the search query if the title of the search results contains the keywords entered by the user, or the title of the search results contains synonyms of the keywords entered by the user, or the search results contain all or part of the text entered by the user, or the search results belong to the same or similar fields as the search query entered by the user. The search results may also be other situations that match the search query. For example, Figure 2 As shown, if the keyword input by the user during the search is "wooden floor", the server can determine the web page whose title contains "wooden floor" as the search result.
[0261] Step S1430: The server scores each of the search results found, and sorts the search results found in descending order of score.
[0262] Among them, a higher score indicates that the search result matches the search query more closely.
[0263] Specifically, when the search result is a web page, the server may score the searched web page according to at least one of the following conditions:
[0264] The number of times the search query appears on the web page (e.g., the more times it appears, the higher the score);
[0265] Where the search query appears on the web page (e.g., a high score appears in the title);
[0266] The number of times the web page has been viewed (for example, the more times the web page has been viewed, the higher the score), etc.
[0267] Step S1440: the server obtains text information of each of the first preset number of search results in order from front to back, and determines the target paragraph from the obtained text information.
[0268] For each search result, the target paragraph is the paragraph where the summary of the search result is located.
[0269] The server determines the target paragraph from the acquired text information, that is, the server determines the target paragraph corresponding to each piece of text information from the acquired text information.
[0270] The above-mentioned first preset number can be any number, for example, it can be 10, 50, 100, 200, 500, etc., or other greater or lesser numbers. The larger the first preset number is set, the more search results will be determined by the server, and the more search results will be presented to the user. The smaller the first preset number is set, the faster the server will determine the search results.
[0271] In the embodiment of the present application, taking the search results as web pages as an example, when the server stores the complete information of each crawled web page in the above-mentioned information database, the server can obtain the text information of the search results from the information database.
[0272] Optionally, for each of the first preset number of search results, the server may determine the target paragraph in any one of the following determination methods.
[0273] Determination method 1: The server segments the text information according to the carriage return characters in the text information of the search results, scores each paragraph, and selects at least one paragraph as the target paragraph in descending order of scores. It is understandable that the character length of some paragraphs after segmentation is very short. In this case, one paragraph may not meet the requirements of summary extraction, so the target paragraph may include one paragraph, or two or more paragraphs.
[0274] The target paragraph determined in this way has a higher matching degree with the user's search query.
[0275] Determination method 2: Segment the text information according to the carriage return characters in the text information of the search results, score each paragraph, and the server determines the highest-scoring paragraph and at least one paragraph located after the highest-scoring paragraph and adjacent to the highest-scoring paragraph as the target paragraph.
[0276] The target paragraph determined in this way can not only have a high degree of match with the user's search query, but also make the coherence of the paragraphs included in the target paragraph better when the target paragraph includes two or more paragraphs, thereby making the semantic coherence and readability of the summary of the determined search result better.
[0277] Determination method three: the server segments the text information according to the carriage return characters in the text information of the search result, and determines the starting paragraph of the text information of the search result as the target paragraph. This method can quickly and conveniently determine the paragraph where the abstract is located.
[0278] The server may also determine the paragraph where the abstract is located in other ways, which are not specifically limited in this application.
[0279] In the above determination methods 1 and 2, the higher the score of the segment, the higher the match between the segment and the search query. Therefore, the server can score each segment based on the following factors: the number of times the search query appears in the segment (for example, the more times it appears, the higher the score), the position of the segment in the search results (for example, if the segment is a title or the first paragraph, the score is higher). The scoring method of the segment will not be repeated here.
[0280] Step S1450: The server determines a preset length of characters starting from the start position of the target paragraph.
[0281] The server determines a preset length of characters, which may be a preset length of Chinese characters, or a preset length of English characters, or a preset length of Korean characters, or a preset length of text in other languages, or a preset length of characters mixed in multiple languages.
[0282] In one embodiment, the preset lengths corresponding to the text information of the search results in different languages can be the same, as exemplified in step S402 of the first embodiment, so that the solution provided by the present application can be more applicable. For different languages, the number of lines and spaces occupied by characters of the same length and the same font size in a web page are often different, so in another embodiment, the preset lengths of the text information of the search results in different languages can also be different. Those skilled in the art can set the preset length according to actual conditions, which is not specifically limited here. The preset length can be, for example, any length between 100 and 200 characters, or a length of other numbers of characters. When the preset length is set to be longer, the number of characters of the determined summary is also larger, so that the user can learn more about the search results; when the preset length is set to be shorter, the number of characters of the determined summary is also smaller, and each search result occupies less space on the web page when displayed on the display of the client, so that the same web page can display more search results. Those skilled in the art can set the specific value of the preset length according to actual needs.
[0283] Step S1460: The server evaluates the last sentence of the text of the preset length of characters to obtain a first evaluation result.
[0284] In the present application, the last sentence of text with a preset length of characters may be determined according to step S703 of the second embodiment, and then the last sentence of text may be evaluated.
[0285] In an embodiment of the present application, the last sentence of text of a preset length of characters determined from the starting position of the above-mentioned target paragraph is evaluated. It can be to evaluate the number of words corresponding to the last sentence of text as in step S403 in embodiment one, or to evaluate the character length corresponding to the last sentence of text as in step S404 in embodiment two, or to evaluate whether the end of the last sentence of text is incomplete topic information as in step S704 in embodiment two, or to evaluate the semantic completeness of the last sentence of text as in step S1203 in embodiment three.
[0286] The first evaluation result obtained may be that the number of words corresponding to the last sentence of text in step S403 of embodiment 1 is less than the second preset number (i.e., the number of words is small), or the character length corresponding to the last sentence of text in step S404 of embodiment 1 is less than the first preset length (i.e., the character length is short), or the end of the last sentence of text in step S704 of embodiment 2 is incomplete subject information, or the semantics of the last sentence of text in step S1203 of embodiment 3 is incomplete. The first evaluation result obtained may also be other results that can reflect the integrity of the last sentence of text, which is not specifically limited in this application.
[0287] Step S1470: The server determines a first clipping position of the target paragraph according to the first evaluation result.
[0288] Among them, the first interception position can be the end position of the text obtained after supplementing the last sentence of the target paragraph. For example, the first interception position can also be the end position of the text obtained after the incomplete subject information at the end of the last sentence of the text is supplemented in step S705 of embodiment 2, and the first interception position can also be the end position of the text obtained after the last sentence of the text is supplemented into a complete text in step S1204 of embodiment 3. The first interception position can also be the end position of the text obtained after deleting the last sentence of the target paragraph. For example, the first interception position can be the end position of the text obtained after deleting the last sentence of the text in step S405 of embodiment 1. The first interception position can also be the end position of the last sentence of the text of the target paragraph. For example, the first interception position can be the summary of the search results determined in step S708 of embodiment 2 or step S1205 of embodiment 3.
[0289] In the embodiment of the present application, the last sentence of the target paragraph is supplemented, which can be as in step S1204 in the third embodiment to supplement the last sentence into a complete text, or as in step S705 in the second embodiment to supplement the subject information at the end of the last sentence. Fig.11 As shown in 11d in the figure, the last sentence of text is supplemented into a complete text, which can be to supplement the text before the next first punctuation mark of the last sentence of text in the target paragraph to the end of the last sentence of text.
[0290] In one embodiment, after determining the first interception position of the target paragraph, the text before the first interception position can be adjusted, and a new interception position can be re-determined so that the character length corresponding to the text before the new interception position is within a preset length range. For example, the new interception position can be re-determined according to step S408 and step S409 of Example 1. The preset length range can be 80 to 350 characters, or other character length ranges. The present application does not specifically limit the preset length range, and those skilled in the art can set it according to actual needs. In this embodiment, if the character length corresponding to the text before the first interception position is within the preset length range, the character length of the summary of the determined search results can be kept within a reasonable length range, and it will not be too long, resulting in too few search results presented on the page, nor will it be too short, resulting in too little effective information contained in the summary.
[0291] After determining the first interception position of the target paragraph, if the character length corresponding to the text before the first interception position in the target paragraph is short, it is difficult for the user to understand the approximate content of the search results through the summary. When the summaries of each search result are displayed on the client or other display, the layout space occupied by the summary of each search result is usually determined, and the font size, line spacing, character spacing and other display settings of the summary of each search result are also determined. If the character length corresponding to the text before the interception position in the paragraph where the summary is located is long, the determined summary cannot be fully displayed on the client or other display, resulting in poor completeness of the summary of the displayed search results and poor display effect. Therefore, in this application, the character length corresponding to the text before the interception position in the target paragraph is set within a preset length range, which can not only enable the user to better understand the approximate content of the search results through the summary, but also enable the determined summary to be fully displayed on the client or other display, so that the summary of the displayed search results is better in completeness and display effect.
[0292] In an embodiment of the present application, when the first evaluation result is that the number of characters or words corresponding to the last sentence of the text is small, such as when the evaluation results of step S403 and step S404 of the first embodiment are no, or when the semantics of the last sentence of the text is incomplete, such as when the evaluation result of step S412 of the first embodiment is no and the evaluation result of step S1203 of the third embodiment is no, or when the end of the last sentence of the text is incomplete topic information, such as when the evaluation result of step S410 of the first embodiment is yes and the evaluation result of step S704 of the second embodiment is yes, the last sentence of the text can be deleted, such as step S405 of the first embodiment, or the last sentence of the text can be supplemented, such as step S705 of the second embodiment and step S1204 of the third embodiment, and the end position of the text obtained after deleting the last sentence of the text or the text obtained after supplementation is determined as the first cut-off position of the target paragraph. When the first evaluation result is that the number of characters or words corresponding to the last sentence of text is not small, or the semantics of the last sentence of text is complete, or the end of the last sentence of text is not incomplete subject information, the end position of the last sentence of text can be determined as the first interception position of the target paragraph, such as step S708 of embodiment 2 and step S1205 of embodiment 3. In the embodiment of the present application, the first interception position of the paragraph where the abstract is located can be flexibly determined according to the first evaluation result. Those skilled in the art can determine the first interception position of the paragraph where the abstract is located based on the principle that the abstract of the search result is more complete and has a better display effect. The present application does not limit the specific method for determining the first interception position.
[0293] Step S1480: The server determines a summary of the search result from the target paragraph according to the first interception position.
[0294] The character length corresponding to the summary of the search result determined in step S1480 is within a preset length range.
[0295] Specifically, the server may determine the text before the first clipping position in the target paragraph as the summary of the search result. For example, step S707 in embodiment 2 and step S1207 in embodiment 3 are examples of determining the text before the first clipping position in the target paragraph as the summary of the search result.
[0296] Alternatively, the server may also determine another interception position based on the text before the first interception position, and determine the text in the target paragraph that is located before the other interception position as the summary of the search results. For example, steps S405 to S416 of the first embodiment are examples of determining another interception position based on the text before the first interception position, and determining the text in the target paragraph that is located before the other interception position as the summary of the search results. The latest interception position in the first embodiment is the determined other interception position. Sometimes, the text in the target paragraph that is located before the first interception position still cannot present a good summary. For example, the text is too long or too short, the text semantics is still incomplete, etc. In this case, another interception position can be further determined based on the text before the first interception position, wherein the text before the other interception position can present a good summary. In this way, the presentation effect of the determined summary can be further improved.
[0297] The solution provided in the embodiment of the present application evaluates the last sentence of text of a preset length of characters starting from the starting position of the target paragraph, and determines the first interception position according to the first evaluation result obtained by the evaluation. It can be seen that the embodiment of the present application flexibly determines the first interception position according to the first evaluation result, so that the last sentence of the summary of the determined search result can be a sentence of text with relatively complete semantics, which improves the reference value for whether the user browses the web page. When the summary of the search result is displayed on the client, the presentation effect is better, the user's invalid reading volume is reduced, the user's reading experience is improved, and the probability of the user clicking on the web page corresponding to the summary is increased. In addition, the first interception position determined in the embodiment of the present application is the end position of the text obtained after supplementing the last sentence of text, the end position of the last sentence of text, or the end position of the text obtained after deleting the last sentence of text. It can be seen that the first interception position determined in the embodiment of the present application is different according to the different first evaluation results. The first interception position is further flexibly determined, so that the presentation effect of the determined summary is better.
[0298] In one implementation, in step S1460, the last sentence of text may be evaluated in any one of the following evaluation methods to obtain a first evaluation result.
[0299] Evaluation method 1: Evaluate whether the character length corresponding to the last sentence of text is less than a first preset length.
[0300] The specific evaluation process of the evaluation method 1 may refer to step S404 of the first embodiment.
[0301] Based on the evaluation result of the evaluation method 1 being yes, the first clipping position may be: the end position of the text obtained after deleting the last sentence of the text, such as steps S405 to S406 of the first embodiment.
[0302] Through evaluation method one, it can be quickly evaluated that the semantic integrity of the last sentence of text is low and its reference value for users to understand the web page is small, so that when determining the first interception position, it can be quickly determined to delete the last sentence of a preset length of characters, and the summary of the search results with better display effect for users can be determined more quickly.
[0303] Evaluation method 2: Evaluate whether the number of words corresponding to the last sentence of text is less than a second preset number.
[0304] The specific evaluation process of the second evaluation method may refer to step S403 of the first embodiment.
[0305] If the evaluation result of the second evaluation method is yes, the first clipping position may be: the end position of the text obtained after deleting the last sentence of the text, such as steps S405 to S406 of the first embodiment.
[0306] Evaluation method 2 can also more quickly determine a summary of search results that is better displayed to users, and because the number of words contained in a sentence of text usually better reflects the semantic integrity of a sentence of text, evaluating the number of words in the last sentence of text can more accurately evaluate the semantic integrity of the last sentence of text and its reference value to users' understanding of web pages. Through evaluation method 2, it can be quickly evaluated that the semantic integrity of the last sentence of text is low and its reference value to users' understanding of web pages is small, so that when determining the first interception position, it can be quickly determined to delete the last sentence of a preset length of characters, and more quickly determine a summary of search results that is better displayed to users.
[0307] Evaluation method three: Evaluate whether the proportion of characters other than words and phrases in the last sentence is greater than a preset proportion.
[0308] The above words may include Chinese single words and phrases, English words, and single words and phrases in other languages. The above characters may include Chinese characters. For text information, characters other than characters and words may include: at least one of numbers, punctuation marks, mathematical symbols, currency symbols, proofreading symbols, dictionary symbols, and phonetic symbols. Characters other than characters and words may also include other symbols, which are not specifically limited in this application. The above preset ratio may be any ratio between 40% and 60%, or other larger ratios.
[0309] Based on the evaluation result of the evaluation method three being yes, the first interception position may be: the end position of the text obtained after deleting the last sentence of the text.
[0310] Users usually understand the abstract more fully through words and phrases with actual semantics. Characters other than words and phrases in the abstract usually provide little help to users in understanding the content of the abstract. Therefore, words and phrases in the text are usually the most effective information for users to understand the abstract. Evaluation method three can evaluate that the proportion of effective information in the last sentence of the text is small. When determining the first cut-off position, it can quickly determine to delete the last sentence of the text with a preset length of characters.
[0311] Evaluation method 4: Evaluate whether the end of the last sentence of the above text contains incomplete topic information.
[0312] The specific evaluation process of the fourth evaluation method may refer to step S704 of the second embodiment.
[0313] Based on the evaluation result of the fourth evaluation method being yes, the first interception position may be the end position of the text obtained by completing the subject information at the end of the last sentence of the text.
[0314] In the fourth evaluation method, the last sentence of the text is evaluated, that is, the subject information at the end of the last sentence of the text is evaluated, and the first evaluation result obtained is that the end of the last sentence of the text is incomplete subject information. When users read texts, for subject information such as the names of movies, TV series, and books, users usually prefer to read the complete content of these subject information to better understand the text. The fourth evaluation method can evaluate that the end of the last sentence is incomplete subject information. When determining the first interception position, the first interception position can be determined as a position that can make the above subject information complete according to the first evaluation result of the fourth evaluation method, so that users can better understand the text.
[0315] Evaluation method five: Evaluate whether the semantics of the last sentence of the above text is incomplete.
[0316] The specific evaluation process of the fifth evaluation method may refer to step S1203 of the third embodiment.
[0317] Based on the evaluation result of evaluation method five being yes, the first interception position may be: the end position of the text obtained after the last sentence of the text is supplemented into a complete text.
[0318] In evaluation method 5, the last sentence of text is evaluated, that is, the semantics of the last sentence of text is evaluated, and the first evaluation result obtained is that the semantics of the last sentence of text is incomplete. When the semantics of a sentence of text is incomplete, the user usually cannot know the specific content of the sentence after reading the sentence of text. Therefore, evaluation method 5 evaluates that the semantics of the last sentence is incomplete. When determining the first interception position, the last sentence of text can be supplemented according to the first evaluation result of evaluation method 5 to facilitate the user to read the text.
[0319] Evaluation method six: Evaluate whether there is a punctuation mark at the end of the last sentence of the above text.
[0320] The punctuation mark in assessment method six can be a period.
[0321] Based on the evaluation result of evaluation method 6 being yes, the first interception position may be: the end position of the text obtained by deleting the punctuation mark at the end of the last sentence of the text.
[0322] When the summary is displayed, if there is a punctuation mark at the end of the summary, the reference value of this punctuation mark to the user's reading comprehension is very small, and the punctuation mark at the end may also affect the display effect of the summary on the client. Therefore, when it is evaluated that there is a punctuation mark at the end of the last sentence of the text, the punctuation mark at the end can be deleted to make the display effect of the summary better.
[0323] It can be seen from the above-mentioned evaluation methods 1, 2, 3 and 6 that these four evaluation methods do not analyze the semantics of the last sentence of the text, but directly evaluate the sentence format such as the number of characters, the number of words or the proportion of words, punctuation marks, etc. contained in the last sentence. Therefore, evaluation methods 1, 2, 3 and 6 can be summarized as format evaluation.
[0324] In the embodiment of the present application, other evaluation methods may also be used to evaluate the last sentence of the text of the preset length of characters, wherein the evaluation result can reflect the semantic integrity of the last sentence of the text, and the specific evaluation method is not limited. The first interception position is determined according to the first evaluation result, and the first interception position determined may be the same or different if the first evaluation result is different.
[0325] In the above implementation, when the character length corresponding to the last sentence of text is less than the first preset length, or the number of words corresponding to the last sentence of text is less than the second preset number, or the proportion of characters other than words in the last sentence of text is greater than the preset ratio, it means that the last sentence of text is very likely to be a sentence with incomplete semantics, or a sentence that does not express any actual semantics. Therefore, the last sentence of text does not have much reference value for users to understand search results. In this case, deleting the last sentence can delete sentences with less reference value, making the determined summary more complete, and the user's reading experience better when the summary is displayed on the client. In addition, since the character length or number of words of the last sentence of text is small, when the last sentence of text is directly deleted, the total character length of the summary obtained is also smaller than the above preset length, and the impact on the display of the summary on the client or other displays is also smaller.
[0326] When it is determined that the character length corresponding to the last sentence of text is less than the first preset length, or the number of words corresponding to the last sentence of text is less than the second preset number, the last sentence of text can also be supplemented as a complete text. This approach can also make the determined summary more complete.
[0327] The above-mentioned complete text can be understood as a semantically complete text, for example, a text including a subject, a location and an object.
[0328] In one embodiment, when the first evaluation result is to determine that the character length corresponding to the last sentence of text is not less than the first preset length, or the number of words corresponding to the last sentence of text is not less than the second preset number, or the proportion of characters other than words in the last sentence of text is determined to be not greater than the preset proportion, or when it is determined that the end of the last sentence of text is complete subject information, or when it is determined that the semantics of the last sentence of text is complete, the first interception position can be the end position of the above-mentioned last sentence of text, step S708 of embodiment 2, and step S1205 of embodiment 3. After the last sentence of text of preset length characters is evaluated, the evaluation result is that the semantics of the last sentence of text is complete. At this time, there is no need to delete or supplement the content of the last sentence. In this embodiment, the reason for directly determining the end position of the above-mentioned last sentence of text as the interception position of the paragraph where the summary is located is that the last sentence of text of preset length characters is already a text with relatively complete semantics and better display effect.
[0329] In one embodiment, the method for determining a summary of the search result may further include the following step: sending the determined summary of the search result to the client, so that the client displays the received summary on a display.
[0330] In one embodiment, the first interception position may be: the end position of the text obtained after deleting the last sentence of text. Step S1480 may be implemented according to the following steps: determine that the character length corresponding to the text before the first interception position in the target paragraph is less than a second preset length; determine the second interception position, wherein the second interception position is: the end position of the text obtained after supplementing the last sentence of text; and determine the summary of the search results from the target paragraph according to the second interception position. The specific embodiments of this embodiment may refer to steps S408, S409 and S413 of embodiment one, and the latest interception position in step 409 of embodiment one is the above-mentioned second interception position.
[0331] The second preset length may be the lower limit of the preset length range. In this embodiment, when the first clipping position is the end position of the text obtained after deleting the last sentence of text, if the character length corresponding to the text before the first clipping position in the target paragraph is less than the second preset length, it means that the character length corresponding to the text before the first clipping position is too small. In this case, the summary of the determined search result may contain very little information, so that the user cannot obtain valid information of the search result from the summary. In this case, the summary of the search result is determined from the target paragraph according to the second clipping position. Since the second clipping position is the end position of the text obtained after supplementing the last sentence of text, the character length corresponding to the summary of the obtained search result can be increased, so that the user can obtain more information of the search result from the summary.
[0332] The above-mentioned method of determining the summary of the search results from the target paragraph based on the second clipping position may be to determine the text in the target paragraph before the second clipping position as the summary of the search results, or to further determine other clipping positions based on the text before the second clipping position, and determine the summary of the search results based on the other clipping positions, until the presentation effect of the summary of the determined search results meets the requirements.
[0333] In a specific implementation, the above-mentioned determination of the summary of the search result from the target paragraph according to the second cut-off position can be implemented according to the following steps: determining that the character length corresponding to the text located before the second cut-off position in the target paragraph is greater than a third preset length, and determining the determined preset length characters as the summary of the search result. Among them, the third preset length is greater than the above-mentioned second preset length, and the third preset length can be the upper limit of the above-mentioned preset length range. For example, the summary of the search result can be determined according to steps S409, S415, S416, and S413 of the first embodiment.
[0334] In this embodiment, if the character length corresponding to the text before the second clipping position in the target paragraph is greater than the third preset length, it means that the character length corresponding to the text before the second clipping position is too long. This may result in too few search results being presented on the page, or the determined summary cannot be fully displayed, affecting the layout of the page. In this case, the determined preset length of characters can be determined as the summary of the search results, which is beneficial to the layout of the page and makes the character length corresponding to the determined summary within the preset length range. That is, in this embodiment, when the length of the determined summary is short, if further increasing the character length of the summary will cause the summary to be too long, the determined preset length of characters is used as the final summary.
[0335] In one embodiment, the first interception position is the end position of the text obtained after the last sentence of text is supplemented. Step S1480 can be implemented according to the following steps: determine that the character length corresponding to the text before the first interception position in the target paragraph is greater than a third preset length; determine a third interception position, wherein the third interception position is: the end position of the text obtained after deleting the last sentence of text; determine the text before the third interception position in the target paragraph as the summary of the search result. For example, the summary of the search result can be determined according to steps S1206, S1208, and S1209 of Example 3.
[0336] The third preset length may be the upper limit of the above preset length range. In this embodiment, when the first interception position is the end position of the text obtained after supplementing the last sentence of text, if the character length corresponding to the text before the first interception position in the target paragraph is greater than the second preset length, it means that the character length corresponding to the text before the first interception position is too long. In this case, since the display space of each search result in the display page is usually determined, the summary of the determined search result may not be fully displayed. In this case, the summary of the search result is determined from the target paragraph according to the third interception position. Since the third interception position is the end position of the text obtained after deleting the last sentence of text, the character length corresponding to the summary of the obtained search result can be shortened, so that the determined search result can be fully displayed in the display page.
[0337] In one embodiment, step S1470 can be implemented according to the following steps: determine that the first evaluation result is any one of the following: the end of the last sentence of text is complete topic information, the semantics of the last sentence of text is complete, the character length corresponding to the last sentence of text is not less than the first preset length, and the proportion of characters other than words and characters in the last sentence of text is not greater than the preset proportion; evaluate the last sentence of text to obtain a second evaluation result; determine the first interception position of the target paragraph according to the second evaluation result. Among them, the second evaluation result is different from the evaluation content corresponding to the first evaluation result. Specifically, the summary of the search result can be determined according to steps S706 to S709 of Example 2, wherein step S706 is the process of evaluating the last sentence of text to obtain the second evaluation result, and steps S708 and S709 are the process of determining the first interception position according to the second evaluation result.
[0338] When the first evaluation result is that the end of the last sentence of the text is the complete subject information, the semantics of the last sentence of the text is complete, the character length corresponding to the last sentence of the text is not less than the first preset length, or the proportion of characters other than words and phrases in the last sentence of the text is not greater than the preset ratio, it means that when evaluating the last sentence of the text, the last sentence meets the evaluation requirements, that is, the last sentence meets certain integrity requirements. In this case, in order to make the obtained summary more complete and the presentation effect of the summary better, the last sentence of the text result can be further evaluated to obtain a second evaluation result. Among them, the evaluation content corresponding to the second evaluation result and the first evaluation result can be different. For example, when the evaluation content corresponding to the first evaluation result is whether the end of the last sentence of the text contains incomplete subject information, the evaluation content corresponding to the second evaluation result can be whether the semantics of the last sentence of the text are complete; when the evaluation content corresponding to the first evaluation result is the character length corresponding to the last sentence of the text, the evaluation content corresponding to the second evaluation result can be whether the end of the last sentence of the text contains incomplete subject information.
[0339] In one embodiment, step S1480 can be implemented according to the following steps: evaluate the last sentence of the text before the first clipping position in the target paragraph to obtain a third evaluation result; determine the fourth clipping position of the target paragraph according to the third evaluation result; determine the summary of the search result from the target paragraph according to the fourth clipping position. The specific implementation process of this embodiment can refer to steps S408 to S416 of Example 1 and steps S1206 to S1209 of Example 3. In Example 1, the evaluation result obtained in step S408 is the third evaluation result, steps S409 to S411 are to determine the fourth clipping position, and steps S412 to S416 are to determine the summary of the search result according to the fourth clipping position. In Example 3, the evaluation result obtained in step S1206 is the third evaluation result, the third clipping position determined in step S1208 is the fourth clipping position, and step S1209 is to determine the summary of the search result according to the fourth clipping position.
[0340] The fourth clipping position may be any one of the following: the end position of the text obtained by supplementing the last sentence of the text before the first clipping position in the target paragraph, the end position of the text before the first clipping position in the target paragraph, or the end position of the text obtained by deleting the last sentence of the text before the first clipping position in the target paragraph.
[0341] In this embodiment, after the first clipping position is determined, the last sentence of the text before the first clipping position in the target paragraph may still have a low integrity. In this case, the last sentence of the text before the first clipping position in the target paragraph can be further evaluated, and the fourth clipping position is determined based on the third evaluation result. According to the fourth clipping position, the summary of the search result is determined from the target paragraph. That is, after each determination of the first clipping position, the last sentence of the text before the first clipping position in the target paragraph is evaluated again in this embodiment, so that the last sentence of the text before the determined clipping position meets the requirement of complete summary display, so that the summary of the determined search result can have better integrity and better display effect.
[0342] In one implementation, the server may determine the target paragraph of the search result according to the following steps. Fig.15 A schematic diagram of a process for determining a target paragraph of a search result provided in an embodiment of the present application. Fig.15 As shown, the target paragraph of the search result may be determined according to the following steps S1501 to S1506.
[0343] S1501: The server receives a search query sent by a client.
[0344] S1502: The server searches for multiple web pages that match the search query, and scores each web page in descending order of matching degree.
[0345] Among them, the higher the matching degree, the higher the score.
[0346] S1503: The server determines X web pages from the plurality of web pages according to the order of scores from high to low.
[0347] X is a positive integer not less than 1. For example, X can be any value between 50 and 300, or other specific values. The larger the value of X is, the more web pages the server sends to the client, and the more web pages the client can display.
[0348] S1504: The server obtains text information corresponding to the determined webpage, and segments the text information to obtain at least one paragraph corresponding to each of the X webpages.
[0349] S1505: The server scores each paragraph.
[0350] Among them, the higher the score, the more closely the description paragraph matches the search query.
[0351] S1506: The server selects Y paragraphs in descending order of scores as target paragraphs of the search results.
[0352] Usually, a web page selects one segment as the paragraph where the summary is located. In this case, the value of Y is 1. In other cases, if the text information of a segment of a web page is small and insufficient to provide sufficient information as a summary, in this case, the value of Y can be a positive integer greater than 1.
[0353] In one implementation, step S1606 may be implemented by following steps a to d:
[0354] Step a: Determine i=1.
[0355] Step b: The server determines whether the length of the text corresponding to the paragraphs ranked from 1 to i is not less than a preset length.
[0356] If the judgment result of step b is yes, then execute step c; if the judgment result of step b is no, then execute step d.
[0357] The setting method of the preset length in step b can refer to the setting method of the preset length in the aforementioned embodiments, which will not be repeated here.
[0358] Step c: Determine the paragraphs ranked from 1 to i as Y paragraphs.
[0359] Step d: Determine i=i+1, and execute steps b to c.
[0360] The above describes in detail an example of a method for determining a summary of a search result provided by the present application. It is understandable that, in order to implement the above functions, the corresponding device includes a hardware structure and / or software module corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the modules and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.
[0361] The present application can divide the function modules of the summary determination device of the search results according to the above method example. For example, each function can be divided into each function module, or two or more functions can be integrated into one module. The above integrated module can be implemented in the form of hardware or in the form of software function modules. It should be noted that the division of modules in the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0362] Fig.16 The schematic diagram of the structure of a device for determining a summary of a search result provided by the present application is shown. The device includes an evaluation module 1610 and a determination module 1620 .
[0363] An evaluation module, configured to determine a preset length of characters from the start position of a target paragraph, evaluate the last sentence of the preset length of characters, and obtain a first evaluation result, wherein the target paragraph is the paragraph where the summary of the search result is located;
[0364] A determination module is used to determine a first clipping position of the target paragraph based on the first evaluation result, wherein the first clipping position is any one of the following: the end position of the text obtained after supplementing the last sentence of text, the end position of the last sentence of text, and the end position of the text obtained after deleting the last sentence of text. According to the first clipping position, a summary of the search result is determined from the target paragraph, wherein the character length corresponding to the summary of the search result is within a preset length range.
[0365] In one embodiment, the first evaluation result is: the end of the last sentence of text is incomplete topic information;
[0366] The first interception position is: the end position of the text obtained by completing the subject information at the end of the last sentence of the text.
[0367] In one implementation, the first evaluation result is: the semantics of the last sentence of text is incomplete;
[0368] The first interception position is: the end position of the text obtained after the last sentence of text is supplemented into a complete text.
[0369] In one embodiment, the first evaluation result is: the character length corresponding to the last sentence of text is less than a first preset length, or the proportion of characters other than words and phrases in the last sentence of text is greater than a preset proportion;
[0370] The first clipping position is: the end position of the text obtained after deleting the last sentence of the text.
[0371] In one embodiment, the first interception position is: the end position of the text obtained after deleting the last sentence of the text;
[0372] The determination module is specifically used for:
[0373] Determining that the character length corresponding to the text located before the first clipping position in the target paragraph is less than a lower limit of a preset length range;
[0374] Determine a second interception position, wherein the second interception position is: the end position of the text obtained after supplementing the last sentence of the text;
[0375] According to the second cut-off position, a summary of the search result is determined from the target paragraph.
[0376] In one embodiment, the first interception position is: the end position of the text obtained after supplementing the last sentence of the text;
[0377] The determination module is specifically used for:
[0378] Determining that the character length corresponding to the text located before the first clipping position in the target paragraph is greater than an upper limit of a preset length range;
[0379] Determine a third clipping position, wherein the third clipping position is: the end position of the text obtained after deleting the last sentence of the text;
[0380] According to the third clipping position, a summary of the search result is determined from the target paragraph.
[0381] In one implementation, the determining module is specifically configured to:
[0382] Determine that the first evaluation result is any one of the following: the end of the last sentence of text is complete subject information, the semantics of the last sentence of text is complete, the character length corresponding to the last sentence of text is not less than a first preset length, and the proportion of characters other than words and phrases in the last sentence of text is not greater than a preset proportion;
[0383] Evaluate the last sentence of text to obtain a second evaluation result, wherein the second evaluation result has a different evaluation content from the first evaluation result;
[0384] A first clipping position of the target paragraph is determined according to the second evaluation result.
[0385] In one implementation, the determining module is specifically configured to:
[0386] Evaluate the last sentence of the text before the first cut-off position in the target paragraph to obtain a third evaluation result;
[0387] Determining a fourth interception position of the target paragraph according to the third evaluation result;
[0388] According to the fourth clipping position, a summary of the search result is determined from the target paragraph.
[0389] The present application also provides an electronic device. The electronic device provided by the present application can be Figure 3 The server 320 shown is used to execute the above-mentioned method for determining the summary of the search result. Fig.17 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, such as Fig.17 As shown, the electronic device provided by the present application includes a processor 1701, an interface 1702, a memory 1703 and a communication bus 1704, wherein the processor 1701, the interface 1702, and the memory 1703 communicate with each other through the communication bus 1704.
[0390] Memory 1703, used for storing computer programs;
[0391] The processor 1701 is configured to implement the method for determining a summary of a search result described in any one of the above embodiments when executing the program stored in the memory 1703 .
[0392] The communication bus mentioned in the above electronic device can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0393] The interface is used for communication between the above electronic device and other devices.
[0394] The memory may include a random access memory (RAM) and may also include a non-volatile memory (NVM), such as at least one disk memory.
[0395] Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0396] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0397] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the processor executes the method for determining a summary of a search result described in any of the above embodiments.
[0398] The embodiment of the present application further provides a computer program product. When the computer program product is executed on a computer, the computer is caused to execute the above-mentioned related steps to implement the method for determining a summary of a search result described in any of the above-mentioned embodiments.
[0399] Among them, the electronic device, computer-readable storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above and will not be repeated here.
[0400] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0401] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0402] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0403] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0404] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for determining a summary of a search result, characterized in that: include: Determine a preset length of characters starting from the start position of a target paragraph, wherein the target paragraph is the paragraph where the summary of the search result is located; The last sentence of the text of the preset length of characters is evaluated to obtain a first evaluation result, wherein the evaluation content corresponding to the first evaluation result is any one of the following: whether the end of the last sentence of the text is incomplete subject information, whether the semantics of the last sentence of the text is incomplete, whether the character length corresponding to the last sentence of the text is less than a first preset length, and whether the proportion of characters other than words and phrases in the last sentence of the text is greater than a preset proportion; According to the first evaluation result, the first clipping position of the target paragraph is determined, wherein, when the first evaluation result is that the end of the last sentence of the text is incomplete subject information, the first clipping position is: the end position of the text obtained after the subject information at the end of the last sentence of the text is completed; when the first evaluation result is that the semantics of the last sentence of the text is incomplete, the first clipping position is: the end position of the text obtained after the last sentence of the text is supplemented into a complete text; when the first evaluation result is that the character length corresponding to the last sentence of the text is less than a first preset length, or the proportion of characters other than words in the last sentence of the text is greater than a preset proportion, the first clipping position is: the end position of the text obtained after deleting the last sentence of the text; According to the first interception position, a summary of the search result is determined from the target paragraph, wherein a character length corresponding to the summary of the search result is within a preset length range.
2. The method according to claim 1, characterized in that: The first interception position is: the end position of the text obtained after deleting the last sentence of the text; Determining the summary of the search result from the target paragraph according to the first interception position includes: Determining that the character length corresponding to the text located before the first clipping position in the target paragraph is less than a lower limit of the preset length range; Determine a second interception position, wherein the second interception position is: the end position of the text obtained after supplementing the last sentence of the text; According to the second cut-off position, a summary of the search result is determined from the target paragraph.
3. The method according to claim 1, characterized in that The first interception position is: the end position of the text obtained after supplementing the last sentence of the text; Determining the summary of the search result from the target paragraph according to the first interception position includes: Determining that the character length corresponding to the text located before the first clipping position in the target paragraph is greater than the upper limit of the preset length range; Determine a third clipping position, wherein the third clipping position is: the end position of the text obtained after deleting the last sentence of the text; According to the third clipping position, a summary of the search result is determined from the target paragraph.
4. The method according to any one of claims 1 to 3, characterized in that Determining a first clipping position of the target paragraph according to the first evaluation result includes: Determine that the first evaluation result is any one of the following: the end of the last sentence of text is complete subject information, the semantics of the last sentence of text is complete, the character length corresponding to the last sentence of text is not less than a first preset length, and the proportion of characters other than words and phrases in the last sentence of text is not greater than a preset proportion; Evaluate the last sentence of text to obtain a second evaluation result, wherein the second evaluation result has different evaluation contents from those corresponding to the first evaluation result, and the evaluation contents corresponding to the second evaluation result are any one of the following: whether the end of the last sentence of text is incomplete subject information, and whether the semantics of the last sentence of text is complete; A first clipping position of the target paragraph is determined according to the second evaluation result.
5. The method according to any one of claims 1 to 3, characterized in that Determining the summary of the search result from the target paragraph according to the first interception position includes: The last sentence of the text in the target paragraph before the first cut-off position is evaluated to obtain a third evaluation result, wherein the evaluation content corresponding to the third evaluation result is any one of the following: whether the character length of the last sentence of the text in the target paragraph before the first cut-off position is not less than the lower limit of a preset length range, and whether the character length of the last sentence of the text in the target paragraph before the first cut-off position is not greater than the upper limit of the preset length range; Determining a fourth interception position of the target paragraph according to the third evaluation result; According to the fourth clipping position, a summary of the search result is determined from the target paragraph.
6. A device for determining a summary of a search result, characterized in that: include: An evaluation module is used to determine a preset length of characters starting from the starting position of a target paragraph, evaluate the last sentence of the preset length of characters, and obtain a first evaluation result, wherein the target paragraph is the paragraph where the summary of the search result is located, and the evaluation content corresponding to the first evaluation result is any one of the following: whether the end of the last sentence of the text is incomplete subject information, whether the semantics of the last sentence of the text is incomplete, whether the character length corresponding to the last sentence of the text is less than a first preset length, and whether the proportion of characters other than words and phrases in the last sentence of the text is greater than a preset proportion; A determination module is used to determine a first clipping position of the target paragraph according to the first evaluation result, wherein when the first evaluation result is that the end of the last sentence of the text is incomplete subject information, the first clipping position is: the end position of the text obtained after the subject information at the end of the last sentence of the text is completed; when the first evaluation result is that the semantics of the last sentence of the text is incomplete, the first clipping position is: the end position of the text obtained after the last sentence of the text is supplemented into a complete text; when the first evaluation result is that the character length corresponding to the last sentence of the text is less than a first preset length, or the proportion of characters other than words and characters in the last sentence of the text is greater than a preset proportion, the first clipping position is: the end position of the text obtained after deleting the last sentence of the text; according to the first clipping position, determine the summary of the search result from the target paragraph, wherein the character length corresponding to the summary of the search result is within a preset length range.
7. The device according to claim 6, characterized in that The first interception position is: the end position of the text obtained after deleting the last sentence of the text; The determination module is specifically used for: Determining that the character length corresponding to the text located before the first clipping position in the target paragraph is less than a lower limit of the preset length range; Determine a second interception position, wherein the second interception position is: the end position of the text obtained after supplementing the last sentence of the text; According to the second cut-off position, a summary of the search result is determined from the target paragraph.
8. The device according to claim 6, characterized in that The first interception position is: the end position of the text obtained after supplementing the last sentence of the text; The determination module is specifically used for: Determining that the character length corresponding to the text located before the first clipping position in the target paragraph is greater than the upper limit of the preset length range; Determine a third clipping position, wherein the third clipping position is: the end position of the text obtained after deleting the last sentence of the text; According to the third clipping position, a summary of the search result is determined from the target paragraph.
9. The device according to any one of claims 6 to 8, characterized in that The determination module is specifically used for: Determine that the first evaluation result is any one of the following: the end of the last sentence of text is complete subject information, the semantics of the last sentence of text is complete, the character length corresponding to the last sentence of text is not less than a first preset length, and the proportion of characters other than words and phrases in the last sentence of text is not greater than a preset proportion; Evaluate the last sentence of text to obtain a second evaluation result, wherein the second evaluation result has different evaluation contents from those corresponding to the first evaluation result, and the evaluation contents corresponding to the second evaluation result are any one of the following: whether the end of the last sentence of text is incomplete subject information, and whether the semantics of the last sentence of text is complete; A first clipping position of the target paragraph is determined according to the second evaluation result.
10. The device according to any one of claims 6 to 8, characterized in that The determination module is specifically used for: The last sentence of the text in the target paragraph before the first cut-off position is evaluated to obtain a third evaluation result, wherein the evaluation content corresponding to the third evaluation result is any one of the following: whether the character length of the last sentence of the text in the target paragraph before the first cut-off position is not less than the lower limit of a preset length range, and whether the character length of the last sentence of the text in the target paragraph before the first cut-off position is not greater than the upper limit of the preset length range; Determining a fourth interception position of the target paragraph according to the third evaluation result; According to the fourth clipping position, a summary of the search result is determined from the target paragraph.
11. An electronic device, characterized in that: include: Processors, memory, and interfaces; The processor, the memory and the interface cooperate with each other, and the processor is used to execute the method according to any one of claims 1 to 5.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Convenient method and system for electronic text-processing and searching
CN101201841A
Convenient method and system of electric text processing and retrieve
WO2008098467A1