Abstract generation method and related device, equipment and storage medium

By converting the text to be generated into a Q&A pair and integrating its summary, the readability and effectiveness of extracted abstracts in topical diversified texts and Q&A scenarios are solved, and a more concentrated and high-quality summary generation is achieved.

CN114357987BActive Publication Date: 2024-12-03ANHUI IFLYTEK INTELLIGENT SYST
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111630180.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-28
Publication Date
2024-12-03
Estimated Expiration
2041-12-28

AI Technical Summary

Technical Problem

When extracted abstracts deal with texts with divergent topics, poor summary, no topic sentences or many short sentences, the extracted content is poorly readable and it is difficult to grasp the key points of the text, especially in question-and-answer scenarios. Not good.

Method used

Convert the text to be generated into multiple Q&A pairs. Each Q&A pair contains key elements with the topic elements and input them into the summary generation model for summary extraction. Integrate the summary of each Q&A pair to form a comprehensive summary to ensure the topic content. concentrated.

Benefits of technology

The quality of the summary in the Q&A scenario is improved, the theme content of the comprehensive summary is more concentrated, the readability and effectiveness of the summary is enhanced, and it is suitable for short sentences and multi-round interactive text content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114357987B_ABST
    Figure CN114357987B_ABST
Patent Text Reader

Abstract

The present application discloses a summary generation method and related devices, equipment and storage media, wherein the summary generation method includes: obtaining a summary text to be generated; generating multiple question-answer pairs from the summary text to be generated; wherein each question-answer pair includes key elements of a subject element corresponding to a summary text to be generated; each subject element includes multiple key elements; inputting the question-answer pair into a summary generation model, performing summary extraction processing on the question-answer pair, and obtaining a summary of each question-answer pair; integrating the summaries of each question-answer pair to form a comprehensive summary of the summary text to be generated. The above scheme can improve the quality of the summary.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of abstract generation, and in particular to an abstract generation method and related devices, equipment and storage media. Background Art

[0002] Extractive summarization is to extract sentences representing key points from a text and splice them together in an orderly manner to generate a summary. Extractive summarization usually requires learning the weight scores between sentences, screening according to the weight scores, finding sentences that represent the main idea of ​​the text and splicing them together to generate a summary result. For texts with divergent topics, texts with weak summary, or even texts without topic sentences, or texts with many short sentences, the content extracted by extractive summarization is poorly readable and cannot grasp the key points of the text. Extractive summarization generates summaries based on coherent text content, and the effectiveness and readability of the extracted content in question-and-answer scenarios are very poor. In view of this, how to improve the quality of summaries has become an urgent problem to be solved. Summary of the invention

[0003] The main technical problem solved by the present application is to provide a summary generation method and related devices, equipment and storage medium, which can improve the quality of the summary.

[0004] In order to solve the above technical problems, the first aspect of the present application provides a summary generation method, including: obtaining a summary text to be generated; generating multiple question-answer pairs from the summary text to be generated; wherein each question-answer pair includes a key element of a topic element corresponding to a summary text to be generated; each topic element includes multiple key elements; inputting the question-answer pairs into a summary generation model, performing summary extraction processing on the question-answer pairs, and obtaining a summary of each question-answer pair; integrating the summaries of each question-answer pair to form a comprehensive summary of the summary text to be generated.

[0005] In order to solve the above-mentioned technical problems, the second aspect of the present application provides a summary generation device, including: an acquisition module, used to acquire a summary text to be generated; a generation module, used to generate multiple question-answer pairs from the summary text to be generated; wherein each question-answer pair includes a key element of a topic element corresponding to a summary text to be generated; each topic element includes multiple key elements; an extraction module, used to input the question-answer pair into a summary generation model, perform summary extraction processing on the question-answer pair, and obtain a summary of each question-answer pair; an integration module, used to integrate the summaries of each question-answer pair to form a comprehensive summary of the summary text to be generated.

[0006] In order to solve the above-mentioned technical problems, the fifth method of the present application provides a data communication device, including a response module, which is used to respond to the demand for the transmission bus in response to the local device being selected as the target device in this round, so that the host device can determine whether to authorize the transmission bus to the target device based on the demand; wherein, a plurality of communication devices are connected to the transmission bus, the plurality of communication devices include at least one slave device and a host device, the local device is one of the slave devices, and the plurality of communication devices are selected as the target device in turn, and the demand includes whether the target device needs to occupy the transmission bus.

[0007] In order to solve the above technical problem, the third aspect of the present application provides an electronic device, which includes a memory and a processor coupled to each other, wherein the memory stores program instructions, and the processor is used to execute the program instructions to implement the summary generation method in the above first aspect.

[0008] In order to solve the above technical problem, the fourth aspect of the present application provides a computer-readable storage medium storing program instructions that can be executed by a processor, and the program instructions are used to implement the summary generation method in the above first aspect.

[0009] The above scheme, after obtaining the summary text to be generated, generates multiple question-answer pairs for the summary text to be generated, and then inputs the question-answer pairs into the summary generation model, performs summary extraction processing on the question-answer pairs, and obtains the summary of each question-answer pair, and then integrates the summary of each question-answer pair to form a comprehensive summary of the summary text to be generated. Since each question-answer pair includes key elements corresponding to a subject element of the summary text to be generated, after generating summaries respectively for question-answer pairs with determined key elements, the comprehensive summary is obtained by integration, so that the subject content of the comprehensive summary in the question-answer scenario is more concentrated, thereby improving the quality of the summary. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Figure 1 It is a flowchart of an embodiment of a method for generating an abstract of the present application;

[0011] Figure 2 is a flowchart of another embodiment of the method for generating an abstract of the present application;

[0012] Figure 3 is a flowchart of step S25 of another embodiment of the method for generating an abstract of the present application;

[0013] Figure 4 It is a flowchart of another embodiment of the method for generating an abstract of the present application;

[0014] Figure 5 It is a schematic diagram of the framework of an embodiment of the abstract generation device of the present application;

[0015] Figure 6 It is a schematic diagram of the framework of an embodiment of the electronic device of the present application;

[0016] Figure 7 It is a schematic diagram of a framework of an embodiment of a computer-readable storage medium of the present application. DETAILED DESCRIPTION

[0017] The scheme of the embodiment of the present application is described in detail below in conjunction with the drawings of the specification.

[0018] In the following description, for the purpose of explanation rather than limitation, specific details such as specific system structures, interfaces, and technologies are provided to facilitate a thorough understanding of the present application.

[0019] The terms "system" and "network" are often used interchangeably in this article. The term "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, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship. In addition, "many" in this article means two or more than two.

[0020] See also Figure 1 , Figure 1 It is a flowchart of an embodiment of a method for generating an abstract of the present application.

[0021] Specifically, the following steps may be included:

[0022] Step S11: Obtain the summary text to be generated.

[0023] The summary text to be generated may be obtained by voice transcription, may be received from other devices, may be obtained from a database, or may be obtained in other ways, which are not specifically limited here. The summary text to be generated may be a question-and-answer text, in which the questions and answers in the question-and-answer text are provided by different objects, so that the summary generation method can be applied to scenarios where question-and-answer interactions exist. For example, the summary text to be generated may be a question-and-answer text generated by at least one round of question-and-answer interaction between a petitioner and a receptionist in a petition reception business scenario. Specifically, based on the voice data generated by a multi-person conversation in a petition reception scenario, the voice data is transcribed into text data through voice recognition technology to obtain the summary text to be generated. The summary text to be generated may be obtained in real time or may be existing text data. The summary text to be generated may be one or more, and each summary text to be generated corresponds to its subject element.

