Method and device for generating text summary

By constructing a feature dictionary and a feature disabled list, identifying and preventing feature bounces, the problem of semantic disfluency in the text summary generation model in the existing technology is solved, and the fluency of the text summary is significantly improved.

CN113449096BActive Publication Date: 2024-09-20BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010213291.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-03-24
Publication Date
2024-09-20
Estimated Expiration
2040-03-24

AI Technical Summary

Technical Problem

Existing text summary generation models generate summaries based on word levels, which leads to the problem of semantic influency. In particular, due to the existence of element bounce phenomenon, the generated summaries are semantically incoherent.

Method used

By building a feature dictionary, the elements of the text data are identified, and decoding is performed based on the feature disabled list and the feature dictionary to prevent the occurrence of feature bounce, thus improving the fluency of the summary.

Benefits of technology

It effectively avoids the phenomenon of element rebound, improves the semantic fluency of text summaries, and makes the generated summaries more coherent and readable.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113449096B
    Figure CN113449096B
Patent Text Reader

Abstract

The present invention discloses a method and device for generating text summaries, and relates to the field of computer technology. A specific implementation of the method includes: constructing an element dictionary of text data, the element dictionary describes the correspondence between elements and element words; encoding the text data to obtain a hidden sequence; decoding the hidden sequence based on an element prohibition list and an element dictionary, and adding the short sentences generated by decoding to a summary set, wherein the element prohibition list stores the decoded elements and the corresponding element words are prohibited from being decoded; generating a summary of the text data according to the summary set. This implementation improves the fluency of the generated text summary.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method and device for generating a text summary. Background Art

[0002] Automatic text summarization is a technology that automatically generates short summaries based on detailed text descriptions based on natural language generation technology. Usually, the automatic text summarization model includes an encoder and a decoder. The encoder encodes a detailed description of a text and generates a hidden sequence; the decoder uses the hidden sequence to generate a summary text. When generating a summary, the decoder model uses a language model to ensure the fluency of the generated summary.

[0003] The decoder of the automatic product summary generation model uses a language model to ensure the fluency of the generated summary, but this fluency is at the word level, that is, the words in the generated summary text are fluent, but there is still semantic disfluency. By observing the data, we found that some of the disfluency comes from the bounce description of product elements. Product elements represent different aspects of a product. For example, for a mobile phone, there are usually elements such as "battery", "screen" and "material". When the text describes the element "battery", then describes the element "screen", and then describes the element "battery", the element bounce phenomenon occurs, resulting in semantic disfluency.

[0004] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art:

[0005] Since the existing text summary generation model generates summaries based on words, the language model can only ensure the fluency of the generated summary at the word level, and the phenomenon of semantic fluency will still exist. Summary of the invention

[0006] In view of this, an embodiment of the present invention provides a method and device for generating a text summary, which can identify elements of text data based on an element dictionary, and generate a text summary based on an element anti-bounce mechanism, thereby avoiding the phenomenon of element bounce in the generated text summary, thereby improving the fluency of the generated text summary.

[0007] To achieve the above objective, according to one aspect of an embodiment of the present invention, a method for generating a text summary is provided.

[0008] A method for generating a text summary comprises: constructing an element dictionary of text data, wherein the element dictionary describes the correspondence between elements and element words; encoding the text data to obtain a hidden sequence; decoding the hidden sequence based on an element prohibition list and the element dictionary, and adding a short sentence generated by decoding to a summary set, wherein the element prohibition list stores decoded elements and the corresponding element words are prohibited from being decoded; and generating a summary of the text data according to the summary set.

[0009] Optionally, after adding the short sentence generated by decoding to the summary set, it also includes: obtaining the element corresponding to the short sentence according to the element dictionary, and judging whether the element corresponding to the short sentence is the same as the element corresponding to the previous short sentence of the short sentence; if different, adding the element corresponding to the previous short sentence to the element prohibition list to update the element prohibition list.

