Abstract text generation method and device, equipment and medium

By obtaining and processing the word segmentation and encoding information of the text to be processed in the summary text generation method, determining the key word segmentation, and constructing and optimizing the feature matrix, the problem of low accuracy of summary text generation in the existing technology is solved, and an efficient, efficient and High-quality summary text generation.

CN119336904APending Publication Date: 2025-01-21PING AN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411472058.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-21
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

The existing abstract text generation methods are not very accurate, and it is difficult to integrate multi-source information to form high-quality abstracts.

Method used

By obtaining the word segmentation and encoding information of the text to be processed, the key segmentation is determined, the adjacency matrix is ​​constructed, feature fusion and optimization are performed, and a target node feature matrix with deep semantic features is generated, and then the summary text is generated.

Benefits of technology

It improves the accuracy and depth of the summary text, comprehensively and accurately captures the semantic information and lexical relevance of the text to be processed, and enhances the coherence and logic of the summary text.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119336904A_ABST
    Figure CN119336904A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of artificial intelligence, and relates to an abstract text generation method which comprises the following steps: acquiring a to-be-processed text, and encoding the to-be-processed text to obtain a plurality of segmented words of the to-be-processed text and encoding information corresponding to each segmented word; determining key segmented words from the plurality of segmented words, and constructing an adjacent matrix of the to-be-processed text based on the key segmented words; performing feature fusion on the coding information and the adjacent matrix to obtain a node feature matrix of the to-be-processed text; performing feature optimization processing on the node feature matrix to obtain a target node feature matrix of the to-be-processed text; and generating an abstract text of the to-be-processed text based on the target node feature matrix. The invention further provides a device, equipment and a medium. In addition, the invention also relates to a block chain technology, and the to-be-processed text, the plurality of segmented words, the coding information, the adjacency matrix, the node feature matrix, the target node feature matrix and the abstract text can be stored in the block chain. The abstract text generation accuracy can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method, device, equipment and medium for generating a summary text. Background Art

[0002] In the field of natural language processing (NLP), text summarization, as one of the key technologies, plays a key role in extracting core information from lengthy texts. This technology has shown great application potential in the fields of finance and insurance, for example, automatically generating product copy or report summaries, which significantly improves the efficiency of information processing and dissemination.

[0003] Currently, text summarization technology is mainly divided into extractive summarization. Extractive summarization constructs summaries by selecting sentences or phrases from the original text. Although it can reflect the core content of the original text to a certain extent, it often leads to incoherent content due to direct extraction, and it is difficult to integrate multi-source information to form a high-quality summary. The generated summary text is not accurate. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a summary text generation method, device, equipment and medium to solve the problem of low accuracy of existing summary text generation.

[0005] In order to solve the above technical problems, the present application embodiment provides a summary text generation method, which adopts the following technical solutions:

[0006] The text to be processed is obtained, the text to be processed is encoded, and multiple word segments of the text to be processed and the encoding information corresponding to each word segment are obtained; the key word segment is determined from the multiple word segments, and the adjacency matrix of the text to be processed is constructed based on the key word segment; the encoding information and the adjacency matrix are subjected to feature fusion to obtain the node feature matrix of the text to be processed, and the node feature matrix represents the semantic information of the text to be processed and the association information between the multiple word segments; the node feature matrix is ​​subjected to feature optimization processing to obtain the target node feature matrix of the text to be processed, and the target node feature matrix represents the deep semantic features of the text to be processed; based on the target node feature matrix, a summary text of the text to be processed is generated.

[0007] Furthermore, the step of encoding the text to be processed to obtain multiple word segments of the text to be processed and encoding information corresponding to each word segment specifically includes:

[0008] A preset word segmenter is used to perform word segmentation on the text to be processed to obtain multiple word segments of the text to be processed; the multiple word segments are input into a preset encoding model to output encoding information of the multiple word segments.

[0009] Furthermore, the step of determining a key word from a plurality of words specifically includes:

[0010] A preset linear layer is used to perform word segmentation prediction on multiple word segments, and the key word score of each word segmentation is output; a preset extreme value index function is used to determine the word segmentation whose key word score among multiple key word segmentations reaches the preset score as a key word segmentation.

[0011] Furthermore, the step of constructing an adjacency matrix of the text to be processed based on the key word segmentation specifically includes:

[0012] Based on the dimensional information of multiple word segmentations and the preset matrix construction rules, an initial adjacency matrix is ​​constructed; based on the key word segmentation scores corresponding to the key word segmentations and the preset matrix filling algorithm, the initial adjacency matrix is ​​filled to obtain the adjacency matrix of the text to be processed.

[0013] Furthermore, the step of fusing the encoded information with the adjacency matrix to obtain a node feature matrix of the text to be processed specifically includes:

[0014] A preset first graph convolutional network is used to construct initial node feature matrices of multiple word segmentations based on the encoding information, and the neighbor nodes of each node in the adjacency matrix are determined; the aggregated neighbor feature information of each node is obtained according to the weight value of the adjacency matrix and the feature information of the neighbor nodes, and the aggregated neighbor feature information is obtained by aggregating the feature information of all neighbor nodes of each node; the aggregated neighbor feature information is aggregated with the feature information of each node to obtain the aggregated node feature information; based on the aggregated node feature information, the feature information of each node in the initial node feature matrix is ​​updated to obtain the node feature matrix of the text to be processed.

[0015] Further, the step of performing feature optimization processing on the node feature matrix to obtain the target node feature matrix of the text to be processed specifically includes:

[0016] A preset graph pooling model is used to reduce the dimension of the node feature matrix to generate an aggregated node feature matrix, which represents the key information of the text to be processed. A preset second graph convolutional network is used to perform a convolution operation on the aggregated node feature matrix to obtain the target node feature matrix of the text to be processed.

[0017] Furthermore, based on the target node feature matrix, the step of generating a summary text of the text to be processed specifically includes:

[0018] The target node feature matrix is ​​input into the preset language model to generate a summary text of the text to be processed.

[0019] In order to solve the above technical problems, the embodiment of the present application also provides a summary text generation device, which adopts the following technical solution:

[0020] An acquisition module is used to acquire the text to be processed, encode the text to be processed, and obtain multiple word segments of the text to be processed and encoding information corresponding to each word segment;

[0021] A construction module, used for determining a key word from multiple words, and constructing an adjacency matrix of the text to be processed based on the key word;

[0022] A fusion module is used to fuse the encoding information with the adjacency matrix to obtain a node feature matrix of the text to be processed. The node feature matrix represents the semantic information of the text to be processed and the association information between multiple word segments.

[0023] An optimization module is used to perform feature optimization processing on the node feature matrix to obtain a target node feature matrix of the text to be processed, where the target node feature matrix represents the deep semantic features of the text to be processed;

[0024] The summary generation module is used to generate a summary text of the text to be processed based on the target node feature matrix.

[0025] In order to solve the above technical problems, an embodiment of the present application also provides a computer device, including a memory and a processor, wherein the memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, the steps of the above summary text generation method are implemented.

[0026] In order to solve the above technical problems, an embodiment of the present application also provides a computer-readable storage medium, which stores computer-readable instructions. The computer-readable instructions can be executed by at least one processor to enable at least one processor to perform the steps of the above summary text generation method.

[0027] Compared with the prior art, the embodiment of the present application mainly has the following beneficial effects: the text to be processed is encoded, and the accurate acquisition of word segmentation and its encoding information is realized, which lays a solid foundation for subsequent processing. By constructing an adjacency matrix based on key word segmentation, the correlation information between the internal words of the text to be processed is effectively captured, and the coherence and logic of the summary text generated subsequently are enhanced. The feature fusion step closely combines the encoding information with the adjacency matrix to form a node feature matrix containing rich semantic information and vocabulary relevance, which provides comprehensive data support for the generation of summary text. Further, through feature optimization processing, the target node feature matrix not only retains the main semantic features of the text to be processed, but also deeply excavates the deep meaning of the text to be processed, and improves the accuracy and depth of the summary text. In summary, the embodiment of the present application can comprehensively and accurately capture the semantic information and vocabulary relevance of the text to be processed, and generate a target node feature matrix with deep semantic features through feature optimization processing, which provides a strong guarantee for efficient and high-quality summary text generation, thereby improving the accuracy of summary text generation. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0029] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;

[0030] Figure 2 It is a flowchart of a summary text generation method provided by this application;

[0031] Figure 3 It is a structural schematic diagram of a summary text generation device provided by the present application;

[0032] Figure 4 It is a structural schematic diagram of a computer device provided by this application. DETAILED DESCRIPTION

[0033] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.

[0034] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0035] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.

[0036] like Figure 1As shown, the system architecture 100 may include a terminal device 101, a network 102 and a server 103. The terminal device 101 may be a laptop 1011, a tablet computer 1012 or a mobile phone 1013. The network 102 is used to provide a medium for a communication link between the terminal device 101 and the server 103. The network 102 may include various connection types, such as wired, wireless communication links or optical fiber cables.

[0037] The user can use the terminal device 101 to interact with the server 103 through the network 102 to receive or send messages, etc. Various communication client applications can be installed on the terminal device 101, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0038] The terminal device 101 can be any electronic device with a display screen and supporting web browsing. In addition to a laptop computer 1011, a tablet computer 1012 or a mobile phone 1013, the terminal device 101 can also be an e-book reader, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 (Moving Picture Experts Group Audio Layer IV), a laptop computer, a desktop computer, etc.

[0039] The server 103 may be a server that provides various services, such as a background server that provides support for a web page displayed on the terminal device 101 .

[0040] It should be noted that the summary text generation method provided in the embodiment of the present application is generally executed by a server, and accordingly, the summary text generation device is generally arranged in the server.

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

[0042] Continue to refer Figure 2 , shows a flow chart of an embodiment of a method for generating a summary text according to the present application. The method for generating a summary text comprises the following steps:

[0043] Step S201, obtaining a text to be processed, encoding the text to be processed, and obtaining a plurality of word segments of the text to be processed and encoding information corresponding to each word segment.

[0044] In this embodiment, the summary text generation method is executed on an electronic device (eg Figure 1 The server shown in the figure) can obtain the text to be processed through a wired connection or a wireless connection. It should be noted that the above wireless connection method may include but is not limited to 3G / 4G / 5G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future.

[0045] The text to be processed refers to the original text data that needs to be extracted and the summary text generated, for example, news reports, academic papers, product descriptions and other forms of text content.

[0046] Among them, encoding is the process of converting the text to be processed into a digital or vector form that can be recognized by a computer. Through a specific encoding algorithm or encoding model (Robustly optimized BERT approach, RoBERTa model, a pre-trained language model based on Transformer structure), each word segment in the text to be processed can be mapped to a unique digital identifier or vector representation to obtain the encoding information corresponding to each word segment.

