Training method and device for text summarization model

By extracting key sentences and similar sentences to construct data pairs during multi-text summarization model training, the amount of model input is reduced and the training accuracy is improved, thus solving the problem of low training efficiency and achieving efficient text summarization model training.

CN114861640BActive Publication Date: 2024-11-08ALIBABA (CHINA) CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202210374234.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-11
Publication Date
2024-11-08
Estimated Expiration
2042-04-11

AI Technical Summary

Technical Problem

The training process of existing multi-text summarization models requires a lot of computing resources, time, and manual annotation costs, resulting in low training efficiency.

Method used

By extracting key sentences and similar sentences to construct data pairs for training the text summarization model, the amount of model input is reduced and the training accuracy is improved. The training is performed by inputting multiple similar sentences.

Benefits of technology

It significantly reduces computational load, improves training accuracy and overall training efficiency, enables the model to quickly approach the training objective, and shortens training time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114861640B_ABST
    Figure CN114861640B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a training method and device for a text summary model, including: obtaining a training data set, the training data set including: at least one annotated summary sample, the annotated summary sample is associated with at least one related text sample; obtaining at least one key sentence from the annotated summary sample, and obtaining similar sentences matching the key sentence in the related text samples associated with the annotated summary sample; training an initial text summary model using the correspondence between the key sentence and the similar sentence to obtain a first text summary model; training the first text summary model using the correspondence between the annotated summary sample and the related text sample to obtain a second text summary model. The present application adopts a training method of inputting multiple similar sentences, which can significantly reduce the input amount of the model, thereby reducing the amount of calculation. In addition, since the extraction of key sentences and similar sentences reduces the interference caused by other redundant content, the overall training efficiency is also improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a training method for a text summary model, a method and device for obtaining a text summary, an electronic device, and a machine-readable medium. Background Art

[0002] Multi-text summarization is a technology that summarizes the core content of multiple texts and can effectively improve the ability to process texts.

[0003] In the related art, during the model training process of a multi-text summarization scenario, it is necessary to construct a semantic relationship graph between different training texts to help the model learn the logical relationship between summaries of multiple texts.

[0004] However, after research, the inventors found that in the current solution, constructing a semantic relationship graph requires a lot of computing resources, time, and manual labeling costs, resulting in low training efficiency. Summary of the invention

[0005] The embodiments of the present application provide a method for training a text summary model and a method for obtaining a text summary to solve the problem of low training efficiency in related technologies.

[0006] Correspondingly, the embodiment of the present application also provides a text summary model training device and a text summary acquisition device, an electronic device and a storage medium to ensure the implementation and application of the above method.

[0007] In order to solve the above problems, the present application embodiment discloses a training method for a text summarization model, the method comprising:

[0008] Acquire a training data set, the training data set comprising: at least one annotated summary sample, the annotated summary sample being associated with at least one related text sample;

[0009] Acquire at least one key sentence from the annotated summary sample, and acquire similar sentences matching the key sentence from relevant text samples associated with the annotated summary sample;

[0010] Training an initial text summary model using the correspondence between the key sentences and the similar sentences to obtain a first text summary model;

[0011] The first text summary model is trained using the correspondence between the annotated summary sample and the related text sample to obtain a second text summary model, wherein the second text summary model is used to generate a summary text according to at least one related text.

[0012] Optionally, also include:

[0013] At least one related text is spliced ​​and input into the second text summary model to obtain a summary text output by the second text summary model.

[0014] Optionally, in the training data set, at least one related text sample associated with the annotated summary sample belongs to different fields.

[0015] The present application embodiment discloses a method for obtaining a text summary, including:

[0016] Get at least one text to be processed;

[0017] The text to be processed is input into a second text summary model to obtain a summary text output by the second text summary model, wherein the second text summary model is trained by the training method of the text summary model.

[0018] The present application embodiment discloses a training device for a text summarization model, the device comprising:

[0019] A first acquisition module is used to acquire a training data set, wherein the training data set includes: at least one annotated summary sample, wherein the annotated summary sample is associated with at least one related text sample;

[0020] A second acquisition module is used to acquire at least one key sentence from the annotated summary sample, and acquire similar sentences matching the key sentence from relevant text samples associated with the annotated summary sample;

[0021] A first training module, used for training an initial text summary model by using the correspondence between the key sentences and the similar sentences to obtain a first text summary model;

[0022] The second training module is used to train the first text summary model by using the correspondence between the annotated summary sample and the related text sample to obtain a second text summary model, wherein the second text summary model is used to generate a summary text according to at least one related text.

[0023] The present application embodiment discloses a device for obtaining a text summary, the device comprising:

[0024] A third acquisition module, used to acquire at least one text to be processed;

[0025] The processing module is used to input the text to be processed into a second text summary model to obtain a summary text output by the second text summary model, wherein the second text summary model is trained by the training device of the text summary model.

[0026] An embodiment of the present application further discloses an electronic device, including: a processor; and a memory, on which executable code is stored. When the executable code is executed, the processor executes one or more methods described in the embodiments of the present application.

[0027] The embodiments of the present application also disclose one or more machine-readable media on which executable codes are stored. When the executable codes are executed, the processor executes one or more methods described in the embodiments of the present application.

[0028] Compared with the related art, the embodiments of the present application have the following advantages:

[0029] In an embodiment of the present application, a text summary model is trained by extracting key sentences and similar sentences to construct data pairs. Key sentences and similar sentences can reflect the essential content of text samples. The extraction of key sentences and similar sentences reduces the interference caused by redundant content in text samples. Compared with the training method of directly inputting multiple related text samples, the embodiment of the present application adopts a training method of inputting multiple similar sentences, which can significantly reduce the input amount of the model, thereby reducing the amount of calculation. In addition, since the extraction of key sentences and similar sentences reduces the interference caused by other redundant content, it also improves the training accuracy of the training process and improves the overall training efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 It is a system architecture diagram of an embodiment of the present application;

[0031] Figure 2 is a schematic diagram of training data processing in an embodiment of the present application;

[0032] Figure 3 is a schematic diagram of a training data relationship in an embodiment of the present application;

[0033] Figure 4 This is a schematic diagram of implementing a text summary in an audio and video conference management scenario in an embodiment of the present application;

