Event summary generation methods, summary generation model training methods, devices and equipment

CN115757763BActive Publication Date: 2026-09-01BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211685504.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-27
Publication Date
2026-09-01
Estimated Expiration
2042-12-27

AI Technical Summary

Technical Problem

[0002]随着互联网技术的飞速发展,使得需要处理的事件信息也越来越多,导致了人们从大量事件信息中获取有效的信息更为困难

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115757763B_ABST
    Figure CN115757763B_ABST
Patent Text Reader

Abstract

This disclosure provides a method for generating event summaries, a method for training a summary generation model, an apparatus, and a device, relating to the field of artificial intelligence technology, specifically deep learning and knowledge graphs. The specific implementation involves: acquiring multiple sentences comprising event information; extracting key sentences from the multiple sentences; encoding the text within the key sentences to obtain vector information for each text; and predicting a summary of the event information based on the vector information of each text. This disclosure can improve the accuracy of summarization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of artificial intelligence technology, specifically to the fields of deep learning, knowledge graphs, etc., and particularly to an event summary generation method, a summary generation model training method, apparatus, and device. Background Technology

[0002] With the rapid development of internet technology, the amount of event information that needs to be processed is increasing, making it more difficult for people to extract useful information from a large volume of events. An event typically describes a single event, which can be summarized using a summary of the event information. However, the current main technical method for generating event summaries is to directly use a single sentence from the event information as the summary. Summary of the Invention

[0003] This disclosure provides a method, apparatus, and device for generating event summaries or training a summary generation model.

[0004] According to one aspect of this disclosure, an event summary generation method is provided, comprising:

[0005] Retrieve multiple sentences containing event information;

[0006] Extract the key sentences containing the event information from the multiple sentences;

[0007] The text included in the key sentence is encoded to obtain vector information for each text, and a summary of the event information is predicted based on the vector information of each text.

[0008] According to one aspect of this disclosure, a method for training a summary generation model is provided, comprising:

[0009] Obtain first sample data, which includes source text and target text. The source text includes text obtained by deleting multiple consecutive characters from the text information, and the target text includes the multiple consecutive characters from the text information that have been deleted.

[0010] The preset model is trained based on the source text and the target text to obtain the target model, which is used to generate a summary of the event information based on the key sentences of the event information.

[0011] According to one aspect of this disclosure, an event summary generation apparatus is provided, comprising:

[0012] The first acquisition module is used to acquire multiple sentences including event information;

[0013] An extraction module is used to extract key sentences of the event information from the plurality of sentences;

[0014] The prediction module is used to encode the text included in the key sentence to obtain vector information of each text, and predict a summary of the event information based on the vector information of each text.

[0015] According to one aspect of this disclosure, a summary generation model training apparatus is provided, comprising:

[0016] The first acquisition module is used to acquire first sample data, which includes source text and target text. The source text includes text obtained by deleting multiple consecutive characters from the text information, and the target text includes the multiple consecutive characters from the text information that have been deleted.

[0017] The training module is used to train a preset model based on the source text and the target text to obtain a target model. The target model is used to generate a summary of the event information based on key sentences of the event information.

[0018] According to another aspect of this disclosure, an electronic device is provided, comprising:

[0019] At least one processor; and

[0020] A memory communicatively connected to the at least one processor; wherein,

[0021] The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the event summary generation method or summary generation model training method provided in this disclosure.

[0022] According to another aspect of this disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause the computer to execute the event summary generation method or the summary generation model training method provided in this disclosure.

[0023] According to another aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the event summary generation method or summary generation model training method provided in this disclosure.

[0024] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0025] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:

[0026] Figure 1 This is a flowchart of an event summary generation method provided in this disclosure;

[0027] Figure 2 This is a flowchart of a method for training a summary generation model provided in this publication;

[0028] Figures 3a to 3e This is a structural diagram of the event summary generation apparatus provided in this disclosure;

[0029] Figures 4a to 4b This is a structural diagram of the abstract generation model training device provided in this publication;

[0030] Figure 5 This is a block diagram of an electronic device used to implement embodiments of the present disclosure. Detailed Implementation

[0031] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0032] Please see Figure 1 , Figure 1 This is a flowchart of an event summary generation method provided in this disclosure, such as... Figure 1 As shown, it includes the following steps:

[0033] Step S101: Obtain the event information, which includes multiple sentences.

[0034] The aforementioned event information can be event information from the Internet, such as news event information, or it can be event information sent by receiving electronic devices, or event information provided by receiving users, etc.

[0035] In addition, the aforementioned event information can be text event information, or it can include image event information, video event information, or event information including at least two of the following: text, image, and video.

[0036] The above sentences can be all or part of the sentences included in the above event information.