[0047] Among them, multiple word segments refer to the basic language units into which the text to be processed is divided according to language rules or algorithms, such as words, phrases, etc. These word segments are the basic processing units in the process of generating summary texts, which can reflect the theme and key information of the text to be processed.

[0048] The encoding information refers to the digital or vector representation of each word after encoding, which contains key information such as the position and semantics of the word in the text to be processed.

[0049] Step S202, determining a key word from multiple word segments, and constructing an adjacency matrix of the text to be processed based on the key word segment.

[0050] Among them, key words refer to words that have an important influence on understanding the content of the text and expressing the theme of the text or appear frequently in the text to be processed. These words can be used to construct an adjacency matrix to reflect the important correlation information within the text to be processed.

[0051] Among them, the adjacency matrix is ​​a matrix used to represent the relationship between nodes in the matrix graph. In the process of generating summary text, it is constructed based on key words, and the elements in the adjacency matrix represent whether there is a relationship or the strength of the relationship between the words.

[0052] Step S203, feature fusion is performed on the encoding information and the adjacency matrix to obtain a node feature matrix of the text to be processed, where the node feature matrix represents the semantic information of the text to be processed and the association information between multiple word segments.

[0053] Among them, feature fusion refers to the process of using the adjacency matrix to aggregate the feature information of the neighboring nodes of each node in the adjacency matrix, and using it to update the feature information of each node, and then using the updated feature information of each node to update the node feature information of the initial node feature matrix constructed based on the encoding information.

[0054] The node feature matrix is ​​a matrix used to represent each word segment and its associated information in the text to be processed. It contains the semantic information of the word segment and the associated information between the word segment.

[0055] Semantic information refers to the meaning, concepts, and knowledge expressed in the text to be processed. It reflects the key content of the text to be processed, such as the subject and intention. In summary text generation, the extraction and representation of semantic information is crucial to generate accurate and coherent summary text.

[0056] Among them, the association information refers to the association and connection between different word segments in the text to be processed. It can include grammatical relations, logical relations, thematic relations, etc. In the process of generating summary text, capturing and using the association information helps to generate more coherent and consistent summary text.

[0057] Step S204, performing feature optimization processing on the node feature matrix to obtain a target node feature matrix of the text to be processed, wherein the target node feature matrix represents the deep semantic features of the text to be processed.

[0058] Among them, feature optimization processing refers to the process of further feature extraction and aggregation of the node feature matrix to improve its feature representation ability and summary generation effect. It can include steps such as dimensionality reduction and convolution operations to reduce redundant information, extract key features, and form a more representative target node feature matrix.

[0059] Among them, the target node feature matrix is ​​the final feature representation matrix obtained after feature optimization processing and used for summary text generation. It contains the deep semantic features of the text to be processed and the association information between key word segments, and is the key to generating accurate and coherent summary text.

[0060] Step S205: Generate a summary text of the text to be processed based on the target node feature matrix.

[0061] The summary text is a short text obtained by compressing and refining the original text to be processed. It retains the main content and key information of the original text to be processed, while removing redundant and minor information.

[0062] The embodiment of the present application can encode the text to be processed, realize the accurate acquisition of word segmentation and its coding information, and lay a solid foundation for subsequent processing. By constructing an adjacency matrix based on key word segmentation, the correlation information between the internal words of the text to be processed is effectively captured, and the coherence and logic of the summary text generated subsequently are enhanced. The feature fusion step closely combines the coding information with the adjacency matrix, forms a node feature matrix containing rich semantic information and vocabulary relevance, and provides comprehensive data support for the generation of summary text. Further, through feature optimization processing, the target node feature matrix not only retains the main semantic features of the text to be processed, but also deeply excavates the deep meaning of the text to be processed, and improves the accuracy and depth of the summary text. In summary, the embodiment of the present application can comprehensively and accurately capture the semantic information and vocabulary relevance of the text to be processed, and generates a target node feature matrix with deep semantic features through feature optimization processing, which provides a strong guarantee for efficient and high-quality summary text generation, thereby improving the accuracy of summary text generation.

[0063] In some optional implementations of this embodiment, step 201, encoding the text to be processed to obtain multiple word segments of the text to be processed and encoding information corresponding to each word segment, specifically includes the following steps:

[0064] A preset word segmenter is used to perform word segmentation on the text to be processed to obtain multiple word segments of the text to be processed; the multiple word segments are input into a preset encoding model to output encoding information of the multiple word segments.

[0065] In one example, a preset word segmenter can be used to perform word segmentation on the text to be processed, and the continuous text to be processed can be cut into independent vocabulary units to obtain multiple word segments. Then, these word segments can be input into a preset encoding model, such as a RoBERTa model. In the RoBERTa encoding model, each word segment is converted into a high-dimensional vector, which contains the semantic information and context information of the word segment. These vectors are output as encoding information. For example, in applications in the financial field, a preset word segmenter can be used to perform word segmentation on financial transaction records, customer consultation information, or market analysis reports waiting for processing text to obtain multiple word segments. These word segments are then input into a preset encoding model, and the encoding information corresponding to each word segment is output, so that the summary text corresponding to the text waiting for processing of the financial transaction records, customer consultation information, or market analysis reports is finally generated by processing multiple word segments and encoding information. For another example, in the medical field, a medical-specific word segmenter, such as a word segmenter based on a medical dictionary and a machine learning algorithm, is used to segment the free text in the electronic medical record to obtain multiple word segments, which are then input into a coding model trained with medical field data to output the coding information corresponding to each word segment, so that the multiple word segments and coding information can be subsequently processed to ultimately generate a summary text corresponding to the free text in the electronic medical record.

