A dialogue text abstract generation method, device, medium and equipment
Patent Information
- Application Number
- CN202310089081.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-06
- Publication Date
- 2026-08-18
- Estimated Expiration
- 2043-02-06
AI Technical Summary
[0003]可见,现有技术中只在BART网络模型中获得与单段对话对应的单一特征,无法对同一个对话文本信息中的多段对话的特征进行综合考虑,从而无法从同一个对话文本信息的多段对话中提取得到与整个对话文本信息对应的对话文本摘要
[0030] In this embodiment of the invention, dialogue text information is acquired; the dialogue text information is input into preset word feature models, topic feature models, and time feature models respectively; word features corresponding to the dialogue text information are extracted from the word feature models; topic features corresponding to the dialogue text information are extracted from the topic feature models; and time features corresponding to the dialogue text information are extracted from the time feature models; a feature vector corresponding to the dialogue text information is obtained based on the word features, topic features, and time features; the feature vector is input into a preset text summarization generator, and the corresponding dialogue text summary is obtained from the text summarization generator based on the feature vector. In the process of generating dialogue text summaries, this embodiment of the invention extracts word features, topic features, and time features from the dialogue text information through word feature models, topic feature models, and time feature models respectively, thus considering multiple features in the dialogue text information. Furthermore, all the above features are integrated to generate a feature vector, and then the dialogue text summary corresponding to the feature vector is obtained from the text summarization generator. This allows for comprehensive consideration of the features of multiple dialogue segments within the same dialogue text information, and the extraction of the dialogue text summary corresponding to the dialogue text information.
Smart Images

