News abstract extraction method and device, equipment, storage medium and product
By combining the news abstract extraction method of the bidirectional coding submodel and the autoregressive decoding submodel, the problems of abstract coherence and context logic loss in the traditional method are solved, the accuracy and adaptability of the news abstract are improved, and efficient summary generation is achieved .
Patent Information
- Application Number
- CN202410966764.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-18
- Publication Date
- 2024-11-15
AI Technical Summary
Traditional news digest extraction methods tend to lose text coherence and contextual logic, resulting in low accuracy of digests.
A target abstract extraction model is used to combine a bidirectional coding sub-model and an autoregressive decoding sub-model to preprocess news text data and generate logically coherent and context-consistent digests.
Improve the accuracy and readability of the extracted text of the news digest, and the generated digest reflects the original text more comprehensively, avoids the limitations of feature selection of traditional methods, can adapt to different types of news texts, and reduces training time and calculations. Resource requirements.
Smart Images

Figure CN118964838A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of natural language processing technology, and in particular to a news summary extraction method, device, equipment, storage medium and product. Background Art
[0002] With the rapid development of the Internet and the advent of the era of information explosion, massive amounts of news data are generated every day. How to quickly obtain key information from these huge amounts of news data has become particularly important. News summary extraction technology helps users quickly understand the core content of the article by automatically generating a brief summary of the news text.
[0003] Traditional extractive news summary extraction methods generate summaries by extracting important sentences or paragraphs from the original text, but they are prone to losing the coherence and contextual logic of the text, resulting in low accuracy of news summary extraction text.
[0004] Therefore, how to improve the accuracy of news summary extraction text is a problem that needs to be solved urgently. Summary of the invention
[0005] The main purpose of this application is to provide a news summary extraction method, device, equipment, storage medium and product, aiming to solve the technical problem of low accuracy of news summary extracted text.
[0006] To achieve the above purpose, the present application proposes a news summary extraction method, which comprises:
[0007] Acquire news text data, and pre-process the news text data to obtain news text data to be processed;
[0008] The news text data to be processed is input into a target summary extraction model to obtain a target news summary, wherein the target summary extraction model is a combination of a bidirectional encoding sub-model and an autoregressive decoding sub-model.
[0009] In one embodiment, the step of acquiring news text data and preprocessing the news text data to obtain news text data to be processed includes:
[0010] removing noise from the news text data and performing data cleaning on the news text data to obtain first optimized data;
[0011] Performing format unification and normalization processing on the first optimized data to obtain second optimized data;
[0012] The second optimized data is segmented and POS tagged to obtain the news text data to be processed.
[0013] In one embodiment, the target summary extraction model includes a bidirectional encoding sub-model and an autoregressive decoding sub-model, and the step of inputting the news text data to be processed into the target summary extraction model to obtain the target news summary includes:
[0014] Inputting the news text data to be processed into the bidirectional encoding sub-model;
[0015] Based on the bidirectional encoding sub-model, the contextual relationship of the news text data to be processed is understood through bidirectional training, and the news text data to be processed is converted into a high-dimensional semantic vector representation according to the contextual relationship;
[0016] Inputting the high-dimensional semantic vector into the autoregressive decoding sub-model;
[0017] Based on the autoregressive decoding sub-model, an initial text is generated by an autoregressive method, and according to the high-dimensional semantic vector representation and the initial text, the target news summary is generated.
[0018] In one embodiment, before the step of acquiring news text data and preprocessing the news text data to obtain the news text data to be processed, the step further includes:
[0019] The summary extraction model to be trained is trained according to the unsupervised text data set to obtain the summary extraction model to be optimized;
[0020] The extraction model to be optimized is trained according to a supervised news summary data set to obtain a target summary extraction model.
[0021] In one embodiment, after the step of inputting the news text data to be processed into the target summary extraction model to obtain the target news summary, the step further includes:
[0022] Evaluate the target news summary according to the scoring index to obtain a quality score of the target news summary;
[0023] If the quality score is lower than the indicator threshold, the target summary extraction model is used as the summary extraction model to be trained, and the step of training the summary extraction model to be trained according to the unsupervised text dataset is returned until a target news summary with a quality score greater than the indicator threshold is obtained.
[0024] In one embodiment, the scoring index includes precision and recall, and the step of evaluating the target news summary according to the scoring index includes:
[0025] Calculating precision based on co-occurring words of a reference summary and the target news summary;
[0026] Calculating a recall rate based on the total number of words in the target news summary and the co-occurring words;
[0027] The target news summary is evaluated according to the precision and the recall.
[0028] In addition, to achieve the above-mentioned purpose, the present application also proposes a news summary extraction device, which includes:
[0029] A text acquisition module, used to acquire news text data and pre-process the news text data to obtain news text data to be processed;
[0030] The summary extraction module is used to input the news text data to be processed into a target summary extraction model to obtain a target news summary. The target summary extraction model is a combination of a bidirectional encoding sub-model and an autoregressive decoding sub-model.
[0031] In addition, to achieve the above-mentioned purpose, the present application also proposes a news summary extraction device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the news summary extraction method described above.
[0032] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the news summary extraction method described above are implemented.
[0033] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the news summary extraction method described above are implemented.
[0034] One or more technical solutions proposed in this application have at least the following technical effects:
[0035] By acquiring news text data and preprocessing the news text data to obtain the news text data to be processed, the accuracy of the model input data can be guaranteed. Furthermore, by inputting the news text data to be processed into the target summary extraction model, the target news summary can be obtained. Among them, the target summary extraction model is composed of a bidirectional encoding sub-model and an autoregressive decoding sub-model. The bidirectional encoding sub-model and the autoregressive decoding sub-model can better capture the key information and details in the original text. The bidirectional encoding sub-model can generate a logically coherent and contextually consistent summary, which improves the accuracy of the news summary extraction text. The autoregressive decoding sub-model can generate innovative summary texts, which increases the adaptability and readability of the summary. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0037] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0038] Figure 1 This is a flow chart of the first embodiment of the news summary extraction method of the present application;
[0039] Figure 2 This is a flow chart of the second embodiment of the news summary extraction method of the present application;
[0040] Figure 3 This is a flow chart of the third embodiment of the news summary extraction method of the present application;
[0041] Figure 4 This is a schematic diagram of the module structure of the news summary extraction device in the embodiment of the present application;
[0042] Figure 5 Schematic diagram of the device structure of the hardware operating environment involved in the news summary extraction method in the embodiment of the present application.
[0043] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0044] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0045] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0046] Since traditional extractive news summary extraction methods often rely on simple rules and features (such as word frequency, sentence position, keywords, etc.), such as the Transformer model, the Transformer model relies on the attention mechanism, that is, the representation of each word is weighted by calculating the weight of the attention of all other words to capture the global dependency. It is understandable that although models like Transformer can process long texts, they are prone to lose the coherence and contextual logic of the text when processing complex texts, resulting in the generated summary being out of context. In addition, although the existing GPT model can generate coherent text, it has certain limitations in the global understanding of long texts. If only a few sentences are selected from the original text, the content of multiple sentences cannot be integrated, which will make the generated summary limited in information and difficult to comprehensively summarize the main points and important details of the original text, resulting in low accuracy of news summary extraction text. Moreover, the extractive summary can only extract and combine existing sentences, and cannot generate new sentences or innovative content, which limits the flexibility and expression of the summary. In addition, both the Transformer model and the GPT model have the problem of requiring a lot of computing resources and being difficult to train and debug.
[0047] Considering the need to combine the above factors to be optimized, the present application provides a solution, obtains news text data, and pre-processes the news text data to obtain the news text data to be processed; inputs the news text data to be processed into the target summary extraction model to obtain the target news summary, and the target summary extraction model is composed of a bidirectional encoding sub-model and an autoregressive decoding sub-model. Through the combination of the bidirectional encoder and the autoregressive decoder, a logically coherent and contextually consistent summary is generated. The generated summary not only covers the main information of the original text, but also maintains the coherence and logic between sentences, making the summary easier to understand and read. In addition, the news summary generated by the method in the present application is not just a simple sentence extraction, but a high-level summary and summary of the original text. The generated summary has a larger amount of information, can more comprehensively reflect the content of the original text, ensure that the user obtains complete important information, avoids the limitations of feature selection in traditional extractive summary methods, and can adapt to different types of news texts. At the same time, by understanding the context, innovative summary texts can be generated, which makes the summary content more novel and rich, can provide more valuable information, and greatly improves the user experience. The method proposed in the present application greatly reduces the training time and computing resource requirements through the transfer learning of the pre-trained model. It can quickly generate high-quality summaries in practical applications and has good practicality and application prospects.
[0048] Based on this, the present application embodiment provides a news summary extraction method, referring to Figure 1 , Figure 1This is a flow chart of the first embodiment of the news summary extraction method of the present application.
[0049] In this embodiment, the news summary extraction method includes steps S10 to S20:
[0050] Step S10, acquiring news text data, and preprocessing the news text data to obtain news text data to be processed.
[0051] It should be noted that an implementation method of step S10 is provided, which is different from the weight, and may have a better effect than the weight difference, or in other words, it is considered from a different angle. From the perspective of user needs, the news text data can be preprocessed according to user needs, and the specific method can be any one or more of data cleaning, word segmentation and part-of-speech tagging, and format unification.
[0052] It should be understood that in order to achieve better implementation effects, the specific implementation methods are given as follows. Step S10 includes: removing noise from news text data and performing data cleaning on the news text data to obtain first optimized data; processing the first optimized data into a unified format and normalization to obtain second optimized data; performing word segmentation and part-of-speech tagging on the second optimized data to obtain news text data to be processed.
[0053] Among them, news text data can be understood as original text data obtained from news websites, databases or other news sources, usually including the title, text, author, release time and other information of news reports. The first optimized data is the news text data after the first optimization process. It can be understood that the second optimized data is based on the first optimization, and then the data is processed in a unified format and normalized. Similarly, the news text data to be processed can be based on the second optimization, and the data is segmented and tagged with parts of speech.
[0054] Exemplarily, remove noise from the data, such as HTML tags, advertising content, repeated text, etc. Process missing data and abnormal data to ensure data quality, then use regular expressions and other text processing techniques to clean it to obtain the first optimized data, then convert the text into a unified format (such as lowercase, remove punctuation), and use the Min-Max normalization method to scale the numerical features (such as time, weather data, holidays, special events, etc.) to the range of [0,1] to obtain the second optimized data, and further use natural language processing tools (such as NLTK, spaCy) for word segmentation and part-of-speech tagging, and encode the segmented data into a format acceptable to the model to complete data preprocessing.
[0055] Step S20, input the news text data to be processed into the target summary extraction model to obtain the target news summary. The target summary extraction model is composed of a bidirectional encoding sub-model and an autoregressive decoding sub-model.
[0056] It should be noted that step S20 includes: inputting the news text data to be processed into the bidirectional encoding sub-model; understanding the contextual relationship of the news text data to be processed through bidirectional training based on the bidirectional encoding sub-model, and converting the news text data to be processed into a high-dimensional semantic vector representation according to the contextual relationship; inputting the high-dimensional semantic vector into the autoregressive decoding sub-model; generating an initial text through autoregression based on the autoregressive decoding sub-model, and generating a target news summary based on the high-dimensional semantic vector representation and the initial text.
[0057] Among them, it should be noted that the target summary extraction model is a machine learning or deep learning model for automatically extracting text summaries. Exemplarily, the model can be a BART (Bidirectional and Auto-Regressive Transformers) model, which is a sequence-to-sequence (seq2seq) model for generative tasks, which is composed of a bidirectional encoding sub-model and an autoregressive decoding sub-model. Exemplarily, the bidirectional encoding sub-model generally refers to an encoder that can process text data from both forward and backward directions, such as the encoder part in BERT (Bidirectional Encoder Representations from Transformers), and the autoregressive decoding sub-model can be a decoder based on sequence-to-sequence (Seq2Seq). The encoder of BART is similar to the BERT model, which understands the contextual relationship of the input text through bidirectional training to capture richer semantic information. The decoder is similar to the GPT model, which generates text by autoregression and gradually generates a coherent and logical summary text based on the contextual information provided by the encoder. The encoder converts the input text into a high-dimensional semantic vector representation, and the decoder gradually generates the target text based on these vectors and the words that have been generated, ensuring that the generated summary text is coherent and accurately reflects the main content of the original text.
[0058] In this embodiment, by acquiring news text data and preprocessing the news text data to obtain the news text data to be processed, the accuracy of the model input data can be guaranteed. Furthermore, by inputting the news text data to be processed into the target summary extraction model, the target news summary can be obtained. Among them, the target summary extraction model is composed of a bidirectional encoding sub-model and an autoregressive decoding sub-model. The bidirectional encoding sub-model and the autoregressive decoding sub-model can better capture the key information and details in the original text. The bidirectional encoding sub-model can generate a logically coherent and contextually consistent summary, which improves the accuracy of the news summary extraction text. The autoregressive decoding sub-model can generate innovative summary texts, which increases the adaptability and readability of the summary.
[0059] Reference Figure 2 , Figure 2 This is a flow chart of the second embodiment of the news summary extraction method of this application. Figure 1 The first embodiment shown is a second embodiment of the news summary extraction method of the present application.
[0060] In the second embodiment, before step S10, the method further includes:
[0061] Step S01, training a summary extraction model to be trained according to an unsupervised text dataset to obtain a summary extraction model to be optimized.
[0062] It should be noted that unsupervised text datasets contain a large amount of unlabeled (i.e., no corresponding summary) news text or other types of text datasets. These data are used to train the model in the unsupervised learning stage to help the model learn the basic representation and features of the text.
[0063] For example, a large-scale unsupervised text dataset (such as Wikipedia, Open News Corpus, etc.) can be prepared, appropriate pre-training parameters (such as learning rate, batch size, number of training rounds, etc.) can be set, and the denoising autoencoder task can be used to pre-train the optimized summary extraction model, so that the model can master basic language modeling and denoising capabilities, that is, master vocabulary, syntax and semantic relationships, and can still generate high-quality output when encountering missing or noisy data. Through pre-training, the model can learn to generate coherent text.
[0064] Step S02: training the extraction model to be optimized according to the supervised news summary data set to obtain the target summary extraction model.
[0065] It should be noted that the supervised news summary dataset contains a large number of labeled news text datasets (that is, each news text corresponds to one or more summaries). These data are used to train the model in the supervised learning stage to help the model learn how to extract summaries from news texts.
[0066] For example, news text data is collected from various news sources (such as news websites, RSS feeds, etc.), ensuring that news of different topics and types are covered, and a large-scale, annotated news summary dataset is prepared, where each piece of data contains the original news text and the corresponding summary. This dataset is used for supervised learning to fine-tune the pre-trained BART model so that it can adapt to the specific task of news summary generation. Through the supervised news summary dataset, the model learns to extract key information from the news text and generate concise and informative summaries.
[0067] During the fine-tuning process, the cross entropy loss function and Adam optimization algorithm can be used, and paired data with original text and corresponding summaries can be used for fine-tuning training to optimize model parameters. The trained BART model can be deployed to the actual application system, receiving news text and generating summaries through the API interface.
[0068] This embodiment trains the summary extraction model to be trained according to the unsupervised text data set to obtain the summary extraction model to be optimized, which ensures the basis for generating high-quality summaries. The extraction model to be optimized is trained according to the supervised news summary data set to obtain the target summary extraction model, ensuring that the generated summary accurately reflects the main content and core information of the original text. The combination of pre-training and fine-tuning enables the BART model to learn common language features from large-scale unsupervised data, while performing task-specific fine-tuning through supervised data sets, and performs well in news summary generation tasks. This two-stage training strategy uses a large amount of unlabeled data to improve the basic capabilities of the model, while achieving task adaptability through a small amount of labeled data, achieving efficient and high-quality summary generation effects.
[0069] Reference Figure 3 , Figure 3 This is a flow chart of the third embodiment of the news summary extraction method of this application. Figure 2 The second embodiment shown provides the third embodiment of the news summary extraction method of the present application.
[0070] In the third embodiment, after step S20, the method further includes:
[0071] Step S30, evaluate the target news summary according to the scoring index to obtain the quality score of the target news summary. If the quality score is lower than the index threshold, the target summary extraction model is used as the summary extraction model to be trained, and return to step S01.
[0072] It should be noted that the scoring index can be used as a quantitative standard or method for evaluating the quality of news summaries. It is understandable that the scoring index can be a single one or a combination of multiple indicators. The quality score can be understood as the score or rating obtained after evaluating the target news summary according to the scoring index. The scoring index can include precision and recall. The step of evaluating the target news summary according to the scoring index includes: calculating the precision based on the co-occurring words of the reference summary and the target news summary; calculating the recall based on the total number of words and the co-occurring words of the target news summary; and evaluating the target news summary according to the precision and recall.
[0073] Exemplarily, after training the model, the ROUGE-1 (Recall-Oriented Understudy for Gisting Evaluation) scoring index is used to evaluate the quality of the generated summary. ROUGE is a set of indicators for evaluating the quality of text summaries and machine translations, and the score is calculated mainly by comparing the generated summary with the reference summary. ROUGE-1 calculates the precision, recall and F1 value of the co-occurring words between the generated summary and the reference summary, where the precision represents the number of correctly matched words in the generated summary divided by the total number of words in the generated summary, the recall represents the number of correctly matched words in the generated summary divided by the total number of words in the reference summary, and the F1 value represents the harmonic mean of the precision and recall. The higher the precision, recall and F1 value, the better the quality of the generated summary. If the three scoring values are low, the quality of the generated summary is low, and the model needs to readjust the parameters for training.
[0074] Among them, the indicator threshold is a standard value used to judge whether the quality of the news summary meets the standard. Exemplarily, the higher the precision, recall rate and F1 value, the better the quality of the generated summary. If the score values of these three items are low, the quality of the generated summary is low, and the model needs to readjust the parameters for training. It can be understood that the indicator threshold includes the precision threshold, the recall threshold and the F1 threshold. The precision threshold is set to a, the recall threshold is set to b, and the F1 threshold is set to c. When the calculated precision is less than a, the recall rate is less than b, and the F1 value is less than c, any one of the three is satisfied, it is considered that the quality of the generated summary is low. At this time, the target summary extraction model is used as the summary extraction model to be trained, and the step of training the summary extraction model to be trained according to the unsupervised text data set is returned until the target news summary with a quality score value greater than the indicator threshold is obtained (the precision, recall rate and F1 value are all higher than the corresponding indicator threshold).
[0075] In this embodiment, the target news summary is evaluated according to the scoring index to obtain the quality score of the target news summary. The target news summary is evaluated by the scoring index, which can objectively and quantitatively reflect the quality of the summary and provide a clear direction for subsequent optimization. If the quality score is lower than the index threshold, the target summary extraction model is used as the summary extraction model to be trained, and the step S01 is returned to continuously optimize the model. This feedback mechanism ensures that the model can continuously adapt to new data and requirements, and improve the accuracy and efficiency of summary generation.
[0076] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the news summary extraction method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0077] This application also provides a news summary extraction device, please refer to Figure 4, the news summary extraction device comprises:
[0078] The text acquisition module 10 is used to acquire news text data and pre-process the news text data to obtain news text data to be processed;
[0079] The summary extraction module 20 is used to input the news text data to be processed into the target summary extraction model to obtain the target news summary. The target summary extraction model is a combination of a bidirectional encoding sub-model and an autoregressive decoding sub-model.
[0080] The news summary extraction device provided by the present application adopts the news summary extraction method in the above embodiment, which can solve the technical problem of low accuracy of news summary extraction text. Compared with the prior art, the beneficial effects of the news summary extraction device provided by the present application are the same as the beneficial effects of the news summary extraction method provided by the above embodiment, and other technical features in the news summary extraction device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0081] The present application provides a news summary extraction device, which 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, and the instructions are executed by the at least one processor so that the at least one processor can execute the news summary extraction method in the above-mentioned embodiment 1.
[0082] Reference below Figure 5 , which shows a schematic diagram of the structure of a news summary extraction device suitable for implementing the embodiment of the present application. The news summary extraction device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The news summary extraction device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0083] like Figure 5As shown, the news summary extraction device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the news summary extraction device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the news summary extraction device to communicate with other devices wirelessly or by wire to exchange data. Figure 5 , a news summary extraction device with various systems is shown, but it should be understood that it is not required to implement or possess all the systems shown. More or fewer systems may be implemented or possessed alternatively.
[0084] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0085] The news summary extraction device provided by the present application adopts the news summary extraction method in the above embodiment, which can solve the technical problem of low accuracy of news summary extraction text. Compared with the prior art, the beneficial effects of the news summary extraction device provided by the present application are the same as the beneficial effects of the news summary extraction method provided by the above embodiment, and other technical features in the news summary extraction device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0086] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0087] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0088] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the news summary extraction method in the above-mentioned embodiment.
[0089] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0090] The computer-readable storage medium may be included in the news summary extraction device; or may exist independently without being assembled into the news summary extraction device.
[0091] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the news summary extraction device, the news summary extraction device: obtains news text data, and preprocesses the news text data to obtain news text data to be processed; inputs the news text data to be processed into a target summary extraction model to obtain a target news summary, and the target summary extraction model is a combination of a bidirectional encoding sub-model and an autoregressive decoding sub-model.
[0092] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0093] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0094] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0095] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned news summary extraction method, and can solve the technical problem of low accuracy of news summary extraction text. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the news summary extraction method provided by the above-mentioned embodiment, and will not be repeated here.
[0096] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned news summary extraction method when executed by a processor.
[0097] The computer program product provided by the present application can solve the technical problem of low accuracy of news summary extraction text. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the news summary extraction method provided by the above embodiment, which will not be repeated here.
[0098] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A news summary extraction method, characterized in that: The method includes: Acquire news text data, and pre-process the news text data to obtain news text data to be processed; The news text data to be processed is input into a target summary extraction model to obtain a target news summary, wherein the target summary extraction model is a combination of a bidirectional encoding sub-model and an autoregressive decoding sub-model.
2. The method according to claim 1, characterized in that The step of obtaining news text data and preprocessing the news text data to obtain news text data to be processed includes: removing noise from the news text data and performing data cleaning on the news text data to obtain first optimized data; Performing format unification and normalization processing on the first optimized data to obtain second optimized data; The second optimized data is segmented and POS tagged to obtain the news text data to be processed.
3. The method according to claim 1, characterized in that The target summary extraction model includes a bidirectional encoding sub-model and an autoregressive decoding sub-model. The step of inputting the news text data to be processed into the target summary extraction model to obtain the target news summary includes: Inputting the news text data to be processed into the bidirectional encoding sub-model; Based on the bidirectional encoding sub-model, the contextual relationship of the news text data to be processed is understood through bidirectional training, and the news text data to be processed is converted into a high-dimensional semantic vector representation according to the contextual relationship; Inputting the high-dimensional semantic vector into the autoregressive decoding sub-model; Based on the autoregressive decoding sub-model, an initial text is generated by an autoregressive method, and according to the high-dimensional semantic vector representation and the initial text, the target news summary is generated.
4. The method according to any one of claims 1 to 3, characterized in that Before the step of obtaining the news text data and preprocessing the news text data to obtain the news text data to be processed, the step further includes: The summary extraction model to be trained is trained according to the unsupervised text data set to obtain the summary extraction model to be optimized; The extraction model to be optimized is trained according to a supervised news summary data set to obtain a target summary extraction model.
5. The method according to claim 4, characterized in that After the step of inputting the news text data to be processed into the target summary extraction model to obtain the target news summary, the method further includes: Evaluate the target news summary according to the scoring index to obtain a quality score of the target news summary; If the quality score is lower than the indicator threshold, the target summary extraction model is used as the summary extraction model to be trained, and the step of training the summary extraction model to be trained according to the unsupervised text dataset is returned until a target news summary with a quality score greater than the indicator threshold is obtained.
6. The method according to claim 5, characterized in that The scoring index includes precision and recall, and the step of evaluating the target news summary according to the scoring index includes: Calculating precision based on co-occurring words of a reference summary and the target news summary; Calculating a recall rate based on the total number of words in the target news summary and the co-occurring words; The target news summary is evaluated according to the precision and the recall.
7. A news summary extraction device, characterized in that: The device comprises: A text acquisition module, used to acquire news text data and pre-process the news text data to obtain news text data to be processed; The summary extraction module is used to input the news text data to be processed into a target summary extraction model to obtain a target news summary. The target summary extraction model is a combination of a bidirectional encoding sub-model and an autoregressive decoding sub-model.
8. A news summary extraction device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the news summary extraction method according to any one of claims 1 to 6.
9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the news summary extraction method according to any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the news summary extraction method according to any one of claims 1 to 6 are implemented.
