Abstract generation method, device and electronic device

By constructing a professional field corpus and using seq2seq and attention models, a more professional summary is generated, which solves the problem of low accuracy of summary of professional field articles in the existing technology and improves the accuracy of the summary.

CN112883711BActive Publication Date: 2024-09-24BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202110100459.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-25
Publication Date
2024-09-24
Estimated Expiration
2041-01-25

AI Technical Summary

Technical Problem

Existing summary generation methods have low accuracy in generating summaries in articles in professional fields, especially when keyword frequency cannot accurately describe the weight of words in professional fields and the proportion of effective content in text expressions is small.

Method used

By pre-building a corpus of specified professional fields, the documents to be processed are converted into input vectors, and the pre-trained seq2seq model and attention model are used to generate summaries. Word vector features and specified text information features are used to improve the professionalism of the summaries.

Benefits of technology

It improves the accuracy of summary generation for articles in professional fields and alleviates the problem of low accuracy when summaries generated based on vocabulary frequency are less professional and effective text expressions account for less content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112883711B
    Figure CN112883711B
Patent Text Reader

Abstract

The present invention provides a method, device and electronic device for generating a summary, and relates to the field of data processing technology. The method includes preprocessing a document to be processed; converting the preprocessed document to be processed into an input vector according to a pre-constructed corpus of the specified professional field; inputting the input vector into a pre-trained summary model to obtain an output vector; and converting the output vector into a summary of the document to be processed according to the corpus. The embodiment of the present invention pre-establishes a corpus of a specified professional field to convert the document to be processed in the specified professional field into an input vector, so that the corpus carries the characteristic information of the specified professional field, and the summary generated based on the input vector is more professional, thereby improving the accuracy of the summary generation of the article in the specified professional field, and alleviating the problem that the summary generated based on the vocabulary frequency is less professional, and the summary generated when the proportion of the effective text expression content is less accurate is less.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] Automatic summarization technology is to summarize the main idea of ​​the entire article with some concise words, so that users can understand the meaning of the original article through the summary content. At present, there are many methods for summarization, which mainly rely on the following technologies:

[0003] One of them is the TF-IDF (Term Frequency–Inverse Document Frequency) word frequency weighting technology. When using this method to generate summaries, the frequency of keywords is used to weight the words, and the semantic paragraphs of the word context are obtained based on the weighted content to generate summaries. The disadvantage of this method is that the frequency of keywords cannot accurately describe the weight of words in professional fields. When applied to the generation of summaries in professional fields, the generated summaries are often less professional.

[0004] Another is the TextSum technology. For example, in the research in Google Tensorflow, the TextSum algorithm is used, that is, Seq2Seq+Attention. This method is currently a relatively advanced neural network summary generation method, but this method has low accuracy in generating summaries when the article is too complex in professional fields, the paragraphs are long, and the proportion of effective content in the text description is small.

[0005] In general, the existing summary generation methods have low summary extraction accuracy when it is necessary to generate summaries for professional articles in a specific field. Summary of the invention

[0006] In view of this, an object of the present invention is to provide a method, device and electronic device for generating a summary, which can improve the accuracy of generating summaries for articles in professional fields.

[0007] In a first aspect, an embodiment of the present invention provides a method for generating a summary, comprising: preprocessing a document to be processed; wherein the document to be processed belongs to a specified professional field; converting the preprocessed document to be processed into an input vector based on a pre-constructed corpus of the specified professional field; wherein the corpus includes original corpus of the specified professional field and feature vectors corresponding to each original corpus; inputting the input vector into a pre-trained summary model to obtain an output vector; and converting the output vector into a summary of the document to be processed based on the corpus.

[0008] In an optional embodiment of the present invention, the above-mentioned feature vector includes the word vector features of the original corpus and the information features of specified text information in the original corpus; wherein the specified text information includes at least one of proper nouns, exception codes, status codes and uniform resource locators.