[0034] Figure 5 It is a schematic diagram of implementing a text summary in a news information management scenario in an embodiment of the present application;

[0035] Figure 6 This is a schematic diagram of implementing a text summary in a paper information management scenario in an embodiment of the present application;

[0036] Figure 7 is a flowchart of a method for training a text summarization model according to an embodiment of the present application;

[0037] Figure 8 It is a flowchart of a method for obtaining a text summary according to an embodiment of the present application;

[0038] Fig. 9 is a block diagram of a training device for a text summarization model according to an embodiment of the present application;

[0039] Fig.10 is a block diagram of a device for obtaining a text summary according to an embodiment of the present application;

[0040] Fig.11 It is a schematic diagram of the structure of a device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0041] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0042] In order to enable those skilled in the art to better understand the present application, the concepts involved in the present application are explained below:

[0043] Multi-text summarization: A technology that extracts information from multiple different texts to form a summary. For example, extracting information from multiple different papers and merging the extracted information can obtain a summary text that reflects the core content of these papers.

[0044] Single-text summarization: A technique for extracting information from a text to form a summary.

[0045] Pre-trained model: A model is pre-trained on an original specific task using a large amount of data sets. The model can then be used on the target task. The model can be fine-tuned according to the characteristics of the target task to improve the performance of the target task. This essentially utilizes the theory of transfer learning.

[0046] In one implementation of the embodiment of the present application, the training method of the text summary model can be applied to the training process of the text summary model in a multi-text summary scenario. Specifically, a training data set consisting of multiple annotated summary samples and multiple related text samples can be obtained, wherein each annotated summary sample is associated with multiple different related text samples. After obtaining the training data set, the data in the training data set can be transformed, multiple key sentences can be obtained from the annotated summary samples, and similar sentences matching the key sentences can be obtained from the related text samples associated with the annotated summary samples, thereby establishing a data pair constructed by the key sentence and the corresponding multiple similar sentences, and finally using the correspondence between the key sentence and the similar sentence, and the correspondence between the annotated summary sample and the related text sample to train the text summary model. Wherein, the related text is the text content associated with the content of the summary text.

[0047] Since the idea of ​​multi-text summarization is to analyze one of the core contents in the related texts and construct the summary text based on the understanding of the core content, there is a natural correlation between the sentences in the summary text and the sentences in the related texts. Therefore, the embodiment of the present application extracts key sentences and similar sentences to construct data pairs for training. Key sentences and similar sentences can reflect the essence of the text sample. The extraction of key sentences and similar sentences reduces the interference caused by redundant content in the text sample. Compared with the training method of directly inputting multiple related text samples, the first training process of the embodiment of the present application can first adopt the training method of inputting multiple similar sentences, thereby greatly reducing the input amount of the model and thus reducing the amount of calculation. In addition, since the extraction of key sentences and similar sentences reduces the interference caused by other redundant content, the training accuracy of the first training process is also improved, so that the model can quickly approach the training target. After that, the second training process can use the labeled summary samples and related text samples for training. Since the training effect of the first training process is better, the time required for the subsequent second training process is shortened, the subsequent calculation amount is also reduced, and the overall training efficiency is improved.

[0048] Reference Figure 1 , which shows a system architecture diagram provided in an embodiment of the present application, including: a server and a client, the server including: a training data processing module, a first training module and a second training module.

[0049] Among them, refer to Figure 2 , which shows a training data processing schematic diagram provided by an embodiment of the present application, the training data processing module can obtain a training data set and extract the corresponding relationship between key sentences and similar sentences from the training data set. Specifically, Figure 2 The training data set contains three annotated summary samples, each of which is associated with n (n≥1) related text samples; the related text samples include a large number of training texts, such as an article, a paper, a news article, etc. The annotated summary samples are correct summary samples that can be used as the true value of multiple annotated summary samples in the multi-text summary training process. For example, if the n related text samples are n news texts, the corresponding annotated summary samples can be summary texts that reflect the core content of these n news texts.

[0050] In the embodiments of this application, refer to Figure 2, the processing process of the labeled summary sample 1 and the corresponding related text sample 1 is described and illustrated for the training data processing module, so as to realize the functional explanation of the training data processing module: the training data processing module can extract 3 key sentences from the labeled summary sample 1, and each key sentence can be calculated with the sentence in the related text sample 1 to obtain the similarity between the key sentence and the sentence in the related text sample 1. By sorting the sentences in the related text sample 1 according to the similarity, the m sentences (Top m) most similar to the key sentence can be extracted from the sorting result as similar sentences of the key sentence. For example, based on the key sentence 1, similar sentences 11 and 12 are obtained in the related text sample 1; based on the key sentence 2, similar sentences 21 and 22 are obtained in the related text sample 1; based on the key sentence 3, similar sentences 31 and 32 are obtained in the related text sample 1. Further reference Figure 3 ,according to Figure 2 The processing results of the annotated summary sample 1 and the corresponding related text sample 1 finally obtain the corresponding relationship between key sentence 1 and similar sentences 11 and 12; the corresponding relationship between key sentence 2 and similar sentences 21 and 22; and the corresponding relationship between key sentence 3 and similar sentences 31 and 32. The processing process of the annotated summary sample 1 and other related text samples, as well as other annotated summary samples and related text samples is similar, and will not be repeated here.

[0051] First, the training data processing module of the embodiment of the present application extracts key sentences and similar sentences to extract the essence of the text sample for subsequent training, which reduces the interference caused by redundant content in the text sample, significantly reduces the input amount of the model, and thus reduces the amount of calculation; in addition, for the original data pair of annotated summary sample 1-related text sample 1, after processing by the training data processing module, 3 data pairs of key sentences-similar sentences are actually obtained, achieving the effect of training data amplification, thereby effectively improving the efficiency of subsequent training.

[0052] Reference Figure 1, the embodiment of the present application can divide the training process of the text summary model into two processes, which are respectively implemented by the first training module and the second training module, wherein the first training module can train the initial text summary model according to the data pairs consisting of the key sentences and similar sentences output by the training data processing module. Since the data pairs consisting of the key sentences and similar sentences can reflect the essence of the text samples, the model parameters can converge quickly to approach the training target, and the amount of calculation is reduced by reducing the input amount. Afterwards, in order to enable the text summary model to match the requirements of inputting relevant texts and outputting summary texts in actual application scenarios, the second training module can train the first text summary model according to the data pairs consisting of a labeled summary sample and multiple related text samples in the training data set. Since the training effect of the first training process is better, the time required for the subsequent second training process is shortened, the subsequent amount of calculation is also reduced, and the overall training efficiency is improved.