[0037] The aforementioned acquisition of event information, which includes multiple sentences, can be achieved by segmenting the event information into sentences. Alternatively, in cases involving images or videos, the text content of the event information can be extracted and segmented into sentences to obtain the aforementioned multiple sentences.

[0038] Step S102: Extract the key sentences of the event information from the multiple sentences.

[0039] The key sentences for extracting the event information from the multiple sentences mentioned above can be obtained by scoring each sentence, obtaining a score for each sentence, and extracting the key sentences with higher scores; or, the key sentences can be extracted from the multiple sentences using a key sentence extraction model.

[0040] In some implementations, the aforementioned key sentences may be important sentences in the aforementioned event information that are general or contain important features of the event.

[0041] The key sentence extracted in step S102 can be one or more sentences.

[0042] Step S103: Encode the text included in the key sentence to obtain vector information of each text, and predict the summary of the event information based on the vector information of each text.

[0043] The above-mentioned encoding of the text included in the key sentence can be performed by encoding each text in the key sentence separately to obtain vector information of each text. This vector information can represent the content information, position information, etc. of the corresponding text, and the position information represents the position information in the key sentence.

[0044] The above-mentioned prediction of the event information summary based on the vector information of each character can be achieved by performing a text generation operation based on the vector information of each character to obtain the event information summary. In some embodiments, the above-mentioned key sentences can also be modified, replaced, adjusted, or regenerated to obtain the event information summary.

[0045] The summary generated by the above steps can be one or more sentences.

[0046] In this disclosure, by encoding the text included in the key sentences of the event information and then predicting the summary of the event information based on the vector information of each text, the generated summary can be generated based on the prediction of the key sentences of the event information, thereby improving the accuracy of the summary.

[0047] In this disclosure, the above method is applied to an electronic device that performs all the steps included in the above method. The electronic device may be a server, computer, mobile phone, or other electronic device.

[0048] In one embodiment, encoding the text included in the key sentence to obtain vector information for each text, and predicting a summary of the event information based on the vector information for each text, includes:

[0049] The key sentence is split to obtain the text contained in the key sentence, and the text contained in the key sentence is concatenated in sequence to obtain a concatenated text sequence.

[0050] The concatenated text sequence is encoded to obtain the word vector and position vector of each character, and a summary of the event information is predicted based on the word vector and position vector of each character.

[0051] The aforementioned splitting of the key sentence can be done by dividing it into characters, thus obtaining the text contained in the key sentence.

[0052] The Chinese characters in this publication can also be referred to as words.

[0053] The word vectors mentioned above can represent the content of the text, and the position vectors mentioned above can represent the position of the text in the key sentences.

[0054] The above-mentioned prediction of the event information summary based on the word vector and position vector of each character can be achieved by inputting the word vector and position vector of each character into the decoder in the neural network model, and having the decoder predict the event information summary based on the word vector and position vector of each character.

[0055] In practical applications, the aforementioned key sentences are often redundant, and the connections between the extracted key sentences are abrupt. Therefore, in this embodiment, based on the word vector and position vector of each character in the key sentence, a summary of the event information is predicted, and a summary can be generated to summarize the extracted key sentences, thereby improving the readability of the event summary.

[0056] In one embodiment, a first preset flag exists between any two characters in the concatenated text sequence; encoding the concatenated text sequence to obtain the word vector and position vector of each character, and predicting a summary of the event information based on the word vector and position vector of each character, includes:

[0057] The concatenated text sequence is input into the target model for text prediction to generate a summary of the event information;

[0058] The target model includes an encoder and a decoder. The encoder encodes the concatenated text sequence to obtain word vectors and position vectors for each character. The decoder predicts a summary of the event information based on the word vectors and position vectors of each character.

[0059] The first preset flag mentioned above can be [ATTN].

[0060] The target model mentioned above can be pre-trained and can be a text generation model, such as a transformer model.

[0061] In this embodiment, the concatenated text sequence is encoded by the encoder to obtain the word vector and position vector of each character. Then, the decoder predicts a summary of the event information based on the word vector and position vector of each character. Specifically, the decoder can utilize the vectors of the first preset marker positions in the last layer to decode and generate the summary.

[0062] In this embodiment, the concatenated text sequence corresponding to the key sentence is used as input, so the event can be summarized more comprehensively to generate a summary describing the important features of the event, thereby making the summary more comprehensive.

[0063] In addition, the summary generated by the target model is more coherent and coherent, which can avoid the situation of the summary being incoherent and unclear, and make the generated event summary more fluent.