Figure CN116010580B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a method, apparatus, medium, and device for generating dialogue text summaries. Background Technology
[0002] In existing technologies, when generating a summary of dialogue text, after obtaining the dialogue text information, the dialogue text information is input into a preset BART (Bayesian Additive Regression Trees) network model. A single feature corresponding to a single dialogue segment in the dialogue text information is obtained from the BART network model. Then, based on the obtained single feature, the text summary of the corresponding single dialogue segment is obtained from the BART network model.
[0003] It is evident that existing technologies only obtain a single feature corresponding to a single dialogue segment in the BART network model, and cannot comprehensively consider the features of multiple dialogue segments in the same dialogue text information. Therefore, it is impossible to extract a dialogue text summary corresponding to the entire dialogue text information from multiple dialogue segments in the same dialogue text information. Summary of the Invention
[0004] To address the aforementioned technical problems, this invention proposes a method, apparatus, medium, and device for generating dialogue text summaries. By utilizing word feature models, topic feature models, and time feature models respectively, features of corresponding multi-segment dialogues are extracted from the dialogue text. In the text summarization generator, all of the above features are comprehensively considered to obtain the corresponding dialogue text summary. Thus, it is possible to extract the dialogue text summary corresponding to the entire dialogue text information from multiple segments of the same dialogue text information.
[0005] To achieve the above objectives, embodiments of the present invention provide a method for generating dialogue text summaries, including:
[0006] Obtain dialogue text information;
[0007] The dialogue text information is input into the preset word feature model, topic feature model and time feature model respectively;
[0008] Extract word features corresponding to the dialogue text information from the word feature model;
[0009] Extract topic features corresponding to the dialogue text information from the topic feature model;
[0010] Extract the time features corresponding to the dialogue text information from the time feature model;
[0011] Based on the word features, the topic features, and the time features, a feature vector corresponding to the dialogue text information is obtained;
[0012] The feature vector is input into a preset text summarization generator, and the corresponding dialogue text summary is obtained from the text summarization generator based on the feature vector.
[0013] Furthermore, the step of extracting word features corresponding to the dialogue text information from the word feature model specifically involves: dividing the dialogue text information into several dialogue groups; extracting dialogue group word features corresponding one-to-one with each of the dialogue groups from the word feature model; and generating word features corresponding to the dialogue text information based on all the dialogue group word features.
[0014] Furthermore, the acquisition of dialogue text information specifically involves: acquiring dialogue text and generating a dialogue text dictionary based on the dialogue text; inputting each word in the dialogue text dictionary into a preset word embedding model, obtaining word vectors corresponding to each word from the word embedding model; generating a dialogue text vector corresponding to the dialogue text based on all word vectors, and using the dialogue text vector as dialogue text information.
[0015] Furthermore, the step of extracting the time features corresponding to the dialogue text information from the time feature model specifically involves: dividing the dialogue text information into M dialogue groups according to time order; where M ≥ 1; inputting the first dialogue group into the time feature model, and extracting the first time feature corresponding to the first dialogue group from the time feature model; for the i-th dialogue group, inputting the i-th dialogue group and the (i-1)-th time feature together into the time feature model, and extracting the corresponding i-th time feature from the time feature model; where i = 2, 3, ..., M; and using the M-th time feature as the time feature corresponding to the dialogue text information.
[0016] Furthermore, obtaining the feature vector corresponding to the dialogue text information based on the word features, the topic features, and the time features specifically involves concatenating the word features, the topic features, and the time features to obtain the feature vector corresponding to the dialogue text information.
[0017] Furthermore, the step of concatenating the word features, topic features, and time features to obtain a feature vector corresponding to the dialogue text information specifically involves: using a concatenation function to concatenate the word features, topic features, and time features along the column vector dimension to obtain a concatenated feature matrix, and representing the concatenated feature matrix as a feature vector corresponding to the dialogue text information.
[0018] Furthermore, the step of inputting the feature vector into a preset text summarization generator and finding the corresponding dialogue text summary from the text summarization generator based on the feature vector specifically involves: inputting the feature vector into the preset text summarization generator; extracting the corresponding ascending and descending features from the memory network model of the text summarization generator based on the feature vector; generating corresponding global features based on the ascending and descending features; outputting the corresponding global feature vector from the attention mechanism layer of the text summarization generator based on the global features; and finding the probability that corresponds one-to-one with different text summaries from the text summarization generator based on the global feature vector, and taking the text summary with the highest probability as the dialogue text summary corresponding to the dialogue text information.
[0019] This invention also provides a dialogue text summarization generation apparatus, comprising:
[0020] The dialogue text information acquisition module is used to acquire dialogue text information;
[0021] The dialogue text information transmission module is used to input the dialogue text information into the preset word feature model, topic feature model and time feature model respectively;
[0022] The word feature acquisition module is used to extract word features corresponding to the dialogue text information from the word feature model;
[0023] The topic feature acquisition module is used to extract topic features corresponding to the dialogue text information from the topic feature model;
[0024] A time feature acquisition module is used to extract time features corresponding to the dialogue text information from the time feature model;
[0025] The feature vector acquisition module is used to obtain a feature vector corresponding to the dialogue text information based on the word features, the topic features, and the time features;
[0026] The dialogue text summarization module is used to input the feature vector into a preset text summarization generator, and to find the corresponding dialogue text summary from the text summarization generator based on the feature vector.
[0027] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the dialogue text summarization method as described in any of the preceding embodiments.
[0028] This invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executed by the processor, wherein the processor executes the program to implement the steps of the dialogue text summarization method as described in any of the preceding embodiments.
[0029] The present invention has the following beneficial effects:
[0030] In this embodiment of the invention, dialogue text information is acquired; the dialogue text information is input into preset word feature models, topic feature models, and time feature models respectively; word features corresponding to the dialogue text information are extracted from the word feature models; topic features corresponding to the dialogue text information are extracted from the topic feature models; and time features corresponding to the dialogue text information are extracted from the time feature models; a feature vector corresponding to the dialogue text information is obtained based on the word features, topic features, and time features; the feature vector is input into a preset text summarization generator, and the corresponding dialogue text summary is obtained from the text summarization generator based on the feature vector. In the process of generating dialogue text summaries, this embodiment of the invention extracts word features, topic features, and time features from the dialogue text information through word feature models, topic feature models, and time feature models respectively, thus considering multiple features in the dialogue text information. Furthermore, all the above features are integrated to generate a feature vector, and then the dialogue text summary corresponding to the feature vector is obtained from the text summarization generator. This allows for comprehensive consideration of the features of multiple dialogue segments within the same dialogue text information, and the extraction of the dialogue text summary corresponding to the dialogue text information. Attached Figure Description
[0031] Figure 1 This is a flowchart illustrating an embodiment of a dialogue text summarization method provided by the present invention;
[0032] Figure 2 This is a schematic diagram of an embodiment of a dialogue text summarization generation device provided by the present invention. Detailed Implementation
[0033] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0034] See Figure 1 This is a flowchart illustrating an embodiment of the dialogue text summarization method provided by the present invention. The method includes steps S1 to S7, as follows:
[0035] S1, obtain dialogue text information;
[0036] Preferably, the step of obtaining dialogue text information specifically involves: obtaining dialogue text and generating a dialogue text dictionary based on the dialogue text; inputting each word in the dialogue text dictionary into a preset word embedding model, obtaining word vectors corresponding to each word from the word embedding model; generating a dialogue text vector corresponding to the dialogue text based on all word vectors, and using the dialogue text vector as dialogue text information.
[0037] Specifically, the acquired dialogue text information is processed into a specified JSON format (JavaScript Object Notation, JS object notation) dialogue, and meaningless symbols in the text are removed; all numbers in the text are removed and replaced with uniform symbols to represent all numbers. Subsequently, a mapping table of "character-word-number corresponding symbols" is established. The order of this table can be arbitrary, and the processing method for numbers can also be arbitrary. For example, the table can be numbered according to the frequency of use of Chinese characters, or it can be randomly numbered according to Chinese characters.
[0038] Specifically, each Chinese character or letter (token) is processed into data that can be processed by the neural network. A word embedding model is used to convert the words in the corpus into vectors to facilitate subsequent calculations.
[0039] X in =Wordembedding(C1,C2,C3…C n )=[x1,x2,x3…x n ]
[0040] Among them, X in As input to various subsequent feature extractors, x1, x2, x3…x n These are vectors after word embedding; each vector is 256-dimensional, therefore X in It is a matrix of shape [500, 256].
[0041] S2, input the dialogue text information into the preset word feature model, topic feature model and time feature model respectively;
[0042] S3, extract word features corresponding to the dialogue text information from the word feature model;
[0043] Preferably, the step of extracting word features corresponding to the dialogue text information from the word feature model specifically involves: dividing the dialogue text information into several dialogue groups; extracting dialogue group word features corresponding one-to-one with each of the dialogue groups from the word feature model; and generating word features corresponding to the dialogue text information based on all the dialogue group word features.
[0044] Specifically, one embodiment of the word feature model is the BERT model (Bidirectional Encoder Representation from Transformers), which converts the above X... in Inputting the data into BERT, and letting the function of the BERT model be F1(), then...
[0045] Z1=F1(X in )=(z 11 ,z 12 ,z 13 …z 1n )
[0046] Z1 is the word feature matrix extracted by BERT, with dimensions [500, 256].
[0047] S4, extract the topic features corresponding to the dialogue text information from the topic feature model;
[0048] Specifically, the above X in Input the topic feature model, and let the function of the topic feature model be F2(), then
[0049] Z2=F2(X in )=(z 21 ,z 22 ,z 23 …z 2n )
[0050] Z2 is the topic feature matrix extracted by the topic feature model, with dimensions [500, 256].
[0051] S5, extract the time features corresponding to the dialogue text information from the time feature model;
[0052] Specifically, the above X in Input the time feature model, and let the function of the time feature model be F3(), then
[0053]
[0054] Z3 is the time feature matrix extracted by the time feature model, with dimensions [500, 256].
[0055] Preferably, the step of extracting the time feature corresponding to the dialogue text information from the time feature model specifically involves: dividing the dialogue text information into M dialogue groups according to time order; where M ≥ 1; inputting the first dialogue group into the time feature model, and extracting the first time feature corresponding to the first dialogue group from the time feature model; for the i-th dialogue group, inputting the i-th dialogue group and the (i-1)-th time feature together into the time feature model, and extracting the corresponding i-th time feature from the time feature model; where i = 2, 3, ..., M; and using the M-th time feature as the time feature corresponding to the dialogue text information.
[0056] Specifically, X in_before This step extracts the temporal features of all dialogues preceding the current input for the temporal feature model. After this step, the new X... in_before =Z3 serves as the temporal feature for subsequent inputs.
[0057] S6. Based on the word features, the topic features, and the time features, obtain the feature vector corresponding to the dialogue text information;
[0058] Preferably, obtaining the feature vector corresponding to the dialogue text information based on the word features, the topic features, and the time features specifically involves concatenating the word features, the topic features, and the time features to obtain the feature vector corresponding to the dialogue text information.
[0059] Preferably, the step of concatenating the word features, topic features, and time features to obtain a feature vector corresponding to the dialogue text information specifically involves: using a concatenation function to concatenate the word features, topic features, and time features along the column vector dimension to obtain a concatenated feature matrix, and representing the concatenated feature matrix as a feature vector corresponding to the dialogue text information.
[0060] Specifically, X in The input word feature model, topic feature model, and temporal feature model are transformed and semantic information is re-integrated: Z1, Z2, and Z3 are concatenated using the Concate function as follows:
[0061] Z o =Concate(Z1,Z2,Z3); where Z o This is the concatenated feature matrix;
[0062] Z out =BiLSTM(Z) o )
[0063] The BiLSTM (Bi-directional Long Short-Term Memory) consists of a forward LSTM and a backward LSTM. The forward LSTM is used to extract the Z-order input. o The features of the inverse LSTM are used to extract the Z-order of the reversed input. o_reverse BiLSTM can overcome the shortcomings of a single LSTM in extracting and fusing semantic features of the future; forward LSTM and backward LSTM extract features of the same dimension as the input [500,768], and perform element-wise addition to obtain Z. out ,Right now:
[0064] Z out =LSTM(Z) o )+LSTM(Z o_reverse ).
[0065] Z out The output in is h i The attention mechanism layer outputs h at time t. t eigenvectors K t V t The following formula is:
[0066] K t =AttentionK(h) t V t =AttentionV(h) t )
[0067] The output of the attention mechanism is:
[0068] g t =σ(W g h t +b g ),
[0069] k t =(g t ·h t )+((1-g t )·K t ),
[0070] v t =(g t ·h t )+((1-g t )·V t ).
[0071] Where σ represents the sigmoid function; W g b g These represent the weight matrix and the bias vector, respectively.
[0072] S7. Input the feature vector into a preset text summarization generator, and find the corresponding dialogue text summary from the text summarization generator based on the feature vector.
[0073] Preferably, the step of inputting the feature vector into a preset text summarization generator and finding the corresponding dialogue text summary from the text summarization generator based on the feature vector specifically involves: inputting the feature vector into the preset text summarization generator; extracting corresponding ascending and descending features from the memory network model of the text summarization generator based on the feature vector; generating corresponding global features based on the ascending and descending features; outputting the corresponding global feature vector from the attention mechanism layer of the text summarization generator based on the global features; finding the probability that corresponds one-to-one with different text summaries from the text summarization generator based on the global feature vector, and taking the text summary with the highest probability as the dialogue text summary corresponding to the dialogue text information.
[0074] Accordingly, embodiments of the present invention also provide a dialogue text summarization generation apparatus for implementing all processes of the dialogue text summarization generation method provided in the above embodiments.
[0075] See Figure 2 This is a schematic diagram of an embodiment of the dialogue text summarization generation device provided by the present invention.
[0076] An embodiment of the present invention provides a dialogue text summarization generation device, comprising:
[0077] The dialogue text information acquisition module 101 is used to acquire dialogue text information;
[0078] The dialogue text information transmission module 102 is used to input the dialogue text information into the preset word feature model, topic feature model and time feature model respectively;
[0079] The word feature acquisition module 103 is used to extract word features corresponding to the dialogue text information from the word feature model;
[0080] The topic feature acquisition module 104 is used to extract topic features corresponding to the dialogue text information from the topic feature model;
[0081] The time feature acquisition module 105 is used to extract time features corresponding to the dialogue text information from the time feature model;
[0082] The feature vector acquisition module 106 is used to obtain a feature vector corresponding to the dialogue text information based on the word features, the topic features, and the time features;
[0083] The dialogue text summarization module 107 is used to input the feature vector into a preset text summarization generator, and to find the corresponding dialogue text summary from the text summarization generator based on the feature vector.
[0084] Furthermore, embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the dialogue text summarization method as described in any of the preceding claims.
[0085] Furthermore, embodiments of the present invention also provide a computer device, including a memory, a processor, and a computer program stored in the memory and executed by the processor, wherein the processor executes the program to implement the steps of the dialogue text summarization method as described in any of the preceding claims.
[0086] Through the above description of the embodiments, those skilled in the art can clearly understand that the present invention can be implemented by means of software plus necessary hardware platforms, and of course, it can also be implemented entirely by hardware. Based on this understanding, all or part of the technical solution of the present invention that contributes to the background art can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of the present invention.
[0087] The present invention has the following beneficial effects:
[0088] In this embodiment of the invention, dialogue text information is acquired; the dialogue text information is input into preset word feature models, topic feature models, and time feature models respectively; word features corresponding to the dialogue text information are extracted from the word feature models; topic features corresponding to the dialogue text information are extracted from the topic feature models; and time features corresponding to the dialogue text information are extracted from the time feature models; a feature vector corresponding to the dialogue text information is obtained based on the word features, topic features, and time features; the feature vector is input into a preset text summarization generator, and the corresponding dialogue text summary is obtained from the text summarization generator based on the feature vector. In the process of generating dialogue text summaries, this embodiment of the invention extracts word features, topic features, and time features from the dialogue text information through word feature models, topic feature models, and time feature models respectively, thus considering multiple features in the dialogue text information. Furthermore, all the above features are integrated to generate a feature vector, and then the dialogue text summary corresponding to the feature vector is obtained from the text summarization generator. This allows for comprehensive consideration of the features of multiple dialogue segments within the same dialogue text information, and the extraction of the dialogue text summary corresponding to the dialogue text information.
[0089] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A dialogue text summarization method, characterized in that, include: Obtain dialogue text information; The dialogue text information is input into the preset word feature model, topic feature model and time feature model respectively; Extract word features corresponding to the dialogue text information from the word feature model; The topic features corresponding to the dialogue text information are extracted from the topic feature model; wherein, the topic feature model is used to extract the topic feature matrix; Extract the time features corresponding to the dialogue text information from the time feature model; Using a concatenation function, the word features, topic features, and time features are concatenated along the column vector dimension to obtain a concatenated feature matrix, which is then represented as a feature vector corresponding to the dialogue text information. The feature vector is input into a preset text summarization generator, and the corresponding dialogue text summary is obtained from the text summarization generator based on the feature vector. Specifically, the step of inputting the feature vector into a preset text summarization generator, and retrieving the corresponding dialogue text summary from the text summarization generator based on the feature vector, involves: The feature vector is input into a preset text summarization generator; Based on the feature vector, the corresponding forward and reverse features are extracted from the memory network model of the text summarization generator; Based on the ascending and descending features, corresponding global features are generated; Based on the global features, the attention mechanism layer of the text summarization generator outputs the corresponding global feature vector; Based on the global feature vector, the probability of each different text summary is found from the text summary generator, and the text summary with the highest probability is taken as the dialogue text summary corresponding to the dialogue text information. Specifically, extracting the time features corresponding to the dialogue text information from the time feature model includes: The dialogue text information is divided into M dialogue groups according to time sequence; where M≥1; The first dialogue group is input into the time feature model, and the first time feature corresponding to the first dialogue group is extracted from the time feature model; For the i-th dialogue group, the i-th dialogue group and the (i-1)-th time feature are input into the time feature model, and the corresponding i-th time feature is extracted from the time feature model; where i = 2, 3, ..., M; The Mth time feature is used as the time feature corresponding to the dialogue text information.
2. The dialogue text summarization generation method of claim 1, wherein, The step of extracting word features corresponding to the dialogue text information from the word feature model specifically involves: The dialogue text information is divided into several dialogue groups; Extract dialogue group word features that correspond one-to-one with each of the dialogue groups from the word feature model; Based on all the dialogue word features, generate word features corresponding to the dialogue text information. 3.The dialogue text summarization generation method of claim 1, wherein, The acquisition of dialogue text information specifically includes: Obtain the dialogue text and generate a dialogue text dictionary based on the dialogue text; Each word in the dialogue text dictionary is input into a preset word embedding model, and a word vector corresponding to each word is obtained from the word embedding model. Based on all the word vectors, generate a dialogue text vector corresponding to the dialogue text, and use the dialogue text vector as the dialogue text information.
4. A dialogue text abstract generation apparatus characterized by comprising: include: The dialogue text information acquisition module is used to acquire dialogue text information; The dialogue text information transmission module is used to input the dialogue text information into the preset word feature model, topic feature model and time feature model respectively; The word feature acquisition module is used to extract word features corresponding to the dialogue text information from the word feature model; A topic feature acquisition module is used to extract topic features corresponding to the dialogue text information from the topic feature model; wherein, the topic feature model is used to extract a topic feature matrix; A time feature acquisition module is used to extract time features corresponding to the dialogue text information from the time feature model; The feature vector acquisition module is used to use a concatenation function to concatenate the word features, the topic features, and the time features along the column vector dimension to obtain a concatenated feature matrix, and to represent the concatenated feature matrix as a feature vector corresponding to the dialogue text information; The dialogue text summarization module is used to input the feature vector into a preset text summarization generator, and to find the corresponding dialogue text summary from the text summarization generator based on the feature vector. Specifically, the step of inputting the feature vector into a preset text summarization generator, and retrieving the corresponding dialogue text summary from the text summarization generator based on the feature vector, involves: The feature vector is input into a preset text summarization generator; Based on the feature vector, the corresponding forward and reverse features are extracted from the memory network model of the text summarization generator; Based on the ascending and descending features, corresponding global features are generated; Based on the global features, the attention mechanism layer of the text summarization generator outputs the corresponding global feature vector; Based on the global feature vector, the probability of each different text summary is found from the text summary generator, and the text summary with the highest probability is taken as the dialogue text summary corresponding to the dialogue text information. Specifically, extracting the time features corresponding to the dialogue text information from the time feature model includes: The dialogue text information is divided into M dialogue groups according to time sequence; where M≥1; The first dialogue group is input into the time feature model, and the first time feature corresponding to the first dialogue group is extracted from the time feature model; For the i-th dialogue group, the i-th dialogue group and the (i-1)-th time feature are input into the time feature model, and the corresponding i-th time feature is extracted from the time feature model; where i = 2, 3, ..., M; The Mth time feature is used as the time feature corresponding to the dialogue text information.
5. A computer-readable storage medium having stored thereon a computer program, characterized in that, When executed by a processor, the program implements the dialogue text summarization method as described in any one of claims 1 to 3.
6. A computer device comprising a memory, a processor, and a computer program stored on the memory and run by the processor, characterized in that, When the processor executes the program, it implements the dialogue text summarization method as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Enterprise public opinion event network generation method, device and equipment and storage medium
CN109582796A
Self-supervised conversation text abstracting method and system
CN111639175A
Sequence model text abstract generation method based on topic fusion
CN111666756A