[0053] After obtaining the second text summary model, the server can obtain at least one text to be processed sent by the client and input it into the second text summary model, obtain the summary text corresponding to the at least one text to be processed and output it to the client. It should be noted that the server can also store the obtained summary text locally on the server for use according to actual needs.

[0054] The text summary model of the embodiment of the present application can specifically be a bidirectional encoder representation (BERT, Bidirectional Encoder Representation from Transformers) model based on a transformer, which no longer uses a traditional unidirectional language model for pre-training, or a method of shallow splicing of two unidirectional language models for pre-training, but a new masked language model (MLM, masked language model) is used to generate a deep bidirectional language representation, and the BERT model uses a deep bidirectional transformer (Transformer) component to build the entire model, so that a deep bidirectional language representation that can fuse left and right context information is finally generated. The BERT model can learn to obtain a large amount of data structured information through the process of self-supervised pre-training on a large amount of training data, and thus can obtain very high accuracy in downstream tasks such as data classification and data matching. In addition, the text summary model of the embodiment of the present application can also be a model of other structures, and the embodiment of the present application is not limited to this.

[0055] It should be noted that the second text summary model trained in the embodiment of the present application can also be applicable to single text summary scenarios, that is, the second training module can train the first text summary model based on a data pair consisting of a labeled summary sample and a related text sample to make it meet the needs of the single text summary scenario.

[0056] According to the scenario requirements of text summarization, several specific scenarios that can be realized are as follows:

[0057] In one implementation, Figure 1 The system architecture shown can be applied to audio and video conference management scenarios. Figure 4 , which shows a schematic diagram of implementing a text summary in an audio and video conference management scenario provided by an embodiment of the present application, including: a conference client and a conference server, wherein the conference server may be equipped with a trained second text summary model. When participating in a meeting, the conference client may record the conference speech audio of the participant and transmit it to the conference server. On the basis of using the conference speech audio to conduct conference interaction, the conference server may also perform speech recognition on the conference speech audio and convert it into conference text. After that, the conference server may splice each conference text and input it into the second text summary model to obtain a conference summary text output by the second text summary model. The conference summary text is specifically a summary text formed by summarizing the conference speeches of each conference client. The multi-text summary technology implemented in this scenario may improve the convenience of conference management and enhance the degree of automation of conference records.

[0058] In another implementation, Figure 1 The system architecture shown can be applied to news information management scenarios, refer to Figure 5 , which shows a schematic diagram of implementing text summarization in a news information management scenario provided by an embodiment of the present application, including: a news release server, a news recording server and a client, wherein the news recording server can be equipped with a trained second text summary model, the news release server can release news text messages, the news recording server can collect news texts released by the news release server, and then the news recording server can splice each news text and input it into the second text summary model to obtain a news summary text output by the second text summary model, the news summary text is specifically a summary text formed by summarizing each news text, the news recording server can send the news summary text to the client, so that the client can quickly understand the key points of each news, and the multi-text summarization technology implemented in this scenario can improve the convenience and automation of the coordinated management and recording of news information.

[0059] In another implementation, Figure 1 The system architecture shown can be applied to paper information management scenarios, refer to Figure 6, which shows a schematic diagram of the implementation of text summarization in a paper information management scenario provided by an embodiment of the present application, including: a paper publishing server, a paper record server and a client, wherein the paper record server can be equipped with a trained second text summary model, the paper publishing server can publish paper texts, the paper record server can collect paper texts published by the paper publishing server, and then the paper record server can splice each paper text and input it into the second text summary model to obtain the paper summary text output by the second text summary model, the paper summary text is specifically a summary text formed by summarizing each paper text, the paper record server can send the paper summary text to the client so that the client can quickly understand the key points of each paper, and the multi-text summary technology implemented in this scenario can improve the convenience and automation of paper information overall management records.

[0060] It should be noted that the process of obtaining annotated summary samples, related text samples, texts to be processed, conference texts, news texts, paper texts and other information, signals or data used in the embodiments of the present application is carried out in compliance with the relevant data protection laws and policies of the country where it is located, and with the authorization given by the owner of the corresponding device.

[0061] In an embodiment of the present application, a text summary model is trained by extracting key sentences and similar sentences to construct data pairs. Key sentences and similar sentences can reflect the essential content of text samples. The extraction of key sentences and similar sentences reduces the interference caused by redundant content in text samples. Compared with the training method of directly inputting multiple related text samples, the embodiment of the present application adopts a training method of inputting multiple similar sentences, which can significantly reduce the input amount of the model, thereby reducing the amount of calculation. In addition, since the extraction of key sentences and similar sentences reduces the interference caused by other redundant content, it also improves the training accuracy of the training process and improves the overall training efficiency.

[0062] Reference Figure 7 , which shows a flowchart of the steps of a training method for a text summarization model provided in an embodiment of the present application, including:

[0063] Step 101: Acquire a training data set, wherein the training data set includes: at least one annotated summary sample, wherein the annotated summary sample is associated with at least one related text sample.

[0064] In the embodiment of the present application, the data structure in the training data set can refer to Figure 2The training data set may include: at least one annotated summary sample, the annotated summary sample is associated with at least one related text sample, the related text samples include a large number of training texts, such as an article, a paper, a news article, etc. The annotated summary sample is a correct summary sample that can be used as the true value of multiple annotated summary samples in the multi-text summary training process. For example, if the n related text samples are n news texts, the corresponding annotated summary sample can be a summary text reflecting the core content of the n news texts.

[0065] Optionally, in the training data set, at least one related text sample associated with the annotated summary sample belongs to different fields.

[0066] In an embodiment of the present application, in order to improve the applicability of multi-text summary scenarios so that the multi-text summary scenarios can cover more fields, when obtaining a training data set, multiple related text samples of different fields can be obtained for each annotated summary sample for association. This allows the text summary model trained with the training data set to adapt to changes in the field of the scenario, thereby improving the applicability of the multi-text summary.