[0064] It should be noted that, in some embodiments, the above-mentioned event information summary can be generated based on the Unified-Modal Understanding and Generation via Cross-ModalContrastive Learning (UNIMO) method. The input of this method includes the above-mentioned concatenated text sequence, and the output is the above-mentioned event information summary.

[0065] In one embodiment, encoding the text included in the key sentence to obtain vector information for each text, and predicting a summary of the event information based on the vector information for each text, includes:

[0066] The text included in the key sentence is encoded to obtain vector information of each text, and a summary prediction is performed based on the vector information of each text to obtain the first candidate summary of the event information;

[0067] Perform text recognition on the first candidate abstract;

[0068] If the first candidate summary is found to include text of a preset type, the first text of the preset type in the first candidate summary is replaced with a second text to obtain a summary of the event information, wherein the second text is the text of the preset type included in the event information.

[0069] The first candidate abstract can be generated using any one of the above embodiments.

[0070] The above-mentioned text recognition of the first candidate summary can be performed by recognizing each character in the first candidate summary.

[0071] The preset types mentioned above can be pre-defined types such as English, proper nouns, etc.

[0072] The second text mentioned above can be text of the preset type identified in the event information mentioned above.

[0073] When the above-mentioned preset type includes multiple types, the replacement of the first text of the preset type in the above-mentioned first candidate summary with the second text can be the replacement of the first text and the second text in the same type.

[0074] In this embodiment, by replacing the first text of the preset type in the first candidate summary with the second text, errors in generating the preset type of text, such as generating English words, book titles, or work titles, can be avoided during the summary generation process, thereby improving the accuracy of the summary.

[0075] In one embodiment, the proportion of text of a preset language type in the event information is lower than a preset threshold, and the preset language type text includes: text of the preset language type; replacing the first text of the preset language type in the first candidate summary with the second text includes:

[0076] The event information includes a query for a second character that matches the first character in the preset language type of text, and the first character in the first candidate summary is replaced with the second character.

[0077] The preset language type can be English or Chinese. For example, in an event information described in Chinese, the preset language type is English, and in an event information described in English, the preset language type is Chinese.

[0078] In this embodiment, by replacing the first character in the first candidate summary with the second character, errors in generating characters of the preset language type in the summary can be avoided, thereby further improving the accuracy of the summary. For example, if the predicted first candidate summary is "wing is getting married today", but the event information does not contain the English word "wing", but contains the English word "wind", then replacing "wing" with "wind" will result in the final summary "wind is getting married today".

[0079] In some embodiments, the second text may be text determined in the event information by regular expression matching.

[0080] In one embodiment, the preset type of text is a proper noun, where the first text is a first proper noun in the first candidate summary information, and the second text is a second proper noun in the event information that matches the first proper noun.

[0081] Among them, the aforementioned proper nouns can be book titles, work titles, film and television titles, personal names, etc.

[0082] The second proper noun that matches the first proper noun in the above event information can be a proper noun of the same type as the first proper noun in the event information, or a proper noun that is similar to the first proper noun in the event information.

[0083] In this embodiment, the first proper noun in the first candidate abstract can be replaced with the second proper noun, which can avoid errors in the generation of proper nouns in the abstract and further improve the accuracy of the abstract.

[0084] In one embodiment, encoding the text included in the key sentence to obtain vector information for each text, and predicting a summary of the event information based on the vector information for each text, includes:

[0085] The text included in the key sentence is encoded to obtain vector information of each text, and a summary prediction is performed based on the vector information of each text to obtain a second candidate summary of the event information;

[0086] Calculate the similarity between the second candidate summary and the key sentence;

[0087] If the similarity is higher than a preset similarity threshold, the second candidate summary is used as the summary of the event information.

[0088] The calculation of the similarity between the second candidate summary and the key sentence can be performed using a pre-trained text similarity recognition model. In some embodiments, it can also be calculated in other ways, such as calculating the number or proportion of identical characters between the second candidate summary and the key sentence, and then determining the similarity based on that number or proportion.

[0089] The above-mentioned similarity being higher than the preset similarity threshold can be understood as the second candidate summary being similar to the key sentence, or the second candidate summary being related to the key sentence.

[0090] In this embodiment, candidate summaries with a similarity higher than a preset similarity threshold can be used as summaries of event information, which can further improve the accuracy of the summaries.

[0091] In one embodiment, calculating the similarity between the second candidate summary and the key sentence includes:

[0092] Identify whether the second candidate summary is a preset summary, wherein the preset summary is a summary that appears more frequently than a preset frequency threshold in the summary set, and the summary set is a summary set obtained by summarizing multiple event information;

[0093] If the second candidate summary is the preset summary, calculate the similarity between the second candidate summary and the key sentence.