[0024] Step S12: Generate multiple question-answer pairs from the summary text to be generated.

[0025] The summary text to be generated corresponds to a topic element, and each topic element includes multiple key elements. When the summary text to be generated generates multiple question-answer pairs, each question-answer pair includes the key elements of the topic element corresponding to one summary text to be generated, so that each question-answer pair can reflect its own key elements.

[0026] In a disclosed embodiment, the summary text to be generated is a question-and-answer text, and the questions and answers in the question-and-answer text are provided by different objects, so that in the step of generating multiple question-and-answer pairs from the summary text to be generated, each question in the summary text to be generated can be identified, and based on the question, the key elements of each question-and-answer pair can be determined, and then the answer corresponding to each question is identified to obtain multiple question-and-answer pairs with determined key elements. Therefore, the recognition results of the question and its answer are used as the question-and-answer pair, and the key elements determined by the question are used as the key elements of the question-and-answer pair, thereby realizing the determination of the key elements of the question-and-answer pair.

[0027] Step S13: Input the question-answer pair into the summary generation model, perform summary extraction on the question-answer pair, and obtain the summary of each question-answer pair.

[0028] The question-answer pair is input into the summary generation model, and the summary is extracted from the question-answer pair. The summary is automatically generated using the summary generation model to obtain the summary of each question-answer pair. Unlike the prior art in which the entire summary text to be generated is input into the summary generation model, in this case, the question-answer pairs with determined key elements are input into the summary generation model respectively, and the summary is extracted from the question-answer pairs to obtain the summary of each question-answer pair. Therefore, each question-answer pair generates a summary independently, and since each question-answer pair corresponds to a key element, the summary independently generated for each question-answer pair can correspond to the key element, reducing the impact of the scattered subject content on summary generation.

[0029] Step S14: Integrate the summaries of each question-answer pair to form a comprehensive summary of the summary text to be generated.

[0030] When integrating the summaries of each question and answer pair to form a comprehensive summary of the summary text to be generated, a text similarity algorithm can be used to identify similar summary information between the summaries of the question and answer pairs, and the summaries without similar summary information can be spliced ​​into a comprehensive summary; the summaries of each question and answer pair can also be spliced ​​into a comprehensive summary; or at least one summary of a question and answer pair can be selected from the summaries of each question and answer pair, and the selected summaries of the question and answer pairs can be spliced ​​into a comprehensive summary.

[0031] In order to calculate the similarity between the summaries of the question and answer pairs and eliminate redundancy to achieve the effect of eliminating duplicate content, when using the text similarity algorithm to identify similar summary information between the summaries of the question and answer pairs, and splicing the summaries without similar summary information into a comprehensive summary, the summaries of the question and answer pairs are sorted, for example, sorted in chronological order, and the summaries of the question and answer pairs are taken as summaries to be fused in turn. Based on the text similarity algorithm, the fused summary and the summary to be fused are compared textually to obtain similar summary information between the summary to be fused and the fused summary, and the summary to be fused after removing the similar summary information is merged with the fused summary as a new fused summary, and so on, until the summaries of all question and answer pairs are traversed, thereby preferentially retaining the summary content in the previous order, removing the similar summary information in the summary in the later order, and repeatedly taking the summaries of the question and answer pairs as summaries to be fused and subsequent steps, so that the summaries of the question and answer pairs can be integrated in sequence to avoid repeated sentences or repeated sentences with partial content. In an actual scenario, the manually modified summary content can also be obtained to update the comprehensive summary of the summary text to be generated or the summary of the question and answer pair. For example, the text similarity algorithm is used to identify the similarity or difference information between the comprehensive summary of the summary text to be generated and the manually modified summary content, and the difference information newly added by the manually modified summary content is added to the comprehensive summary of the summary text to be generated. For the content generation results of the summaries of multiple question and answer pairs in the summary text to be generated, redundant content is removed, which greatly improves the accuracy and effectiveness of the automatically generated comprehensive summary.

[0032] The above scheme, after obtaining the summary text to be generated, generates multiple question-answer pairs for the summary text to be generated, and then inputs the question-answer pairs into the summary generation model, performs summary extraction on the question-answer pairs, and obtains the summary of each question-answer pair, and then integrates the summaries of each question-answer pair to form a comprehensive summary of the summary text to be generated. Since each question-answer pair includes key elements corresponding to a subject element of the summary text to be generated, after generating summaries separately for question-answer pairs that determine the key elements, they are integrated to obtain a comprehensive summary, so that the subject content of the comprehensive summary in the question-answer scenario is more concentrated, thereby improving the quality of the summary.

[0033] See also Figure 2 , Figure 2 It is a flowchart of another embodiment of the abstract generation method of the present application.

[0034] Specifically, the following steps may be included:

[0035] Step S21: Obtain the summary text to be generated.

[0036] In the disclosed embodiment, the summary text to be generated is a question-and-answer text, and the questions and answers in the question-and-answer text are provided by different objects.

[0037] Step S22: construct a question outline library of the subject elements, wherein the question outline library includes at least one questioning method for each key element of the subject element.

[0038] After obtaining the summary text to be generated, the subject elements of the summary text to be generated can be identified, thereby constructing a question outline library of the subject elements. The question outline library includes at least one questioning method for each key element of the subject element, that is, one subject element includes multiple key elements, and each key element corresponds to at least one questioning method. For example, the subject element is "house demolition", and the key elements include "demolition project name", "project nature", "demolition scope", and "demolition subject". Taking the key element "demolition project name" as an example, at least one questioning method can be "What is the name of the demolition project?", "What is the full name of the demolition project?", "What is the name of the demolition project?", "What is the full name of the demolition project?", "What is the name of the demolition project?", "What is the name of the demolition project?", "What is the name of the demolition project?", "What is the name of the demolition project?", "What is the name of the demolition project?", "Do you know the name of the project?", "Do you know the full name of the project?", etc.

[0039] Step S23: Compare each question with the question outline library to determine the key elements of each question-answer pair.

[0040] Each question in the summary text to be generated is compared with the question form in the question outline library. If the question and the question form match, the key elements of each question can be determined based on the correspondence between the question form and the key elements, and thus the key elements of the question-answer pair corresponding to the question are also determined.

[0041] Step S24: Identify the answers corresponding to each question to obtain multiple question-answer pairs that determine key elements.

[0042] Since the summary text to be generated is formed by questions and answers provided by different objects, after determining the questions and their corresponding key elements, the answers corresponding to each question are identified, and the questions and answers are matched one by one to form question-answer pairs. Based on the key elements corresponding to the questions, multiple question-answer pairs with determined key elements can be obtained. Compared with inputting the summary text to be generated with multiple questions and answers into the summary generation model in general, the questions and answers cannot match and text confusion may occur. When the questions and answers are formed into question-answer pairs and input into the summary generation model for summary extraction, the relevance of questions and answers will not be destroyed, which can improve the accuracy of summary generation.