[0067] For example, for a labeled summary sample, we can obtain medical-related text samples, news-related text samples, business-related text samples, and legal-related text samples that are associated with its content, and establish associations between these related text samples. The text summary model trained with this training data can improve its applicability to different fields.

[0068] Step 102: obtaining at least one key sentence from the annotated summary sample, and obtaining similar sentences matching the key sentence from relevant text samples associated with the annotated summary sample.

[0069] In this step, refer to Figure 2 In the embodiment of the present application, three key sentences can be extracted from the annotated summary sample 1. Each key sentence can be similarly calculated with the sentences in the relevant text sample 1 to obtain the similarity between the key sentence and the sentences in the relevant text sample 1. Then, based on the similarity, similar sentences matching the key sentences can be selected from the sentences in the relevant text sample 1. The processing process of the annotated summary sample 1 and other relevant text samples, as well as other annotated summary samples and relevant text samples is similar and will not be elaborated here.

[0070] Step 103: train an initial text summary model using the correspondence between the key sentences and the similar sentences to obtain a first text summary model.

[0071] In this step, a training can concatenate multiple similar sentences associated with a key sentence and input them into the initial text summary model, and calculate the loss function based on the output result of the initial text summary model and the key sentence, so as to train the parameters of the initial text summary model.

[0072] The process of extracting key sentences and similar sentences in the embodiment of the present application can extract the essence of the text sample for training, reduce the interference caused by redundant content in the text sample, enable the model parameters to converge quickly to approach the training target, and significantly reduce the input amount of the model, thereby reducing the amount of calculation.

[0073] Step 104: train a first text summary model using the correspondence between the annotated summary sample and the related text sample to obtain a second text summary model, wherein the second text summary model is used to generate a summary text according to at least one related text.

[0074] In the embodiment of the present application, in order to enable the text summary model to match the requirements of inputting relevant text and outputting summary text in actual application scenarios, the second training module can train the first text summary model based on a data pair consisting of an original annotated summary sample and multiple relevant text samples in the training data set. In one training, multiple relevant text samples associated with a annotated summary sample can be spliced ​​and input into the first text summary model, and the loss function is calculated based on the output result of the first text summary model and the annotated summary sample, thereby training the parameters of the first text summary model. Since the training effect of step 103 is better, the time required for the training process of step 104 is shortened, the subsequent calculation amount is reduced, and the overall training efficiency is improved.

[0075] Optionally, step 102 may specifically include:

[0076] Sub-step 1021: Acquire at least one key sentence from the annotated summary sample.

[0077] In this step, there are multiple ways to obtain at least one key sentence from the annotated summary sample. In one implementation, the annotated summary sample can be firstly divided into sentences according to sentence punctuation marks to obtain multiple sentences, and then each sentence can be matched according to a preset key sentence template, and sentences that are similar or identical to the template sentences in the key sentence template are used as key sentences; in another implementation, the annotated summary sample can be divided into sentences according to sentence punctuation marks to obtain multiple sentences, and then each sentence is semantically recognized to obtain a semantic result of the sentence, and the sentence with the preset semantic result is used as the key sentence; in another implementation, the key sentence can be extracted from the annotated summary sample through a trained deep learning model to obtain the key sentence.

[0078] Sub-step 1022: Calculate the text similarity between the key sentence and the second sentence in the relevant text sample.

[0079] In this step, in order to calculate the text similarity between the key sentence and the second sentence, the feature vectors of the key sentence and the second sentence can be extracted respectively, and then the vector similarity between the two is calculated to obtain the text similarity between the key sentence and the second sentence.

[0080] Sub-step 1023: sorting the second sentences according to the text similarity, and starting from the end with the largest text similarity in the sorting result, selecting at least one second sentence as the similar sentence.

[0081] In this step, according to the size of the text similarity, K second sentences with the greatest similarity can be selected from multiple second sentences as similar sentences, where the K value can be adjusted according to actual needs. The larger the K value, the greater the amount of calculation and the higher the training accuracy; the smaller the K value, the smaller the amount of calculation and the worse the training accuracy.

[0082] Optionally, it may also include:

[0083] Sub-step 1024: When the total length of the text after concatenating similar sentences associated with the key sentence is greater than a preset input length threshold, reduce the number of selected second sentences until the total length of the text after concatenating similar sentences associated with the key sentence is less than or equal to the preset input length threshold.

[0084] In an embodiment of the present application, based on the computing power limitation of the device to which the text summary model is deployed, the text summary model may have an input length limitation, that is, based on the computing power limitation of the device, a fixed input length of the text summary model may be set to limit the input length of the text summary model to be less than or equal to the fixed input length, thereby avoiding excessive computational complexity of the text summary model.

[0085] Specifically, similar sentences associated with the key sentence need to be spliced ​​and input into the text summary model for training. Since the text summary model has a preset input length threshold parameter to limit the input length, when the total length of the text after the similar sentences associated with the key sentence are spliced ​​is greater than the preset input length threshold, the text summary model will be trained.

[0086] In the case of a value of , the embodiment of the present application can reduce the size of the number K of second sentences selected from the sorting results of the second sentences, thereby reducing the number of similar sentences corresponding to the key sentences, and further reducing the input length of the subsequent text summary model, so that the input length of the text summary model is limited within the input length threshold.

[0087] For example, assuming that the number K of second sentences originally selected from the sorting results of the second sentences is 5, so that the total length of the text after the similar sentences are spliced ​​together is greater than the preset input length threshold, then after adjusting K to 2, the total length of the text after the similar sentences are spliced ​​together can be made less than the preset input length threshold.

[0088] Optionally, step 103 may specifically include:

[0089] Sub-step 1031: concatenate the similar sentences and input them into an initial text summary model to obtain a first sentence output by the initial text summary model.

[0090] Sub-step 1032: training the parameters of the initial text summarization model according to the key sentence, the first sentence and a preset first loss function.

[0091] In an embodiment of the present application, similar sentences can be sorted in order of similarity from large to small, and then similar sentences in the sorting can be spliced ​​end to end and input into the initial text summary model for training to obtain the first sentence output by the initial text summary model. Then, the loss value of this input can be calculated based on the key sentence and the first sentence, and finally the parameters of the initial text summary model can be trained according to the loss value and the preset first loss function. The selection of the first loss function in the embodiment of the present application can be implemented based on actual needs and is not additionally limited. Among them, the splicing method of similar sentences in the embodiment of the present application is not specifically limited. For example, similar sentences can be spliced ​​after being sorted in order of similarity from small to large, or spliced ​​after being randomly sorted, etc.