[0094] The aforementioned summary set can be a pre-generated collection of event summaries for multiple event information items in batches. During batch generation, the frequency of event summaries that fail to generate summaries for multiple event information items is often higher than the frequency of normally generated event summaries. For example, if 100 failed summaries for 10,000 event information items are "AAAA", then the summary "AAAA" is determined to be the aforementioned pre-defined summary.

[0095] In this embodiment, when the second candidate summary is a preset summary, the similarity between the second candidate summary and the key sentence can be calculated. Then, when the similarity between the second candidate summary and the key sentence is higher than a preset similarity threshold, the second candidate summary is used as a summary of the event information, thereby improving the accuracy of the summary.

[0096] In one embodiment, encoding the text included in the key sentence to obtain vector information for each text, and predicting the summary of the event information based on the vector information of each text, further includes:

[0097] If the second candidate summary is not the preset summary, the second candidate summary shall be used as the summary of the event information.

[0098] In this embodiment, if the second candidate digest is not a preset digest, the second candidate digest can be directly used as the digest of the event information, thereby saving computational resources.

[0099] In one embodiment, the key sentences for extracting the event information from the plurality of sentences include:

[0100] Each of the multiple sentences is scored to obtain a score for each sentence;

[0101] Select the key sentence from the plurality of sentences whose score information meets the preset score conditions.

[0102] The above score information can be a specific score or a score level.

[0103] The above score information can meet the preset score conditions by either a score or a score level that is higher than a threshold.

[0104] In this embodiment, key sentences whose score information meets preset score conditions can be selected, thereby improving the accuracy of key sentence extraction.

[0105] In one embodiment, the event information can be segmented into sentences, and a marker [CLS] can be added to the beginning of each sentence. The sentences are then concatenated and input into a transformer model. Based on the vectors at each [CLS] position in the last layer of the transformer model, a linear layer is used to score each sentence. Finally, all key sentences with scores higher than a threshold are extracted.

[0106] In one embodiment, the method further includes:

[0107] Obtain the published summary associated with the event information, wherein the published summary is a summary of event information associated with the event information that occurred before the event information, and the published summary is a summary that has already been published on the network;

[0108] Calculate the causal relationship between the event information summary and the published summary, wherein the causal relationship is used to indicate whether the event information summary and the published summary have a preset logical causal relationship;

[0109] When the causal relationship indicates that the summary of the event information and the published summary have a preset logical causal relationship, the summary of the event information is sent to the device corresponding to the published summary.

[0110] The published summary mentioned above can be the most recent published summary. The event information associated with the published summary can be event information from the same region, country, province, person, or brand.

[0111] The aforementioned pre-defined logical causal relationship can be the relationship between the cause of an event and the result of an event, for example: the aforementioned published summary is the cause of the event, while the aforementioned summary of the event information is the result of the event; or, the aforementioned pre-defined logical causal relationship can be the causal relationship of the event response, such as the aforementioned published summary is the event description information, while the aforementioned summary of the event information is the message for handling the event.

[0112] The above calculation of the causal relationship between the event information summary and the published summary can be done by identifying whether the event information summary and the published summary have the above-mentioned preset logical causal relationship.

[0113] In this embodiment, when the causal relationship indicates that the summary of the event information and the published summary have a preset logical causal relationship, the summary of the event information is sent to the device corresponding to the published summary. This allows the published summary and the summary of the event information to be displayed continuously on the same platform or page, improving the continuous readability of multiple summaries. For example, the published summary is displayed at 10:00 AM, stating that an explosion occurred in XXX; the summary of the event information is displayed at 10:30 AM, stating that rescue operations were initiated in XXX.

[0114] In some embodiments, in the absence of the aforementioned preset logical causal relationship, a pre-specified device or a summary of the event information can be sent to transmit the event information.

[0115] In this disclosure, by encoding the text included in the key sentences of the event information and then predicting the summary of the event information based on the vector information of each text, the generated summary can be generated based on the prediction of the key sentences of the event information, thereby improving the accuracy of the summary.

[0116] Please see Figure 2 , Figure 2 This is a flowchart of a summarization generation model training method provided in this disclosure, such as... Figure 2 As shown, it includes the following steps:

[0117] Step S201: Obtain first sample data, which includes source text and target text. The source text includes text obtained by deleting multiple consecutive characters from the text information, and the target text includes the multiple consecutive characters from the text information that have been deleted.

[0118] The first sample data mentioned above can be multiple sample data, each of which includes source text and target text.

[0119] Here, the source text is the input text of the model during training, while the target text is the target text for the input during training.

[0120] The above text information can be a piece of text, or one or more sentences.

[0121] Step S202: Train the preset model based on the source text and the target text to obtain the target model. The target model is used to generate a summary of the event information based on the key sentences of the event information.