[0009] In an optional embodiment of the present invention, the above-mentioned corpus is established in the following manner: obtaining the original corpus of the specified professional field; performing word segmentation processing on the original corpus to obtain multiple word units; determining whether the original corpus contains specified text information; if so, extracting the specified text information; generating a feature vector of the original corpus based on the word unit and the specified text information; and constructing a corpus of the specified professional field based on the original corpus and the feature vector.

[0010] In an optional embodiment of the present invention, the above-mentioned step of generating a feature vector of the original corpus based on the word unit and the specified text information includes: vectorizing the word unit and the specified text information to obtain a first vector and a second vector of the original corpus, respectively; and generating a feature vector of the original corpus based on the first vector and the second vector.

[0011] In an optional embodiment of the present invention, the summary model includes a seq2seq model and an attention model; wherein the encoding model in the attention model adopts a one-hot encoding model, and the decoding model in the attention model adopts a feedforward neural network FFN+Softmax layer model.

[0012] In an optional embodiment of the present invention, the step of inputting the input vector into a pre-trained summary model to obtain an output vector includes: encoding the input vector based on a preset one-hot encoding model to obtain an intermediate vector; decoding the intermediate vector based on a preset feedforward neural network FFN+Softmax layer model to obtain an output element of the output vector; generating the next adjacent output element of the currently generated output element according to the currently generated output element and the summary model, until all output elements of the output vector are generated; and obtaining the output vector according to all the generated output elements.

[0013] In an optional embodiment of the present invention, the above step of preprocessing the document to be processed includes: performing sentence and / or word segmentation processing on the document to be processed.

[0014] In a second aspect, an embodiment of the present invention further provides a device for generating a summary, comprising: a preprocessing module, used to preprocess a document to be processed; wherein the document to be processed belongs to a specified professional field; an input vector module, used to convert the preprocessed document to be processed into an input vector based on a pre-constructed corpus of the specified professional field; wherein the corpus includes the original corpus of the specified professional field and the feature vectors corresponding to each of the original corpus; an output vector module, used to input the input vector into a pre-trained summary model to obtain an output vector; and a summary generation module, used to convert the output vector into a summary of the document to be processed based on the corpus.

[0015] In a third aspect, an embodiment of the present invention further provides an electronic device, which includes a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the above-mentioned summary generation method.

[0016] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the above-mentioned summary generation method.

[0017] The embodiments of the present invention bring the following beneficial effects:

[0018] The embodiment of the present invention provides a method, device and electronic device for generating a summary, which pre-processes a document to be processed; wherein the document to be processed belongs to a specified professional field; according to a pre-constructed corpus of the specified professional field, the pre-processed document to be processed is converted into an input vector; wherein the corpus includes the original corpus of the specified professional field and the feature vector corresponding to each of the original corpus; the input vector is input into a pre-trained summary model to obtain an output vector; and the output vector is converted into a summary of the document to be processed according to the corpus. In this method, a corpus of a specified professional field is pre-established to convert the document to be processed in the specified professional field into an input vector so that it carries the feature information of the specified professional field, and the summary generated based on the input vector is more professional, thereby improving the accuracy of the summary generation of the article in the specified professional field, and alleviating the problem that the summary generated based on the frequency of words is less professional, and the summary generated when the proportion of the effective text expression content is less accurate is less.

[0019] Other features and advantages of the present disclosure will be set forth in the following description, or some features and advantages may be inferred or unambiguously determined from the description, or may be learned by implementing the above-mentioned technology of the present disclosure.

[0020] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0022] Figure 1 A schematic diagram of a process for generating a summary provided by an embodiment of the present invention;

[0023] Figure 2 A schematic diagram of a process for establishing a professional domain corpus provided by an embodiment of the present invention;

[0024] Figure 3 A schematic diagram of the structure of a device for generating a summary provided by an embodiment of the present invention;

[0025] Figure 4 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention.

[0026] Icon: 41 - preprocessing module; 42 - input vector module; 43 - output vector module; 44 - summary generation module; 51 - processor; 52 - memory; 53 - bus; 54 - communication interface. DETAILED DESCRIPTION