[0043] In a public embodiment, each question is compared with the question in the question outline library, and when determining the key elements of each question-answer pair, the similarity between each question and the question in the question outline library is calculated, and then the question with the highest similarity to the question is determined, and the key elements corresponding to the question are determined as the key elements of the question-answer pair. Therefore, through the similarity between the question and the question in the question outline library, the question with the highest similarity to the question can be found simply and quickly. The similarity calculation method can be a similarity calculation based on a word frequency vector, or other similarity calculation methods. In an actual scenario, when calculating the similarity based on a word frequency vector, first, the various questions in the question outline library are segmented and each question is marked, such as S1...S n are 1 to n question tags respectively. The questions are segmented and marked at the same time. For example, O1 is the tag of the question. Then, taking the calculation of the similarity between S1 and O1 as an example, all the segmentation results of S1 and O1 are counted, and all the different segmentations appearing in S1 and O1 are merged to get a word vector superset. The TF word frequency is obtained and multiplied by the IDF weight to get the TF*IDF of S1 and O1 respectively. They are expressed as S1: [1 1 1 1 2 0 1 1 1 1 0 1] and O1: [1 0 0 1 2 0 1 0 1 1 0 1]. Then the cosine similarity of the two vectors of the question and the question in the question outline library is calculated. The calculation formula of the cosine similarity is:

[0044]

[0045] Among them, A and B represent the questioning method and questions in the question outline library respectively.

[0046] In the same way, the similarity between each question in the question outline library and the question is calculated, the question with the highest similarity to the question is determined, and the key elements corresponding to the question are determined as the key elements of the question-answer pair.

[0047] In one disclosed embodiment, if the question is not related to the question in the question outline library, the question and its corresponding answer can be deleted, thereby deleting irrelevant content as soon as possible, filtering text pairs, and improving the quality of the question-answer pair input into the summary generation model. In another disclosed embodiment, if the similarity between each question and the question in the question outline library is calculated separately, it is impossible to determine the question with the highest similarity to the question, the network model can be used to determine the question with the highest similarity to the question, thereby determining the key element corresponding to the question as the key element of the question-answer pair.

[0048] Therefore, when generating multiple question-answer pairs from the summary text to be generated, each question in the summary text to be generated can be identified, and based on the question, the key elements of each question-answer pair can be determined, and then the answer corresponding to each question can be identified to obtain multiple question-answer pairs with determined key elements. Before identifying each question in the summary text to be generated and determining the key elements of each question-answer pair based on the question, a question outline library of the subject element can be constructed. Since the question outline library includes at least one questioning method of each key element of the subject element, when identifying each question in the summary text to be generated and determining the key elements of each question-answer pair based on the question, each question can be compared with the questioning method in the question outline library to determine the key elements of each question-answer pair. Based on this, by comparing the question with the questioning method in the question outline library, the key elements corresponding to the question are determined, and then after combining the question and its corresponding answer to form a question-answer pair, the key elements of the question-answer pair are determined based on the key elements corresponding to the question.

[0049] Step S25: Input the question-answer pair into the summary generation model, perform summary extraction on the question-answer pair, and obtain a summary of each question-answer pair.

[0050] The summary generation model can be a Unilm model or other model structures. The Unilm model is a pre-trained language model that can complete unidirectional, sequence-to-sequence, and bidirectional prediction tasks. It combines the advantages of the autoregressive model and the autoencoder language model. It is highly flexible, can improve the generated summary effect, and has low requirements for the amount of training data.

[0051] For a clearer explanation of how the summary generation model generates summaries of question-answer pairs, see Figure 3 , Figure 3 This is a flow chart of step S25 of another embodiment of the method for generating an abstract of the present application. Specifically, the following steps may be included:

[0052] Step S251: extracting summary characters of the question-answer pair in this iteration.

[0053] Since the summary is formed by combining summary characters one by one, the summary generation model generates summary characters through multiple iteration cycles so that the summary characters are combined to form a summary. The number of summary characters generated by the summary generation model in each iteration can be customized. For example, in a public embodiment, when extracting the summary characters of the question and answer pair in this iteration, the question and answer pair can be converted into a character array, and the character array includes each character that constitutes the question and answer pair. Then, the first prediction score of each character is obtained and ranked, and finally, the characters corresponding to the first preset number of first prediction scores that are ranked high are used as the summary characters of this iteration, so that the characters with higher scores are selected as the summary characters of this iteration through the ranking of the first prediction scores of each character, so that the summary characters of the generated summary are more in line with the actual text content.

[0054] Step S252: The existing candidate summaries and the summary characters of this iteration are combined to form the current candidate summaries.

[0055] The existing candidate paths are generated before this iteration. When the existing candidate summaries and the summary characters of this iteration are combined to form this candidate summary, each summary character of this iteration can be used as the end character of each existing candidate summary to form several candidate summaries of this iteration. By setting the summary characters generated by the summary generation model for each iteration and the number of iterations, a variety of candidate paths of this iteration can be obtained.

[0056] Step S253: Determine whether the candidate summary meets the summary generation condition.

[0057] When judging whether the candidate summary meets the summary generation condition, if so, step S254 is executed to use the candidate summary as the final candidate summary of the question-answer pair; if not, step S255 is executed to input the question-answer pair with the summary characters of this iteration into the summary generation model, thereby iteratively executing the extraction of the summary characters of the question-answer pair in this iteration and subsequent steps until the candidate summary meets the summary generation condition. The summary generation condition can be customized, such as the number of characters in the summary exceeds the preset number of characters, the summary includes the segmentation results of key elements, etc.

[0058] In a disclosed embodiment, the summary generation condition may be that the cumulative number of iterations exceeds the preset number of iterations, and / or the summary character of this iteration is the end character. The summary generation condition is that the cumulative number of iterations exceeds the preset number of iterations, and the length of the generated summary can be limited by limiting the number of iterations, while the summary generation condition is that the summary character of this iteration is the end character, indicating that the summary generation model has gone through the summary text to be generated in this iteration, and there is no need to continue iterating, so as to avoid duplication of summary content.

[0059] Step S254: Use the candidate summary of this time as the final candidate summary of the question-answer pair.

[0060] Since the candidate summary of this time has met the summary generation conditions, the candidate summary of this time can be used as the final candidate summary of the question-answer pair. There may be one or more final candidate summaries. When the question-answer pair is extracted in this iteration, when there are multiple summary characters, the candidate summaries of this time are composed of the existing candidate summaries and the summary characters of this iteration. Therefore, after multiple iterations, several candidate summaries of this time are used as the final candidate summaries of the question-answer pair, thereby obtaining several final candidate summaries.

[0061] Step S255: input the question-answer pair with the summary characters added in this iteration into the summary generation model.

[0062] Since the candidate summary does not meet the summary generation conditions, the question-answer pair with the summary characters of this iteration is input into the summary generation model, so as to iteratively extract the summary characters of the question-answer pair in this iteration and its subsequent steps until the candidate summary meets the summary generation conditions.

[0063] Step S256: Determine a summary of the question-answer pair based on the final candidate summary.