[0122] The aforementioned preset model can be a text generation model, such as the transformer model.

[0123] The above-mentioned training of the preset model based on the source text and the target text can be performed by inputting the source text into the preset model to generate and predict text, and updating the parameters of the preset model based on the prediction results and the target file.

[0124] The target model mentioned above can be the model used to predict event information summaries in the above embodiments, which will not be elaborated here.

[0125] In this embodiment, since the source text includes text obtained by deleting multiple consecutive characters from the text information, and the target text includes multiple consecutive characters whose text information has been deleted, the target model can rely more on the information in the source text during the process of predicting the summary, thereby enhancing the correlation between the generated summary and the input text, and thus improving the accuracy of the summary generated by the target model.

[0126] In this disclosure, the above method is applied to an electronic device that performs all the steps included in the above method. The electronic device may be a server, computer, mobile phone, or other electronic device.

[0127] In one embodiment, training the preset model based on the source text and the target text to obtain the target model includes:

[0128] Based on the source text and the target text, a preset model is pre-trained to obtain a candidate model;

[0129] Based on the second sample data, the candidate model is fine-tuned to obtain the target model, wherein the source text included in the second sample data is the information text of the news event information, and the target text included in the second sample data is the title text of the news event information.

[0130] In this embodiment, the training model includes two stages: pre-training and fine-tuning.

[0131] The aforementioned news event information can be found in the news database.

[0132] In this embodiment, the candidate model is fine-tuned using the information text and headline text of the news event, which makes the trained target model more accurate in predicting summaries of news-related event information.

[0133] In one embodiment, the method further includes:

[0134] Obtain a news event information set, which includes information on multiple news events;

[0135] Calculate the relevance score between the information text and the headline text for each news event.

[0136] Extract target news event information from the news event information set whose relevance scores are higher than a preset threshold;

[0137] The second sample data includes source text which is the information text of the target news event information, and target text which is the title text of the target news event information.

[0138] The relevance score between the information text and the title text of the aforementioned news event can be calculated using a pre-trained text similarity recognition model.

[0139] In this embodiment, only target news event information with a relevance score higher than a preset threshold can be used as the second sample data to improve the quality of the training data and thus improve the accuracy of the target model's predicted summary.

[0140] In one embodiment, the target model can be a 12-layer transformer model, which is trained using the cross-entropy loss function, with a learning rate of 5e-5, a batch size of 32, and convergence after approximately 40,000 training steps.

[0141] In this embodiment, since the source text includes text obtained by deleting multiple consecutive characters from the text information, and the target text includes multiple consecutive characters whose text information has been deleted, the accuracy of the summary generated by the target model can be improved.

[0142] Please see Figure 3a , Figure 3a This disclosure provides an event summary generation device, such as... Figure 3a As shown, the event summary generation device 300 includes:

[0143] The first acquisition module 301 is used to acquire multiple sentences included in the event information;

[0144] Extraction module 302 is used to extract key sentences of the event information from the plurality of sentences;

[0145] The prediction module 303 is used to encode the text included in the key sentence to obtain vector information of each text, and predict a summary of the event information based on the vector information of each text.

[0146] In one embodiment, such as Figure 3b As shown, the prediction module 303 includes:

[0147] The splicing unit 3031 is used to split the key sentence to obtain the text contained in the key sentence, and to splice the text contained in the key sentence in sequence to obtain a spliced ​​text sequence.

[0148] The first prediction unit 3032 is used to encode the concatenated text sequence to obtain the word vector and position vector of each character, and predict the summary of the event information based on the word vector and position vector of each character.

[0149] In one embodiment, a first preset marker exists between any two characters in the concatenated text sequence; the first prediction unit 3032 is used for:

[0150] The concatenated text sequence is input into the target model for text prediction to generate a summary of the event information;

[0151] The target model includes an encoder and a decoder. The encoder encodes the concatenated text sequence to obtain word vectors and position vectors for each character. The decoder predicts a summary of the event information based on the word vectors and position vectors of each character.

[0152] In one embodiment, such as Figure 3b As shown, the prediction module 303 includes:

[0153] The second prediction unit 3033 is used to encode the text included in the key sentence to obtain vector information of each text, and to perform summary prediction based on the vector information of each text to obtain a first candidate summary of the event information.

[0154] Recognition unit 3034 is used to perform text recognition on the first candidate summary;

[0155] The replacement unit 3035 is used to replace the first text of the preset type in the first candidate summary with a second text when the first candidate summary is identified to obtain a summary of the event information, wherein the second text is the text of the preset type included in the event information.

[0156] In one embodiment, the proportion of text of a preset language type in the event information is lower than a preset threshold, and the preset language type text includes: text of the preset language type; replacing the first text of the preset language type in the first candidate summary with the second text includes:

[0157] The event information includes a query for a second character that matches the first character in the preset language type of text, and the first character in the first candidate summary is replaced with the second character.

[0158] In one embodiment, the preset type of text is a proper noun, where the first text is a first proper noun in the first candidate summary information, and the second text is a second proper noun in the event information that matches the first proper noun.

[0159] In one embodiment, such as Figure 3d As shown, the prediction module 303 includes:

[0160] The third prediction unit 3036 is used to encode the text included in the key sentence to obtain vector information of each text, and to perform summary prediction based on the vector information of each text to obtain a second candidate summary of the event information.

[0161] The calculation unit 3037 is used to calculate the similarity between the second candidate summary and the key sentence;

[0162] The first determining unit 3038 is used to use the second candidate summary as the summary of the event information when the similarity is higher than a preset similarity threshold.

[0163] In one embodiment, the computing unit 3037 is used for:

[0164] Identify whether the second candidate summary is a preset summary, wherein the preset summary is a summary that appears more frequently than a preset frequency threshold in the summary set, and the summary set is a summary set obtained by summarizing multiple event information;

[0165] If the second candidate summary is the preset summary, calculate the similarity between the second candidate summary and the key sentence.

[0166] In one embodiment, the prediction module 303 further includes:

[0167] The second determining unit 3039 is used to use the second candidate summary as the summary of the event information when the second candidate summary is not the preset summary.

[0168] In one embodiment, the extraction module 302 is used for:

[0169] Each of the multiple sentences is scored to obtain a score for each sentence;

[0170] Select the key sentence from the plurality of sentences whose score information meets the preset score conditions.

[0171] In one embodiment, such as Figure 3e As shown, the device further includes:

[0172] The second acquisition module 304 is used to acquire the published summary associated with the event information. The published summary is a summary of event information associated with the event information and occurring before the event information, and the published summary is a summary that has already been published on the network.

[0173] The calculation module 305 is used to calculate the causal relationship between the summary of the event information and the published summary, wherein the causal relationship is used to indicate whether the summary of the event information and the published summary have a preset logical causal relationship;

[0174] The sending module 306 is configured to send a summary of the event information to the device corresponding to the published summary when the causal relationship indicates that the summary of the event information and the published summary have a preset logical causal relationship.

[0175] The event summary generation apparatus provided in this disclosure can implement all the processes implemented by the event summary generation method provided in this disclosure and achieve the same technical effect. To avoid repetition, it will not be described in detail here.

[0176] Please see Figure 4a , Figure 4a This disclosure provides a training device for a summary generation model, such as... Figure 4a As shown, the summary generation model training device 400 includes:

[0177] The first acquisition module 401 is used to acquire first sample data, the first sample data including source text and target text, wherein the source text includes: text obtained by deleting multiple consecutive characters from the text information, and the target text includes the multiple consecutive characters from the text information that have been deleted;

[0178] Training module 402 is used to train a preset model based on the source text and the target text to obtain a target model. The target model is used to generate a summary of the event information based on key sentences of the event information.

[0179] In one embodiment, the training module 402 is used for:

[0180] Based on the source text and the target text, a preset model is pre-trained to obtain a candidate model;

[0181] Based on the second sample data, the candidate model is fine-tuned to obtain the target model, wherein the source text included in the second sample data is the information text of the news event information, and the target text included in the second sample data is the title text of the news event information.

[0182] In one embodiment, such as Figure 4b The device further includes:

[0183] The second acquisition module 403 is used to acquire a news event information set, which includes multiple news event information;

[0184] The calculation module 404 is used to calculate the relevance score between the information text and the title text of each news event.

[0185] Extraction module 405 is used to extract target news event information in the news event information set whose relevance score is higher than a preset threshold;

[0186] The second sample data includes source text which is the information text of the target news event information, and target text which is the title text of the target news event information.

[0187] The summary generation model training device provided in this disclosure can realize all the processes of the summary generation model training method provided in this disclosure and achieve the same technical effect. To avoid repetition, it will not be described in detail here.

[0188] The acquisition, storage, and application of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0189] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0190] The aforementioned electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to execute the event summary generation method or summary generation model training method provided in this disclosure.

[0191] The aforementioned readable storage medium stores computer instructions, wherein the computer instructions are used to cause the computer to execute the event summary generation method or the summary generation model training method provided in this disclosure.

[0192] The aforementioned computer program product includes a computer program that, when executed by a processor, implements the event summary generation method or summary generation model training method provided in this disclosure.