[0010] Optionally, acquiring the element corresponding to the short sentence according to the element dictionary includes: acquiring the element word corresponding to the short sentence according to the element dictionary, and then acquiring the element corresponding to the element word.

[0011] Optionally, determining whether the element corresponding to the short sentence is the same as the element corresponding to the previous short sentence of the short sentence comprises: adding the element corresponding to the short sentence to an element history list; and determining whether the element corresponding to the short sentence is the same as the element corresponding to the previous short sentence of the short sentence by comparing the elements in the element history list.

[0012] Optionally, constructing an element dictionary of text data includes: classifying the text data according to content characteristics of the text data; and constructing an element dictionary corresponding to the text data by annotating and learning each type of text data.

[0013] According to another aspect of an embodiment of the present invention, a device for generating a text summary is provided.

[0014] A device for generating a text summary comprises: a dictionary construction module, which is used to construct an element dictionary of text data, wherein the element dictionary describes the corresponding relationship between elements and element words; an encoding module, which is used to encode the text data to obtain a hidden layer sequence; a decoding module, which is used to decode the hidden layer sequence based on an element prohibition list and the element dictionary, and add the short sentences generated by decoding to a summary set, wherein the element prohibition list stores the decoded elements and the corresponding element words are prohibited from being decoded; and a summary generation module, which is used to generate a summary of the text data according to the summary set.

[0015] Optionally, it also includes a list updating module, which is used to: after adding the short sentence generated by decoding to the summary set, obtain the element corresponding to the short sentence according to the element dictionary, and determine whether the element corresponding to the short sentence is the same as the element corresponding to the previous short sentence of the short sentence; if different, add the element corresponding to the previous short sentence to the element prohibition list to update the element prohibition list.

[0016] Optionally, the list updating module is further used to: obtain the element word corresponding to the short sentence according to the element dictionary, and then obtain the element corresponding to the element word.

[0017] Optionally, the list updating module is further used to: add the element corresponding to the short sentence to the element history list; and compare the elements in the element history list to determine whether the element corresponding to the short sentence is the same as the element corresponding to the previous short sentence of the short sentence.

[0018] Optionally, the dictionary construction module is further used to: classify the text data according to the content characteristics of the text data; and construct an element dictionary corresponding to the text data by annotating and learning each type of text data.

[0019] According to yet another aspect of an embodiment of the present invention, an electronic device for generating a text summary is provided.

[0020] An electronic device for generating a text summary includes: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the method for generating a text summary provided by an embodiment of the present invention.

[0021] According to still another aspect of the embodiments of the present invention, a computer readable medium is provided.

[0022] A computer readable medium stores a computer program, which, when executed by a processor, implements a method for generating a text summary provided by an embodiment of the present invention.

[0023] An embodiment of the above invention has the following advantages or beneficial effects: by constructing an element dictionary of text data, the element dictionary describes the correspondence between elements and element words; encoding the text data to obtain a hidden sequence; decoding the hidden sequence based on the element prohibition list and the element dictionary, and adding the short sentences generated by decoding to a summary set, wherein the element prohibition list stores the decoded elements and the corresponding element words are prohibited from being decoded; generating a summary of the text data according to the summary set, identifying the elements of the text data based on the element dictionary, and generating a text summary based on the element anti-bounce mechanism, thereby avoiding the phenomenon of element bounce in the generated text summary, thereby improving the fluency of the generated text summary.

[0024] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0026] Figure 1 is a schematic diagram of main steps of a method for generating a text summary according to an embodiment of the present invention;

[0027] Figure 2 Schematic diagram of the implementation process of generating a text summary according to an embodiment of the present invention;

[0028] Figure 3 is a schematic diagram of main modules of a device for generating a text summary according to an embodiment of the present invention;

[0029] Figure 4 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;