[0064] There may be one or more final candidate summaries. When there may be multiple final candidate summaries, when determining the summary of the question-answer pair based on the final candidate summaries, all or part of the multiple final candidate summaries may be spliced ​​into the summary of the question-answer pair, or one final candidate summary may be selected from the multiple final candidate summaries as the summary of the question-answer pair.

[0065] In a disclosed embodiment, when the step of combining the existing candidate summaries with the summary characters of this iteration to form the candidate summaries of this iteration can be performed, the second prediction score of each candidate summaries composed of the summary characters of this iteration can be calculated using a beam search algorithm, and then the candidate summaries corresponding to the second prediction scores of the top-ranked second preset number are used as the candidate summaries of this iteration, so that the final candidate summaries correspond to the second prediction scores, and therefore, when determining the summary of the question-answer pair based on the final candidate summaries, the final candidate summaries corresponding to the second prediction scores of the top-ranked third preset number can be used as the summary of the question-answer pair. Therefore, as many candidate summaries of this iteration and final candidate summaries as possible are generated to increase the richness of the summaries, and at the same time, the summaries are ranked and selected using the second prediction scores, the second preset number, and the third preset number, and the content with the higher second prediction scores is used as the summary of the question-answer pair.

[0066] In an actual scenario, in the case of the petition reception business scenario, it is necessary for the petition receptionist to maintain a highly close interaction with the petitioner. When listening to the petitioner's description and compiling the petition overview at the same time, it is a great test of the receptionist's professional level and focus, and it is easy to distract the receptionist's energy. Therefore, how to automatically identify the reception speech and better generate an automatic summary of the conversation content to provide assistance for the compilation of the petition overview in the reception process is of great significance for the petition reception business. In the business conversation content of the voice interaction between the receptionist and the petitioner, the question in the Q&A pair is "Where are you from?", and the answer is "I am from Hefei, Anhui". When inputting the Q&A pair into the summary generation model, the input format is a character array, and the character array is: [[CLS], you, are, from, where,?, I, am, from, Hefei, Anhui, [SEP], [MASK], [SEP]]. When the summary generation model is iterated for the first time, the summary character extracted from the Q&A pair in this iteration is "An". Because it is the first iteration of the model, there is no existing candidate summary yet. Then, the summary character "An" in this iteration is used as the candidate summary for this time. Then, it is judged that the candidate summary "An" for this time does not meet the summary generation conditions. After adding "An" to the Q&A pair, when the Q&A pair is input into the summary generation model for the second iteration, it is: [[CLS], you, are, from, where,?, I, am, from, Hefei, Anhui, [SEP], An, [MASK], [SEP]]. The summary character for the second iteration is "Hui". The existing candidate summary "An" and the summary character "Hui" for this iteration are combined into the candidate summary "Anhui" for this time. Then, it is judged that the candidate summary "Anhui" for this time does not meet the summary generation conditions. After adding "An" and "Hui" to the Q&A pair, when the Q&A pair is input into the summary generation model for the third iteration, it is: [[CLS], you, are, from, where,?, I, am, from, Hefei, Anhui, [SEP], An, Hui, [MASK], [SEP]]. And so on. Suppose the optimal sequence decoded after the first N iterations of the model is "Anhui X3…XN". Then, when the (N + 1)th model iteration is input into the summary generation model, it is: [[CLS], you, are, from, where,?, I, am, from, Hefei, Anhui, [SEP], An, Hui, X3, …, XN, [MASK], [SEP]], until the candidate summary for this time meets the summary generation conditions, and the candidate summary for this time is used as the final candidate summary of the Q&A pair.It can be understood that in each model iteration, the summary generation model can extract multiple summary characters of the question and answer pair in this iteration. When the existing candidate summaries are combined with the summary characters of this iteration to form this candidate summary, multiple candidate summaries will also be generated. After each iteration, each candidate summary will be judged whether it meets the summary generation conditions. If there is a candidate summary that meets the summary generation conditions, it will be used as the final candidate summary of the question and answer pair. For other candidate summaries that do not meet the summary generation conditions, the question and answer pairs with the summary characters of this iteration added will continue to be input into the summary generation model. After a loop iteration, until all the final candidate summaries are obtained, the summary of the question and answer pair is determined based on the final candidate summary.

[0067] Of course, in order to more flexibly meet the needs of summary extraction, a summary generation model, such as the UniLM model, can also be used to perform a single-step prediction on the question-answer pair to generate the first preset number of summary characters with the largest first prediction score, which are then sent to the beam search algorithm, and the beam search algorithm is used to calculate the second prediction score of the candidate summary composed of each summary character of this iteration, and the candidate summary corresponding to the second preset number of second prediction scores that are ranked high is used as the candidate summary of this time. After the candidate summary of this time meets the summary generation conditions, it becomes the final candidate summary, and the final candidate summary corresponding to the third preset number of second prediction scores that are ranked high is used as the summary of the question-answer pair. When the UniLM model and the beam search algorithm are combined to collaboratively generate summaries, the UniLM model can be used to pre-generate a summary based on the "question" of the summary text to be generated, and then the global optimal solution can be obtained based on the "answer" of the summary text to be generated using the beam search algorithm.

[0068] Therefore, when the question-answer pairs are input into the summary generation model and the summary is extracted for each question-answer pair, compared with the extractive summary, this scheme can still grasp the key points and main points for texts with divergent themes, texts with weak summary, and even texts without topic sentences, while generating summaries with advantages such as semantic coherence, controllable word count, and clear main points. Compared with the generative summary in the sequence-to-sequence model framework based on the attention mechanism, which can only automatically summarize based on coherent text content, this scheme can not only be applied to business scenarios where the text content is the speech transcription of question-answer conversations, but also the conversation content is often expressed as short sentences and short text content, and involves multiple rounds of interactive petition reception and consultation, and can grasp the topic content of the conversation. The extracted summary content has good validity and readability. Moreover, compared with the generative summary, it requires less corpus for annotation and training, has low training data requirements, and a short training cycle. The model output results have strong semantic expression ability and good fluency.

[0069] Step S26: Integrate the summaries of each question-answer pair to form a comprehensive summary of the summary text to be generated.

[0070] In the step of combining the existing candidate summaries with the summary characters of this iteration to form the candidate summaries of this iteration, if the second prediction score of the candidate summaries composed of the summary characters of each iteration is calculated using a beam search algorithm, and then the candidate summaries corresponding to the second preset number of second prediction scores that are ranked high are used as the candidate summaries of this iteration, so that the final candidate summaries correspond to the second prediction scores, then when determining the summary of the question-answer pair based on the final candidate summaries, the final candidate summaries corresponding to the third preset number of second prediction scores that are ranked high are used as the summary of the question-answer pair. For other descriptions of step S26, please refer to the above step S14, which will not be repeated here.

[0071] The above scheme uses a question outline library with pre-constructed subject elements to determine the key elements corresponding to the question by comparing the question with the question in the question outline library, and then combines the question and its corresponding answer to form a question-answer pair. Based on the key elements corresponding to the question, the key elements of the question-answer pair are determined, ensuring the validity of the input data when the summary generation model automatically generates the summary, and the summary generation model can grasp the subject content, and the extracted summary content has good validity and readability.

[0072] See also Figure 4 , Figure 4 It is a flowchart of another embodiment of the abstract generation method of the present application.