[0027] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0028] Considering the problem that the existing summary generation methods have low summary extraction accuracy when it is necessary to generate summaries for professional articles in a specific field, the present application provides a summary generation method, device and electronic device, which can be applied to the scenario of extracting summaries from professional documents. To facilitate understanding of this embodiment, a summary generation method disclosed in an embodiment of the present invention is first introduced in detail.

[0029] See also Figure 1 , which is a flowchart of a method for generating a summary. Figure 1It can be seen that the method comprises the following steps:

[0030] Step S102: pre-processing the document to be processed; wherein the document to be processed belongs to a specified professional field.

[0031] Here, the above-mentioned documents to be processed can be Word documents, TXT documents, PDF documents, PPT documents or documents in other formats, and the above-mentioned designated professional fields can be cutting-edge technology fields such as big data, machine learning, artificial intelligence, blockchain, etc., or academic professional fields such as geophysics and biomedicine, without any limitation here.

[0032] Among them, the preprocessing of the document to be processed can be sentence and / or word segmentation processing of the document to be processed, wherein word segmentation is the basis of natural language processing, and the accuracy of word segmentation directly determines the quality of subsequent part-of-speech tagging, syntactic analysis, word vector and text analysis. Since English sentences use spaces to separate words, except for some specific words such as howmany, New York, etc., in most cases, there is no need to consider word segmentation; but Chinese is different, there is a natural lack of separators, and readers need to segment words and sentences by themselves. Therefore, when doing Chinese natural language processing, it is often necessary to preprocess the document by word segmentation.

[0033] Step S104: converting the preprocessed document to be processed into an input vector according to a pre-constructed corpus of the designated professional field; wherein the corpus includes the original corpus of the designated professional field and each feature vector corresponding to the original corpus.

[0034] In this embodiment, the corpus is different from a conventional corpus because the corpus is a pre-built corpus for the specified professional field, and the corpus in the corpus has more abundant, complete and perfect original corpus in the specified professional field, and each original corpus corresponds to a feature vector reflecting its characteristics. Therefore, when the document to be processed after sentence segmentation is transformed according to the corpus to obtain the corresponding input vector, the generated input vector also carries the feature information of the above original corpus.

[0035] In one possible implementation, assuming that the feature vector includes the word vector features of the original corpus and the information features of the specified text information in the original corpus, then accordingly, the input vector obtained based on the corpus transformation also includes the word vector features and the information features of the specified text information. Here, the specified text information includes at least one of a proper noun, an exception code, a status code, and a uniform resource locator. Among them, the information features of the specified text information can be a vector generated based on the specified text. And, the word vector features can be the features of the vector calculated based on the vocabulary in the original corpus.

[0036] Here, assume that a certain original corpus is an article titled "Artificial Intelligence Telephone Robot Error Code Encyclopedia", which includes a variety of error codes, the corresponding meaning of each error code, and its possible causes. Here, assuming that the error code belongs to the specified text information, when generating a feature vector corresponding to the original corpus, a word vector can be generated based on the natural vocabulary in the article, and a corresponding vector can be generated based on the error code therein, thereby jointly constituting the feature vector of the original corpus. In this way, the feature vector of the original corpus contains both the word vector features and the information features of the specified text information. In the above scenario, the converted input vector will carry the word vector features of the above original corpus and the information features of the specified text information.

[0037] Step S106: input the input vector into a pre-trained summary model to obtain an output vector.

[0038] The summary model can be obtained by machine learning. In one possible implementation, the summary model includes a seq2seq (sequence-to-sequence) model and an attention model; wherein the encoding model in the attention model adopts a one-hot encoding model, and the decoding model in the attention model adopts a feedforward neural network FFN (Feedforward Neural Network) + Softmax layer model.

[0039] Here, the seq2seq model is an encoder-decoder network. Its input is a sequence and its output is also a sequence. The encoding model / encoder (encoder) converts a variable-length signal sequence into a fixed-length vector expression, and the decoding model / decoder (decoder) converts this fixed-length vector expression into a variable-length target signal sequence.