[0030] Figure 5 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0031] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0032] Because in the prior art, when generating text summaries, decoding is mainly based on word coverage, and the generation of repeated words is reduced based on the word coverage mechanism, so the generated summary is fluent between words, but there is still a phenomenon of semantic non-fluidity. The inventors observed and analyzed a large amount of data and found that some non-fluidity comes from the jump back description of text data elements (used to describe different aspects of text data). For example, for an item, it has multiple elements A, B and C, etc. After describing elements A and B, if it jumps back to describe element A again, it will cause semantic non-fluidity. Specifically, for example, for "mobile phone", there are usually elements such as "battery", "screen" and "material". When the text summary describes the element "battery", then describes the element "screen", and then describes the element "battery", that is, the element jumps back, which will cause semantic non-fluidity.

[0033] In order to solve the above-mentioned technical problem of semantic disfluency when generating text summaries, the present invention proposes a method for improving the fluency of text summaries based on a commodity element anti-bounce mechanism. Based on the element dictionary, the elements of text data can be identified; based on the element anti-bounce mechanism, the text summary generated by the decoder can be prevented from having element bounces, thereby improving the fluency of the generated text summary.

[0034] Figure 1 FIG. 1 is a schematic diagram of the main steps of a method for generating a text summary according to an embodiment of the present invention. Figure 1 As shown, the method for generating a text summary according to an embodiment of the present invention mainly includes the following steps S101 to S104.

[0035] Step S101: constructing an element dictionary of text data, wherein the element dictionary describes the correspondence between elements and element words;

[0036] Step S102: Encode the text data to obtain a hidden layer sequence;

[0037] Step S103: decoding the hidden sequence based on the forbidden element list and the element dictionary, and adding the short sentences generated by decoding to the summary set, wherein the forbidden element list stores the decoded elements and the corresponding element words are forbidden to be decoded;

[0038] Step S104: Generate a summary of the text data according to the summary set.

[0039] According to the above steps S101 to S104, the text data can be decoded according to the element dictionary of the text data and the established element prohibition list to generate a summary, so that the generated summary will not have element bounce, thereby improving the fluency of the text summary.

[0040] According to an embodiment of the present invention, when constructing an element dictionary of text data, the following steps may be specifically performed:

[0041] Classify text data according to its content characteristics;

[0042] Each type of text data is labeled and learned to build a feature dictionary corresponding to the text data.

[0043] There are many types of text data, and text data can be classified according to its content characteristics. For example, text data can be classified into poetry, prose, novels, lyrics, etc. according to the subject matter of the text content; for example, text data can be classified into news, finance, technology, sports, entertainment, etc. according to different contents. In one embodiment of the present invention, taking the generation of a summary of a detailed description of a product as an example, the text data can be classified according to different product categories.

[0044] After the text data is classified, each type of text data can be annotated. When annotating, it can generally be done by experts. Given a batch of detailed description text data of commodities, the expert responsible for annotation reads each sentence and marks the elements and element words of the commodities contained therein. Then, the annotated elements and element words are learned to summarize and generate an element dictionary. For example, for the text data "This mobile phone has a long battery life", the element is "battery" and the element word is "battery life", and finally an "element-element word" dictionary is formed. In addition, machine learning can be performed based on the previous expert annotation results and semantic analysis tools to obtain a model for generating an element dictionary, and the model can be used to generate an element dictionary.

[0045] In an embodiment of the present invention, the element dictionary is an "element-element word" dictionary, which describes the correspondence between elements and element words, and each element can have multiple corresponding element words. For example, for the commodity "mobile phone", its elements include "battery", "screen" and "memory", etc.; the element words corresponding to the element "battery" include "power consumption", "power" and "battery life", etc. In an embodiment of the present invention, each commodity can have an average of about 10 elements; and each element can have 30-100 element words. According to the elements and element words corresponding to the commodity, the element dictionary of the commodity can be constructed.