[0073] Specifically, the following steps may be included:

[0074] Step S41: Obtain the summary text to be generated.

[0075] The summary text to be generated and the method for obtaining it can be found above and will not be described in detail here.

[0076] Step S42: dividing the summary text to be generated into multiple segments based on the subject elements of the summary text to be generated, wherein the question-answer pairs in each segment include the same key elements.

[0077] Each topic element includes multiple key elements. When the topic element is determined, the corresponding key element can be determined, so that the question and answer pairs in the summary text to be generated can be clustered into multiple segments according to the key elements. For example, taking a key element as an example, the key element is segmented to obtain at least one segmentation result, and the at least one segmentation result is used to match the question and answer pairs of the summary text to be generated, and the question and answer pairs that successfully match the segmentation results corresponding to the key element are clustered into the same segment. For the summary text to be generated by multiple rounds of question and answer interactions, the question and answer pairs with the same key elements in multiple question and answer pairs are clustered together to form segments, which is conducive to focusing on the text theme content when generating the summary.

[0078] In a disclosed embodiment, when the summary text to be generated is divided into multiple segments based on the subject elements of the summary text to be generated, a question outline library of the subject elements can be constructed, and the question outline library includes at least one question form of each key element of the subject element; then, each question in the summary text to be generated and its corresponding answer are identified, and the question and its corresponding answer are respectively used as multiple question-answer pairs of the summary text to be generated, and the question of each question-answer pair is compared with the question form in the question outline library to determine the key elements of the question, so as to determine the key elements of each question-answer pair, thereby realizing the identification of each question in the summary text to be generated, and determining the key elements of each question-answer pair based on the question; then, the similarity between each question and the question form in the question outline library is calculated respectively, and the question form with the highest similarity to the question is determined, and the key elements corresponding to the question form are determined as the key elements of the question-answer pair, thereby realizing the identification of the answer corresponding to each question, and obtaining multiple question-answer pairs with determined key elements; finally, the question-answer pairs with the same key elements are clustered into the same segment.

[0079] Step S43: Merge the questions in the question-answer pairs in each segment, and merge the answers corresponding to the questions, to obtain question-answer pairs corresponding to each segment.

[0080] After the summary text to be generated is divided into multiple segments based on the subject elements of the summary text to be generated, the questions in the question-answer pairs in each segment can be merged, and the answers corresponding to the questions can be merged, and the question-answer pairs corresponding to the same key elements can be grouped into segments to obtain question-answer pairs corresponding to each segment. Therefore, according to the key elements, when the contents of the question-answer pairs with the same key elements are grouped into segments, the question-answer pairs with related contents can be clustered together to form a question-answer pair in the form of one question and one answer.

[0081] In order to screen out highly correlated question and answer pairs to form question and answer pairs and improve the quality of question and answer pairs, after dividing the summary text to be generated into multiple segments based on the subject elements of the summary text to be generated, merging the questions in the question and answer pairs in each segment, and merging the answers corresponding to the questions to obtain the question and answer pairs corresponding to each segment, the key elements corresponding to each segment can be segmented to obtain at least one segmentation result, and the at least one segmentation result is used to match the question and answer pairs corresponding to the segment, and the questions in the successfully matched question and answer pairs are merged, and the answers corresponding to the questions are merged to obtain the question and answer pairs corresponding to each segment, and the question and answer pairs that fail to match are discarded.

[0082] For example, in an actual scenario, the summary text to be generated is a question-and-answer text obtained by transcribing the voice interaction between the interviewer and the petitioner in the petition interview scenario, and identifying each question q1...q in the summary text to be generated n and its corresponding answer a1...a n, respectively taking the question and its corresponding answer as the summary text to be generated to generate multiple question-answer pairs (q 1, a1)...(q n, a n ), suppose that one of the question-answer pairs (q1,a1)...(q4,a4) in one of the segments has the same key element "demolition project", where q1 of (q1,a1) is "What is the name of the demolition project?" and a1 is "What is a demolition project? It means the demolition of Xiatang in our village.", and q2 of (q2,a2) is "Yes, there is a name for demolition in your place, right? What is written on the demolition notice about demolition?" and a2 is "The notice was posted at the village committee, but I don't remember the details. What happened?", (q3,a3)'s q3 is "Can you tell me the specific name of the place where the demolition took place?" and a3 is "My mother's family is from Jiangxi. The place where the demolition took place is Xiatang Group, Shanbei Village, Heshang Town, Chongren County, Fuzhou City. The whole group was demolished. When I married to Anhui, my household registration was still in my mother's family.", (q4,a4)'s q4 is "When did you marry to Anhui?" and a4 is "I got married during the May Day holiday in 2019." It can be seen that the question-answer pair (q4,a4) may not be related to the key factors, so it is necessary to screen the question-answer pairs. At this time, the key element "demolition project" corresponding to the fragment is segmented to obtain the segmentation results "demolition" and "project", and "demolition" and "project" are used to match the question and answer pairs (q1,a1)...(q4,a4) corresponding to the fragment. The questions in the successfully matched question and answer pairs (q1,a1)...(q3,a3) are merged (q1,q2,q3), and the answers corresponding to the questions are merged (a1,a2,a3), to obtain the question and answer pairs corresponding to each fragment [(q1,q2,q3),(a1,a2,a3)], and the question and answer pair (q4,a4) that failed to match is discarded. In addition, when generating summaries in real time, after constructing a question outline library of thematic elements, you can use the microphone array device to collect multiple rounds of voice transcription content of petitioners and interviewers in the petition interview scenario based on the question outline library, detect and determine the interview and answer segments under the thematic elements, and convert the multiple rounds of question and answer content in the segments into single-round question and answer content, thereby reducing the interference caused by the superposition of multiple rounds of questions and answers when generating summaries.

[0083] Step S44: input the question-answer pair corresponding to each segment into the summary generation model, perform summary extraction on the question-answer pair, and obtain a summary of each question-answer pair.

[0084] and Figure 3How the summary generation model generates the summary of the question-answer pair in step S44 is different from that in step S44, the input of the summary generation model changes from the question-answer pair to the question-answer group pair. For example, the question-answer pair (q1, a1) has q1 as "What is the name of the demolition project?" and a1 as "What is the demolition project? It means that the Xiatang area in our village has been demolished." The model input when inputting the summary generation model is: [[CLS], What is the name of the demolition project? What is the name of the demolition project? It means that the Xiatang area in our village has been demolished. , [SEP], [MASK], [SEP]], where the English character "," represents a separator. At the same time, q2 of the question-answer pair (a2, a2) is "Yes, your demolition has a name, right? The demolition notice says something about the demolition" and a2 is "The notice was posted at the village committee, but I don't remember what was written in detail." Assuming that the question-answer pair [(q1, q2), (a1, a2)] is obtained, the model input when it inputs the summary generation model is: [[CLS], What is the name of the demolition project? Yes, your demolition has a name, right? What is written on the demolition notice about the demolition? What is the demolition project? The demolition of Xiatang in our village was demolished. The notice was indeed posted at the village committee, but I don’t remember what was written in detail [SEP] [MASK] [SEP]], that is, when the question-answering group inputs the summary generation model, they splice together multiple questions and, correspondingly, splice together multiple answers and input them into the summary generation model.