[0066] The embodiment of the present application can perform word segmentation on the text to be processed by a preset word segmenter, and can accurately identify the vocabulary boundaries and semantic units in the text to be processed. This helps to reduce word segmentation errors and improve the accuracy of subsequent summary text generation. The encoding model can convert the word segmentation results into high-dimensional vector representations (i.e., encoding information), and these vectors contain rich semantic information and context information. This representation method not only improves the efficiency of the text to be processed, but also provides richer features for subsequent summary text generation tasks.

[0067] In some optional implementations of this embodiment, in step S202, determining a key participle from a plurality of participles specifically includes the following steps:

[0068] A preset linear layer is used to perform word segmentation prediction on multiple word segments, and the key word score of each word segmentation is output; a preset extreme value index function is used to determine the word segmentation whose key word score among multiple key word segmentations reaches the preset score as a key word segmentation.

[0069] In one example, a preset linear layer can be used to predict multiple word segments. In this step, the linear layer, as a fully connected neural network layer, receives the feature vector of the word segment as input, and performs a linear transformation on these features through the learned weight matrix. The result after the transformation, that is, the key word score of each word segment, reflects the importance or criticality of the word segment in the text. Next, a preset extreme index function, such as the argmax function, can be used to process the key word score. The function of the argmax function is to find the index corresponding to the maximum value from a series of numerical values. The argmax function can be applied to the key word score sequence to find the word with the highest score. If the highest score reaches or exceeds the preset score threshold, the word is judged as a key word segment. This step realizes the mapping from key word score to key word segment, so that the key information in the text can be identified according to the key word score.

[0070] The embodiment of the present application can predict the word segmentation through a preset linear layer, and can use the powerful ability of the deep learning model to capture the correlation and contextual information between the word segmentations, thereby improving the accuracy of the word segmentation prediction. Using an extreme index function (such as argmax) to find the word segmentation whose key word score reaches a preset score, and judge it as a key word segmentation, this method can directly perform word segmentation screening based on the key word score, avoiding the subjectivity and uncertainty of artificially set rules, and improving the accuracy of key word extraction.

[0071] In some optional implementations of this embodiment, step S202, constructing an adjacency matrix of the text to be processed based on the key word segmentation, specifically includes the following steps:

[0072] Based on the dimensional information of multiple word segmentations and the preset matrix construction rules, an initial adjacency matrix is ​​constructed; based on the key word segmentation scores corresponding to the key word segmentations and the preset matrix filling algorithm, the initial adjacency matrix is ​​filled to obtain the adjacency matrix of the text to be processed.

[0073] In one example, a square matrix with the same dimension as the number of segmented words can be created as an initial adjacency matrix based on a preset matrix construction rule. And according to the matrix construction rule, the diagonal elements of the initial adjacency matrix are initialized to 1, indicating that each segmented word will aggregate its own information. Based on the preset matrix filling algorithm, the key segmented word prediction results are traversed. If multiple consecutive segmented words are predicted as key segmented words (i.e., continuous 1), the first and last positions of these continuous segmented word sequences are set to 1 in the initial adjacency matrix. This indicates that there is a connection relationship between these key segmented words, and information can be aggregated with each other. Suppose there is a text containing 5 segmented words (A, B, C, D, E), and the key segmented word prediction results are [1, 1, 1, 0, 1] (indicating that A, B, C are key segmented words, D is not, and E is a key segmented word). Initialize a 5x5 adjacency matrix with the same dimension as the number of segmented words (for example, 5), and the diagonal elements are 1. Traversing the prediction results of key word segmentation, we find that A, B, and C are consecutive 1s, so A (first position) and C (third position) are set to 1 in the adjacency matrix (connected end to end). E is a separate key word segmentation, but since it is not part of a continuous sequence, it is not directly connected to other segmentations (unless there are other continuous sequences containing E). However, in this example, the adjacency matrix is ​​constructed only based on the given information, so the adjacency relationship of E is only with itself (1 on the diagonal).

[0074] The embodiment of the present application can construct an initial adjacency matrix through dimensional information, which can accurately capture the correlation between different participles in a specific dimension. The initial adjacency matrix is ​​filled with key participle scores to quantify the importance of each key participle in the text. As a concise data structure, the adjacency matrix can intuitively represent the complex relationship between participles. Compared with traditional text representation methods (such as the bag of words model), the adjacency matrix has higher efficiency when processing large-scale text data.

[0075] In some optional implementations of this embodiment, step S203, performing feature fusion on the encoding information and the adjacency matrix to obtain a node feature matrix of the text to be processed, specifically includes the following steps:

[0076] A preset first graph convolutional network is used to construct initial node feature matrices of multiple word segmentations based on the encoding information, and the neighbor nodes of each node in the adjacency matrix are determined; the aggregated neighbor feature information of each node is obtained according to the weight value of the adjacency matrix and the feature information of the neighbor nodes, and the aggregated neighbor feature information is obtained by aggregating the feature information of all neighbor nodes of each node; the aggregated neighbor feature information is aggregated with the feature information of each node to obtain the aggregated node feature information; based on the aggregated node feature information, the feature information of each node in the initial node feature matrix is ​​updated to obtain the node feature matrix of the text to be processed.