[0092] Optionally, sub-step 1031 may specifically include:

[0093] Sub-step 10311: When the total length of the text after the similar sentences are spliced ​​is less than or equal to a preset input length threshold, the similar sentences are spliced ​​and input into the initial text summary model.

[0094] Sub-step 10312: When the total length of the text after the similar sentences are concatenated is greater than the preset input length threshold, partial text is obtained from the text after the similar sentences are concatenated, and the partial text is input into the initial text summary model, and the total length of the partial text is less than or equal to the preset input length threshold.

[0095] In an embodiment of the present application, due to the computing power limitation of the device to which the text summary model is deployed, the text summary model can set a fixed input length to limit the input length of the text summary model to be less than or equal to the fixed input length. When the total length of the text after similar sentences are spliced ​​is less than or equal to the preset input length threshold, the similar sentences can be spliced ​​and input into the initial text summary model for training. When the total length of the text after similar sentences are spliced ​​is greater than the preset input length threshold, a portion of the text with a total length less than or equal to the preset input length threshold can be intercepted from the text after similar sentences are spliced, and the portion of the text can be input into the initial text summary model for training.

[0096] It should be noted that the embodiment of the present application does not specifically limit the method of extracting partial text from the text after similar sentences are spliced ​​together. For example, in one implementation, the end of the text after similar sentences are spliced ​​together can be truncated so that the remaining part of the text after similar sentences are spliced ​​together can be used as the partial text. In addition, for the training process of step 104, the input of the model is the splicing result of multiple related text samples associated with the annotated summary sample. In this process, an input length threshold of the model input can also be introduced to limit the input length of the model. For details, please refer to the above process, which will not be repeated here.

[0097] Optionally, in one implementation, the relevant text samples have corresponding annotation probability values; step 104 may specifically include:

[0098] Sub-step 1041: splicing the relevant text samples and inputting them into the first text summary model to extract the third sentence from the relevant text samples.

[0099] Sub-step 1042: Calculate a first probability value that the third sentence in the relevant text sample belongs to the annotated summary sample.

[0100] Sub-step 1043: training the parameters of the first text summarization model according to the annotation probability value, the first probability value and a preset second loss function.

[0101] In one implementation of the embodiment of the present application, referring to sub-steps 1041-1043, the training process of the first text summary model can adopt an extractive summary training process, which is to select keywords and key sentences from the original text to form a summary. Specifically, the third sentence can be extracted from the input related text sample, and the first probability value that the third sentence belongs to the annotated summary sample is calculated, and the loss value is calculated according to the annotated probability value and the first probability value. Finally, the parameters of the first text summary model are trained according to the loss value and the preset second loss function. This method can have a low error rate in grammar and syntax, and ensure a certain effect.

[0102] Optionally, based on the second text summarization model trained on the basis of sub-steps 1041-1043, the method further includes:

[0103] Sub-step 1044: input at least one related text into the second text summary model to obtain a second probability value that the fourth sentence in the related text belongs to the summary text.

[0104] Sub-step 1045: sort the fourth sentences according to the second probability value, and select a target fourth sentence from the sorting result to form a summary text.

[0105] In an embodiment of the present application, the second text summary model trained based on the extractive summary training process can use the splicing result of the relevant text as the model input after being deployed in the application environment, and output a second probability value that the fourth sentence in the relevant text belongs to the summary text. The larger the second probability value, the greater the possibility that the fourth sentence can be extracted and added to the summary text.

[0106] Furthermore, when generating summary text, the second text summary model of the embodiment of the present application can sort the fourth sentences according to the size of the second probability value, and select multiple target fourth sentences from the sorting results to form the summary text. In one way, a probability value threshold can be set, and the fourth sentences that are less than or equal to the probability value threshold can be extracted and formed into the summary text. In another way, L fourth sentences with the largest second probability values ​​can also be selected from the sorting results of the fourth sentences to form the summary text, and the value of L can be set according to actual needs.

[0107] Optionally, sub-step 1045 may specifically include:

[0108] Sub-step 10451: Select the target fourth sentence from the sorting results.

[0109] Sub-step 10452: sorting the target fourth sentences according to the magnitude of the second probability values ​​to form the summary text, wherein the second probability value corresponding to the target fourth sentence is displayed in the summary text.

[0110] In an embodiment of the present application, the selected target fourth sentences can be sorted according to the size of their respective second probability values ​​(in order from large to small or from small to large), and then combined into a summary text, and the second probability value corresponding to the target fourth sentence can be displayed in the summary text, which can make the content details in the summary text have an increasing or decreasing order of importance, and the marked second probability value can also reflect the importance of the content details in the summary text. The larger the second probability value, the higher the importance of the corresponding target fourth sentence. In this way, the embodiment of the present application can further subdivide the content of the summary text and reduce the user's understanding cost of the summary text content.

[0111] For example, assuming that the input of the second text summary model is: related text 1, related text 2 and related text 3, the second text summary model extracts the fourth sentence a (second probability value 60%) and the fourth sentence b (second probability value 40%) in the related text 1 after processing, extracts the fourth sentence d (second probability value 80%) in the related text 2, and extracts the fourth sentence e (second probability value 50%) in the related text 3. Finally, the fourth sentence a, the fourth sentence b, the fourth sentence d, and the fourth sentence e are sorted in order from large to small according to the second probability value to form a summary text: "fourth sentence d (80%) - fourth sentence a (60%) - fourth sentence e (50%) - fourth sentence b (40%)", so that the user can perceive and refine the subdivided content of the summary text on the basis of viewing the summary text as a whole.

[0112] Optionally, in another implementation, step 104 may specifically include:

[0113] Sub-step 1046: input the relevant text sample into the first text summary model, perform encoding and decoding operations on the text features of the relevant text sample in sequence, and obtain an output summary text.

[0114] Sub-step 1047: training the parameters of the first text summary model according to the annotated summary sample, the output summary text and a preset third loss function.