[0040] In addition, the above-mentioned attention mechanism is also called the attention mechanism, which has a huge improvement effect on sequence learning tasks. In the codec framework, the attention mechanism is added in the encoding stage to perform data weighted transformation on the source data sequence, and the accuracy of the model is improved by increasing the attention (weight) allocation to the input data and increasing the weight of the dimension containing important information. In this way, by introducing the attention mechanism, when training the summary model, the weight of professional vocabulary in the specified professional field can be increased, so that when extracting summaries based on the summary model, a more professional summary can be generated.

[0041] In one embodiment, assuming that the structure of a certain summary model M is a seq2seq model + attention model, first, the encoding model in the attention mechanism attention model encodes the input sentence with an LSTM (Long Short-Term Memory) network; then the pre-trained word2vec word vector is used for initialization in the word embedding part, and the segmented words are mapped to another space. The output of this part is the encoded semantic vector; wherein, the semantic vector is obtained by weighting the hidden state at each moment, and the weight is calculated by the Attention mechanism. Thus, the information feature of the specified text information is carried in the input vector of the summary model, so that the summary generated based on the input vector is more professional.

[0042] Furthermore, in the decoding stage, the Attention weight at each moment is obtained by multiplying the hidden state at the previous moment with the hidden state at each moment in the encoding stage and performing a softmax transformation.

[0043] In one possible implementation manner, the output vector can be obtained through the following steps 11-14:

[0044] (11) Encode the input vector based on a preset one-hot encoding model to obtain an intermediate vector;

[0045] (12) decoding the intermediate vector based on a preset feed-forward neural network FFN+Softmax layer model to obtain an output element of the output vector;

[0046] (13) generating the next adjacent output element of the currently generated output element according to the currently generated output element and the summary model, until all output elements of the output vector are generated;

[0047] (14) Obtain the output vector based on all the generated output elements.

[0048] For example, suppose that the input vector obtained through the aforementioned steps S102 to S104 is [x1, x2, ...x n ], and use it as the input of the summary model, where the one-hot encoding model learns the input vector [x1, x2, …x n ], encode it into an intermediate vector of fixed size, and then pass the intermediate vector to the decoding model (feedforward neural network FFN+Softmax layer model), and the decoding model decodes by learning the intermediate vector to obtain the output [y1, y2, ...y m ].

[0049] Specifically, if the input vector [x1, x2, ...x n ] is input into the trained summary model, the input vector is encoded according to the one-hot encoding model to obtain an intermediate vector, and then the intermediate vector is transmitted to the FFN+Softmax decoding model, which decodes the received intermediate vector and generates an output element y of the output vector accordingly. j , and further based on the output element y j and the above summary model generates the output element y j The next adjacent output element y j+1 , similarly, according to the output element y j+1 and the summary model generates the output element y j+1 The next adjacent output element y j+2 , until all the output elements of the output vector are generated, and finally the output vector [y1, y2, …y m ].

[0050] Step S108: converting the output vector into a summary of the document to be processed according to the corpus.

[0051] Here, the output vector is mapped to corresponding word vocabulary according to the corpus, and then converted into several sentences according to these word vocabulary, and the summary of the document to be processed is generated according to these sentences.

[0052] A method for generating a summary provided by an embodiment of the present invention pre-processes a document to be processed; wherein the document to be processed belongs to a specified professional field; according to a pre-constructed corpus of the specified professional field, the pre-processed document to be processed is converted into an input vector; wherein the corpus includes the original corpus of the specified professional field and the feature vector corresponding to each of the original corpus; the input vector is input into a pre-trained summary model to obtain an output vector; and the output vector is converted into a summary of the document to be processed according to the corpus. In this method, a corpus of a specified professional field is pre-established to convert the document to be processed in the specified professional field into an input vector so that it carries the feature information of the specified professional field, and the summary generated based on the input vector is more professional, thereby improving the accuracy of the summary generation of the article in the specified professional field, and alleviating the problem that the summary generated based on the frequency of words is less professional, and the summary generated when the proportion of the effective text expression content is less accurate is less.