[0046] After obtaining the element dictionary, the text data can be encoded to obtain the hidden layer sequence. When encoding the text data, it is necessary to input a detailed description of the text data {x1, x2, ..., x n}, where each x i (i∈1, 2, ..., n) is a word, which can be obtained by segmenting the detailed description text data through word segmentation tools (such as Stanford Chinese word segmentation tools, etc.). Then, a bidirectional LSTM (Long Short-Term Memory) encoder f is used enc Encode the detailed description text data to generate a hidden layer sequence {h1, h2, ..., h n}. Afterwards, a unidirectional LSTM decoder f dec Using this hidden layer sequence, the target summary is generated word by word through the attention mechanism. The formula is as follows:

[0047] h i =f enc (x i ,h i-1 );

[0048] s t =f dec (s t-1 ,y t-1 ,c t );

[0049]

[0050] α t,i =softmax(e t,i );

[0051] c t =∑ i α t,i h i ;

[0052] P(w)=softmax(W b s t +V b c t );

[0053] Among them, {t1, t2, …, t m} is the decoder hidden sequence, {y1, y2, …, y m} is the target summary, c t is the context vector at time t, u a , W a 、V a , W b and V b is the model parameter matrix, α t,i Describe the vocabulary x in the text data at time t i ’s attention, P(w) is the probability of the decoder generating word w.

[0054] In order to solve the technical problem mentioned above, the present invention provides a method for generating text summaries based on an element anti-bounce mechanism, with the aim of improving the fluency of automatically generated text summaries.

[0055] According to an embodiment of the present invention, when decoding, it is necessary to perform decoding based on a prohibited element list and an element dictionary. Among them, the element words corresponding to the elements stored in the prohibited element list are prohibited from being decoded. The prohibited element list is continuously updated with the decoding process and is initialized to be empty. In one embodiment of the present invention, after adding the short sentence generated by decoding to the summary set, it is also possible to:

[0056] Obtaining elements corresponding to the short sentence according to the element dictionary, and determining whether the elements corresponding to the short sentence are the same as the elements corresponding to the previous short sentence of the short sentence;

[0057] If they are different, the element corresponding to the previous phrase is added to the element prohibition list to update the element prohibition list.

[0058] In this way, when the decoder is decoding and generating a text summary, it can add the described elements to the element forbidden list according to the elements corresponding to the current short sentence, thereby avoiding the situation of element jumping back and improving the fluency of the text summary.

[0059] When the decoder generates a short sentence, it will determine the elements described by the short sentence based on the element dictionary. Specifically, it can obtain the element word corresponding to the short sentence based on the element dictionary, and then obtain the element corresponding to the element word, thereby determining the element corresponding to the short sentence.

[0060] According to another embodiment of the present invention, after obtaining the elements corresponding to the short sentence according to the element dictionary, it is determined whether the elements corresponding to the short sentence are the same as the elements corresponding to the previous short sentence of the short sentence. In specific implementation, the elements corresponding to the short sentence can be added to the element history list; and by comparing the elements in the element history list, it is determined whether the elements corresponding to the short sentence are the same as the elements corresponding to the previous short sentence of the short sentence. The element history list stores the elements that have appeared in the history. By storing the elements corresponding to the short sentence in the element history list, it is convenient to compare the elements corresponding to the current short sentence with the elements corresponding to the previous short sentence of the current short sentence to determine whether the two elements are the same. If they are the same, there is no need to add the elements corresponding to the current short sentence to the element history list; if they are different, it means that the description of the elements corresponding to the previous short sentence has ended, and the elements corresponding to the current short sentence can be added to the element history list.

[0061] In one embodiment of the present invention, the text summary generation model maintains an element history list and an element prohibition list. When the decoder decodes each short sentence, it identifies the element expressed by the short sentence through the element dictionary and adds it to the element history list. When the element is different from the previous element in the element history list, that is, when the previous element description ends, the previous element is added to the element prohibition list. When the decoder continues to decode, the decoded elements in the element prohibition list are saved and the corresponding element words are prohibited from decoding, that is:

[0062] P(w)=0, Features Disables features in the list.

[0063] In a specific embodiment, it is assumed that a summary is to be generated for the detailed description text data of the item "mobile phone", the current element history list is {screen}, and the element forbidden list is empty. The currently generated short sentence is "The shell of this mobile phone is ceramic", and the element "material" corresponding to the element word "ceramic" can be obtained as: "material". First, the short sentence "The shell of this mobile phone is ceramic" is added to the summary set to generate the summary of the text data; then, the element "material" is added to the element history list, and the element history list is updated to {screen, material}; afterwards, since the current element "material" is different from the previous element "screen", the element "screen" is added to the element forbidden list, and the element forbidden list is updated to {screen} at this time, then the element words corresponding to the element "screen", such as "inch", "full screen" and "large screen" are all forced to be set to 0 when calculating the decoding probability. Assuming that the next short sentence generated is "long battery life" and the corresponding element is "battery", then similarly to the above process, the short sentence "long battery life" is added to the summary set to generate the summary of the text data, and the element history list is updated to {screen, material, battery}, and the element disabled list is updated to {screen, material}. Finally, the text summary corresponding to the detailed description text data of the item "mobile phone" can be obtained based on the short sentences in the summary set, and in the generated text summary, there will be no element bounce phenomenon, thereby improving the fluency of the text summary.

[0064] Figure 2 FIG. 1 is a schematic diagram of the implementation process of generating a text summary according to an embodiment of the present invention. Figure 2 As shown, in the embodiment of the present invention, taking the generation of corresponding summaries according to the detailed description texts of different commodities as an example, the implementation process of generating text summaries mainly includes the following steps:

[0065] Step S201: constructing a commodity element dictionary for different commodity categories to record the correspondence between elements and element words;

[0066] Step S202: Encode the detailed description text of the product using a bidirectional LSTM encoder to obtain a hidden layer sequence;

[0067] Step S203: Based on the element dictionary and the element forbidden list, the hidden layer sequence is decoded using a unidirectional LSTM decoder, wherein the element forbidden list stores the decoded elements and the corresponding element words are forbidden to be decoded;

[0068] Step S204: for each short sentence obtained by decoding, the short sentence is added to the summary set for generating a text summary;

[0069] Step S205: Obtain the element corresponding to the short sentence and add it to the element history list;

[0070] Step S206: If the element corresponding to the phrase in the element history list is different from its previous element, the previous element is added to the element prohibition list.

[0071] Figure 3 Schematic diagram of the main modules of the apparatus for generating text summaries according to an embodiment of the present invention. Figure 3 As shown, the apparatus 300 for generating a text summary according to the embodiment of the present invention mainly includes a dictionary construction module 301 , an encoding module 302 , a decoding module 303 and a summary generation module 304 .

[0072] A dictionary construction module 301 is used to construct an element dictionary of text data, wherein the element dictionary describes the correspondence between elements and element words;

[0073] An encoding module 302, used for encoding the text data to obtain a hidden layer sequence;

[0074] A decoding module 303 is used to decode the hidden layer sequence based on the element prohibition list and the element dictionary, and add the short sentences generated by decoding to the summary set, wherein the element prohibition list stores the decoded elements and the corresponding element words are prohibited from being decoded;

[0075] The summary generating module 304 is configured to generate a summary of the text data according to the summary set.

[0076] According to an embodiment of the present invention, the apparatus 300 for generating a text summary may further include a list updating module (not shown in the figure) for:

[0077] After adding the short sentence generated by decoding to the summary set, obtaining the element corresponding to the short sentence according to the element dictionary, and determining whether the element corresponding to the short sentence is the same as the element corresponding to the previous short sentence of the short sentence;

[0078] If they are different, the element corresponding to the previous short sentence is added to the element prohibition list to update the element prohibition list.