[0193] Figure 5A schematic block diagram of an example electronic device 500 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0194] like Figure 5 As shown, device 500 includes a computing unit 501, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 502 or a computer program loaded from storage unit 508 into random access memory (RAM) 503. RAM 503 may also store various programs and data required for the operation of device 500. The computing unit 501, ROM 502, and RAM 503 are interconnected via bus 504. Input / output (I / O) interface 505 is also connected to bus 504.

[0195] Multiple components in device 500 are connected to I / O interface 505, including: input unit 506, such as keyboard, mouse, etc.; output unit 507, such as various types of monitors, speakers, etc.; storage unit 508, such as disk, optical disk, etc.; and communication unit 509, such as network card, modem, wireless transceiver, etc. Communication unit 509 allows device 500 to exchange information / data with other devices through computer grids such as the Internet and / or various telecommunications grids.

[0196] The computing unit 501 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 501 performs the various methods and processes described above, such as event summary generation methods or summary generation model training methods. For example, in some embodiments, the event summary generation method or summary generation model training method can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 508. In some embodiments, part or all of the computer program can be loaded and / or installed on device 500 via ROM 502 and / or communication unit 509. When the computer program is loaded into RAM 503 and executed by the computing unit 501, one or more steps of the event summary generation method or summary generation model training method described above can be performed. Alternatively, in other embodiments, the computing unit 501 may be configured in any other suitable manner (e.g., by means of firmware) to perform an event summary generation method or a summary generation model training method.

[0197] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0198] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0199] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0200] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0201] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or grid browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication mesh). Examples of communication meshes include local area networks (LANs), wide area networks (WANs), and the Internet.

[0202] Computer systems can include clients and servers. Clients and servers are generally geographically separated and typically interact through a communication mesh. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.

[0203] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0204] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A method for generating an event summary, comprising: Retrieve multiple sentences containing event information; Extract the key sentences containing the event information from the multiple sentences; The text included in the key sentence is encoded to obtain vector information for each text, and a summary of the event information is predicted based on the vector information of each text. The process of encoding the text included in the key sentence to obtain vector information for each text, and predicting a summary of the event information based on the vector information of each text, includes: The key sentence is split to obtain the text contained in the key sentence, and the text contained in the key sentence is concatenated in sequence to obtain a concatenated text sequence. The concatenated text sequence is encoded to obtain the word vector and position vector of each character, and a summary of the event information is predicted based on the word vector and position vector of each character; a first preset flag exists between any two characters in the concatenated text sequence; or, The text included in the key sentence is encoded to obtain vector information of each text, and a summary prediction is performed based on the vector information of each text to obtain the first candidate summary of the event information; Perform text recognition on the first candidate abstract; If the first candidate summary is found to include text of a preset type, the first text of the preset type in the first candidate summary is replaced with a second text to obtain a summary of the event information, wherein the second text is the text of the preset type included in the event information; or, The text included in the key sentence is encoded to obtain vector information of each text, and a summary prediction is performed based on the vector information of each text to obtain a second candidate summary of the event information; Calculate the similarity between the second candidate summary and the key sentence; If the similarity is higher than a preset similarity threshold, the second candidate summary will be used as the summary of the event information. The method further includes: Obtain the published summary associated with the event information, wherein the published summary is a summary of event information associated with the event information that occurred before the event information, and the published summary is a summary that has already been published on the network; Calculate the causal relationship between the event information summary and the published summary, wherein the causal relationship is used to indicate whether the event information summary and the published summary have a preset logical causal relationship; When the causal relationship indicates that the summary of the event information and the published summary have a preset logical causal relationship, the summary of the event information is sent to the device corresponding to the published summary.

2. The method according to claim 1, wherein encoding the concatenated text sequence to obtain a word vector and a position vector for each character, and predicting a summary of the event information based on the word vector and position vector of each character, comprises: The concatenated text sequence is input into the target model for text prediction to generate a summary of the event information; The target model includes an encoder and a decoder. The encoder encodes the concatenated text sequence to obtain word vectors and position vectors for each character. The decoder predicts a summary of the event information based on the word vectors and position vectors of each character.

3. The method according to claim 1, characterized in that, The proportion of text of a preset language type in the event information is lower than a preset threshold. The preset language type includes text of the preset language type. Replacing the first text of the preset language type in the first candidate summary with the second text includes: The event information includes a query for a second character that matches the first character in the preset language type of text, and the first character in the first candidate summary is replaced with the second character.

4. The method according to claim 1, characterized in that, The preset type of text is: proper noun, where the first text is the first proper noun in the first candidate summary information, and the second text is the second proper noun in the event information that matches the first proper noun.