[0085] Each topic element includes multiple key elements, and the question-answer pairs in each segment include the same key elements. Therefore, the questions in the question-answer pairs in each segment are merged, and the answers corresponding to the questions are merged to obtain the question-answer pairs corresponding to each segment. The question-answer pairs correspond to the key elements one-to-one, and the contents with similar contents are grouped together. The summary generated using the question-answer pair is more in line with the topic content of the summary text to be generated.

[0086] Step S45: Integrate the summaries of the question-answer pairs to form a comprehensive summary of the summary text to be generated.

[0087] The summary integrated in step S45 is formed by the question-answer pair, so that each summary corresponds to a key element, and the summaries of the question-answer pair are integrated to form a comprehensive summary of the summary text to be generated, so that the comprehensive summary is closer to the topic. Except that the summary integrated in step S45 is formed by the question-answer pair, the description of other related steps S45 can refer to the above steps S14 and / or step S26, which will not be repeated here.

[0088] Through the above method, the summary text to be generated is divided into multiple segments based on the subject elements of the summary text to be generated, and the question and answer pairs in each segment include the same key elements, and then the questions in the question and answer pairs in each segment are merged, and the answers corresponding to the questions are merged to obtain the question and answer pairs corresponding to each segment, so as to merge the multiple question and answer pairs in the segment into a question and answer pair in the form of one question and one answer, and convert the multiple rounds of question and answer content in the segment into a single round of question and answer content; then the question and answer pairs corresponding to each segment are input into the summary generation model, and the question and answer pairs are subjected to summary extraction processing to obtain the summary of each question and answer pair, thereby reducing the interference caused by the superposition of multiple rounds of question and answer pairs when generating summaries.

[0089] See also Figure 5 , Figure 5 It is a schematic diagram of the framework of an embodiment of a summary generation device 50 of the present application. The summary generation device 50 includes: an acquisition module 51, a generation module 52, an extraction module 53, and an integration module 54. The acquisition module 51 is used to acquire the summary text to be generated; the generation module 52 is used to generate multiple question-answer pairs from the summary text to be generated; wherein each question-answer pair includes key elements of a subject element corresponding to a summary text to be generated; each subject element includes multiple key elements; the extraction module 53 is used to input the question-answer pair into the summary generation model, perform summary extraction processing on the question-answer pair, and obtain the summary of each question-answer pair; the integration module 54 is used to integrate the summaries of each question-answer pair to form a comprehensive summary of the summary text to be generated.

[0090] In the above scheme, after the acquisition module 51 acquires the summary text to be generated, the generation module 52 generates multiple question-answer pairs for the summary text to be generated, and then the extraction module 53 inputs the question-answer pairs into the summary generation model, performs summary extraction on the question-answer pairs, and obtains the summary of each question-answer pair. The integration module 54 can integrate the summaries of each question-answer pair to form a comprehensive summary of the summary text to be generated. Since each question-answer pair includes key elements corresponding to a subject element of the summary text to be generated, after summaries are generated separately for question-answer pairs that determine the key elements, the comprehensive summary is obtained by integration, so that the subject content of the comprehensive summary in the question-answer scenario is more concentrated, thereby improving the quality of the summary.

[0091] In some disclosed embodiments, the summary text to be generated is a question-and-answer text; wherein the questions and answers in the question-and-answer text are provided by different objects; when the generation module 52 is used to generate a plurality of question-and-answer pairs from the summary text to be generated, it is also used to identify each question in the summary text to be generated, and based on the questions, determine the key elements of each question-and-answer pair; identify the answer corresponding to each question, and obtain a plurality of question-and-answer pairs with determined key elements.

[0092] Therefore, the recognition results of the question and its answer are taken as a question-answer pair, and the key elements determined by the question are used as the key elements of the question-answer pair to achieve the determination of the key elements of the question-answer pair.

[0093] In some disclosed embodiments, the generation module 52 is used to identify each question in the summary text to be generated, and before the step of determining the key elements of each question-answer pair based on the question, it is also used to construct a question outline library of the subject elements; wherein the question outline library includes at least one way of asking each key element of the subject element; the generation module 52 is used to identify each question in the summary text to be generated, and before the step of determining the key elements of each question-answer pair based on the question, the generation module 52 is used to compare each question with the way of asking in the question outline library to determine the key elements of each question-answer pair.

[0094] Therefore, by comparing the question with the question in the question outline library, the key elements corresponding to the question are determined, and then the question and its corresponding answer are combined to form a question-answer pair. Based on the key elements corresponding to the question, the key elements of the question-answer pair are determined. Compared with the case where the text to be generated for the summary with multiple questions and answers is generally input into the summary generation model, the questions and answers cannot match and the text may be disordered. When the question and answer are combined into a question-answer pair and input into the summary generation model for summary extraction, the relevance of the question and answer will not be destroyed, which can improve the accuracy of summary generation.

[0095] In some disclosed embodiments, generation module 52 is used to compare each question with the question in the question outline library, and when determining the key elements of each question-answer pair, it is also used to calculate the similarity between each question and the question in the question outline library; determine the question with the highest similarity to the question, and determine the key elements corresponding to the question as the key elements of the question-answer pair.

[0096] Therefore, by comparing the similarity between a question and the question forms in the question outline library, it is possible to simply and quickly find the question form that is most similar to the question, and then quickly determine the key elements of the question-answer pair.

[0097] In some disclosed embodiments, the summary generating device 50 is further configured to delete a question and its corresponding answer when the question is irrelevant to the question outline library.

[0098] Therefore, the questions are not related to the questions in the question outline library. Irrelevant content is deleted as early as possible to filter text pairs and improve the quality of question-answer pairs input into the summary generation model.

[0099] In some disclosed embodiments, when the generation module 52 is used to generate a plurality of question-answer pairs from the summary text to be generated, it is also used to divide the summary text to be generated into a plurality of segments based on the subject elements of the summary text to be generated; wherein the question-answer pairs in each segment include the same key elements; the questions in the question-answer pairs in each segment are merged, and the answers corresponding to the questions are merged to obtain the question-answer pairs corresponding to each segment; when the extraction module 53 is used to input the question-answer pairs into the summary generation model, perform summary extraction on the question-answer pairs, and obtain the summary of each question-answer pair, it is also used to input the question-answer pairs corresponding to each segment into the summary generation model, perform summary extraction on the question-answer pairs, and obtain the summary of each question-answer pair.

[0100] Therefore, based on the subject elements of the summary text to be generated, the summary text to be generated is divided into multiple segments, and the question and answer pairs in each segment include the same key elements. Then, the questions in the question and answer pairs in each segment are merged, and the answers corresponding to the questions are merged to obtain the question and answer pairs corresponding to each segment, so as to merge the multiple question and answer pairs in the segment into a question and answer pair in the form of one question and one answer, and convert the multiple rounds of question and answer content in the segment into a single round of question and answer content; then the question and answer pairs corresponding to each segment are input into the summary generation model, and the question and answer pairs are subjected to summary extraction processing to obtain the summary of each question and answer pair. Since the question and answer pairs correspond to the key elements one-to-one, the contents with similar contents are gathered together, and the summary generated by using the question and answer pairs is more in line with the subject content of the summary text to be generated, and the interference caused by the superposition of multiple rounds of question and answer pairs when generating summaries is reduced.