[0077] In one example, the encoding information and the adjacency matrix can be input into the first graph convolutional network (Graph Convolutional Network, GCN) to output the node feature matrix representing the semantic information of the text to be processed and the association information between multiple word segments. The encoding information and the adjacency matrix are input into the GCN, and the purpose is to obtain a richer and higher-dimensional feature representation through the GCN. GCN can make full use of the structural information contained in the adjacency matrix to assist in the deep analysis and processing of text encoding and simulate the information exchange between nodes. Specifically, the word segmentation sequence of multiple word segments input into the GCN can be obtained, and the encoding vector corresponding to each word segmentation sequence can be obtained for the word segmentation sequence to construct the initial node feature matrix. The adjacency matrix input into the GCN, for each node of the adjacency matrix, obtains the neighbor node corresponding to each node indicated in the adjacency matrix, and calculates the weighted sum of the neighbor node feature vectors according to the weight value in the adjacency matrix, that is, the feature vectors of all neighbor nodes of the current node are multiplied by their corresponding weights, and then the result obtained by adding these products is the aggregated neighbor feature information of each node. Aggregate the calculated weighted sum of neighbor node features with the feature information of each node in the adjacency matrix to obtain aggregated node feature information. Update the feature representation of the corresponding row in the initial node feature matrix based on the aggregated node feature information to obtain an updated node feature matrix.

[0078] In the embodiment of the present application, the feature representation of each word segment (node) can be based not only on its own encoding information, but also on the feature information of its neighboring nodes through a graph convolutional network. This fusion method makes the feature representation of each word segment more abundant and contains more contextual information. The weight values ​​in the adjacency matrix reflect the strength of association between the word segments. By aggregating the feature information of neighboring nodes, the complex relationship between the word segments in the text to be processed can be captured.

[0079] In some optional implementations of this embodiment, in step S204, feature optimization processing is performed on the node feature matrix to obtain a target node feature matrix of the text to be processed, which specifically includes the following steps:

[0080] A preset graph pooling model is used to reduce the dimension of the node feature matrix to generate an aggregated node feature matrix, which represents the key information of the text to be processed. A preset second graph convolutional network is used to perform a convolution operation on the aggregated node feature matrix to obtain the target node feature matrix of the text to be processed.

[0081] In one example, the node feature matrix can be reduced in dimension through a graph pooling model, such as the DiffPool model (a differentiable pooling operation module for graph classification, which can generate a hierarchical representation of the graph and can be integrated by various graph neural networks in an end-to-end manner), that is, the nodes of the node feature matrix are aggregated into fewer clusters, thereby reducing the size of the node feature matrix and extracting higher-level features to obtain an aggregated node feature matrix. Each node feature vector in the aggregated node feature matrix reflects the key content in the text to be processed more concentratedly. The aggregated node feature matrix is ​​further feature extracted and aggregated through a second graph convolutional network (such as GCN) to obtain a target node feature matrix that represents the deep semantic features of the text to be processed. Each node feature vector in the target node feature matrix contains deep semantic information extracted from the entire text to be processed. This information not only includes the key content in the original text to be processed, but the second graph convolutional network also further explores the potential associations and deep meanings between the various parts of the text to be processed.

[0082] The graph pooling model used in the embodiment of the present application not only retains the most representative features of the text to be processed and removes redundant and noise information by aggregating node features, but also effectively reduces the dimensionality of the original node feature matrix. This dimensionality reduction process not only reduces the dimension of the data, but also reduces the computational complexity of subsequent convolution operations. The graph convolutional network can capture the association relationship between nodes and fuse contextual information through convolution operations to obtain a target node feature matrix that represents the deep semantic features of the text to be processed.

[0083] In some optional implementations of this embodiment, step S205, generating a summary text of the text to be processed based on the target node feature matrix, specifically includes the following steps:

[0084] The target node feature matrix is ​​input into the preset language model to generate a summary text of the text to be processed.

[0085] In one example, the format of the target node feature matrix can be converted into a format acceptable to a preset language model. The preset language model can be GPT-3, which is a generative pre-trained language model based on Transformer, the core of which is the Transformer architecture, which is a neural network structure based on the self-attention mechanism. The converted target node feature matrix is ​​input into GPT-3, which will automatically generate an accurate and coherent summary text, which can concisely summarize the main content of the text to be processed.

[0086] In the embodiment of the present application, the language model can more accurately capture the key information of the text to be processed by taking the target node feature matrix as input. These key information are the node features processed by the graph neural network, which have integrated the context and semantic relationship of the text to be processed. Therefore, compared with directly inputting the original text to be processed, this method can generate a more accurate summary text that is more in line with the main idea of ​​the original text to be processed. At the same time, since the target node feature matrix has already performed dimensionality reduction and feature extraction on the text to be processed, the language model can be more efficient in processing these features, thereby improving the efficiency of summary text generation.

[0087] It should be emphasized that in order to further ensure the privacy and security of the above-mentioned text to be processed, multiple word segmentations, encoding information, adjacency matrix, node feature matrix, target node feature matrix, and summary text, the above-mentioned text to be processed, multiple word segmentations, encoding information, adjacency matrix, node feature matrix, target node feature matrix, and summary text can also be stored in a node of a blockchain.

[0088] The blockchain referred to in this application is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.

