Abstract extraction method, device, equipment and computer readable storage medium
Through the combination of TextRank algorithm and maximum edge correlation MMR algorithm, multiple digest candidate sets are screened and fused, which solves the problem of low redundancy and accuracy in the existing digest extraction methods, and improves the accuracy of text digest extraction.
Patent Information
- Application Number
- CN202010125189.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-02-27
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2040-02-27
AI Technical Summary
Among the existing abstract extraction methods, extraction methods such as TextRank are redundant and have low accuracy. Generative digests require a large amount of labeled data and the labeling standards are not uniform, so text summary cannot be accurately extracted.
The TextRank algorithm is used to calculate sentence similarity and cosine similarity, and combined with the maximum edge correlation MMR algorithm, multiple digest candidate sets are selected, and these candidate sets are fused to reduce redundancy and improve the accuracy of digest extraction.
It effectively reduces the redundancy between summary statements, improves the accuracy of text summary extraction, and solves the problem of low redundancy and accuracy in existing methods.
Smart Images

Figure CN111507090B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data processing, and in particular to a summary extraction method, device, equipment and computer-readable storage medium. Background Art
[0002] At present, summarization technology is mainly divided into two categories: extractive and generative. The extractive method refers to extracting important sentences directly from the text, and then outputting the sentences as the final summary after sorting and combining them; the generative method refers to refining and summarizing the original text content, allowing new words or sentences to be generated to form a summary. However, generative summarization requires a large amount of annotated data, and there is no unified standard for summarization and it is time-consuming, and it is impossible to accurately extract the summary of the text. The commonly used extractive summarization method is TextRank, but the original TextRank method only extracts summaries based on the similarity of sentences, and the extracted sentences are redundant, so the accuracy of summary extraction is low. Therefore, how to improve the accuracy of summary extraction is a problem that needs to be solved urgently. Summary of the invention
[0003] The main purpose of this application is to provide a summary extraction method, device, equipment and computer-readable storage medium, aiming to improve the accuracy of summary extraction.
[0004] In a first aspect, the present application provides a summary extraction method, the summary extraction method comprising the following steps:
[0005] Obtaining a sentence set of a target text, wherein the target text is a text to be extracted as a summary;
[0006] Calculating sentence similarity between every two sentences in the sentence set, and based on the TextRank algorithm, selecting a first summary candidate set from the sentence set according to the sentence similarity;
[0007] Calculating the cosine similarity between every two sentences in the sentence set, and based on the TextRank algorithm, selecting a second summary candidate set from the sentence set according to the cosine similarity;
[0008] Based on the Maximum Margin Relevance (MMR) algorithm and a preset number of sentences, a third summary candidate set is selected from the first summary candidate set, and a fourth summary candidate set is selected from the second summary candidate set;
[0009] Selecting a preset number of summary sentences from the first summary candidate set, the second summary candidate set, the third summary candidate set, and the fourth summary candidate set, respectively, to form a fused summary candidate set;
[0010] The number of occurrences of each sentence in the fused summary candidate set is counted, and according to the number of occurrences of each sentence, a summary result set of the target text is screened out from the fused summary candidate set.
[0011] In a second aspect, the present application further provides a summary extraction device, the summary extraction device comprising:
[0012] An acquisition module, used for acquiring a sentence set of a target text, wherein the target text is a text to be extracted as a summary;
[0013] A first summary screening module is used to calculate the sentence similarity between every two sentences in the sentence set, and screen a first summary candidate set from the sentence set according to the sentence similarity based on a TextRank algorithm;
[0014] A second summary screening module is used to calculate the cosine similarity between every two sentences in the sentence set, and screen a second summary candidate set from the sentence set according to the cosine similarity based on the TextRank algorithm;
[0015] a third summary screening module, configured to screen a third summary candidate set from the first summary candidate set and screen a fourth summary candidate set from the second summary candidate set based on a maximum marginal relevance (MMR) algorithm and a preset number of sentences;
[0016] A selection module, configured to select a preset number of summary sentences from the first summary candidate set, the second summary candidate set, the third summary candidate set, and the fourth summary candidate set, respectively, to form a fused summary candidate set;
[0017] The summary determination module is used to count the number of occurrences of each sentence in the fused summary candidate set, and filter out the summary result set of the target text from the fused summary candidate set according to the number of occurrences of each sentence.
[0018] In a third aspect, the present application also provides a computer device, comprising a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of the summary extraction method as described above are implemented.
[0019] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, wherein when the computer program is executed by a processor, the steps of the abstract extraction method as described above are implemented.
[0020] The present application provides a summary extraction method, apparatus, device and computer-readable storage medium. The present application uses a TextRank algorithm to screen out a first summary candidate set from a statement set according to the sentence similarity between every two statements in the statement set, and uses a TextRank algorithm to screen out a second summary candidate set from the statement set according to the cosine similarity between every two statements in the statement set, and then based on a maximum marginal correlation (MMR) algorithm and a preset number of statements, a third summary candidate set is screened from the first summary candidate set and a fourth summary candidate set is screened from the second summary candidate set. Finally, the four summary candidate sets are merged to determine a summary result set of the text, which can reduce the redundancy between the extracted summary sentences and effectively improve the accuracy of text summary extraction. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0022] Figure 1 A schematic diagram of a process for extracting an abstract provided in an embodiment of the present application;
[0023] Figure 2 for Figure 1 A schematic diagram of the sub-steps of the abstract extraction method in FIG.
[0024] Figure 3 A schematic diagram of a flow chart of another abstract extraction method provided in an embodiment of the present application;
[0025] Figure 4 A schematic block diagram of a summary extraction device provided in an embodiment of the present application;
[0026] Figure 5 A schematic block diagram of another abstract extraction device provided in an embodiment of the present application;
[0027] Figure 6 The present invention is a block diagram showing the structure of a computer device according to an embodiment of the present application.
[0028] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0029] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0030] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.
[0031] The embodiments of the present application provide a summary extraction method, apparatus, device, and computer-readable storage medium. The summary extraction method can be applied to a server or a terminal device, the server can be a single server or a server cluster composed of multiple servers, and the terminal device can be an electronic device such as a mobile phone, a tablet computer, a laptop computer, a desktop computer, a personal digital assistant, and a wearable device. The following description takes a server as an example.
[0032] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0033] Please refer to Figure 1 , Figure 1 A schematic diagram of a process flow of a summary extraction method provided in an embodiment of the present application.
[0034] like Figure 1 As shown, the summary extraction method includes steps S101 to S106.
[0035] Step S101: Acquire a sentence set of a target text, wherein the target text is a text to be extracted as a summary.
[0036] When a user needs to extract a summary from a text, the user can upload the text to be extracted to the server through the terminal device. The server splits the received text to be extracted to obtain an initial sentence set, and cleans the initial sentence set to remove punctuation marks and stop words in the initial sentence set to obtain a sentence set of the text to be extracted. The server obtains the sentence set of the text to be extracted in a scheduled or real-time manner.
[0037] Step S102: Calculate the sentence similarity between every two sentences in the sentence set, and based on the TextRank algorithm, select a first summary candidate set from the sentence set according to the sentence similarity.
[0038] After acquiring the sentence set of the target text, the sentence similarity between every two sentences in the sentence set is calculated, and based on the TextRank algorithm, the first summary candidate set is screened from the sentence set according to the sentence similarity between every two sentences in the sentence set.
[0039] Specifically, the number of identical words between every two sentences in the sentence set and the number of words contained in each sentence in the sentence set are counted; the sentence similarity between every two sentences in the sentence set is calculated based on the number of identical words between every two sentences in the sentence set and the number of words contained in each sentence in the sentence set; based on the TextRank algorithm, the first importance value of each sentence is determined based on the sentence similarity between every two sentences in the sentence set; based on the first importance value of each sentence in the sentence set, the first summary candidate set is screened out from the sentence set. Among them, the first importance value is used to characterize the importance of the sentence in the target text. The higher the first importance value, the higher the importance of the sentence in the target text, and the lower the first importance value, the lower the importance of the sentence in the target text. Based on the TextRank algorithm, the formula for calculating the first importance value of the sentence is:
[0040]
[0041] Among them, W on the left side of the equation S (V i ) represents the statement V i The importance value, w ji For statement V i To statement V j The weight of the edge, d is the damping coefficient, which represents the probability that a sentence points to any other sentence, which can be selected as 0.85. i ) and Out(V j ) are pointing to statements V i The set of statements and the from statement V j The set of statements pointed to by the outgoing edge, with a weight of w ji There are two statements S i and S j The similarity, weight w jk is from the statement V j Any statement in the statement set pointed to by the starting edge and statement S j The calculation formula for the sentence similarity between every two sentences in this sentence set is as follows:
[0042]
[0043] Among them, {t k ∨t k ∈S i ∧t k ∈S j} for two statements S i and S j The number of words that appear in i and S j Including multiple words, t k is the kth word, |S i | is the statement S i The number of words contained in |S j | is the statement S j The number of words contained in . The sentence similarity between every two sentences in the sentence set can be calculated by the above similarity formula, and the first importance value of each sentence in the sentence set can be calculated by the calculation formula of the first importance value.
[0044] In one embodiment, according to the first importance value of each sentence in the sentence set, the method of selecting the first summary candidate set from the sentence set is specifically as follows: sorting each sentence in the sentence set according to the first importance value of each sentence in the sentence set to obtain the first summary candidate set, or sorting each sentence in the sentence set according to the first importance value of each sentence in the sentence set, and obtaining sentences from the sentence set in the order of sorting, until the number of sentences obtained reaches the set number, and collecting each sentence obtained to obtain the first summary candidate set. It should be noted that the above-mentioned set number can be set based on actual conditions, and this application does not make specific restrictions on this.
[0045] Step S103: Calculate the cosine similarity between every two sentences in the sentence set, and based on the TextRank algorithm, select a second summary candidate set from the sentence set according to the cosine similarity.
[0046] After obtaining the sentence set of the target text, the cosine similarity between every two sentences in the sentence set is calculated, and based on the TextRank algorithm, the first summary candidate set is screened from the sentence set according to the cosine similarity between every two sentences in the sentence set.
[0047] Specifically, each sentence in the sentence set is encoded to obtain the sentence vector corresponding to each sentence in the sentence set; based on the sentence vector corresponding to each sentence in the sentence set, the cosine similarity between every two sentences in the sentence set is calculated; based on the TextRank algorithm, the second importance value of each sentence is determined based on the cosine similarity between every two sentences in the sentence set; based on the second importance value of each sentence in the sentence set, the second summary candidate set is screened out from the sentence set. Among them, the second importance value is used to characterize the importance of the sentence in the target text. The higher the second importance value, the higher the importance of the sentence in the target text, and the lower the second importance value, the lower the importance of the sentence in the target text. Based on the TextRank algorithm, the formula for calculating the second importance value of the sentence is:
[0048]
[0049] Among them, W on the left side of the equation S (V i ) represents the statement V i The importance value of D ji For statement V i To statement V j The weight of the edge, d is the damping coefficient, which represents the probability that a sentence points to any other sentence, which can be selected as 0.85. i ) and Out(V j ) are pointing to statements V i The set of statements and the from statement V j The set of statements pointed to by the outgoing edge, with a weight of w ji There are two statements S i and S j The similarity, weight w jk is from the statement V j Any statement in the statement set pointed to by the starting edge and statement S j The similarity.
[0050] Among them, the two statements S i and S j The calculation formula of cosine similarity is:
[0051]
[0052] in, For statement S i The sentence vector of For statement S j The cosine similarity of every two sentences in the sentence set can be calculated by the above similarity formula, and the second importance value of each sentence in the sentence set can be calculated by the calculation formula of the second importance value.
[0053] In one embodiment, the sentence vector of a sentence may be determined by encoding each word in the sentence to obtain a word vector corresponding to each word, and calculating an average word vector based on the word vector corresponding to each word, and using the average word vector as the sentence vector of the sentence.
[0054] In one embodiment, according to the second importance value of each sentence in the sentence set, the method of selecting the second summary candidate set from the sentence set is specifically as follows: sorting each sentence in the sentence set according to the second importance value of each sentence in the sentence set to obtain the second summary candidate set, or sorting each sentence in the sentence set according to the second importance value of each sentence in the sentence set, and sequentially obtaining sentences from the sentence set in the order of sorting until the number of sentences obtained reaches the set number, and collecting each sentence obtained to obtain the second summary candidate set. It should be noted that the above-mentioned set number can be set based on actual conditions, and this application does not specifically limit this.
[0055] Step S104: based on the Maximum Margin Relevance (MMR) algorithm and the preset number of sentences, a third summary candidate set is selected from the first summary candidate set, and a fourth summary candidate set is selected from the second summary candidate set.
[0056] After the first summary candidate set and the second summary candidate set are screened, the server screens out a third summary candidate set from the first summary candidate set and a fourth summary candidate set from the second summary candidate set based on the Maximum Marginal Relevance (MMR) algorithm and the preset number of sentences. The third summary candidate set is a subset of the first summary candidate set, and the fourth summary candidate set is a subset of the second summary candidate set. It should be noted that the above-mentioned preset number of sentences can be set based on actual conditions, and this application does not make specific restrictions on this. Through the MMR algorithm, the redundancy between sentences can be eliminated and the accuracy of summary extraction can be improved.
[0057] In one embodiment, if Figure 2 As shown, step S104 includes sub-steps S1041 to S1047.
[0058] S1041. Sort each sentence in the first summary candidate set according to the first importance value of each sentence in the first summary candidate set, and obtain a ranking number of each sentence.
[0059] According to the first importance value of each sentence in the first summary candidate set, each sentence in the first summary candidate set is sorted, and a sorting number of each sentence is obtained. It should be noted that the higher the first importance value, the smaller the sorting number of the sentence, and the lower the first importance value, the larger the sorting number of the sentence.
[0060] S1042: Acquire sentences whose ranking numbers are less than or equal to a preset ranking number from the first summary candidate set to form a candidate sentence set.
[0061] After sorting each sentence in the first summary candidate set, sentences with a sorting number less than or equal to a preset sorting number are obtained from the first summary candidate set to form a candidate sentence set. It should be noted that the above preset sorting number can be set based on actual conditions, and this application does not specifically limit this. Optionally, if the preset sorting number is 10, sentences with a sorting number less than or equal to 10 are obtained from the first summary candidate set to form a candidate sentence set.
[0062] S1043: Move the sentence with the highest first importance value in the candidate sentence set to a blank summary candidate set, so as to update the summary candidate set and the candidate sentence set.
[0063] Specifically, the server obtains the sentence with the highest first importance value from the candidate sentence set, and moves the sentence to the preset blank summary candidate set to update the summary candidate set and the candidate sentence set. For example, the candidate sentence set includes 5 sentences, namely, sentence A, sentence B, sentence C, sentence D and sentence E, and sentence C has the highest first importance value, then the updated summary candidate set includes sentence C, and the updated candidate sentence set includes sentence A, sentence B, sentence D and sentence E.
[0064] S1044. Based on a preset MMR value calculation formula, and according to the first importance value of each sentence in the candidate sentence set, calculate the MMR values corresponding to each sentence in the summary candidate set and the candidate sentence set, respectively.
[0065] The MMR value is used to characterize the similarity between the sentences in the candidate sentence set and the summary candidate set. The preset calculation formula of the MMR value is:
[0066] MMR i =α·W S (V i )-(1-α)·sim(i,set)
[0067] Among them, MMR i For statement V i The MMR value of α is the weight coefficient, and the value range can be 0-1. S (Vi ) is the statement V i The first importance value of , set is the candidate sentence set, sim(i,set) is the sentence V i The semantic similarity between the candidate sentence set and the candidate sentence set. Based on the first importance value of each sentence in the candidate sentence set and the calculation formula of the MMR value, the MMR value corresponding to each sentence in the candidate sentence set can be calculated.
[0068] Specifically, the summary candidate set is encoded to obtain the vector corresponding to the summary candidate set; each sentence in the candidate sentence set is encoded to obtain the vector corresponding to each sentence in the candidate sentence set; the semantic similarity between the vector corresponding to the summary candidate set and the vector corresponding to each sentence in the candidate sentence set is calculated; based on the calculation formula of the MMR value, according to each semantic similarity and the first importance value of each sentence in the candidate sentence set, the MMR value corresponding to each sentence in the candidate sentence set is calculated. For example, if the first importance value of a sentence in the candidate sentence set is x, and the similarity between the sentence and the summary candidate set is s, then the MMR value between the sentence and the summary candidate set is α·x-(1-α)·s.
[0069] The method of encoding the summary candidate set to obtain the vector corresponding to the summary candidate set is specifically as follows: encoding each sentence in the summary candidate set to obtain the sentence vector corresponding to each sentence in the summary candidate set; calculating the average vector according to the sentence vector corresponding to each sentence in the summary candidate set, and using the average vector as the vector of the summary candidate set.
[0070] S1045: Move the sentence with the highest MMR value to the summary candidate set to update the summary candidate set and the candidate sentence set.
[0071] After calculating the MMR values corresponding to each statement in the candidate summary set and the candidate statement set, the server moves the statement with the highest MMR value to the candidate summary set to update the candidate summary set and the candidate statement set. For example, the candidate summary set includes statement C, the candidate statement set includes statement A, statement B, statement D, and statement E, and the statement with the highest MMR value is statement E, then the updated candidate summary set includes statement C and statement E, and the updated candidate statement set includes statement A, statement B, and statement D.
[0072] S1046: Determine whether the number of sentences in the updated summary candidate set reaches a preset number of sentences.
[0073] The server determines whether the number of sentences in the updated summary candidate set reaches the preset number of sentences. If the number of sentences in the updated summary candidate set does not reach the preset number of sentences, sub-step S1044 is executed, that is, based on the preset MMR value calculation formula, according to the first importance value of each sentence in the candidate sentence set, the MMR value corresponding to each sentence in the candidate sentence set is calculated for the summary candidate set. It should be noted that the above-mentioned preset number of sentences can be set based on actual conditions, and this application does not make specific restrictions on this.
[0074] S1047: If the number of sentences in the updated summary candidate set reaches a preset number of sentences, use the updated summary candidate set as a third summary candidate set.
[0075] If the number of sentences in the updated summary candidate set reaches the preset number of sentences, the updated summary candidate set is used as the third summary candidate set. For example, the preset number of sentences is 5, and the updated summary candidate set includes sentence A, sentence B, sentence C, sentence D and sentence E, a total of 5 sentences. At this time, the number of sentences in the summary candidate set reaches the preset number of sentences, so the summary candidate set including sentence A, sentence B, sentence C, sentence D and sentence E is used as the third summary candidate set.
[0076] It can be understood that the fourth summary candidate set is extracted in a similar manner to the third summary candidate set, specifically: according to the second importance value of each sentence in the second summary candidate set, sort each sentence in the first summary candidate set and obtain the sorting number of each sentence; obtain sentences whose sorting numbers are less than or equal to the preset sorting numbers from the second summary candidate set to form a candidate sentence set; move the sentence with the highest second importance value in the candidate sentence set to a blank summary candidate set to update the summary candidate set and the candidate sentence set; based on a preset MMR value calculation formula, calculate the MMR value corresponding to each sentence in the candidate sentence set and the summary candidate set according to the second importance value of each sentence in the candidate sentence set. R value, wherein the MMR value is used to characterize the similarity between the sentences in the candidate sentence set and the summary candidate set; the sentence with the highest MMR value is moved to the summary candidate set to update the summary candidate set and the candidate sentence set; it is determined whether the number of sentences in the updated summary candidate set reaches the preset number of sentences; if the number of sentences in the updated summary candidate set does not reach the preset number of sentences, the steps are executed: based on the preset MMR value calculation formula, according to the second importance value of each sentence in the candidate sentence set, the MMR values corresponding to each sentence in the candidate sentence set are calculated; if the number of sentences in the updated summary candidate set reaches the preset number of sentences, the updated summary candidate set is used as the fourth summary candidate set.
[0077] Step S105 : selecting a preset number of summary sentences from the first summary candidate set, the second summary candidate set, the third summary candidate set, and the fourth summary candidate set to form a fused summary candidate set.
[0078] After obtaining the four summary candidate sets of the first summary candidate set, the second summary candidate set, the third summary candidate set and the fourth summary candidate set, the server selects sentences of a preset number of summary sentences from the first summary candidate set, the second summary candidate set, the third summary candidate set and the fourth summary candidate set, respectively, to form a fused summary candidate set. It should be noted that the preset number of summary sentences is less than the preset number of sentences, and the preset number of summary sentences can be set based on actual conditions, and this application does not make any specific limitation on this.
[0079] In one embodiment, the sentences in the first summary candidate set, the second summary candidate set, the third summary candidate set, and the fourth summary candidate set are sorted according to the importance values, and a preset number of summary sentences are selected from the first summary candidate set, the second summary candidate set, the third summary candidate set, and the fourth summary candidate set according to the order of sorting of the sentences and written into the fused summary candidate set. The larger the importance value, the higher the sorting, and the smaller the importance value, the lower the sorting.
[0080] For example, the first summary candidate set is [A, B, C, D, E, F, G, H, I, J], the second summary candidate set is [A, B, C, D, E, G, H, I, J, K], the third summary candidate set is [C, D, E, F, G, H, I], and the fourth summary candidate set is [D, E, G, H, I, J, K], and the preset number of summary sentences is 5. Then the sentence selected from the first summary candidate set is [A, B, C, D, E], the sentence selected from the second summary candidate set is [A, B, C, D, E], the sentence selected from the third summary candidate set is [C, D, E, F, G], and the sentence selected from the fourth summary candidate set is [D, E, G, H, I], so the fused summary candidate set is {[A, B, C, D, E], [A, B, C, D, E], [C, D, E, F, G], [D, E, G, H, I]}.
[0081] Step S106: Count the number of occurrences of each sentence in the fused summary candidate set, and select a summary result set of the target text from the fused summary candidate set according to the number of occurrences of each sentence.
[0082] After obtaining the fused summary candidate set, the number of occurrences of each sentence in the fused summary candidate set is counted, and the summary result set of the target text is screened out from the fused summary candidate set according to the number of occurrences of each sentence, that is, the sentences whose number of occurrences is greater than or equal to the preset number of occurrences are screened out from the fused summary candidate set as the summary result set of the target text. The number of occurrences is the number of times the sentence appears in the fused summary candidate set.
[0083] For example, the fusion summary candidate set is {[A, B, C, D, E], [A, B, C, D, E], [C, D, E, F, G], [D, E, G, H, I]}, then sentence A appears 2 times, sentence B appears 2 times, sentence C appears 3 times, sentence D appears 4 times, sentence E appears 4 times, sentence F appears 1 times, sentence G appears 2 times, sentence H appears 1 times, and sentence I appears 1 times.
[0084] The summary extraction method provided in the above embodiment uses the TextRank algorithm to screen out a first summary candidate set from the sentence set according to the sentence similarity between every two sentences in the sentence set, and uses the TextRank algorithm to screen out a second summary candidate set from the sentence set according to the cosine similarity between every two sentences in the sentence set, and then based on the Maximum Margin Relevance MMR algorithm and a preset number of sentences, screens out a third summary candidate set from the first summary candidate set and a fourth summary candidate set from the second summary candidate set, and finally merges the four summary candidate sets to determine a summary result set of the text, which can reduce the redundancy between the extracted summary sentences and effectively improve the accuracy of text summary extraction.
[0085] Please refer to Figure 3 , Figure 3 A schematic diagram of a flow chart of another abstract extraction method provided in an embodiment of the present application.
[0086] like Figure 3 As shown, the summary extraction method includes steps S201 to S208.
[0087] Step S201: Acquire a sentence set of a target text, wherein the target text is a text to be extracted as a summary.
[0088] When a user needs to extract a summary from a text, the user can upload the text to be extracted to the server through the terminal device. The server splits the received text to be extracted to obtain an initial sentence set, and cleans the initial sentence set to remove punctuation marks and stop words in the initial sentence set to obtain a sentence set of the text to be extracted. The server obtains the sentence set of the text to be extracted in a scheduled or real-time manner.
[0089] Step S202: Calculate the sentence similarity between every two sentences in the sentence set, and based on the TextRank algorithm, select a first summary candidate set from the sentence set according to the sentence similarity.
[0090] After acquiring the sentence set of the target text, the sentence similarity between every two sentences in the sentence set is calculated, and based on the TextRank algorithm, the first summary candidate set is screened from the sentence set according to the sentence similarity between every two sentences in the sentence set.
[0091] Step S203: Calculate the cosine similarity between every two sentences in the sentence set, and based on the TextRank algorithm, select a second summary candidate set from the sentence set according to the cosine similarity.
[0092] After obtaining the sentence set of the target text, the cosine similarity between every two sentences in the sentence set is calculated, and based on the TextRank algorithm, the first summary candidate set is screened from the sentence set according to the cosine similarity between every two sentences in the sentence set.
[0093] Step S204: based on the Maximum Margin Relevance (MMR) algorithm and the preset number of sentences, a third summary candidate set is selected from the first summary candidate set, and a fourth summary candidate set is selected from the second summary candidate set.
[0094] After the first summary candidate set and the second summary candidate set are screened, the server screens out a third summary candidate set from the first summary candidate set and a fourth summary candidate set from the second summary candidate set based on the Maximum Marginal Relevance (MMR) algorithm and the preset number of sentences. The third summary candidate set is a subset of the first summary candidate set, and the fourth summary candidate set is a subset of the second summary candidate set. It should be noted that the above-mentioned preset number of sentences can be set based on actual conditions, and this application does not make specific restrictions on this. Through the MMR algorithm, the redundancy between sentences can be eliminated and the accuracy of summary extraction can be improved.
[0095] Step S205 : selecting a preset number of summary sentences from the first summary candidate set, the second summary candidate set, the third summary candidate set, and the fourth summary candidate set to form a fused summary candidate set.
[0096] After obtaining the four summary candidate sets of the first summary candidate set, the second summary candidate set, the third summary candidate set and the fourth summary candidate set, the server selects sentences of a preset number of summary sentences from the first summary candidate set, the second summary candidate set, the third summary candidate set and the fourth summary candidate set, respectively, to form a fused summary candidate set. It should be noted that the preset number of summary sentences is less than the preset number of sentences, and the preset number of summary sentences can be set based on actual conditions, and this application does not make any specific limitation on this.
[0097] Step S206: Count the number of occurrences of each sentence in the fusion summary candidate set, and determine whether the number of sentences whose number of occurrences is greater than a preset number of occurrences is greater than or equal to a preset number of summary sentences.
[0098] After obtaining the fused summary candidate set, the number of occurrences of each sentence in the fused summary candidate set is counted, and it is determined whether the number of sentences whose number of occurrences is greater than the preset number of occurrences is greater than or equal to the preset number of summary sentences. The number of occurrences is the number of times the sentence appears in the fused summary candidate set. It should be noted that the number of summary sentences can be set based on actual conditions, and this application does not make specific restrictions on this.
[0099] Step S207: If the number of sentences whose occurrence times are greater than the preset occurrence times is greater than or equal to the preset number of summary sentences, the sentences in the fusion summary candidate set are sorted according to the occurrence times.
[0100] If the number of sentences with a number of occurrences greater than the preset number of occurrences is greater than or equal to the preset number of summary sentences, the sentences in the fusion summary candidate set are sorted according to the number of occurrences. It should be noted that the higher the number of occurrences, the higher the ranking, and the lower the number of occurrences, the lower the ranking.
[0101] In one embodiment, if the number of sentences whose occurrence times are greater than a preset number of occurrences is less than a preset number of summary sentences, the sentences whose occurrence times are greater than the preset number of occurrences in the fused summary candidate set are moved to the summary result set of the target text to update the fused summary candidate set; the importance value of each sentence in the updated fused summary candidate set is obtained, and the sentences in the updated fused summary candidate set are sorted according to the importance value; according to the sorting of each sentence in the updated fused summary candidate set, sentences are selected from the updated fused summary candidate set in turn and written into the summary result set until the number of sentences in the summary result set reaches the preset number of summary sentences.
[0102] Step S208: According to the ranking of each sentence in the fused summary candidate set, sentences are selected from the fused summary candidate set in sequence and written into the summary result set of the target text until the number of sentences in the summary result set reaches a preset number of summary sentences.
[0103] After the sentences in the fusion summary candidate set are sorted, sentences are selected from the fusion summary candidate set in turn according to the sort of each sentence in the fusion summary candidate set and written into the summary result set of the target text until the number of sentences in the summary result set reaches the preset number of summary sentences. For example, if the fusion summary candidate set is {[A, B, C, D, E], [A, B, C, D, E], [C, D, E, F, G], [D, E, G, H, I]}, then the number of occurrences of sentence A is 2, the number of occurrences of sentence B is 2, the number of occurrences of sentence C is 3, the number of occurrences of sentence D is 4, the number of occurrences of sentence E is 4, the number of occurrences of sentence F is 1, the number of occurrences of sentence G is 2, the number of occurrences of sentence H is 1, and the number of occurrences of sentence I is 1. Therefore, the sorting of the sentences in the fusion summary candidate set is [D, E, C, A, B, G, F, H, I], the number of summary sentences is 5, and the preset number of occurrences is 2, then the summary result set of the target text is [D, E, C, A, B].
[0104] The summary extraction method provided in the above embodiment uses the TextRank algorithm to screen out a first summary candidate set according to the sentence similarity between every two sentences in the sentence set, and uses the TextRank algorithm to screen out a second summary candidate set according to the cosine similarity between every two sentences, and then based on the MMR algorithm, screens out a third summary candidate set from the first summary candidate set and a fourth summary candidate set from the second summary candidate set, and selects sentences with a preset number of summary sentences from the four summary candidate sets to form a fused summary candidate set; finally, the number of occurrences of each sentence in the fused summary candidate set is counted, and when the number of sentences with a number of occurrences greater than the preset number of occurrences is greater than or equal to the preset number of summary sentences, selects sentences from the fused summary candidate set in the order of the number of occurrences and writes them into the summary result set of the target text, which can reduce the redundancy between the extracted summary sentences and effectively improve the accuracy of text summary extraction.
[0105] Please refer to Figure 4 , Figure 4 A schematic block diagram of a summary extraction device provided in an embodiment of the present application.
[0106] like Figure 4 As shown, the abstract extraction device 300 includes: an acquisition module 301 , a first abstract screening module 302 , a second abstract screening module 303 , a third abstract screening module 304 , a selection module 305 and an abstract determination module 306 .
[0107] Acquisition module 301 is used to acquire a sentence set of a target text, wherein the target text is a text to be extracted as a summary;
[0108] A first summary screening module 302 is used to calculate the sentence similarity between every two sentences in the sentence set, and screen a first summary candidate set from the sentence set according to the sentence similarity based on a TextRank algorithm;
[0109] A second summary screening module 303 is used to calculate the cosine similarity between every two sentences in the sentence set, and screen a second summary candidate set from the sentence set according to the cosine similarity based on the TextRank algorithm;
[0110] A third summary screening module 304 is configured to screen a third summary candidate set from the first summary candidate set and a fourth summary candidate set from the second summary candidate set based on a maximum marginal relevance (MMR) algorithm and a preset number of sentences;
[0111] A selection module 305 is configured to select a preset number of summary sentences from the first summary candidate set, the second summary candidate set, the third summary candidate set, and the fourth summary candidate set, respectively, to form a fused summary candidate set;
[0112] The summary determination module 306 is used to count the number of occurrences of each sentence in the fused summary candidate set, and filter out the summary result set of the target text from the fused summary candidate set according to the number of occurrences of each sentence.
[0113] In one embodiment, the first summary screening module 302 is further configured to:
[0114] Counting the number of identical words between every two sentences in the sentence set and the number of words contained in each sentence in the sentence set;
[0115] Calculate the sentence similarity between every two sentences in the sentence set according to the number of identical words between every two sentences in the sentence set and the number of words contained in each sentence in the sentence set;
[0116] Based on the TextRank algorithm, determining a first importance value of each sentence according to the sentence similarity between every two sentences in the sentence set, wherein the first importance value is used to characterize the importance of the sentence in the target text;
[0117] A first summary candidate set is screened out from the sentence set according to a first importance value of each sentence in the sentence set.
[0118] In one embodiment, the second summary screening module 303 is further used for:
[0119] Encode each sentence in the sentence set to obtain a sentence vector corresponding to each sentence in the sentence set;
[0120] Calculate the cosine similarity between every two sentences in the sentence set according to the sentence vector corresponding to each sentence in the sentence set;
[0121] Based on the TextRank algorithm, determining a second importance value of each sentence according to the cosine similarity between every two sentences in the sentence set, wherein the second importance value is used to characterize the importance of the sentence in the target text;
[0122] A second summary candidate set is screened out from the sentence set according to the second importance value of each sentence in the sentence set.
[0123] In one embodiment, the third summary screening module 304 is further configured to:
[0124] sorting each sentence in the first summary candidate set according to the first importance value of each sentence in the first summary candidate set, and obtaining a sorting number for each sentence;
[0125] Acquire sentences whose ranking numbers are less than or equal to a preset ranking number from the first summary candidate set to form a candidate sentence set;
[0126] Move the sentence with the highest first importance value in the candidate sentence set to a blank summary candidate set to update the summary candidate set and the candidate sentence set;
[0127] Based on a preset MMR value calculation formula, according to the first importance value of each sentence in the candidate sentence set, the MMR values corresponding to each sentence in the candidate sentence set and the candidate summary set are calculated, wherein the MMR values are used to represent the similarity between the sentences in the candidate sentence set and the candidate summary set;
[0128] Move the sentence with the highest MMR value to the summary candidate set to update the summary candidate set and the candidate sentence set;
[0129] Determining whether the number of sentences in the updated summary candidate set reaches a preset number of sentences;
[0130] If the number of sentences in the updated summary candidate set does not reach the preset number of sentences, the steps are performed: based on the MMR algorithm, based on the preset MMR value calculation formula, according to the first importance value of each sentence in the candidate sentence set, calculating the MMR value corresponding to each sentence in the summary candidate set and the candidate sentence set respectively;
[0131] If the number of sentences in the updated summary candidate set reaches a preset number of sentences, the updated summary candidate set is used as a third summary candidate set.
[0132] In one embodiment, the third summary screening module 304 is further configured to:
[0133] Encoding the summary candidate set to obtain a vector corresponding to the summary candidate set;
[0134] Encode each sentence in the candidate sentence set respectively to obtain a vector corresponding to each sentence in the candidate sentence set;
[0135] Calculating semantic similarities between vectors corresponding to the candidate summary set and vectors corresponding to each sentence in the candidate sentence set;
[0136] According to each of the semantic similarities and the first importance value of each sentence in the candidate sentence set, the MMR values corresponding to each sentence in the candidate sentence set and the candidate summary set are calculated.
[0137] Please refer to Figure 5 , Figure 5 A schematic block diagram of another abstract extraction device provided in an embodiment of the present application.
[0138] like Figure 5 As shown, the abstract extraction device 400 includes: an acquisition module 401, a first abstract screening module 402, a second abstract screening module 403, a third abstract screening module 404, a selection module 405, a determination module 406, a sorting module 407 and an abstract determination module 408.
[0139] An acquisition module 401 is used to acquire a sentence set of a target text, wherein the target text is a text to be extracted as a summary;
[0140] A first summary screening module 402 is used to calculate the sentence similarity between every two sentences in the sentence set, and screen a first summary candidate set from the sentence set according to the sentence similarity based on a TextRank algorithm;
[0141] A second summary screening module 403 is used to calculate the cosine similarity between every two sentences in the sentence set, and screen a second summary candidate set from the sentence set according to the cosine similarity based on the TextRank algorithm;
[0142] A third summary screening module 404 is configured to screen a third summary candidate set from the first summary candidate set and a fourth summary candidate set from the second summary candidate set based on a maximum marginal relevance (MMR) algorithm and a preset number of sentences;
[0143] A selection module 405 is used to select sentences with a preset number of summary sentences from the first summary candidate set, the second summary candidate set, the third summary candidate set, and the fourth summary candidate set, respectively, to form a fused summary candidate set;
[0144] A determination module 406 is used to determine whether the number of sentences whose occurrence times are greater than a preset occurrence times is greater than or equal to a preset number of summary sentences;
[0145] A sorting module 407 is configured to sort the sentences in the fusion summary candidate set according to the number of occurrences if the number of the sentences with a number of occurrences greater than a preset number of occurrences is greater than or equal to a preset number of summary sentences;
[0146] The summary determination module 408 is used to select sentences from the fused summary candidate set in sequence according to the ranking of each sentence in the fused summary candidate set and write them into the summary result set of the target text until the number of sentences in the summary result set reaches a preset number of summary sentences.
[0147] In one embodiment, the summary determination module 408 is further configured to:
[0148] If the number of the sentences with a number of occurrences greater than a preset number of occurrences is less than a preset number of summary sentences, the sentences with a number of occurrences greater than a preset number of occurrences in the fused summary candidate set are moved to the summary result set of the target text to update the fused summary candidate set;
[0149] Obtaining an importance value of each sentence in the updated fusion summary candidate set, and sorting the sentences in the updated fusion summary candidate set according to the importance value;
[0150] According to the ranking of each sentence in the updated fused summary candidate set, sentences are selected from the updated fused summary candidate set in sequence and written into the summary result set until the number of sentences in the summary result set reaches a preset number of summary sentences.
[0151] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described device and each module and unit can refer to the corresponding process in the aforementioned summary extraction method embodiment, and will not be repeated here.
[0152] The apparatus provided in the above embodiment may be implemented in the form of a computer program. The computer program may be Figure 6 Runs on the computer device shown.
[0153] See also Figure 6 , Figure 6A schematic block diagram of the structure of a computer device provided in an embodiment of the present application. The computer device may be a server or a terminal device.
[0154] like Figure 6 As shown, the computer device includes a processor, a memory, and a network interface connected via a system bus, wherein the memory may include a non-volatile storage medium and an internal memory.
[0155] The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can execute any summary extraction method.
[0156] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.
[0157] The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor, the processor can execute any one of the summary extraction methods.
[0158] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0159] It should be understood that the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0160] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. The computer program includes program instructions. The method implemented when the program instructions are executed can refer to the various embodiments of the abstract extraction method of the present application.
[0161] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiment, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc., equipped on the computer device.
[0162] It should be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0163] It should also be understood that the term "and / or" used in the specification of this application and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations. It should be noted that, in this article, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "including a..." does not exclude the presence of other identical elements in the process, method, article or system including the element.
[0164] The serial numbers of the embodiments of the present application are for description only and do not represent the advantages and disadvantages of the embodiments. The above description is only a specific implementation mode 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 various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A summary extraction method, characterized in that: include: Obtaining a sentence set of a target text, wherein the target text is a text to be extracted as a summary; Calculating sentence similarity between every two sentences in the sentence set, and based on the TextRank algorithm, selecting a first summary candidate set from the sentence set according to the sentence similarity; Calculating the cosine similarity between every two sentences in the sentence set, and based on the TextRank algorithm, selecting a second summary candidate set from the sentence set according to the cosine similarity; Based on the Maximum Margin Relevance (MMR) algorithm and a preset number of sentences, a third summary candidate set is selected from the first summary candidate set, and a fourth summary candidate set is selected from the second summary candidate set; Selecting a preset number of summary sentences from the first summary candidate set, the second summary candidate set, the third summary candidate set, and the fourth summary candidate set, respectively, to form a fused summary candidate set; Counting the number of occurrences of each sentence in the fused summary candidate set, and filtering out a summary result set of the target text from the fused summary candidate set according to the number of occurrences of each sentence; The step of calculating the sentence similarity between every two sentences in the sentence set and selecting a first summary candidate set from the sentence set according to the sentence similarity based on the TextRank algorithm includes: Counting the number of identical words between every two sentences in the sentence set and the number of words contained in each sentence in the sentence set; Calculate the sentence similarity between every two sentences in the sentence set according to the number of identical words between every two sentences in the sentence set and the number of words contained in each sentence in the sentence set; Based on the TextRank algorithm, determining a first importance value of each sentence according to the sentence similarity between every two sentences in the sentence set, wherein the first importance value is used to characterize the importance of the sentence in the target text; A first summary candidate set is screened out from the sentence set according to a first importance value of each sentence in the sentence set.
2. The abstract extraction method according to claim 1, characterized in that: The step of calculating the cosine similarity between every two sentences in the sentence set, and selecting a second summary candidate set from the sentence set according to the cosine similarity based on the TextRank algorithm, comprises: Encode each sentence in the sentence set to obtain a sentence vector corresponding to each sentence in the sentence set; Calculate the cosine similarity between every two sentences in the sentence set according to the sentence vector corresponding to each sentence in the sentence set; Based on the TextRank algorithm, determining a second importance value of each sentence according to the cosine similarity between every two sentences in the sentence set, wherein the second importance value is used to characterize the importance of the sentence in the target text; A second summary candidate set is screened out from the sentence set according to the second importance value of each sentence in the sentence set.
3. The abstract extraction method according to claim 1, characterized in that: The step of selecting a third summary candidate set from the first summary candidate set based on the maximum marginal relevance (MMR) algorithm and the preset number of sentences includes: sorting each sentence in the first summary candidate set according to the first importance value of each sentence in the first summary candidate set, and obtaining a sorting number for each sentence; Acquire sentences whose ranking numbers are less than or equal to a preset ranking number from the first summary candidate set to form a candidate sentence set; Move the sentence with the highest first importance value in the candidate sentence set to a blank summary candidate set to update the summary candidate set and the candidate sentence set; Based on a preset MMR value calculation formula, according to the first importance value of each sentence in the candidate sentence set, the MMR values corresponding to each sentence in the candidate sentence set and the candidate summary set are calculated, wherein the MMR values are used to represent the similarity between the sentences in the candidate sentence set and the candidate summary set; Move the sentence with the highest MMR value to the summary candidate set to update the summary candidate set and the candidate sentence set; Determining whether the number of sentences in the updated summary candidate set reaches a preset number of sentences; If the number of sentences in the updated summary candidate set does not reach the preset number of sentences, the steps are performed: based on the MMR algorithm, based on the preset MMR value calculation formula, according to the first importance value of each sentence in the candidate sentence set, calculating the MMR value corresponding to each sentence in the summary candidate set and the candidate sentence set respectively; If the number of sentences in the updated summary candidate set reaches a preset number of sentences, the updated summary candidate set is used as a third summary candidate set.
4. The abstract extraction method according to claim 3, characterized in that: The calculating, based on a preset MMR value calculation formula and according to the first importance value of each sentence in the candidate sentence set, the MMR values corresponding to each sentence in the candidate sentence set and the candidate summary set respectively include: Encoding the summary candidate set to obtain a vector corresponding to the summary candidate set; Encode each sentence in the candidate sentence set respectively to obtain a vector corresponding to each sentence in the candidate sentence set; Calculating semantic similarities between vectors corresponding to the candidate summary set and vectors corresponding to each sentence in the candidate sentence set; According to each of the semantic similarities and the first importance value of each sentence in the candidate sentence set, the MMR values corresponding to each sentence in the candidate sentence set and the candidate summary set are calculated.
5. The abstract extraction method according to any one of claims 1 to 4, characterized in that: The step of selecting a summary result set of the target text from the fused summary candidate set according to the number of occurrences of each sentence includes: Determining whether the number of sentences whose occurrence times is greater than a preset occurrence times is greater than or equal to a preset number of summary sentences; If the number of the sentences whose occurrence times are greater than the preset occurrence times is greater than or equal to the preset number of summary sentences, the sentences in the fusion summary candidate set are sorted according to the occurrence times; According to the ranking of each sentence in the fused summary candidate set, sentences are selected from the fused summary candidate set in sequence and written into the summary result set of the target text until the number of sentences in the summary result set reaches a preset number of summary sentences.
6. The abstract extraction method according to claim 5, characterized in that: After determining whether the number of the sentences whose occurrence times are greater than the preset occurrence times is greater than or equal to the preset number of summary sentences, the method further includes: If the number of the sentences with a number of occurrences greater than a preset number of occurrences is less than a preset number of summary sentences, the sentences with a number of occurrences greater than a preset number of occurrences in the fused summary candidate set are moved to the summary result set of the target text to update the fused summary candidate set; Obtaining an importance value of each sentence in the updated fusion summary candidate set, and sorting the sentences in the updated fusion summary candidate set according to the importance value; According to the ranking of each sentence in the updated fused summary candidate set, sentences are selected from the updated fused summary candidate set in sequence and written into the summary result set until the number of sentences in the summary result set reaches a preset number of summary sentences.
7. A summary extraction device, characterized in that: The abstract extraction device comprises: An acquisition module, used for acquiring a sentence set of a target text, wherein the target text is a text to be extracted as a summary; A first summary screening module is used to calculate the sentence similarity between every two sentences in the sentence set, and screen a first summary candidate set from the sentence set according to the sentence similarity based on a TextRank algorithm; A second summary screening module is used to calculate the cosine similarity between every two sentences in the sentence set, and screen a second summary candidate set from the sentence set according to the cosine similarity based on the TextRank algorithm; a third summary screening module, configured to screen a third summary candidate set from the first summary candidate set and screen a fourth summary candidate set from the second summary candidate set based on a maximum marginal relevance (MMR) algorithm and a preset number of sentences; A selection module, configured to select a preset number of summary sentences from the first summary candidate set, the second summary candidate set, the third summary candidate set, and the fourth summary candidate set, respectively, to form a fused summary candidate set; A summary determination module, used to count the number of occurrences of each sentence in the fused summary candidate set, and filter out a summary result set of the target text from the fused summary candidate set according to the number of occurrences of each sentence; Wherein, the first summary screening module is further used for: Counting the number of identical words between every two sentences in the sentence set and the number of words contained in each sentence in the sentence set; Calculate the sentence similarity between every two sentences in the sentence set according to the number of identical words between every two sentences in the sentence set and the number of words contained in each sentence in the sentence set; Based on the TextRank algorithm, determining a first importance value of each sentence according to the sentence similarity between every two sentences in the sentence set, wherein the first importance value is used to characterize the importance of the sentence in the target text; A first summary candidate set is screened out from the sentence set according to a first importance value of each sentence in the sentence set.
8. A computer device, characterized in that: The computer device comprises a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of the abstract extraction method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the abstract extraction method according to any one of claims 1 to 6 are implemented.