[0115] In another implementation of the embodiment of the present application, referring to sub-steps 1046-1047, the training process of the first text summary model can adopt a generative summary training process, which can extract the features of relevant text samples for encoding and decoding operations to obtain a summary text. The generative summary can directly predict the generated summary text, allowing the summary to include new words or phrases, with high flexibility. The generated summary text has strong language coherence and is easier to read and understand. In practical applications, a sequence-to-sequence (Seq2Seq) model can be used for generative summary tasks and achieve certain results.

[0116] Optionally, based on the second text summarization model trained on the basis of sub-steps 1046-1047, the method further includes:

[0117] Sub-step 1048: splicing at least one related text and inputting it into the second text summary model to obtain a summary text output by the second text summary model.

[0118] In an embodiment of the present application, the second text summary model trained based on the generative summary training process can use the splicing result of related texts as model input after being deployed in the application environment, and output a summary text with strong coherence through encoding and decoding operations.

[0119] To sum up, in the embodiment of the present application, the text summary model is trained by extracting key sentences and similar sentences to construct data pairs. The key sentences and similar sentences can reflect the essential content of the text sample. The extraction of key sentences and similar sentences reduces the interference caused by redundant content in the text sample. Compared with the training method of directly inputting multiple related text samples, the embodiment of the present application adopts the training method of inputting multiple similar sentences, which can significantly reduce the input amount of the model, thereby reducing the amount of calculation. In addition, since the extraction of key sentences and similar sentences reduces the interference caused by other redundant content, it also improves the training accuracy of the training process and improves the overall training efficiency.

[0120] Reference Figure 8 , which shows a flowchart of the steps of a method for obtaining a text summary provided in an embodiment of the present application, including:

[0121] Step 201, obtaining at least one text to be processed.

[0122] Step 202: input the text to be processed into a second text summary model to obtain a summary text output by the second text summary model.

[0123] The second text summary model is obtained by training using the text summary model training method.

[0124] Steps 201-202 may refer to the above Figure 4-6 The relevant description is not repeated here.

[0125] To sum up, in the embodiment of the present application, the text summary model is trained by extracting key sentences and similar sentences to construct data pairs. The key sentences and similar sentences can reflect the essential content of the text sample. The extraction of key sentences and similar sentences reduces the interference caused by redundant content in the text sample. Compared with the training method of directly inputting multiple related text samples, the embodiment of the present application adopts the training method of inputting multiple similar sentences, which can significantly reduce the input amount of the model, thereby reducing the amount of calculation. In addition, since the extraction of key sentences and similar sentences reduces the interference caused by other redundant content, it also improves the training accuracy of the training process and improves the overall training efficiency.

[0126] Reference Fig. 9 , which shows a block diagram of a training device for a text summarization model provided in an embodiment of the present application, including:

[0127] A first acquisition module 301 is used to acquire a training data set, wherein the training data set includes: at least one annotated summary sample, wherein the annotated summary sample is associated with at least one related text sample;

[0128] A second acquisition module 302 is used to acquire at least one key sentence from the annotated summary sample, and acquire similar sentences matching the key sentence from relevant text samples associated with the annotated summary sample;

[0129] A first training module 303 is used to train an initial text summary model using the correspondence between the key sentences and the similar sentences to obtain a first text summary model;

[0130] The second training module 304 is used to train the first text summary model using the correspondence between the annotated summary sample and the related text sample to obtain a second text summary model, wherein the second text summary model is used to generate a summary text according to at least one related text.

[0131] Optionally, the first training module 303 includes:

[0132] A first input submodule, configured to concatenate the similar sentences and input them into an initial text summary model to obtain a first sentence output by the initial text summary model;

[0133] The first training submodule is used to train the parameters of the initial text summary model according to the key sentence, the first sentence and a preset first loss function.

[0134] Optionally, the first input submodule includes:

[0135] A first judgment unit is used to input the similar sentences after splicing into the initial text summary model when the total length of the text after splicing the similar sentences is less than or equal to a preset input length threshold;

[0136] The second judgment unit is used to intercept and obtain partial text from the text after the similar sentences are spliced ​​together, and input the partial text into the initial text summary model when the total length of the text after the similar sentences are spliced ​​together is greater than the preset input length threshold, and the total length of the partial text is less than or equal to the preset input length threshold.

[0137] Optionally, the second acquisition module 302 includes:

[0138] An extraction submodule, used to obtain at least one key sentence from the annotated summary sample;

[0139] A first calculation submodule, used to calculate the text similarity between the key sentence and the second sentence in the relevant text sample;

[0140] The sorting submodule is used to sort the second sentences according to the text similarity, and select at least one second sentence as the similar sentence starting from the end with the largest text similarity in the sorting result.

[0141] Optionally, the device further comprises:

[0142] The reduction module is used to reduce the number of selected second sentences when the total length of the text after the similar sentences associated with the key sentence are spliced ​​is greater than a preset input length threshold, until the total length of the text after the similar sentences associated with the key sentence are spliced ​​is less than or equal to the preset input length threshold.

[0143] Optionally, the relevant text samples have corresponding annotation probability values; the second training module 304 includes:

[0144] A second input submodule, configured to concatenate the related text samples and input them into the first text summarization model to extract a third sentence from the related text samples;

[0145] A second calculation submodule, configured to calculate a first probability value of a third sentence in the relevant text sample belonging to the annotated summary sample;

[0146] The second training submodule is used to train the parameters of the first text summary model according to the annotation probability value, the first probability value and a preset second loss function.

[0147] Optionally, the device further comprises:

[0148] A probability value acquisition module, configured to input at least one related text into the second text summary model, and obtain a second probability value of a fourth sentence in the related text belonging to the summary text;

[0149] A selection module is used to sort the fourth sentences according to the second probability value, and select a target fourth sentence from the sorting result to form a summary text.

[0150] Optionally, the selection module includes:

[0151] A selection submodule, used for selecting a target fourth sentence from the sorting results;

[0152] The merging submodule is used to sort the target fourth sentences according to the magnitude of the second probability values ​​to form the summary text, and the summary text displays the second probability value corresponding to the target fourth sentence.

[0153] Optionally, the second training module 304 includes:

[0154] A third input submodule is used to input the relevant text sample into the first text summary model, and sequentially encode and decode the text features of the relevant text sample to obtain an output summary text;

[0155] The third training submodule is used to train the parameters of the first text summary model according to the annotated summary sample, the output summary text and a preset third loss function.