[0079] According to another embodiment of the present invention, the list updating module (not shown in the figure) may also be used for:

[0080] The element word corresponding to the short sentence is obtained according to the element dictionary, and then the element corresponding to the element word is obtained.

[0081] According to another embodiment of the present invention, the list updating module (not shown in the figure) may also be used for:

[0082] Adding the element corresponding to the short sentence to the element history list;

[0083] And, by comparing the elements in the element history list, it is determined whether the element corresponding to the short sentence is the same as the element corresponding to the previous short sentence of the short sentence.

[0084] According to yet another embodiment of the present invention, the dictionary building module 301 may also be used for:

[0085] Classify text data according to its content characteristics;

[0086] Each type of text data is labeled and learned to build a feature dictionary corresponding to the text data.

[0087] According to the technical solution of the embodiment of the present invention, by constructing an element dictionary of text data, the element dictionary describes the correspondence between elements and element words; encoding the text data to obtain a hidden sequence; decoding the hidden sequence based on the element prohibition list and the element dictionary, and adding the short sentences generated by decoding to a summary set, wherein the decoded elements are stored in the element prohibition list and the corresponding element words are prohibited from being decoded; generating a summary of the text data according to the summary set, the elements of the text data can be identified based on the element dictionary, and a text summary can be generated based on an element anti-bounce mechanism, thereby avoiding the phenomenon of element bounce in the generated text summary, thereby improving the fluency of the generated text summary.

[0088] Figure 4 An exemplary system architecture 400 is shown to which the method for generating a text summary or the apparatus for generating a text summary according to the embodiments of the present invention can be applied.

[0089] like Figure 4 As shown, system architecture 400 may include terminal devices 401, 402, 403, network 404 and server 405. Network 404 is used to provide a medium for communication links between terminal devices 401, 402, 403 and server 405. Network 404 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0090] Users can use terminal devices 401, 402, 403 to interact with server 405 through network 404 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 401, 402, 403, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).

[0091] The terminal devices 401 , 402 , and 403 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.

[0092] The server 405 may be a server that provides various services, such as a backend management server (only an example) that provides support for shopping websites browsed by users using the terminal devices 401, 402, and 403. The backend management server may analyze and process the received data such as product information query requests, and feed back the processing results (such as target push information, product information - only an example) to the terminal device.

[0093] It should be noted that the method for generating a text summary provided in the embodiment of the present invention is generally executed by the server 405 , and accordingly, the device for generating a text summary is generally disposed in the server 405 .

[0094] It should be understood that Figure 4 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0095] Reference below Figure 5 , which shows a schematic diagram of the structure of a computer system 500 of a terminal device or a server suitable for implementing an embodiment of the present invention. Figure 5 The terminal device or server shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0096] like Figure 5 As shown, the computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage part 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the system 500 are also stored. The CPU 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0097] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed, so that a computer program read therefrom is installed into the storage section 508 as needed.

[0098] In particular, according to the embodiments disclosed in the present invention, 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 invention 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 the network through the communication part 509, and / or installed from the removable medium 511. When the computer program is executed by the central processing unit (CPU) 501, the above-mentioned functions defined in the system of the present invention are executed.

[0099] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, 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 the present invention, a 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, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0100] 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 invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a 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 box can also occur in a different order from the order marked in the accompanying drawings. For example, two 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 box in the block diagram or flow chart, and the combination of the boxes in the block diagram 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.

[0101] The units or modules involved in the embodiments of the present invention may be implemented in software or hardware. The units or modules described may also be provided in a processor, for example, may be described as: a processor including a dictionary construction module, an encoding module, a decoding module, and a summary generation module. The names of these units or modules do not, in certain cases, constitute limitations on the units or modules themselves, for example, the dictionary construction module may also be described as a "module for constructing an element dictionary of text data".