[0101] In some disclosed embodiments, the extraction module 53 is used to input the question-answer pair into a summary generation model, perform summary extraction on the question-answer pair, and obtain the summary of each question-answer pair. It is also used to extract the summary characters of the question-answer pair in this iteration; the existing candidate summary and the summary characters of this iteration are combined into this candidate summary, and the existing candidate path is generated before this iteration; it is determined whether this candidate summary meets the summary generation conditions; if so, the candidate summary is used as the final candidate summary of the question-answer pair, if not, the question-answer pair with the summary characters of this iteration added is input into the summary generation model, and the extraction of the summary characters of the question-answer pair in this iteration and its subsequent steps are iteratively executed until the candidate summary meets the summary generation conditions; based on the final candidate summary, the summary of the question-answer pair is determined.

[0102] Therefore, when the question-answer pairs are input into the summary generation model and the summary is extracted for each question-answer pair, compared with the extractive summary, this scheme can still grasp the key points and main points for texts with divergent themes, texts with weak summary, and even texts without topic sentences, while generating summaries with advantages such as semantic coherence, controllable word count, and clear main points. Compared with the generative summary in the sequence-to-sequence model framework based on the attention mechanism, which can only automatically summarize based on coherent text content, this scheme can not only be applied to business scenarios where the text content is the speech transcription of question-answer conversations, but also the conversation content is often expressed as short sentences and short text content, and involves multiple rounds of interactive petition reception and consultation, and can grasp the topic content of the conversation. The extracted summary content has good validity and readability. Moreover, compared with the generative summary, it requires less corpus for annotation and training, has low training data requirements, and a short training cycle. The model output results have strong semantic expression ability and good fluency.

[0103] In some disclosed embodiments, the digest generation condition is that the cumulative number of iterations exceeds a preset number of iterations, and / or the digest character of this iteration is an end character.

[0104] Therefore, the summary generation condition is that the cumulative number of iterations exceeds the preset number of iterations. The length of the generated summary can be limited by limiting the number of iterations. The summary generation condition is that the summary character of this iteration is the end character, indicating that the summary generation model has gone through the summary text to be generated in this iteration and there is no need to continue iterating to avoid duplication of summary content.

[0105] In some disclosed embodiments, the summary generation model is a Unilm model, and the extraction module 53 is used to extract the summary characters of the question-answer pair in this iteration, and is also used to convert the question-answer pair into a character array, where the character array includes each character that constitutes the question-answer pair; obtain and rank the first prediction score of each character; and use the characters corresponding to the first preset number of first prediction scores that are ranked high as the summary characters of this iteration.

[0106] Therefore, according to the ranking of the first prediction score of each character, characters with higher scores are selected as summary characters of this iteration, so that the summary characters of the generated summary are more consistent with the actual text content.

[0107] In some disclosed embodiments, when the extraction module 53 is used to form a candidate summary of this iteration by combining existing candidate summaries with summary characters of this iteration, the extraction module 53 is also used to calculate the second prediction score of each candidate summary composed of summary characters of this iteration by using a beam search algorithm; the candidate summaries corresponding to the second preset number of second prediction scores that are ranked high are used as the candidate summaries of this iteration; the final candidate summary corresponds to the second prediction score, and when the extraction module 53 is used to determine the summary of the question-answer pair based on the final candidate summary, the final candidate summary corresponding to the third preset number of second prediction scores that are ranked high is used as the summary of the question-answer pair.

[0108] Therefore, as many candidate summaries and final candidate summaries are generated as possible to increase the richness of the summaries. At the same time, the second prediction score, the second preset number, and the third preset number are used to rank and select the summaries, and the content with a higher second prediction score is used as the summary of the question-answer pair. In addition, when the summary generation model and the beam search algorithm are combined to collaboratively generate summaries, the summary generation model can be used to pre-generate a summary based on the "question" of the summary text to be generated, and then the beam search algorithm is used to obtain the global optimal solution based on the "answer" of the summary text to be generated.

[0109] In some disclosed embodiments, the integration module 54 is used to integrate the summaries of each question and answer pair to form a comprehensive summary of the summary text to be generated, and is also used to use a text similarity algorithm to identify similar summary information between the summaries of the question and answer pairs, and to splice the summaries without similar summary information into a comprehensive summary, or to splice the summaries of each question and answer pair into a comprehensive summary.

[0110] Therefore, the content generation results of the summaries of multiple question-answer pairs in the summary text to be generated can be used to remove redundant content, greatly improving the accuracy and effectiveness of the automatically generated comprehensive summary; the summaries of each question-answer pair can also be directly spliced ​​into a comprehensive summary to improve the summary generation speed.

[0111] See also Figure 6 , Figure 6 1 is a schematic diagram of a framework of an embodiment of an electronic device 60 of the present application. The electronic device 60 includes a memory 61 and a processor 62 coupled to each other, the memory 61 stores program instructions, and the processor 62 is used to execute the program instructions to implement the steps in any of the above-mentioned summary generation method embodiments. Specifically, the electronic device 60 may include but is not limited to: a desktop computer, a laptop computer, a server, a mobile phone, a tablet computer, etc., which are not limited here.

[0112] Specifically, the processor 62 is used to control itself and the memory 61 to implement the steps in any of the above-mentioned summary generation method embodiments. The processor 62 can also be called a CPU (Central Processing Unit). The processor 62 may be an integrated circuit chip with signal processing capabilities. The processor 62 can also be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field-programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. In addition, the processor 62 can be implemented by an integrated circuit chip.

[0113] The above scheme, after obtaining the summary text to be generated, generates multiple question-answer pairs for the summary text to be generated, and then inputs the question-answer pairs into the summary generation model, performs summary extraction on the question-answer pairs, and obtains the summary of each question-answer pair, and then integrates the summaries of each question-answer pair to form a comprehensive summary of the summary text to be generated. Since each question-answer pair includes key elements corresponding to a subject element of the summary text to be generated, after generating summaries separately for question-answer pairs that determine the key elements, they are integrated to obtain a comprehensive summary, so that the subject content of the comprehensive summary in the question-answer scenario is more concentrated, thereby improving the quality of the summary.

[0114] See also Figure 7 , Figure 7 Schematic diagram of a computer-readable storage medium 70 of the present application. The computer-readable storage medium 70 stores program instructions 71 that can be executed by a processor, and the program instructions 71 are used to implement the steps in any of the above-mentioned summary generation method embodiments.

[0115] The above scheme, after obtaining the summary text to be generated, generates multiple question-answer pairs for the summary text to be generated, and then inputs the question-answer pairs into the summary generation model, performs summary extraction on the question-answer pairs, and obtains the summary of each question-answer pair, and then integrates the summaries of each question-answer pair to form a comprehensive summary of the summary text to be generated. Since each question-answer pair includes key elements corresponding to a subject element of the summary text to be generated, after generating summaries separately for question-answer pairs that determine the key elements, they are integrated to obtain a comprehensive summary, so that the subject content of the comprehensive summary in the question-answer scenario is more concentrated, thereby improving the quality of the summary.

[0116] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.

[0117] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.

[0118] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, 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, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

[0119] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0120] 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.