[0156] Optionally, the device further comprises:

[0157] The summary module is used to splice at least one related text and input it into the second text summary model to obtain the summary text output by the second text summary model.

[0158] Optionally, in the training data set, at least one related text sample associated with the annotated summary sample belongs to different fields.

[0159] In summary, in the embodiments of the present application, the text summary model is trained by extracting key sentences and similar sentences to construct data pairs. The key sentences and similar sentences can reflect the essential content of the text sample. The extraction of key sentences and similar sentences reduces the interference caused by redundant content in the text sample. Compared with the training method of directly inputting multiple related text samples, the embodiments of the present application adopts a training method of inputting multiple similar sentences, which can significantly reduce the input amount of the model, thereby reducing the amount of calculation. In addition, since the extraction of key sentences and similar sentences reduces the interference caused by other redundant content, it also improves the training accuracy of the training process and improves the overall training efficiency.

[0160] Reference Fig.10 , which shows a block diagram of a device for obtaining a text summary provided by an embodiment of the present application, including:

[0161] The third acquisition module 401 is used to acquire at least one text to be processed;

[0162] The processing module 402 is used to input the text to be processed into a second text summary model to obtain a summary text output by the second text summary model, wherein the second text summary model is trained by the training device of the text summary model.

[0163] In summary, in the embodiments of the present application, the text summary model is trained by extracting key sentences and similar sentences to construct data pairs. The key sentences and similar sentences can reflect the essential content of the text sample. The extraction of key sentences and similar sentences reduces the interference caused by redundant content in the text sample. Compared with the training method of directly inputting multiple related text samples, the embodiments of the present application adopts a training method of inputting multiple similar sentences, which can significantly reduce the input amount of the model, thereby reducing the amount of calculation. In addition, since the extraction of key sentences and similar sentences reduces the interference caused by other redundant content, it also improves the training accuracy of the training process and improves the overall training efficiency.

[0164] The embodiment of the present application also provides a non-volatile readable storage medium, which stores one or more modules (programs). When the one or more modules are applied to a device, the device can execute instructions (instructions) of each method step in the embodiment of the present application.

[0165] The present application embodiment provides one or more machine-readable media on which instructions are stored, and when executed by one or more processors, an electronic device executes one or more of the methods described in the above embodiments. In the present application embodiment, the electronic device includes various types of devices such as terminal devices and server terminals (clusters).

[0166] The embodiments of the present disclosure may be implemented as a device that uses any appropriate hardware, firmware, software, or any combination thereof to perform desired configurations, and the device may include electronic devices such as terminal devices and server (cluster). Fig.11 An exemplary device 1000 that can be used to implement various embodiments described in the embodiments of the present application is schematically shown.

[0167] For one embodiment, Fig.11An exemplary apparatus 1000 is shown having one or more processors 1002, a control module (chip set) 1004 coupled to at least one of the (one or more) processors 1002, a memory 1006 coupled to the control module 1004, a non-volatile memory (NVM) / storage device 1008 coupled to the control module 1004, one or more input / output devices 1010 coupled to the control module 1004, and a network interface 1012 coupled to the control module 1004.

[0168] The processor 1002 may include one or more single-core or multi-core processors, and the processor 1002 may include any combination of general-purpose processors or special-purpose processors (such as graphics processors, application processors, baseband processors, etc.). In some embodiments, the device 1000 can be used as a terminal device, a server (cluster), and other devices described in the embodiments of the present application.

[0169] In some embodiments, the apparatus 1000 may include one or more computer-readable media (e.g., memory 1006 or NVM / storage device 1008) having instructions 1014 and one or more processors 1002 combined with the one or more computer-readable media and configured to execute the instructions 1014 to implement a module to perform the actions described in the present disclosure.

[0170] For one embodiment, the control module 1004 may include any suitable interface controller to provide any suitable interface to at least one of the processor(s) 1002 and / or any suitable device or component in communication with the control module 1004 .

[0171] The control module 1004 may include a memory controller module to provide an interface to the memory 1006. The memory controller module may be a hardware module, a software module, and / or a firmware module.

[0172] The memory 1006 may be used, for example, to load and store data and / or instructions 1014 for the device 1000. For one embodiment, the memory 1006 may include any suitable volatile memory, such as a suitable DRAM. In some embodiments, the memory 1006 may include double data rate type four synchronous dynamic random access memory (DDR4 SDRAM).

[0173] For one embodiment, control module 1004 may include one or more input / output controllers to provide an interface to NVM / storage device 1008 and input / output device(s) 1010 .

[0174] For example, NVM / storage 1008 may be used to store data and / or instructions 1014. NVM / storage 1008 may include any suitable non-volatile memory (e.g., flash memory) and / or may include any suitable non-volatile storage device(s) (e.g., one or more hard disk drives (HDDs), one or more compact disk (CD) drives, and / or one or more digital versatile disk (DVD) drives).

[0175] NVM / storage device 1008 may include storage resources that are physically part of the device on which apparatus 1000 is installed, or it may be accessible to the device without being part of the device. For example, NVM / storage device 1008 may be accessed via input / output device(s) 1010 over a network.

[0176] (One or more) input / output devices 1010 may provide an interface for the apparatus 1000 to communicate with any other appropriate device, and the input / output device 1010 may include a communication component, an audio component, a sensor component, etc. The network interface 1012 may provide an interface for the apparatus 1000 to communicate through one or more networks, and the apparatus 1000 may wirelessly communicate with one or more components of a wireless network according to any of one or more wireless network standards and / or protocols, for example, accessing a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G, 5G, etc., or a combination thereof for wireless communication.

[0177] For one embodiment, at least one of the processor(s) 1002 may be packaged together with the logic of one or more controllers (e.g., a memory controller module) of the control module 1004. For one embodiment, at least one of the processor(s) 1002 may be packaged together with the logic of one or more controllers of the control module 1004 to form a system-in-package (SiP). For one embodiment, at least one of the processor(s) 1002 may be integrated on the same die with the logic of one or more controllers of the control module 1004. For one embodiment, at least one of the processor(s) 1002 may be integrated on the same die with the logic of one or more controllers of the control module 1004 to form a system-on-chip (SoC).