[0089] The embodiment of the present application can acquire and process the text to be processed, multiple word segments, coding information, adjacency matrix, node feature matrix, and target node feature matrix based on the relevant algorithms of natural language processing technology (NLP) under artificial intelligence. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0090] Natural language processing technology is a key branch in the field of artificial intelligence. It focuses on giving computers the ability to understand and process human language, so that they can parse, understand and generate natural language text like humans. By simulating some core mechanisms of human language processing, NLP technology can deeply process, analyze and interpret text data, extract key information, understand semantic content, and perform complex tasks or generate natural language responses based on it. Natural language processing technology can be used to encode the text to be processed, and determine key segmentations based on the segmentations obtained by encoding to construct an adjacency matrix. After the encoded information and the adjacency matrix are feature fused to obtain a node feature matrix, the node feature matrix is ​​feature optimized to obtain a target node feature matrix, so as to generate a summary text of the text to be processed based on the target node feature matrix.

[0091] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0092] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0093] Further references Figure 3 , as a response to the above Figure 2 The present application provides an embodiment of a summary text generation device, and the device embodiment is similar to Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0094] like Figure 3 As shown, the summary text generation device 400 of this embodiment includes: an acquisition module 401, a construction module 402, a fusion module 403, an optimization module 404 and a summary generation module 405. Among them:

[0095] The acquisition module 401 is used to acquire the text to be processed, encode the text to be processed, and obtain multiple word segments of the text to be processed and encoding information corresponding to each word segment;

[0096] A construction module 402 is used to determine a key word from a plurality of word segments, and construct an adjacency matrix of the text to be processed based on the key word segment;

[0097] A fusion module 403 is used to perform feature fusion on the encoding information and the adjacency matrix to obtain a node feature matrix of the text to be processed, where the node feature matrix represents the semantic information of the text to be processed and the association information between multiple word segments;

[0098] The optimization module 404 is used to perform feature optimization processing on the node feature matrix to obtain a target node feature matrix of the text to be processed, where the target node feature matrix represents the deep semantic features of the text to be processed;

[0099] The summary generation module 405 is used to generate a summary text of the text to be processed based on the target node feature matrix.

[0100] The embodiment of the present application can achieve accurate acquisition of word segmentation and its coding information by encoding the text to be processed, laying a solid foundation for subsequent processing. By constructing an adjacency matrix based on key word segmentation, the correlation information between the internal words of the text to be processed is effectively captured, and the coherence and logic of the summary text generated subsequently are enhanced. The feature fusion step closely combines the coding information with the adjacency matrix to form a node feature matrix containing rich semantic information and vocabulary relevance, which provides comprehensive data support for the generation of summary text. Further, through feature optimization processing, the target node feature matrix not only retains the main semantic features of the text to be processed, but also deeply excavates the deep meaning of the text to be processed, and improves the accuracy and depth of the summary text. In summary, the embodiment of the present application can comprehensively and accurately capture the semantic information and vocabulary relevance of the text to be processed, and generates a target node feature matrix with deep semantic features through feature optimization processing, which provides a strong guarantee for efficient and high-quality summary text generation, thereby improving the accuracy of summary text generation.

[0101] In one embodiment, the acquisition module 401 includes:

[0102] The word segmentation submodule is used to use a preset word segmenter to perform word segmentation on the text to be processed to obtain multiple word segments of the text to be processed;

[0103] The output submodule is used to input multiple word segments into a preset encoding model and output encoding information of the multiple word segments.

[0104] The embodiment of the present application can perform word segmentation on the text to be processed by a preset word segmenter, and can accurately identify the vocabulary boundaries and semantic units in the text to be processed. This helps to reduce word segmentation errors and improve the accuracy of subsequent summary text generation. The encoding model can convert the word segmentation results into high-dimensional vector representations (i.e., encoding information), and these vectors contain rich semantic information and context information. This representation method not only improves the efficiency of the text to be processed, but also provides richer features for subsequent summary text generation tasks.

[0105] In one embodiment, the building block 402 includes:

[0106] The prediction submodule is used to use a preset linear layer to perform word segmentation prediction on multiple words and output the key word score of each word;

[0107] The determination submodule is used to use a preset extreme value index function to determine a word whose key word score reaches a preset score among multiple key word parts as a key word.

[0108] The embodiment of the present application can predict the word segmentation through a preset linear layer, and can use the powerful ability of the deep learning model to capture the correlation and contextual information between the word segmentations, thereby improving the accuracy of the word segmentation prediction. Using an extreme index function (such as argmax) to find the word segmentation whose key word score reaches a preset score, and judge it as a key word segmentation, this method can directly perform word segmentation screening based on the key word score, avoiding the subjectivity and uncertainty of artificially set rules, and improving the accuracy of key word extraction.

[0109] In one embodiment, the building block 402 includes:

[0110] The first construction submodule is used to construct an initial adjacency matrix based on the dimension information of multiple word segments and a preset matrix construction rule;

[0111] The filling submodule is used to fill the initial adjacency matrix based on the key word scores corresponding to the key words and a preset matrix filling algorithm to obtain the adjacency matrix of the text to be processed.

[0112] The embodiment of the present application can construct an initial adjacency matrix through dimensional information, which can accurately capture the correlation between different participles in a specific dimension. The initial adjacency matrix is ​​filled with key participle scores to quantify the importance of each key participle in the text. As a concise data structure, the adjacency matrix can intuitively represent the complex relationship between participles. Compared with traditional text representation methods (such as the bag of words model), the adjacency matrix has higher efficiency when processing large-scale text data.