[0121] 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 computer-readable storage medium. Based on this understanding, the technical solution 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, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of each implementation method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.

Claims

1. A method for generating a summary, characterized in that: The method comprises: Obtaining a summary text to be generated, wherein the summary text to be generated is a question-and-answer text; Generating a plurality of question-answer pairs from the summary text to be generated, each of the question-answer pairs consisting of a question and its corresponding answer; wherein each of the question-answer pairs includes key elements of a subject element corresponding to the summary text to be generated; and each of the subject elements includes a plurality of key elements; Inputting the question-answer pairs into a summary generation model, performing summary extraction processing on the question-answer pairs, and obtaining a summary of each question-answer pair; Integrate the summaries of the question-answer pairs to form a comprehensive summary of the summary text to be generated; The step of inputting the question-answer pairs into a summary generation model, performing summary extraction processing on the question-answer pairs, and obtaining a summary of each question-answer pair includes: Extracting summary characters of the question-answer pair in this iteration; Combine the existing candidate summary and the summary characters of this iteration into this candidate summary, where the existing candidate summary is generated before this iteration; Determine whether the candidate summary meets the summary generation condition; If yes, the candidate summary is used as the final candidate summary of the question-answer pair. If no, the question-answer pair with the summary characters of this iteration added is input into the summary generation model, and the steps of extracting the summary characters of the question-answer pair in this iteration and subsequent steps are iteratively executed until the candidate summary meets the summary generation condition. Based on the final candidate summary, a summary of the question-answer pair is determined.

2. The method for generating a summary according to claim 1, characterized in that: The questions and answers in the question-and-answer text are provided by different subjects; The step of generating a plurality of question-answer pairs from the summary text to be generated comprises: Identify each question in the summary text to be generated, and determine the key elements of each question-answer pair based on the question; The answers corresponding to the questions are identified to obtain a plurality of question-answer pairs that determine key elements.

3. The method for generating a summary according to claim 2, characterized in that: Before the step of identifying each question in the summary text to be generated and determining the key elements of each question-answer pair based on the question, the method includes: Constructing a question outline library of the subject elements; wherein the question outline library includes at least one question method for each of the key elements of the subject elements; The step of identifying each question in the summary text to be generated, and determining the key elements of each question-answer pair based on the question, includes: Compare each of the questions with the question outline library to determine the key elements of each question-answer pair.

4. The method for generating a summary according to claim 3, characterized in that: The step of comparing each of the questions with the questioning methods in the question outline library to determine the key elements of each of the question-answer pairs includes: Calculate the similarity between each of the questions and the question outline library; A question with the highest similarity to the question is determined, and a key element corresponding to the question is determined as the key element of the question-answer pair.

5. The method for generating a summary according to claim 3, characterized in that: The summary generation method further comprises: If the question is not related to the questioning method in the question outline library, delete the question and its corresponding answer.

6. The method for generating a summary according to any one of claims 1 to 5, characterized in that: The step of generating a plurality of question-answer pairs from the summary text to be generated comprises: Dividing the summary text to be generated into multiple segments based on the subject elements of the summary text to be generated; wherein the question-answer pairs in each segment include the same key elements; Merging the questions in the question-answer pairs in each of the segments, and merging the answers corresponding to the questions, to obtain question-answer pairs corresponding to each of the segments; The step of inputting the question-answer pairs into a summary generation model, performing summary extraction processing on the question-answer pairs, and obtaining a summary of each question-answer pair includes: The question-answer group pairs corresponding to each of the fragments are input into the summary generation model, and summary extraction processing is performed on the question-answer group pairs to obtain a summary of each of the question-answer group pairs.

7. The method for generating a summary according to claim 1, characterized in that: The digest generation condition is that the cumulative number of iterations exceeds a preset number of iterations, and / or the digest character of this iteration is an end character.

8. The method for generating a summary according to claim 1, characterized in that: The summary generation model is a Unilm model, and the step of extracting summary characters of the question-answer pair in this iteration includes: Convert the question-answer pair into a character array, wherein the character array includes each character constituting the question-answer pair; Obtaining and ranking a first prediction score for each character, wherein the first prediction score is generated by the Unilm model prediction; The characters corresponding to the first preset number of the first prediction scores that are ranked high are used as the summary characters of the current iteration.

9. The method for generating a summary according to claim 1, wherein: The step of combining the existing candidate summaries and the summary characters of the current iteration into the current candidate summaries comprises: Calculate the second prediction score of each candidate summary composed of summary characters of the iteration by using a beam search algorithm; Using the candidate summaries corresponding to the second prediction scores of the second preset number of top rankings as the current candidate summaries; The final candidate summary corresponds to the second prediction score, and the step of determining the summary of the question-answer pair based on the final candidate summary includes: The final candidate summaries corresponding to a third preset number of the second prediction scores that are ranked high are used as summaries of the question-answer pair.

10. The method for generating a summary according to claim 1, characterized in that: The step of integrating the summaries of the question-answer pairs to form a comprehensive summary of the summary text to be generated includes: A text similarity algorithm is used to identify similar summary information between the summaries of the question-answer pairs, and the summaries without the similar summary information are concatenated into the comprehensive summary, or the summaries of the question-answer pairs are concatenated into the comprehensive summary.

11. A summary generation device, characterized in that: The device comprises: An acquisition module is used to acquire a summary text to be generated, wherein the summary text to be generated is a question and answer text; A generating module, used for generating a plurality of question-answer pairs from the summary text to be generated, each of which consists of a question and its corresponding answer; wherein each of the question-answer pairs includes a key element of a topic element corresponding to the summary text to be generated; and each of the topic elements includes a plurality of key elements; An extraction module, used to input the question-answer pairs into a summary generation model, perform summary extraction processing on the question-answer pairs, and obtain a summary of each question-answer pair; An integration module, used to integrate the summaries of the question-answer pairs to form a comprehensive summary of the summary text to be generated; Among them, the extraction module is used to input the question and answer pairs into the summary generation model, perform summary extraction processing on the question and answer pairs, and obtain the summaries of each question and answer pair, and is also used to extract the summary characters of the question and answer pairs in this iteration; combine the existing candidate summaries and the summary characters of the current iteration into this candidate summary, and the existing candidate summaries are generated before the current iteration; judge whether the current candidate summary meets the summary generation conditions; if so, use the current candidate summary as the final candidate summary of the question and answer pair, if not, input the question and answer pair with the summary characters of the current iteration added into the summary generation model, iteratively execute the extraction of the summary characters of the question and answer pair in this iteration and its subsequent steps until the current candidate summary meets the summary generation conditions; based on the final candidate summary, determine the summary of the question and answer pair.

12. An electronic device, characterized in that: The invention comprises a memory and a processor coupled to each other, wherein the memory stores program instructions, and the processor is used to execute the program instructions to implement the abstract generation method according to any one of claims 1 to 10.

13. A computer-readable storage medium, characterized in that: Program instructions that can be executed by a processor are stored, and the program instructions are used to implement the abstract generation method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Intelligent question and answer library establishing method, intelligent question and answer method and device, and computer equipment

    CN110941708A

  • Abstract and dialogue abstract generation method and device

    CN111460109A

  • Self-supervised conversation text abstracting method and system

    CN111639175A