[0178] In various embodiments, the device 1000 may be, but is not limited to, a terminal device such as a server, a desktop computing device, or a mobile computing device (e.g., a laptop computing device, a handheld computing device, a tablet computer, a netbook, etc.). In various embodiments, the device 1000 may have more or fewer components and / or different architectures. For example, in some embodiments, the device 1000 includes one or more cameras, a keyboard, a liquid crystal display (LCD) screen (including a touch screen display), a non-volatile memory port, multiple antennas, a graphics chip, an application-specific integrated circuit (ASIC), and a speaker.

[0179] Among them, the main control chip can be used as a processor or control module in the detection device, sensor data, location information, etc. are stored in a memory or NVM / storage device, the sensor group can be used as an input / output device, and the communication interface may include a network interface.

[0180] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0181] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0182] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0183] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0184] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable terminal device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0185] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.

[0186] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device 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 terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0187] The above is a detailed introduction to the training method of a text summary model, the method for obtaining a text summary, the device, the electronic device and the storage medium provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A training method for a text summarization model, characterized in that: include: Acquire a training data set, the training data set comprising: at least one annotated summary sample, the annotated summary sample being associated with at least one related text sample; Acquire at least one key sentence from the annotated summary sample, and acquire similar sentences matching the key sentence from relevant text samples associated with the annotated summary sample; Training an initial text summary model using the correspondence between the key sentences and the similar sentences to obtain a first text summary model; The first text summary model is trained using the correspondence between the annotated summary sample and the related text sample to obtain a second text summary model, wherein the second text summary model is used to generate a summary text according to at least one related text.

2. The method according to claim 1, characterized in that The using the correspondence between the key sentences and the similar sentences to train the initial text summarization model includes: splicing the similar sentences and inputting them into the initial text summary model to obtain the first sentence output by the initial text summary model; The parameters of the initial text summary model are trained according to the key sentence, the first sentence and a preset first loss function.

3. The method according to claim 2, characterized in that The step of splicing the similar sentences and inputting them into the initial text summary model comprises: When the total length of the text after the similar sentences are spliced ​​is less than or equal to a preset input length threshold, the similar sentences are spliced ​​and input into the initial text summary model; When the total length of the text after the similar sentences are concatenated is greater than the preset input length threshold, partial text is intercepted from the text after the similar sentences are concatenated, and the partial text is input into the initial text summary model, and the total length of the partial text is less than or equal to the preset input length threshold.

4. The method according to claim 1, characterized in that: The acquiring at least one key sentence from the annotated summary sample, and acquiring a similar sentence matching the key sentence in a related text sample associated with the annotated summary sample, includes: Acquire at least one key sentence from the annotated summary sample; Calculating text similarity between the key sentence and a second sentence in the relevant text sample; The second sentences are sorted according to the text similarity, and starting from the end with the largest text similarity in the sorting result, at least one second sentence is selected as the similar sentence.

5. The method according to claim 4, characterized in that Also includes: When the total length of the text after splicing similar sentences associated with the key sentence is greater than a preset input length threshold, the number of selected second sentences is reduced until the total length of the text after splicing similar sentences associated with the key sentence is less than or equal to the preset input length threshold.

6. The method according to claim 1, characterized in that The relevant text samples have corresponding annotation probability values; The method of training a first text summary model by using the correspondence between the annotated summary sample and the related text sample includes: splicing the relevant text samples and inputting them into the first text summary model to extract the third sentence from the relevant text samples; Calculate a first probability value that a third sentence in the relevant text sample belongs to the annotated summary sample; The parameters of the first text summarization model are trained according to the annotation probability value, the first probability value and a preset second loss function.

7. The method according to claim 6, characterized in that Also includes: Inputting at least one related text into the second text summary model to obtain a second probability value of a fourth sentence in the related text belonging to the summary text; The fourth sentences are sorted according to the second probability value, and a target fourth sentence is selected from the sorting result to form a summary text.

8. The method according to claim 7, characterized in that The step of selecting a target fourth sentence from the sorting results to form a summary text includes: Selecting a target fourth sentence from the sorting results; The target fourth sentences are sorted according to the magnitude of the second probability values ​​to form the summary text, and the second probability values ​​corresponding to the target fourth sentences are displayed in the summary text.

9. The method according to claim 1, characterized in that: The method of training a first text summary model by using the correspondence between the annotated summary sample and the related text sample includes: Inputting the relevant text sample into the first text summary model, encoding and decoding the text features of the relevant text sample in sequence, and obtaining an output summary text; The parameters of the first text summary model are trained according to the annotated summary sample, the output summary text and a preset third loss function.

10. A method for obtaining a text summary, characterized in that: include: Get at least one text to be processed; The text to be processed is input into a second text summary model to obtain a summary text output by the second text summary model, wherein the second text summary model is trained by the text summary model training method according to any one of claims 1 to 9.

11. A training device for a text summarization model, characterized in that: include: A first acquisition module is used to acquire a training data set, wherein the training data set includes: at least one annotated summary sample, wherein the annotated summary sample is associated with at least one related text sample; A second acquisition module is used to acquire at least one key sentence from the annotated summary sample, and acquire similar sentences matching the key sentence from relevant text samples associated with the annotated summary sample; A first training module, used for training an initial text summary model by using the correspondence between the key sentences and the similar sentences to obtain a first text summary model; The second training module is used to train the first text summary model by using the correspondence between the annotated summary sample and the related text sample to obtain a second text summary model, wherein the second text summary model is used to generate a summary text according to at least one related text.

12. A device for obtaining a text summary, characterized in that: include: A third acquisition module, used to acquire at least one text to be processed; A processing module is used to input the text to be processed into a second text summary model to obtain a summary text output by the second text summary model, wherein the second text summary model is trained by the text summary model training device according to claim 11.

13. An electronic device, characterized in that: include: processor; and A memory having executable codes stored thereon, which, when the executable codes are executed, enable the processor to perform the method according to any one of claims 1 to 10.

14. One or more machine-readable media having executable codes stored thereon, which, when executed, cause a processor to perform the method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Text method and device, electronic equipment and computer readable storage medium

    CN111125301A

  • Abstraction extraction model training method and device, abstract extraction method and device and electronic equipment

    CN112560479A

  • Model training method, text segmentation method, and abstract extraction method and device

    CN113255319A

  • Method of training a descriptive text generating model, and method and apparatus for generating descriptive text

    US20190384810A1