A method and apparatus for generating an abstract text
By converting the text to be processed into a sequence of mapping identifiers and rewriting it using a preset dictionary, a summary text is generated, which solves the problems of accuracy and coherence in the generation of summary text in the prior art and achieves efficient and accurate summary text generation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-20
- Publication Date
- 2026-03-27
AI Technical Summary
Existing methods for generating abstract text suffer from poor accuracy, high computational difficulty, excessive redundant information, poor coherence between sentences, and lack of flexibility.
The process involves converting the text to be processed into a mapping identifier sequence, generating the mapping identifier sequence using a trained summary text model, and rewriting it using a preset dictionary to generate summary text.
It improves the coherence and accuracy of the abstract text, reduces computational costs and the length of the analyzed text, and avoids the problems of coherence and flexibility between sentences caused by awkward splicing.
Smart Images

Figure CN115840816B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of artificial intelligence, and particularly relates to a method and device for generating an abstract text. BACKGROUND
[0002] In recent years, with the leap-forward development of information technology, information transmission methods such as public accounts, blogs, news, and the like are emerging in an endless stream, and the convenience of users in obtaining information is continuously improved. Users can harvest various information through various channels every day, the amount of information is infinitely rising, and text information is showing explosive growth, so that users are almost overwhelmed by text big data. However, the energy of users is limited, and how to enable users to obtain key information of a text in a short time and quickly extract important content from a large amount of text information has become an urgent need in the face of information explosion. Therefore, there is an urgent need for a method capable of automatically generating an abstract text. SUMMARY
[0003] In view of this, the embodiments of the present disclosure provide a method and device for generating an abstract text, a computer device, and a computer readable storage medium, to enable automatic generation of an abstract text.
[0004] In a first aspect, the embodiments of the present disclosure provide a method for generating an abstract text, and the method comprises the following steps:
[0005] obtaining a to-be-processed text;
[0006] determining a mapping identifier sequence corresponding to the to-be-processed text; wherein the mapping identifier sequence corresponding to the to-be-processed text comprises a mapping identifier corresponding to each character in the to-be-processed text, and the mapping identifier corresponding to the character is used to reflect position information of the character in the to-be-processed text;
[0007] inputting the to-be-processed text and the mapping identifier sequence corresponding to the to-be-processed text into a trained abstract text model to obtain a mapping identifier sequence corresponding to an abstract text; wherein the mapping identifier sequence corresponding to the abstract text comprises a mapping identifier corresponding to each character in the abstract text, and the mapping identifier corresponding to the character is used to reflect position information of the character in the to-be-processed text and an extraction starting position of the character in a character string in which the character is located, or the mapping identifier corresponding to the character is used to reflect a serial number of the character in a preset dictionary;
[0008] determining an abstract text corresponding to the to-be-processed text according to the mapping identifier sequence corresponding to the abstract text.
[0009] In a second aspect, the embodiments of the present disclosure provide a device for generating an abstract text, and the device comprises:
[0010] a text obtaining unit configured to obtain a to-be-processed text;
[0011] The first determining unit is configured to determine a mapping identifier sequence corresponding to the to-be-processed text, wherein the mapping identifier sequence corresponding to the to-be-processed text comprises a mapping identifier corresponding to each character in the to-be-processed text, and the mapping identifier corresponding to the character is used to reflect position information of the character in the to-be-processed text.
[0012] The second determining unit is configured to input the to-be-processed text and the mapping identifier sequence corresponding to the to-be-processed text into the trained summary text model to obtain a mapping identifier sequence corresponding to a summary text, wherein the mapping identifier sequence corresponding to the summary text comprises a mapping identifier corresponding to each character in the summary text, and the mapping identifier corresponding to the character is used to reflect position information of the character in the to-be-processed text and an extraction start position of the character in a character string in which the character is located.
[0013] The summary determining unit is configured to determine the summary text corresponding to the to-be-processed text according to the mapping identifier sequence corresponding to the summary text.
[0014] In a third aspect of the embodiments of the present disclosure, a computer device is provided, which comprises a memory, a processor, and a computer program stored in the memory and capable of running on the processor, and the processor implements the steps of the above method when executing the computer program.
[0015] In a fourth aspect of the embodiments of the present disclosure, a computer readable storage medium is provided, which stores a computer program, and the computer program implements the steps of the above method when executed by a processor.
[0016] Compared with the prior art, the embodiment of the present disclosure has the beneficial effects that: the embodiment of the present disclosure can first acquire a to-be-processed text; then, a mapping identifier sequence corresponding to the to-be-processed text can be determined; wherein the mapping identifier sequence corresponding to the to-be-processed text includes a mapping identifier corresponding to each character in the to-be-processed text, and the mapping identifier corresponding to the character is used to reflect the position information of the character in the to-be-processed text. Next, the to-be-processed text and the mapping identifier sequence corresponding to the to-be-processed text can be input into a trained summary text model to obtain a mapping identifier sequence corresponding to a summary text; wherein the mapping identifier sequence corresponding to the summary text includes a mapping identifier corresponding to each character in the summary text, and the mapping identifier corresponding to the character is used to reflect the position information of the character in the to-be-processed text and the extraction starting position of the character in the character string where the character is located, or the mapping identifier corresponding to the character is used to reflect the serial number of the character in the preset dictionary. Finally, the summary text corresponding to the to-be-processed text can be determined according to the mapping identifier sequence corresponding to the summary text. In this embodiment, in the process of determining the summary text corresponding to the to-be-processed text, the to-be-processed text is first converted into a mapping identifier sequence, and then the summary text model is used to generate a mapping identifier sequence corresponding to the summary text. Next, the preset dictionary and the to-be-processed text can be used to restore the mapping identifier sequence corresponding to the summary text to the summary text. In this way, in the process of determining the summary text corresponding to the to-be-processed text, the mapping identifier is used to not only extract the key information in the to-be-processed text, but also to rewrite the extracted key information through the generation mode, so as to obtain the mapping identifier sequence corresponding to the summary text, and then the summary text corresponding to the to-be-processed text can be obtained. It can be seen that the above method can control the text content of the to-be-processed text by extraction, reduce the calculation consumption and the length of the text that needs to be analyzed in the task of generating the summary text, and at the same time, the rewriting through the generation mode can avoid the problems of poor coherence and poor flexibility between sentences caused by rough splicing of the to-be-processed text, thereby improving the coherence and accuracy of the generated summary text. BRIEF DESCRIPTION OF DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art without creative labor.
[0018] Figure 1 is a scene diagram of an application scenario of the embodiment of the present disclosure;
[0019] Figure 2is a flowchart of a method for generating an abstract text according to an embodiment of the present disclosure;
[0020] Figure 3 is a block diagram of an apparatus for generating an abstract text according to an embodiment of the present disclosure;
[0021] Figure 4 is a schematic diagram of a computer device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0022] In the following description, specific details are set forth, such as a particular system architecture, techniques, etc., in order to provide a thorough understanding of the present embodiments. However, persons skilled in the art will understand that the present disclosure can be practiced without these specific details. In other instances, well-known structures, devices, circuits, and methods have not been described in detail in order to avoid obscuring the present disclosure.
[0023] A method and apparatus for generating an abstract text according to an embodiment of the present disclosure will be described in detail below with reference to the accompanying drawings.
[0024] In the prior art, the current method for generating an abstract text mainly includes the following two methods. The first method is to determine a sentence similar to the content of the text from a large number of word libraries according to the original text. However, this method has poor accuracy and high calculation difficulty. The second method is to extract text from the original text. However, this method easily introduces redundant information (repeated extraction), extracts incorrect content, or lacks information (some important sentences are not extracted). The method of obtaining an abstract text by rigidly splicing has the problems of poor coherence between sentences and poor flexibility. Therefore, there is an urgent need for a method for automatically generating an abstract text.
[0025] To solve the above problems, the application provides a method for generating an abstract text. In the method, the to-be-processed text is first converted into a mapping identifier sequence in the process of determining the abstract text corresponding to the to-be-processed text, then the abstract text model is used to generate the mapping identifier sequence corresponding to the abstract text, and finally the preset dictionary and the to-be-processed text are used to restore the mapping identifier sequence corresponding to the abstract text into the abstract text. In the process of determining the abstract text corresponding to the to-be-processed text, the mapping identifier sequence is used to extract the key information in the to-be-processed text, and the preset dictionary is used to rewrite the extracted key information in the generation mode, so as to obtain the mapping identifier sequence corresponding to the abstract text, and then the abstract text corresponding to the to-be-processed text can be obtained. As can be seen, the above method can control the text content of the to-be-processed text by extraction, reduce the calculation consumption of generating the abstract text task and the length of the text that needs to be analyzed, and rewrite the text content by generation, so as to avoid the problems of poor coherence and poor flexibility between sentences caused by rough splicing of the to-be-processed text, thereby improving the coherence and accuracy of the generated abstract text.
[0026] For example, the embodiment of the application can be applied to the application scenario as shown in the figure. Figure 1 In the scenario, a terminal device 1 and a server 2 can be included.
[0027] The terminal device 1 can be hardware or software. When the terminal device 1 is hardware, it can be various electronic devices with a display screen and supporting communication with the server 2, including but not limited to a smart phone, a tablet computer, a laptop computer, a desktop computer, and the like. When the terminal device 1 is software, it can be installed in the electronic device as described above. The terminal device 1 can be implemented as multiple software or software modules, or as a single software or software module, and the embodiment of the present disclosure does not limit this. Further, various applications can be installed on the terminal device 1, such as a data processing application, an instant messaging tool, a social platform software, a search application, a shopping application, and the like.
[0028] The server 2 can be a server that provides various services, for example, a background server that receives a request sent by a terminal device that establishes a communication connection therewith. The background server can receive and analyze the request sent by the terminal device, and generate a processing result. The server 2 can be a single server, a server cluster composed of several servers, or a cloud computing service center, and the embodiment of the present disclosure does not limit this.
[0029] It should be noted that the server 2 can be hardware or software. When the server 2 is hardware, it can be various electronic devices that provide various services for the terminal device 1. When the server 2 is software, it can be multiple software or software modules that provide various services for the terminal device 1, or a single software or software module that provides various services for the terminal device 1, and the embodiments of the present disclosure do not limit this.
[0030] The terminal device 1 and the server 2 can be communicatively connected through a network. The network can be a wired network connected by coaxial cables, twisted-pair cables and optical fibers, or a wireless network that can realize interconnection of various communication devices without wiring, for example, Bluetooth, Near Field Communication (NFC), Infrared, etc., and the embodiments of the present disclosure do not limit this.
[0031] Specifically, the user can input the to-be-processed text through the terminal device 1; the terminal device 1 sends the to-be-processed text to the server 2. The server 2 stores a trained summary text model; the server 2 can first determine the mapping identifier sequence corresponding to the to-be-processed text; then, the server 2 can input the to-be-processed text and the mapping identifier sequence corresponding to the to-be-processed text into the trained summary text model to obtain the mapping identifier sequence corresponding to the summary text; then, the server 2 can determine the summary text corresponding to the to-be-processed text according to the mapping identifier sequence corresponding to the summary text. Finally, the server 2 can return the summary text corresponding to the to-be-processed text to the terminal device 1. In this way, since in the present embodiment, in the process of determining the summary text corresponding to the to-be-processed text, the to-be-processed text is first converted into a mapping identifier sequence, then the summary text model is used to generate the mapping identifier sequence corresponding to the summary text, and then the preset dictionary and the to-be-processed text are used to restore the mapping identifier sequence corresponding to the summary text to the summary text; in this way, in the process of determining the summary text corresponding to the to-be-processed text, the mapping identifier is used to extract the key information in the to-be-processed text, and the preset dictionary is used to rewrite the extracted key information through the generation mode, so as to obtain the mapping identifier sequence corresponding to the summary text, and then the summary text corresponding to the to-be-processed text can be obtained; it can be seen that the above method can realize the extraction of the text content of the to-be-processed text, reduce the computational consumption of the generation of the summary text task and the length of the text that needs to be analyzed, and at the same time, the rewriting through the generation mode avoids the problem of poor coherence and poor flexibility between sentences caused by the rough splicing of the to-be-processed text, thereby improving the coherence and accuracy of the generated summary text.
[0032] It should be noted that the specific types, quantities and combinations of the terminal device 1 and the server 2 and the network can be adjusted according to the actual needs of the application scenario, and the embodiments of the present disclosure do not limit this.
[0033] It should be noted that the above application scenarios are only shown for the convenience of understanding the present disclosure, and the embodiments of the present disclosure are not limited in this respect. On the contrary, the embodiments of the present disclosure can be applied to any applicable scenario.
[0034] Figure 2 is a flowchart of a method for generating an abstract text provided by an embodiment of the present disclosure. Figure 2 The method for generating an abstract text Figure 1 may be executed by a terminal device or a server. As shown in Figure 2 , the method for generating an abstract text comprises:
[0035] S201: Obtain a to-be-processed text.
[0036] In this embodiment, the to-be-processed text can be understood as the original text for which an abstract text needs to be generated. For example, the to-be-processed text can be a text input by a user, an original text in a book, an article, etc.
[0037] S202: Determine a mapping identifier sequence corresponding to the to-be-processed text.
[0038] In this embodiment, mapping identifiers corresponding to characters at each position in the text can be pre-set. It can be understood that each mapping identifier can reflect the position of the character corresponding to the mapping identifier in the to-be-processed text, i.e., the position of the character in the to-be-processed text. In one implementation, assuming that the longest text length supported by the to-be-processed text is N, N mapping identifiers can be pre-set to represent the positions of N characters in the to-be-processed text.
[0039] In this embodiment, after obtaining the to-be-processed text, the position of each character in the to-be-processed text can be determined, and then the mapping identifier corresponding to the character can be determined according to the position of the character in the to-be-processed text. Specifically, the mapping identifier corresponding to the character can be determined based on the preset correspondence between the character position and the mapping identifier. Then, the mapping identifiers corresponding to each character in the to-be-processed text can be sorted in the order of the positions of the characters in the to-be-processed text, so that the mapping identifier sequence corresponding to the to-be-processed text can be obtained. It can be understood that the mapping identifier sequence corresponding to the to-be-processed text can include the mapping identifiers corresponding to each character in the to-be-processed text, and the mapping identifier corresponding to the character reflects the position information of the character in the to-be-processed text. That is, the position of each mapping identifier in the mapping identifier sequence corresponding to the to-be-processed text is the same as the position of the character corresponding to the mapping identifier in the to-be-processed text. Assuming that the position of character a in the to-be-processed text is the second character position, the position of the mapping identifier A corresponding to character a in the mapping identifier sequence corresponding to the to-be-processed text is also the second identifier position.
[0040] Next, it is assumed by way of example that the to-be-processed text is: this is a book about literature. Since the position of the character "this" in the to-be-processed text is the first position, the mapping identifier corresponding to the character "this" is "1"; the position of the character "is" in the to-be-processed text is the second position, so the mapping identifier corresponding to the character "is" is "2"; the position of the character "one" in the to-be-processed text is the third position, so the mapping identifier corresponding to the character "one" is "3"; the position of the character "this" in the to-be-processed text is the fourth position, so the mapping identifier corresponding to the character "this" is "4"; the position of the character "related" in the to-be-processed text is the fifth position, so the mapping identifier corresponding to the character "related" is "5"; the position of the character "on" in the to-be-processed text is the sixth position, so the mapping identifier corresponding to the character "on" is "6"; the position of the character "text" in the to-be-processed text is the seventh position, so the mapping identifier corresponding to the character "text" is "7"; the position of the character "learning" in the to-be-processed text is the eighth position, so the mapping identifier corresponding to the character "learning" is "8"; the position of the character "of" in the to-be-processed text is the ninth position, so the mapping identifier corresponding to the character "of" is "9"; the position of the character "book" in the to-be-processed text is the tenth position, so the mapping identifier corresponding to the character "book" is "10"; therefore, the mapping identifier sequence corresponding to the to-be-processed text is [1][2][3][4][5][6][7][8][9]
[10] .
[0041] S203: input the to-be-processed text and the mapping identifier sequence corresponding to the to-be-processed text into the trained summary text model to obtain a mapping identifier sequence corresponding to a summary text.
[0042] In the embodiment, the to-be-processed text and the mapping identifier sequence corresponding to the to-be-processed text are input into the trained summary text model, and the mapping identifier sequence corresponding to the summary text can be obtained. In an implementation manner, the summary text model can be a trained self-attention network, such as a series of variant and improved neural network models such as T5, BART, and the like.
[0043] The mapping identifier sequence corresponding to the summary text can include a mapping identifier corresponding to each character in the summary text, and the mapping identifier corresponding to the character is used to reflect position information of the character in the to-be-processed text and an extraction start position of the character in a string in which the character is located, or the mapping identifier corresponding to the character is used to reflect a serial number of the character in a preset dictionary. That is, the mapping identifier sequence corresponding to the summary text includes a mapping identifier corresponding to each character in the summary text, and the mapping identifier corresponding to the character is used to reflect position information of the character in the to-be-processed text and an extraction start position of the character in a string in which the character is located, or the mapping identifier corresponding to the character is used to reflect a serial number of the character in a preset dictionary.
[0044] The summary text model can extract important characters or strings (that is, key information) from the to-be-processed text. The extraction start position of the character in the string in which the character is located can be understood as follows: if a string of continuous characters in the summary text is a string of continuous characters in the to-be-processed text, the first character and the last character of the string of characters can be taken as the extraction start position in the string (that is, the first character is the extraction start position of the string, and the last character is the extraction end position of the string). In this way, when a continuous string needs to be extracted from the to-be-processed text, only the mapping identifiers of the first character and the last character in the string of characters can be recorded in the mapping identifier sequence corresponding to the summary text. In this way, by extracting the text content, the length of the mapping identifier sequence corresponding to the summary text is reduced, and the calculation consumption of the summary text generation task and the length of the text to be analyzed can be reduced.
[0045] In an implementation, in order to distinguish whether the identification type of the mapping identification is the extraction start position identification or the extraction end position identification, if the character is the first character of the string (i.e. the extraction start position of the string), the identification type of the mapping identification corresponding to the character is the extraction start position identification, if the character is the last character of the string (i.e. the extraction end position of the string), the identification type of the mapping identification corresponding to the string is the extraction end position identification; wherein if the identification type of the mapping identification corresponding to the character is the extraction start position identification, the mapping identification corresponding to the character is the same as the mapping identification corresponding to the character in the mapping identification sequence corresponding to the text to be processed, for example, both are [1], if the identification type of the mapping identification corresponding to the character is the extraction end position identification, the mapping identification corresponding to the character is different from the mapping identification corresponding to the character in the mapping identification sequence corresponding to the text to be processed, for example, is [1]*; in this way, assuming that the longest text length supported by the text to be processed is N, N mapping identifications representing the positions of N characters in the text to be processed and N mapping identifications representing the identification type of the extraction end position identification (i.e. the N mapping identifications can represent the positions of N characters in the text to be processed and the N mapping identifications representing the identification type of the extraction end position identification at the same time) can be preset, and N mapping identifications representing the identification type of the extraction end position identification can be preset, in this way, assuming that the longest text length supported by the text to be processed is N, 2N mapping identifications need to be additionally set. For example, assuming that the longest text length of the text to be processed is 5 characters, [1], [2], [3], [4], [5], [1]*, [2]*, [3]*, [4]*, [5]* these ten mapping identifications need to be additionally set.
[0046] It should be noted that, in order to avoid the problem of poor coherence and poor flexibility between sentences caused by rough splicing of the to-be-processed text, a preset dictionary is introduced in the embodiment to train the summary text model, wherein the preset dictionary stores a correspondence between a plurality of characters and serial numbers, wherein the serial numbers can be different from the preset mapping identifiers, for example, can be (32) and the like; in this way, in the process of determining the summary text corresponding to the to-be-processed text, the mapping identifier is used to not only extract the key information in the to-be-processed text, but also rewrite the extracted key information by using the preset dictionary in a generation manner, so as to obtain a mapping identifier sequence corresponding to the summary text, and then the summary text corresponding to the to-be-processed text can be obtained. It can be understood that the characters stored in the preset dictionary can be used to supplement and rewrite the content of the summary text, so that the summary text can be perfected by using the preset dictionary (for example, characters that need to be supplemented in the summary text but are not in the to-be-processed text), and the problem of poor coherence and poor flexibility between sentences caused by the lack of some characters in the to-be-processed text or the omission of part of the information when extracting the summary is avoided. It should be emphasized that the mapping identifier corresponding to any character in the to-be-processed text is different from the serial number corresponding to any character in the preset dictionary, and the mapping identifier corresponding to any character in the to-be-processed text is also different from the serial number corresponding to any character in the preset dictionary; that is, a mapping identifier can only correspond to one character in the to-be-processed text or one character in the preset dictionary.
[0047] For example, assuming that the to-be-processed text is: this is a book about literature, the mapping identifier sequence corresponding to the to-be-processed text is [1][2][3][4][5][6][7][8][9]
[10] , after the to-be-processed text and the mapping identifier sequence corresponding to the to-be-processed text are input into the summary text model, the mapping identifier sequence corresponding to the summary text can be obtained as (11)(12)(13)[1][2]*[4][7][8]*
[10] ; wherein (11), (12), (13) are serial numbers in the preset dictionary, [1][2]* is a string composed of the first character to the second character in the to-be-processed text, [4] is the fourth character in the to-be-processed text, [7][8]* is a string composed of the seventh character to the eighth character in the to-be-processed text, and
[10] is the tenth character in the to-be-processed text.
[0048] S204: determining the summary text corresponding to the to-be-processed text according to the mapping identifier sequence corresponding to the summary text.
[0049] After obtaining the mapping identifier sequence corresponding to the summary text, the mapping identifiers in the mapping identifier sequence corresponding to the summary text can be restored based on the to-be-processed text and the preset dictionary, so as to obtain the summary text corresponding to the to-be-processed text.
[0050] For example, assuming that the text to be processed is: this is a book about literature, the mapping identifier sequence corresponding to the text to be processed is [1] [2] [3] [4] [5] [6] [7] [8] [9]
[10] , and the mapping identifier sequence of the summary text corresponding to the text to be processed is (11) (12) (13) [1] [2] * [4] [7] [8] *
[10] ; wherein (11), (12), (13) are serial numbers in the preset dictionary (corresponding to "Summary:"); [1] [2] * is a string composed of the first character to the second character in the text to be processed; [4] is the fourth character in the text to be processed; [7] [8] * is a string composed of the seventh character to the eighth character in the text to be processed; and
[10] is the tenth character in the text to be processed. Then, according to the mapping identifier sequence (11) (12) (13) [1] [2] * [4] [7] [8] *
[10] of the summary text, it is determined that the summary text corresponding to the text to be processed is "Summary: this is a book about literature".
[0051] Compared with the prior art, the embodiment of the present disclosure has the beneficial effects that: the embodiment of the present disclosure can first acquire a to-be-processed text; then, a mapping identifier sequence corresponding to the to-be-processed text can be determined; wherein the mapping identifier sequence corresponding to the to-be-processed text includes a mapping identifier corresponding to each character in the to-be-processed text, and the mapping identifier corresponding to the character is used to reflect the position information of the character in the to-be-processed text. Next, the to-be-processed text and the mapping identifier sequence corresponding to the to-be-processed text can be input into a trained summary text model to obtain a mapping identifier sequence corresponding to a summary text; wherein the mapping identifier sequence corresponding to the summary text includes a mapping identifier corresponding to each character in the summary text, and the mapping identifier corresponding to the character is used to reflect the position information of the character in the to-be-processed text and the extraction starting position of the character in the character string where the character is located, or the mapping identifier corresponding to the character is used to reflect the serial number of the character in the preset dictionary. Finally, the summary text corresponding to the to-be-processed text can be determined according to the mapping identifier sequence corresponding to the summary text. In this embodiment, in the process of determining the summary text corresponding to the to-be-processed text, the to-be-processed text is first converted into a mapping identifier sequence, and then a summary text model is used to generate a mapping identifier sequence corresponding to a summary text. Next, the preset dictionary and the to-be-processed text can be used to restore the mapping identifier sequence corresponding to the summary text to the summary text. In this way, in the process of determining the summary text corresponding to the to-be-processed text, the mapping identifier is used to not only extract the key information in the to-be-processed text, but also to rewrite the extracted key information through the generation mode of the preset dictionary, so as to obtain the mapping identifier sequence corresponding to the summary text, and then the summary text corresponding to the to-be-processed text can be obtained. It can be seen that the above method can control the text content of the to-be-processed text by extraction, reduce the computational consumption and the length of the text that needs to be analyzed in the task of generating a summary text, and at the same time, the rewriting through the generation mode can avoid the problem of poor coherence and poor flexibility between sentences caused by the rough splicing of the to-be-processed text, thereby improving the coherence and accuracy of the generated summary text.
[0052] In some embodiments, the trained summary text model includes an encoder and a decoder; in one implementation, the encoder is composed of a self-attention network, and the decoder is also composed of a self-attention network, that is, the encoder is a self-attention network, the decoder is a self-attention network, and the loss function used by the summary text model in the model training process is a cross-entropy loss function. In this way, the summary text model can calculate the gradient through the cross-entropy loss function, thereby completing the training. Accordingly, the step of S203 "inputting the to-be-processed text and the mapping identifier sequence corresponding to the to-be-processed text into the trained summary text model to obtain a mapping identifier sequence corresponding to a summary text" can include the following steps:
[0053] S203a: input the to-be-processed text and the mapping identifier sequence corresponding to the to-be-processed text into the encoder to obtain a hidden layer representation vector.
[0054] After obtaining the to-be-processed text and the mapping identifier sequence corresponding to the to-be-processed text, the to-be-processed text and the mapping identifier sequence corresponding to the to-be-processed text can be input into the encoder. The encoder can perform semantic understanding on the characters and mapping identifiers in the to-be-processed text and the mapping identifier sequence corresponding to the to-be-processed text, identify the context information between the characters, and determine the hidden layer representation vector corresponding to the to-be-processed text and the mapping identifier sequence corresponding to the to-be-processed text in combination with the context information between the mapping identifiers in the mapping identifier sequence.
[0055] It can be understood that the hidden layer representation vector can reflect the meaning of each character in the to-be-processed text, the correlation between each character, and the correspondence between the to-be-processed text and the mapping identifier sequence corresponding to the to-be-processed text. In this way, when the to-be-processed text corresponding to the summary text is predicted using the hidden layer representation vector corresponding to the to-be-processed text and the mapping identifier sequence corresponding to the to-be-processed text, the deviation of the summary text from the original meaning of the to-be-processed text can be within a certain range, and the coherence and flexibility between sentences in the summary text are good. That is, the summary text predicted using the hidden layer representation vector can retain the main information of the sentences in the to-be-processed text, maintain the main meaning of the sentences in the to-be-processed text to a large extent, and not deviate too much from the original meaning of the to-be-processed text, and the coherence and flexibility between sentences are good.
[0056] S203b: input the hidden layer representation vector into the decoder to obtain a mapping identifier sequence corresponding to the summary text.
[0057] After obtaining the hidden layer representation vector corresponding to the to-be-processed text and the mapping identifier sequence corresponding to the to-be-processed text, the hidden layer representation vector corresponding to the to-be-processed text and the mapping identifier sequence corresponding to the to-be-processed text can be input into the decoder. The decoder can obtain a mapping identifier sequence corresponding to the summary text.
[0058] In some embodiments, the step S204 of "determining the summary text corresponding to the to-be-processed text according to the mapping identifier sequence corresponding to the summary text" can include the following steps:
[0059] S204a: for each mapping identifier in the mapping identifier sequence corresponding to the summary text, determining a character or a string of characters corresponding to the mapping identifier according to the mapping identifier and the next mapping identifier of the mapping identifier.
[0060] In the embodiment, for each mapping identifier in the mapping identifier sequence corresponding to the abstract text, a character or a string corresponding to the mapping identifier is determined from the to-be-processed text or the preset dictionary based on the identifier type of the mapping identifier and the identifier type of a next mapping identifier of the mapping identifier.
[0061] Specifically, if the mapping identifier is an extraction start position identifier and the next mapping identifier of the mapping identifier is an extraction end position identifier, a string is extracted from the to-be-processed text according to the mapping identifier and the next mapping identifier of the mapping identifier, and the string is taken as the string corresponding to the mapping identifier. If the mapping identifier is an extraction start position identifier and the next mapping identifier of the mapping identifier is an extraction end position identifier, it indicates that the mapping identifier and the next mapping identifier of the mapping identifier correspond to a string of characters in the to-be-processed text in the mapping identifier sequence corresponding to the abstract text. Therefore, a position of a character corresponding to the mapping identifier in the to-be-processed text can be taken as an extraction start position, a position of a character corresponding to the next mapping identifier of the mapping identifier in the to-be-processed text can be taken as an extraction end position, and then a string between the extraction start position and the extraction end position in the to-be-processed text is taken as the string corresponding to the mapping identifier and the next mapping identifier of the mapping identifier. For example, assuming that the to-be-processed text is: this is a book about literature, the mapping identifier sequence corresponding to the to-be-processed text is [1] [2] [3] [4] [5] [6] [7] [8] [9]
[10] , and the mapping identifier sequence corresponding to the abstract text of the to-be-processed text is (11) (12) (13) [1] [2]* [4] [7] [8]*
[10] ; since the mapping identifier [1] is an extraction start position identifier, the mapping identifier [2]* is an extraction end position identifier, and the character positions corresponding to the mapping identifiers [1] and [2]* are the first character and the second character in the to-be-processed text, the string from the first character “this” to the second character “is” in the to-be-processed text “this is a book about literature” can be taken as the string corresponding to the mapping identifiers [1] and [2]*.
[0062] If the mapping identifier is an extraction start position identifier, and the mapping identifier after the mapping identifier is an extraction start position identifier, a character is queried from the to-be-processed text or the preset dictionary according to the mapping identifier, and the character is taken as the character corresponding to the mapping identifier. If the mapping identifier is an extraction start position identifier, and the mapping identifier after the mapping identifier is also an extraction start position identifier, it is indicated that the mapping identifier in the mapping identifier sequence corresponding to the abstract text only corresponds to a single character, and cannot be combined with the previous mapping identifier or the mapping identifier after the mapping identifier to correspond to a string of characters. Therefore, if the mapping identifier is a mapping identifier corresponding to a character in the to-be-processed text, the character in the to-be-processed text corresponding to the mapping identifier can be taken as the character corresponding to the mapping identifier; if the mapping identifier is a serial number corresponding to a character in the preset dictionary, a character can be queried from the preset dictionary according to the mapping identifier, and then the character is taken as the character corresponding to the mapping identifier. For example, it is assumed that the to-be-processed text is: this is a book about literature, the mapping identifier sequence corresponding to the to-be-processed text is [1][2][3][4][5][6][7][8][9]
[10] , and the mapping identifier sequence of the abstract text corresponding to the to-be-processed text is (11)(12)(13)[1][2]*[4][7][8]*
[10] ; wherein, since the mapping identifier [4] is an extraction start position identifier, and the mapping identifier [7] after the mapping identifier [4] is also an extraction start position identifier, the mapping identifier [4] only corresponds to a single character, and in addition, since the mapping identifier [4] is a mapping identifier corresponding to a character "this" in the to-be-processed text, the character "this" in the to-be-processed text corresponding to the mapping identifier [4] can be taken as the character corresponding to the mapping identifier [4]; the mapping identifier (11) is a serial number corresponding to a character "extract" in the preset dictionary, and then a character "extract" is queried from the preset dictionary according to the mapping identifier (11), and the character "extract" is taken as the character corresponding to the mapping identifier (11).
[0063] S204b: determining the abstract text corresponding to the to-be-processed text according to the characters or strings corresponding to the mapping identifiers in the mapping identifier sequence corresponding to the abstract text.
[0064] After determining the characters or strings corresponding to the mapping identifiers in the mapping identifier sequence corresponding to the abstract text, the characters or strings corresponding to the mapping identifiers in the mapping identifier sequence corresponding to the abstract text can be sorted according to the position sorting order of the mapping identifiers in the mapping identifier sequence corresponding to the abstract text, so that the abstract text corresponding to the to-be-processed text can be obtained.
[0065] For example, assume the text to be processed is: This is a book about literature. The mapping identifier sequence corresponding to the text to be processed is [1][2][3][4][5][6][7][8][9]
[10] , and the mapping identifier sequence corresponding to the summary text of the text to be processed is (11)(12)(13)[1][2]*[4][7][8]*
[10] . Since the character corresponding to the mapping identifier (11) is "摘", the character corresponding to the mapping identifier (12) is "要", the character corresponding to the mapping identifier (13) is ":", the character string corresponding to the mapping identifier sequence [1][2]* is "这是", the character corresponding to the mapping identifier [4] is "本", the character string corresponding to the mapping identifier sequence [7][8]* is "文学", and the character corresponding to the mapping identifier
[10] is "书", therefore, arranging the characters or character strings corresponding to each mapping identifier in the mapping identifier sequence corresponding to the summary text in the sorting order of the positions of each mapping identifier in the mapping identifier sequence corresponding to the summary text, the summary text corresponding to the text to be processed, namely "摘要:这是本文学书", can be obtained.
[0066] All the above optional technical solutions can be combined arbitrarily to form optional embodiments of the present disclosure, which will not be elaborated here one by one.
[0067] The following is an embodiment of the apparatus of the present disclosure, which can be used to execute the embodiment of the method of the present disclosure. For the details not disclosed in the embodiment of the apparatus of the present disclosure, please refer to the embodiment of the method of the present disclosure.
[0068] Figure 3 is a schematic diagram of a device for generating the summary text provided by an embodiment of the present disclosure. As Figure 3 shown, the device for generating the summary text includes:
[0069] A text acquisition unit 301, configured to acquire the text to be processed;
[0070] A first determination unit 302, configured to determine the mapping identifier sequence corresponding to the text to be processed; wherein, the mapping identifier sequence corresponding to the text to be processed includes the mapping identifier corresponding to each character in the text to be processed, and the mapping identifier corresponding to the character is used to reflect the position information of the character in the text to be processed;
[0071] A second determination unit 303, configured to input the text to be processed and the mapping identifier sequence corresponding to the text to be processed into a trained summary text model, and obtain the mapping identifier sequence corresponding to the summary text; wherein, the mapping identifier sequence corresponding to the summary text includes the mapping identifier corresponding to each character in the summary text, and the mapping identifier corresponding to the character is used to reflect the position information of the character in the text to be processed and the extraction start position of the character in the character string where the character is located;
[0072] The abstract determining unit 304 is configured to determine the abstract text corresponding to the to-be-processed text according to the mapping identifier sequence corresponding to the abstract text.
[0073] Optionally, the trained abstract text model comprises an encoder and a decoder.
[0074] The to-be-processed text and the mapping identifier sequence corresponding to the to-be-processed text are input into the encoder to obtain a hidden layer representation vector.
[0075] The hidden layer representation vector is input into the decoder to obtain the mapping identifier sequence corresponding to the abstract text.
[0076] Optionally, the encoder is a self-attention network, and the decoder is a self-attention network.
[0077] Optionally, a loss function used in a model training process of the abstract text model is a cross-entropy loss function.
[0078] The abstract determining unit 304 is configured to:
[0079] For each mapping identifier in the mapping identifier sequence corresponding to the abstract text, a character or a string corresponding to the mapping identifier is determined according to the mapping identifier and a next mapping identifier of the mapping identifier.
[0080] The abstract text corresponding to the to-be-processed text is determined according to the characters or the strings corresponding to the mapping identifiers in the mapping identifier sequence corresponding to the abstract text.
[0081] The abstract determining unit 304 is configured to:
[0082] For each mapping identifier in the mapping identifier sequence corresponding to the abstract text, a character or a string corresponding to the mapping identifier is determined based on an identifier type of the mapping identifier and an identifier type of a next mapping identifier of the mapping identifier, from the to-be-processed text or the preset dictionary.
[0083] The abstract determining unit 304 is configured to:
[0084] For each mapping identifier in the mapping identifier sequence corresponding to the abstract text, if the mapping identifier is an extraction start position identifier, and a next mapping identifier of the mapping identifier is an extraction end position identifier, a string is extracted from the to-be-processed text according to the mapping identifier and the next mapping identifier of the mapping identifier, and the string is taken as a character corresponding to the mapping identifier; if the mapping identifier is an extraction start position identifier, and a next mapping identifier of the mapping identifier is an extraction start position identifier, a character is queried from the to-be-processed text or the preset dictionary according to the mapping identifier, and the character is taken as a character corresponding to the mapping identifier.
[0085] Compared with the prior art, the embodiment of the present disclosure has the beneficial effects that: the abstract text generation device provided by the embodiment of the present disclosure comprises: a text acquisition unit configured to acquire a to-be-processed text; a first determination unit configured to determine a mapping identifier sequence corresponding to the to-be-processed text; wherein the mapping identifier sequence corresponding to the to-be-processed text comprises a mapping identifier corresponding to each character in the to-be-processed text, and the mapping identifier corresponding to the character is used to reflect the position information of the character in the to-be-processed text; a second determination unit configured to input the to-be-processed text and the mapping identifier sequence corresponding to the to-be-processed text into a trained abstract text model to obtain a mapping identifier sequence corresponding to an abstract text; wherein the mapping identifier sequence corresponding to the abstract text comprises a mapping identifier corresponding to each character in the abstract text, and the mapping identifier corresponding to the character is used to reflect the position information of the character in the to-be-processed text and the extraction start position of the character in the character string in which the character is located; and an abstract determination unit configured to determine an abstract text corresponding to the to-be-processed text according to the mapping identifier sequence corresponding to the abstract text. In the embodiment, in the process of determining the abstract text corresponding to the to-be-processed text, the to-be-processed text is first converted into a mapping identifier sequence, then the abstract text model is used to generate a mapping identifier sequence corresponding to the abstract text, and finally the mapping identifier sequence corresponding to the abstract text is restored into the abstract text by using the preset dictionary and the to-be-processed text. Therefore, in the process of determining the abstract text corresponding to the to-be-processed text, the mapping identifier is used to not only extract the key information in the to-be-processed text, but also rewrite the extracted key information by using the generation method of the preset dictionary, so as to obtain the mapping identifier sequence corresponding to the abstract text, and then the abstract text corresponding to the to-be-processed text can be obtained. It can be seen that the above method can control the text content of the to-be-processed text by extraction, reduce the calculation consumption and the length of the text that needs to be analyzed in the task of generating the abstract text, and rewrite the text content by using the generation method, thereby avoiding the problems of poor coherence and poor flexibility between sentences caused by the rough splicing of the to-be-processed text, and improving the coherence and accuracy of the generated abstract text.
[0086] It should be understood that the size of the serial number of each step in the above embodiments does not mean the order of execution, and the execution order of each process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present disclosure.
[0087] Figure 4 is a schematic diagram of a computer device 4 provided by the embodiments of the present disclosure. As shown in the figure, the computer device 4 of the embodiments includes a processor 401, a memory 402, and a computer program 403 stored in the memory 402 and executable on the processor 401. The processor 401 implements the steps in each of the above method embodiments when executing the computer program 403. Alternatively, the processor 401 implements the functions of each module / module in each of the above device embodiments when executing the computer program 403. Figure 4
[0088] For example, the computer program 403 can be divided into one or more modules, which are stored in the memory 402 and executed by the processor 401 to complete the present disclosure. One or more modules can be a series of computer program instruction segments that can complete a specific function, which are used to describe the execution process of the computer program 403 in the computer device 4.
[0089] The computer device 4 can be a desktop computer, a notebook computer, a palm computer, a cloud server, and the like. The computer device 4 can include but is not limited to the processor 401 and the memory 402. Those skilled in the art can understand that the computer device 4 is only an example of the computer device 4 and does not constitute a limitation on the computer device 4, and can include more or fewer components than the figure, or combine certain components, or different components, for example, the computer device can also include an input / output device, a network access device, a bus, and the like. Figure 4
[0090] The processor 401 can be a central processing module (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.
[0091] The memory 402 can be an internal storage module of the computer device 4, for example, a hard disk or a memory of the computer device 4. The memory 402 can also be an external storage device of the computer device 4, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card and the like equipped on the computer device 4. Further, the memory 402 can include both the internal storage module and the external storage device of the computer device 4. The memory 402 is used to store computer programs and other programs and data required by the computer device. The memory 402 can also be used to temporarily store data that has been output or is to be output.
[0092] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above-mentioned functional modules and module divisions are taken as examples, and in actual applications, the above-mentioned functions can be completed by different functional modules or modules according to needs, that is, the internal structure of the device is divided into different functional modules or modules to complete all or part of the functions described above. Each functional module or module in the embodiment can be integrated into one processing module, or each module can exist physically, or two or more modules can be integrated into one module. The above-mentioned integrated module can be realized in the form of hardware or in the form of software functional module. In addition, the specific name of each functional module or module is only for the convenience of mutual distinction, and does not limit the protection scope of the present disclosure. The specific working process of the module or module in the above system can refer to the corresponding process in the foregoing method embodiments, which will not be described here.
[0093] In the above embodiments, the description of each embodiment has its own emphasis, and the parts not described or recorded in detail in a certain embodiment can be referred to the relevant description of other embodiments.
[0094] Those of ordinary skill in the art can realize that the modules and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present disclosure.
[0095] In the embodiments of the present disclosure, it should be understood that the disclosed apparatus / computer device and method can be implemented in other manners. For example, the described apparatus / computer device embodiment is merely illustrative. For example, the division of the modules or the division of the functions of the modules can be different from the embodiment. For another example, multiple modules or components can be combined or can be integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed coupling or direct coupling or communication connection between the modules can be indirect coupling or communication connection through some interfaces, devices or modules, and can be electrical, mechanical or in other forms.
[0096] The modules illustrated as separated components can or can not be physically separated, and the components illustrated as modules can or can not be physical modules, i.e., can be located in one place, or can be distributed to multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the embodiment.
[0097] In addition, each functional module in each embodiment of the present disclosure can be integrated into a processing module, or each module can exist physically independently, or two or more modules can be integrated into one module. The integrated module can be realized in the form of hardware or in the form of a software functional module.
[0098] If the integrated module / module is realized in the form of a software functional module and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, all or part of the processes in the above-mentioned embodiment methods can also be completed by computer programs instructing related hardware, and the computer programs can be stored in a computer readable storage medium. When the processor executes the computer programs, the steps of each method embodiment described above can be implemented. The computer program can include computer program code, which can be in the form of source code, object code, executable file or some intermediate form. The computer readable medium can include any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the computer readable medium can include or exclude content according to the requirements of legislation and patent practice in the jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunication signals.
[0099] The above examples are only used to illustrate the technical solutions of the present disclosure, rather than limit the same; although the present disclosure is described in detail with reference to the foregoing examples, those of ordinary skill in the art should understand that the technical solutions recorded in the foregoing examples can be modified, or some technical features thereof can be replaced by equivalents; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure.
Claims
1. A method of generating an abstract of text, characterized by, The method comprises: acquiring a to-be-processed text; determining a mapping identifier sequence corresponding to the to-be-processed text; wherein the mapping identifier sequence corresponding to the to-be-processed text comprises a mapping identifier corresponding to each character in the to-be-processed text, and the mapping identifier corresponding to a character is used to reflect position information of the character in the to-be-processed text; inputting the to-be-processed text and the mapping identifier sequence corresponding to the to-be-processed text into a trained summary text model to obtain a mapping identifier sequence corresponding to a summary text; wherein the mapping identifier sequence corresponding to the summary text comprises a mapping identifier corresponding to each character in the summary text, and the mapping identifier corresponding to a character is used to reflect position information of the character in the to-be-processed text and an extraction start position of the character in a character string in which the character is located, the extraction start position comprising an extraction start position and an extraction end position, or the mapping identifier corresponding to a character is used to reflect a serial number of the character in a preset dictionary; the preset dictionary stores a correspondence between a plurality of characters and serial numbers, and the characters stored in the preset dictionary are used to supplement and rewrite the content of the summary text; one mapping identifier can correspond to only one character in the to-be-processed text or one character in the preset dictionary; determining a summary text corresponding to the to-be-processed text according to the mapping identifier sequence corresponding to the summary text.
2. The method of claim 1, wherein, The trained summary text model comprises an encoder and a decoder; inputting the to-be-processed text and the mapping identifier sequence corresponding to the to-be-processed text into the trained summary text model to obtain the mapping identifier sequence corresponding to the summary text comprises: inputting the to-be-processed text and the mapping identifier sequence corresponding to the to-be-processed text into the encoder to obtain a hidden layer representation vector; inputting the hidden layer representation vector into the decoder to obtain the mapping identifier sequence corresponding to the summary text.
3. The method of claim 2, wherein, The encoder is a self-attention network, and the decoder is a self-attention network.
4. The method of claim 2, wherein, A loss function used by the summary text model in a model training process is a cross-entropy loss function.
5. The method of claim 1, wherein, The determination of the summary text corresponding to the to-be-processed text according to the mapping identifier sequence corresponding to the summary text comprises: for each mapping identifier in the mapping identifier sequence corresponding to the summary text, determining a character or a character string corresponding to the mapping identifier according to the mapping identifier and a next mapping identifier of the mapping identifier; determining the summary text corresponding to the to-be-processed text according to the characters or the character strings corresponding to the mapping identifiers in the mapping identifier sequence corresponding to the summary text.
6. The method of claim 5, wherein, The determination of the character or the character string corresponding to the mapping identifier according to the mapping identifier and the next mapping identifier of the mapping identifier comprises: for each mapping identifier in the mapping identifier sequence corresponding to the summary text, determining the character or the character string corresponding to the mapping identifier from the to-be-processed text or the preset dictionary based on an identifier type of the mapping identifier and an identifier type of the next mapping identifier of the mapping identifier.
7. The method of claim 6, wherein, The method comprises the following steps: For each mapping identifier in the mapping identifier sequence corresponding to the abstract text, if the mapping identifier is an extraction start position identifier, and a next mapping identifier of the mapping identifier is an extraction end position identifier, a string is extracted from the to-be-processed text according to the mapping identifier and the next mapping identifier of the mapping identifier, and the string is taken as a character corresponding to the mapping identifier; if the mapping identifier is an extraction start position identifier, and the next mapping identifier of the mapping identifier is an extraction start position identifier, a character is queried from the to-be-processed text or the preset dictionary according to the mapping identifier, and the character is taken as a character corresponding to the mapping identifier.
8. An apparatus for generating an abstract text, characterized by comprising: The apparatus comprises: a text acquisition unit configured to acquire a to-be-processed text; a first determination unit configured to determine a mapping identifier sequence corresponding to the to-be-processed text; wherein the mapping identifier sequence corresponding to the to-be-processed text comprises a mapping identifier corresponding to each character in the to-be-processed text, and the mapping identifier corresponding to a character is used to reflect position information of the character in the to-be-processed text; a second determination unit configured to input the to-be-processed text and the mapping identifier sequence corresponding to the to-be-processed text into a trained abstract text model to obtain a mapping identifier sequence corresponding to an abstract text; wherein the mapping identifier sequence corresponding to the abstract text comprises a mapping identifier corresponding to each character in the abstract text, and the mapping identifier corresponding to a character is used to reflect position information of the character in the to-be-processed text and an extraction start position of the character in a string in which the character is located, the extraction start position comprises an extraction start position and an extraction end position, or the mapping identifier corresponding to a character is used to reflect a serial number of the character in a preset dictionary; the preset dictionary stores a correspondence between a plurality of characters and serial numbers, and characters stored in the preset dictionary are used to supplement and rewrite content of an abstract text; one mapping identifier can only correspond to one character in the to-be-processed text or one character in the preset dictionary; an abstract determination unit configured to determine an abstract text corresponding to the to-be-processed text according to the mapping identifier sequence corresponding to the abstract text.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the steps of the method in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 9. The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 7. The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 7.
Citation Information
Patent Citations
Graphic and text information sorting processing method, device and equipment
CN110609968A
Abstract and dialogue abstract generation method and device
CN111460109A