5. The method according to claim 1, wherein, The calculation of the similarity between the second candidate summary and the key sentence includes: Identify whether the second candidate summary is a preset summary, wherein the preset summary is a summary that appears more frequently than a preset frequency threshold in the summary set, and the summary set is a summary set obtained by summarizing multiple event information; If the second candidate summary is the preset summary, calculate the similarity between the second candidate summary and the key sentence.

6. The method according to claim 5, wherein, The process of encoding the text included in the key sentence to obtain vector information for each text, and predicting the summary of the event information based on the vector information of each text, further includes: If the second candidate summary is not the preset summary, the second candidate summary shall be used as the summary of the event information.

7. The method according to any one of claims 1 to 6, wherein, The key sentences for extracting the event information from the plurality of sentences include: Each of the multiple sentences is scored to obtain a score for each sentence; Select the key sentence from the plurality of sentences whose score information meets the preset score conditions.

8. An event summary generation apparatus, comprising: The first acquisition module is used to acquire multiple sentences including event information; An extraction module is used to extract key sentences of the event information from the plurality of sentences; The prediction module is used to encode the text included in the key sentence to obtain vector information of each text, and predict a summary of the event information based on the vector information of each text. The prediction module includes: The splicing unit is used to split the key sentence to obtain the text contained in the key sentence, and to splice the text contained in the key sentence in sequence to obtain a spliced ​​text sequence. The first prediction unit is used to encode the concatenated text sequence to obtain the word vector and position vector of each character, and to predict the summary of the event information based on the word vector and position vector of each character; wherein, a first preset flag exists between any two characters in the concatenated text sequence; or, The prediction module includes: The second prediction unit is used to encode the text included in the key sentence to obtain vector information of each text, and to perform summary prediction based on the vector information of each text to obtain a first candidate summary of the event information. A recognition unit is used to perform text recognition on the first candidate summary; A replacement unit is configured to, when recognizing that the first candidate summary includes text of a preset type, replace the first text of the preset type in the first candidate summary with a second text to obtain a summary of the event information, wherein the second text is text of the preset type included in the event information; or, The prediction module includes: The third prediction unit is used to encode the text included in the key sentence to obtain vector information of each text, and to perform summary prediction based on the vector information of each text to obtain a second candidate summary of the event information. A calculation unit is used to calculate the similarity between the second candidate summary and the key sentence; The first determining unit is configured to use the second candidate summary as the summary of the event information when the similarity is higher than a preset similarity threshold. The device further includes: The second acquisition module is used to acquire the published summary associated with the event information. The published summary is a summary of event information associated with the event information and occurring before the event information, and the published summary is a summary that has already been published on the network. A calculation module is used to calculate the causal relationship between the summary of the event information and the published summary, wherein the causal relationship is used to indicate whether the summary of the event information and the published summary have a preset logical causal relationship; The sending module is configured to send a summary of the event information to the device corresponding to the published summary when the causal relationship indicates that the summary of the event information and the published summary have a preset logical causal relationship.

9. The apparatus according to claim 8, wherein the first prediction unit is configured to: The concatenated text sequence is input into the target model for text prediction to generate a summary of the event information; in, The target model includes an encoder and a decoder. The encoder is used to encode the concatenated text sequence to obtain the word vector and position vector of each character. The decoder is used to predict a summary of the event information based on the word vector and position vector of each character.

10. The apparatus according to claim 8, characterized in that, The proportion of text of a preset language type in the event information is lower than a preset threshold. The preset language type includes text of the preset language type. Replacing the first text of the preset language type in the first candidate summary with the second text includes: The event information includes a query for a second character that matches the first character in the preset language type of text, and the first character in the first candidate summary is replaced with the second character.

11. The apparatus according to claim 10, characterized in that, The preset type of text is: proper noun, where the first text is the first proper noun in the first candidate summary information, and the second text is the second proper noun in the event information that matches the first proper noun.

12. The apparatus according to claim 8, wherein, The computing unit is used for: Identify whether the second candidate summary is a preset summary, wherein the preset summary is a summary that appears more frequently than a preset frequency threshold in the summary set, and the summary set is a summary set obtained by summarizing multiple event information; If the second candidate summary is the preset summary, calculate the similarity between the second candidate summary and the key sentence.

13. The apparatus according to claim 12, wherein, The prediction module also includes: The second determining unit is configured to use the second candidate summary as the summary of the event information when the second candidate summary is not the preset summary.

14. The apparatus according to any one of claims 8 to 13, wherein, The extraction module is used for: Each of the multiple sentences is scored to obtain a score for each sentence; Select the key sentence from the plurality of sentences whose score information meets the preset score conditions.

15. An electronic device comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.

16. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-7.

17. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-7.

Citation Information

Patent Citations

  • Pre-training language model generation method and device, electronic equipment and storage medium

    CN113705187A