[0113] In one embodiment, the fusion module 403 includes:

[0114] The second construction submodule is used to use the preset first graph convolutional network to construct the initial node feature matrix of multiple word segmentations based on the encoding information, and determine the neighbor nodes of each node in the adjacency matrix;

[0115] The submodule is used to obtain the aggregated neighbor feature information of each node according to the weight value of the adjacency matrix and the feature information of the neighbor nodes. The aggregated neighbor feature information is obtained by aggregating the feature information of all neighbor nodes of each node;

[0116] The aggregation submodule is used to aggregate the aggregated neighbor feature information with the feature information of each node to obtain aggregated node feature information;

[0117] The updating submodule is used to update the feature information of each node in the initial node feature matrix based on the aggregated node feature information to obtain the node feature matrix of the text to be processed.

[0118] In the embodiment of the present application, the feature representation of each word segment (node) can be based not only on its own encoding information, but also on the feature information of its neighboring nodes through a graph convolutional network. This fusion method makes the feature representation of each word segment more abundant and contains more contextual information. The weight values ​​in the adjacency matrix reflect the strength of association between the word segments. By aggregating the feature information of neighboring nodes, the complex relationship between the word segments in the text to be processed can be captured.

[0119] In one embodiment, the optimization module 404 includes:

[0120] The dimension reduction submodule is used to use a preset graph pooling model to perform dimension reduction processing on the node feature matrix to generate an aggregated node feature matrix, and the aggregated node feature matrix represents the key information of the text to be processed;

[0121] The convolution submodule is used to use a preset second graph convolutional network to perform a convolution operation on the aggregated node feature matrix to obtain a target node feature matrix of the text to be processed.

[0122] The graph pooling model used in the embodiment of the present application not only retains the most representative features of the text to be processed and removes redundant and noise information by aggregating node features, but also effectively reduces the dimensionality of the original node feature matrix. This dimensionality reduction process not only reduces the dimension of the data, but also reduces the computational complexity of subsequent convolution operations. The graph convolutional network can capture the association relationship between nodes and fuse contextual information through convolution operations to obtain a target node feature matrix that represents the deep semantic features of the text to be processed.

[0123] In one embodiment, the summary generation module 405 includes:

[0124] The generation submodule is used to input the target node feature matrix into a preset language model to generate a summary text of the text to be processed.

[0125] In the embodiment of the present application, the language model can more accurately capture the key information of the text to be processed by taking the target node feature matrix as input. These key information are the node features processed by the graph neural network, which have integrated the context and semantic relationship of the text to be processed. Therefore, compared with directly inputting the original text to be processed, this method can generate a more accurate summary text that is more in line with the main idea of ​​the original text to be processed. At the same time, since the target node feature matrix has already performed dimensionality reduction and feature extraction on the text to be processed, the language model can be more efficient in processing these features, thereby improving the efficiency of summary text generation.

[0126] To solve the above technical problems, the present application also provides a computer device. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.

[0127] The computer device 6 includes a memory 61, a processor 62, and a network interface 63 that are interconnected and communicated through a system bus. It should be noted that the figure only shows a computer device 6 having a memory 61, a processor 62, and a network interface 63, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (ASIC), programmable gate arrays (FPGA), digital signal processors (DSP), embedded devices, etc.

[0128] Computer devices can be computing devices such as desktop computers, notebooks, PDAs, and cloud servers. Computer devices can interact with users through keyboards, mice, remote controls, touch pads, or voice control devices.

[0129] The memory 61 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 61 can be an internal storage unit of the computer device 6, such as a hard disk or memory of the computer device 6. In other embodiments, the memory 61 can also be an external storage device of the computer device 6, such as a plug-in hard disk equipped on the computer device 6, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the memory 61 can also include both the internal storage unit of the computer device 6 and its external storage device. In this embodiment, the memory 61 is generally used to store the operating system and various application software installed on the computer device 6, such as computer-readable instructions of the summary text generation method, etc. In addition, the memory 61 can also be used to temporarily store various types of data that have been output or are to be output.

[0130] The processor 62 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 62 is generally used to control the overall operation of the computer device 6. In this embodiment, the processor 62 is used to run computer-readable instructions stored in the memory 61 or process data, such as computer-readable instructions for running the summary text generation method.

[0131] The network interface 63 may include a wireless network interface or a wired network interface, and the network interface 63 is generally used to establish a communication connection between the computer device 6 and other electronic devices.

[0132] The embodiment of the present application can achieve accurate acquisition of word segmentation and its coding information by encoding the text to be processed, laying a solid foundation for subsequent processing. By constructing an adjacency matrix based on key word segmentation, the correlation information between the internal words of the text to be processed is effectively captured, and the coherence and logic of the summary text generated subsequently are enhanced. The feature fusion step closely combines the coding information with the adjacency matrix to form a node feature matrix containing rich semantic information and vocabulary relevance, which provides comprehensive data support for the generation of summary text. Further, through feature optimization processing, the target node feature matrix not only retains the main semantic features of the text to be processed, but also deeply excavates the deep meaning of the text to be processed, and improves the accuracy and depth of the summary text. In summary, the embodiment of the present application can comprehensively and accurately capture the semantic information and vocabulary relevance of the text to be processed, and generates a target node feature matrix with deep semantic features through feature optimization processing, which provides a strong guarantee for efficient and high-quality summary text generation, thereby improving the accuracy of summary text generation.