[0053] exist Figure 1 Based on the method of generating abstracts shown in FIG. 1 , this embodiment further describes the process of constructing the corpus in the above-mentioned specified professional field. Figure 2 , which is a flowchart of a method for establishing a professional domain corpus. Figure 2 It can be seen that the method includes the following steps:

[0054] S202: Acquire the original corpus of the specified professional field.

[0055] Here, in one possible implementation, the original corpus of the target domain can be obtained from a preset external information system and the domain application of the target domain. For example, the external information system may include: a question-and-answer system (Answer&Question), a Wiki system, a Chinese Software Developer Network (CSDN), user interaction information (Message), and a trend (Tendency) in the target domain. In addition, the domain application of the target domain can be an application scenario such as Hadoop, Hive, Spark, etc.; it can also be very targeted information in the issue system (Issue system), for example, information with system problems as the core, where the Issue System is a system that records system bugs and upgrades; it can also be source code (Source Code), documents (Document), application programming interface description (Application Programming Interface, API) and release version (Release), etc.

[0056] Taking the acquisition of original corpus from the Issue System as an example, in this system, each ISSUE-ID corresponds to the issue title (Title), issue description (Description), issue activity (Activity), issue type (Type), issue importance level, whether the issue has been resolved, etc. Among them, according to the issue title, issue description and issue activity, the type and importance of the issue can be judged, and then marked accordingly. Therefore, this part of the corpus in the Issue System can be obtained in a targeted manner.

[0057] S204: Perform word segmentation on the original corpus to obtain multiple word units.

[0058] Word segmentation is the process of recombining continuous character sequences into word sequences according to certain specifications. The original corpus can be in Chinese, English or other languages. Taking the original corpus as Chinese data as an example, the word segmentation method can be to segment Chinese words based on the Hidden Markov Model (HMM); or it can be segmented by the N-gram bidirectional maximum matching method, that is, the forward maximum matching algorithm and the reverse maximum matching algorithm in the word segmentation method based on the string, for the different parts of the sequence results obtained by matching in the two directions, the Bi-gram model is used to calculate the parts with higher probability, and then splice to obtain the best word sequence. In other possible implementations, the original corpus can also be segmented by other possible methods, which are not limited here.

[0059] S206: Determine whether the original corpus contains specified text information.

[0060] S208: If yes, extract the specified text information.

[0061] If the original corpus contains the designated text information, the designated text information is extracted; if the original corpus does not contain the designated text information, a feature vector of the original corpus is generated according to word units obtained by word segmentation.

[0062] S210: Generate a feature vector of the original corpus according to the word unit and the specified text information.

[0063] In this embodiment, the feature vector of the original corpus is generated through the following steps 21-22:

[0064] (21) Vectorize the word unit and the specified text information to obtain a first vector and a second vector of the original corpus, respectively.

[0065] Here, the word unit and the specified text information can be vectorized respectively using the word2vec model to obtain a first vector and a second vector of the original corpus.

[0066] (22) Generate a feature vector of the original corpus based on the first vector and the second vector.

[0067] The second vector can be concatenated to the end of the first vector to obtain the feature vector of the original corpus. For example, suppose the first vector obtained by vectorizing the word unit is And, the second vector obtained according to the specified text information is {1,1,0,1}; thus, the vector obtained by splicing the second vector to the end of the first vector is That is, the feature vector of the original corpus is

[0068] In other possible implementations, the first vector and the second vector may be fused or concatenated in other ways to obtain the feature vector of the original corpus, which is not limited here.

[0069] S212: Constructing a corpus of the designated professional field according to the original corpus and the feature vector.

[0070] The original corpus and its corresponding feature vector are associated, and a corpus of the target domain is constructed based on the associated original corpus and feature vector.

[0071] In this way, through the above steps S202 to S212, a corpus of the specified professional field can be constructed, and then based on the corpus, the documents to be processed in the specified professional field can be converted into input vectors so that they carry specific feature information of the specified professional field, thereby generating a more professional and accurate summary that is more in line with the specified professional field.

[0072] The method for generating a summary provided in the embodiment of the present invention has the same technical features as the method provided in the above embodiment, and can therefore solve the same technical problems and achieve the same technical effects.