[0102] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes: constructing an element dictionary of text data, the element dictionary describes the correspondence between elements and element words; encoding the text data to obtain a hidden layer sequence; decoding the hidden layer sequence based on the element prohibition list and the element dictionary, and adding the short sentences generated by decoding to a summary set, wherein the element prohibition list stores the decoded elements and the corresponding element words are prohibited from being decoded; generating a summary of the text data according to the summary set.

[0103] According to the technical solution of the embodiment of the present invention, by constructing an element dictionary of text data, the element dictionary describes the correspondence between elements and element words; encoding the text data to obtain a hidden sequence; decoding the hidden sequence based on the element prohibition list and the element dictionary, and adding the short sentences generated by decoding to a summary set, wherein the decoded elements are stored in the element prohibition list and the corresponding element words are prohibited from being decoded; generating a summary of the text data according to the summary set, the elements of the text data can be identified based on the element dictionary, and a text summary can be generated based on an element anti-bounce mechanism, thereby avoiding the phenomenon of element bounce in the generated text summary, thereby improving the fluency of the generated text summary.

[0104] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for generating a text summary, characterized in that: include: Constructing an element dictionary of text data, wherein the element dictionary describes the correspondence between elements and element words; Encoding the text data to obtain a hidden layer sequence; Decoding the hidden sequence based on the element prohibition list and the element dictionary, and adding the short sentences generated by decoding to the summary set, wherein the element prohibition list stores the decoded elements and the corresponding element words are prohibited from being decoded; generating a summary of the text data according to the summary set; Among them, constructing the element dictionary of text data includes: classifying the text data according to the content characteristics of the text data; and constructing the element dictionary corresponding to the text data by marking and learning each type of text data.

2. The method according to claim 1, characterized in that After adding the decoded short sentences to the summary collection, it also includes: Acquire the element corresponding to the short sentence according to the element dictionary, and determine whether the element corresponding to the short sentence is the same as the element corresponding to the previous short sentence of the short sentence; If they are different, the element corresponding to the previous short sentence is added to the element prohibition list to update the element prohibition list.

3. The method according to claim 2, characterized in that Acquiring the element corresponding to the short sentence according to the element dictionary includes: The element word corresponding to the short sentence is obtained according to the element dictionary, and then the element corresponding to the element word is obtained.

4. The method according to claim 2, characterized in that: Determining whether the element corresponding to the short sentence is the same as the element corresponding to the previous short sentence of the short sentence includes: Adding the element corresponding to the short sentence to the element history list; And, by comparing the elements in the element history list, it is determined whether the element corresponding to the short sentence is the same as the element corresponding to the previous short sentence of the short sentence.

5. A device for generating a text summary, characterized in that: include: A dictionary construction module, used to construct an element dictionary of text data, wherein the element dictionary describes the correspondence between elements and element words; An encoding module, used for encoding the text data to obtain a hidden layer sequence; A decoding module, used for decoding the hidden layer sequence based on the element prohibition list and the element dictionary, and adding the short sentences generated by decoding to the summary set, wherein the element prohibition list stores the decoded elements and the corresponding element words are prohibited from being decoded; A summary generation module, used for generating a summary of the text data according to the summary set; The dictionary construction module is also used to classify text data according to the content characteristics of the text data; and to construct an element dictionary corresponding to the text data by marking and learning each type of text data.

6. The device according to claim 5, characterized in that Also includes list update modules for: After adding the short sentence generated by decoding to the summary set, obtaining the element corresponding to the short sentence according to the element dictionary, and determining whether the element corresponding to the short sentence is the same as the element corresponding to the previous short sentence of the short sentence; If they are different, the element corresponding to the previous short sentence is added to the element prohibition list to update the element prohibition list.

7. The device according to claim 6, characterized in that The list updating module is also used for: The element word corresponding to the short sentence is obtained according to the element dictionary, and then the element corresponding to the element word is obtained.

8. An electronic device for generating a text summary, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 4.

9. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.