[0133] The present application also provides another implementation, namely, providing a computer-readable storage medium, which stores computer-readable instructions. The computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the summary text generation method as described above.

[0134] The embodiment of the present application can achieve accurate acquisition of word segmentation and its coding information by encoding the text to be processed, laying a solid foundation for subsequent processing. By constructing an adjacency matrix based on key word segmentation, the correlation information between the internal words of the text to be processed is effectively captured, and the coherence and logic of the summary text generated subsequently are enhanced. The feature fusion step closely combines the coding information with the adjacency matrix to form a node feature matrix containing rich semantic information and vocabulary relevance, which provides comprehensive data support for the generation of summary text. Further, through feature optimization processing, the target node feature matrix not only retains the main semantic features of the text to be processed, but also deeply excavates the deep meaning of the text to be processed, and improves the accuracy and depth of the summary text. In summary, the embodiment of the present application can comprehensively and accurately capture the semantic information and vocabulary relevance of the text to be processed, and generates a target node feature matrix with deep semantic features through feature optimization processing, which provides a strong guarantee for efficient and high-quality summary text generation, thereby improving the accuracy of summary text generation.

[0135] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods of each embodiment of the present application.

[0136] The non-Company software tools or components appearing in the embodiments of this application are merely examples and do not represent actual use.

[0137] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.

Claims

1. A summary text generation method, characterized in that: The steps include: Obtaining a text to be processed, encoding the text to be processed, and obtaining a plurality of word segments of the text to be processed and encoding information corresponding to each word segment; Determine a key participle from the multiple participles, and construct an adjacency matrix of the text to be processed based on the key participles; Performing feature fusion on the encoding information and the adjacency matrix to obtain a node feature matrix of the text to be processed, wherein the node feature matrix represents the semantic information of the text to be processed and the association information between the multiple word segments; Performing feature optimization processing on the node feature matrix to obtain a target node feature matrix of the text to be processed, wherein the target node feature matrix represents deep semantic features of the text to be processed; Based on the target node feature matrix, a summary text of the text to be processed is generated.

2. The method according to claim 1, characterized in that The step of encoding the text to be processed to obtain multiple word segments of the text to be processed and encoding information corresponding to each word segment specifically includes: Using a preset word segmenter to perform word segmentation processing on the text to be processed to obtain multiple word segments of the text to be processed; The multiple word segments are input into a preset encoding model, and encoding information of the multiple word segments is output.

3. The method according to claim 1, characterized in that: The step of determining a key participle from the multiple participles specifically includes: Using a preset linear layer, perform word segmentation prediction on the multiple word segments, and output a key word segmentation score for each word segment; A preset extreme value index function is used to determine the key participles whose key participle scores reach the preset scores as key participles.

4. The method according to claim 3, characterized in that The step of constructing the adjacency matrix of the text to be processed based on the key participles specifically includes: Based on the dimensional information of the multiple word segments and a preset matrix construction rule, construct an initial adjacency matrix; Based on the key word segmentation scores corresponding to the key word segmentation and a preset matrix filling algorithm, the initial adjacency matrix is ​​filled to obtain the adjacency matrix of the text to be processed.

5. The method according to claim 1, characterized in that The step of fusing the encoding information with the adjacency matrix to obtain a node feature matrix of the text to be processed specifically includes: Using a preset first graph convolutional network, constructing an initial node feature matrix of the plurality of word segments based on the encoding information, and determining a neighbor node of each node in the adjacency matrix; Obtaining aggregated neighbor feature information of each node according to the weight value of the adjacency matrix and the feature information of the neighbor nodes, wherein the aggregated neighbor feature information is obtained by aggregating feature information of all neighbor nodes of each node; Aggregating the aggregated neighbor feature information with the feature information of each node to obtain aggregated node feature information; Based on the aggregated node feature information, the feature information of each node in the initial node feature matrix is ​​updated to obtain the node feature matrix of the text to be processed.

6. The method according to claim 1, characterized in that The step of performing feature optimization processing on the node feature matrix to obtain the target node feature matrix of the text to be processed specifically includes: Using a preset graph pooling model, the node feature matrix is ​​subjected to dimensionality reduction processing to generate an aggregated node feature matrix, wherein the aggregated node feature matrix represents key text information of the text to be processed; A preset second graph convolutional network is used to perform a convolution operation on the aggregated node feature matrix to obtain a target node feature matrix of the text to be processed.

7. The method according to claim 1, characterized in that The step of generating a summary text of the text to be processed based on the target node feature matrix specifically includes: The target node feature matrix is ​​input into a preset language model to generate a summary text of the text to be processed.

8. A summary text generation device, characterized in that: include: An acquisition module is used to acquire a text to be processed, encode the text to be processed, and obtain multiple word segments of the text to be processed and encoding information corresponding to each word segment; A construction module, used to determine a key participle from the multiple participles, and construct an adjacency matrix of the text to be processed based on the key participles; A fusion module, used for performing feature fusion on the encoding information and the adjacency matrix to obtain a node feature matrix of the text to be processed, wherein the node feature matrix represents the semantic information of the text to be processed and the association information between the multiple word segments; An optimization module is used to perform feature optimization processing on the node feature matrix to obtain a target node feature matrix of the text to be processed, wherein the target node feature matrix represents the deep semantic features of the text to be processed; A summary generation module is used to generate a summary text of the text to be processed based on the target node feature matrix.

9. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the method according to any one of claims 1 to 7 when executing the computer-readable instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the method according to any one of claims 1 to 7.