[0073] Corresponds to Figure 1 The method for generating a summary shown in , the embodiment of the present invention also provides a device for generating a summary, such as Figure 3 As shown, it is a structural schematic diagram of a device for generating a summary, which consists of Figure 3 It can be seen that the device includes a pre-processing module 31, an input vector module 32, an output vector module 33 and a summary generation module 34 connected in sequence, wherein the functions of each module are as follows:

[0074] A preprocessing module 31 is used to preprocess the document to be processed; wherein the document to be processed belongs to a specified professional field;

[0075] An input vector module 32 is used to convert the pre-processed document to be processed into an input vector according to a pre-built corpus of the specified professional field; wherein the corpus includes the original corpus of the specified professional field and the feature vector corresponding to each of the original corpus;

[0076] An output vector module 33, used for inputting the input vector into a pre-trained summary model to obtain an output vector;

[0077] The summary generation module 34 is used to convert the output vector into a summary of the document to be processed according to the corpus.

[0078] In one possible implementation, the feature vector includes word vector features of the original corpus and information features of specified text information in the original corpus; wherein the specified text information includes at least one of proper nouns, exception codes, status codes and uniform resource locators.

[0079] In another possible implementation, the corpus is established in the following manner: obtaining original corpus of the specified professional field; performing word segmentation on the original corpus to obtain a plurality of word units; determining whether the original corpus contains specified text information; if so, extracting the specified text information; generating a feature vector of the original corpus based on the word unit and the specified text information; and constructing a corpus of the specified professional field based on the original corpus and the feature vector.

[0080] In another possible implementation, the step of generating the feature vector of the original corpus based on the word unit and the designated text information includes: vectorizing the word unit and the designated text information to obtain a first vector and a second vector of the original corpus, respectively; and generating the feature vector of the original corpus based on the first vector and the second vector.

[0081] In another possible implementation, the summary model includes a seq2seq model and an attention model; wherein the encoding model in the attention model adopts a one-hot encoding model, and the decoding model in the attention model adopts a feedforward neural network FFN+Softmax layer model.

[0082] In another possible implementation, the output vector module 33 is further used to: encode the input vector based on a preset one-hot encoding model to obtain an intermediate vector; decode the intermediate vector based on a preset feedforward neural network FFN+Softmax layer model to obtain an output element of the output vector; generate the next adjacent output element of the currently generated output element according to the currently generated output element and the summary model, until all output elements of the output vector are generated; and obtain the output vector according to all the generated output elements.

[0083] In another possible implementation, the preprocessing module 31 is further used to perform sentence and / or word segmentation processing on the document to be processed.

[0084] The implementation principle and technical effects of the device for generating a summary provided in the embodiment of the present invention are the same as those of the aforementioned method for generating a summary in the embodiment. For the sake of brief description, for matters not mentioned in the embodiment of the device for generating a summary, reference may be made to the corresponding contents in the aforementioned method for generating a summary in the embodiment.

[0085] The embodiment of the present invention further provides an electronic device, such as Figure 4 As shown, it is a schematic diagram of the structure of the electronic device, wherein the electronic device includes a processor 41 and a memory 42, the memory 42 stores machine executable instructions that can be executed by the processor 41, and the processor 41 executes the machine executable instructions to implement the above-mentioned summary generation method.

[0086] exist Figure 4 In the illustrated embodiment, the electronic device further includes a bus 43 and a communication interface 44 , wherein the processor 41 , the communication interface 44 and the memory 42 are connected via the bus.

[0087] The memory 42 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 44 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used. The bus may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0088] The processor 41 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the processor 41 or the instruction in the form of software. The above processor 41 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiment of the present invention can be directly embodied as a hardware decoding processor to be executed, or the hardware and software modules in the decoding processor can be executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor 41 reads the information in the memory 42 and completes the steps of the summary generation method of the above embodiment in combination with its hardware.

[0089] An embodiment of the present invention also provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the above-mentioned summary generation method. The specific implementation can be found in the aforementioned method embodiment, which will not be repeated here.

[0090] The method for generating a summary, the device for generating a summary, and the computer program product of the electronic device provided in the embodiments of the present invention include a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the method for generating a summary described in the previous method embodiments. The specific implementation can be referred to the method embodiments, which will not be described in detail here.

[0091] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0092] In addition, in the description of the embodiments of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, and it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0093] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.

[0094] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A method for generating a summary, characterized in that: include: Preprocessing the documents to be processed; wherein the documents to be processed belong to a specified professional field; According to the pre-constructed corpus of the specified professional field, the pre-processed document to be processed is converted into an input vector; wherein the corpus includes the original corpus of the specified professional field and the feature vector corresponding to each of the original corpus; the feature vector includes the word vector feature of the original corpus and the information feature of the specified text information in the original corpus; wherein the specified text information includes at least one of a proper noun, an exception code, a status code and a uniform resource locator; Inputting the input vector into a pre-trained summary model to obtain an output vector; Converting the output vector into a summary of the document to be processed according to the corpus; The corpus is established in the following manner: obtaining the original corpus of the specified professional field; performing word segmentation processing on the original corpus to obtain multiple word units; determining whether the original corpus contains specified text information; if so, extracting the specified text information; vectorizing the word units and the specified text information to obtain the first vector and the second vector of the original corpus respectively; generating a feature vector of the original corpus based on the first vector and the second vector; and constructing the corpus of the specified professional field based on the original corpus and the feature vector.

2. The method for generating a summary according to claim 1, characterized in that: The summary model includes a seq2seq model and an attention model; wherein the encoding model in the attention model adopts a one-hot encoding model, and the decoding model in the attention model adopts a feedforward neural network FFN+Softmax layer model.

3. The method for generating a summary according to claim 1, characterized in that: The step of inputting the input vector into a pre-trained summary model to obtain an output vector comprises: Encode the input vector based on a preset one-hot encoding model to obtain an intermediate vector; Decoding the intermediate vector based on a preset feedforward neural network FFN+Softmax layer model to obtain an output element of the output vector; According to the currently generated output element and the summary model, generate the next adjacent output element of the currently generated output element until all output elements of the output vector are generated; The output vector is obtained according to all the generated output elements.

4. The method for generating a summary according to claim 1, characterized in that: The step of preprocessing the document to be processed includes: Perform sentence and / or word segmentation on the document to be processed.

5. A device for generating a summary, characterized in that: include: A preprocessing module, used for preprocessing the documents to be processed; wherein the documents to be processed belong to a specified professional field; An input vector module, used to convert the pre-processed document to be processed into an input vector according to a pre-built corpus of the specified professional field; wherein the corpus includes the original corpus of the specified professional field and a feature vector corresponding to each of the original corpus; the feature vector includes the word vector feature of the original corpus and the information feature of the specified text information in the original corpus; wherein the specified text information includes at least one of a proper noun, an exception code, a status code and a uniform resource locator; An output vector module, used for inputting the input vector into a pre-trained summary model to obtain an output vector; A summary generation module, used for converting the output vector into a summary of the document to be processed according to the corpus; The corpus is established in the following manner: obtaining the original corpus of the specified professional field; performing word segmentation processing on the original corpus to obtain multiple word units; determining whether the original corpus contains specified text information; if so, extracting the specified text information; vectorizing the word units and the specified text information to obtain the first vector and the second vector of the original corpus respectively; generating a feature vector of the original corpus based on the first vector and the second vector; and constructing the corpus of the specified professional field based on the original corpus and the feature vector.

6. An electronic device, characterized in that: The electronic device includes a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the method for generating an abstract according to any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the method for generating an abstract as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Indonesian language file abstract generation method and device, storage medium, and terminal device

    CN109325110A

  • Text abstract generation method and device, computer equipment and storage medium

    CN109657051A

  • Text abstract automatic generation method and device based on deep learning, and storage medium

    CN110737768A

  • Document summary device, control method of document summary device, control program of document summary device and recording medium

    JP2003108571A

  • Automatic summarization of a document

    US20020078091A1