Abstract extraction model training method, abstract extraction method and device for public security multiple documents
By generating multi-document heterogeneous graphs and using graph convolutional networks, graph attention networks and reinforcement learning models, the problem of cross-document information processing in public safety multi-document is solved, and efficient and accurate abstract extraction effect is achieved.
Patent Information
- Application Number
- CN202411309717.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-19
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2044-09-19
AI Technical Summary
The prior art is difficult to effectively process cross-document information in public safety multi-document, resulting in insufficient accuracy and efficiency of abstract extraction.
Cross-document information between multiple public safety documents is extracted by generating multi-document heterogeneous graphs and using graph convolutional networks, graph attention networks, and reinforcement learning models to train local abstract extraction models.
The training efficiency and generalization capabilities of the public safety multi-document abstract extraction model are improved, and the comprehensiveness, accuracy and efficiency of abstract extraction are ensured.
Smart Images

Figure CN119416775A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of document processing, and in particular to a summary extraction model training method, a summary extraction method and a device for public security multiple documents. Background Art
[0002] With the rapid growth and spread of data, information overload has become a common challenge faced by people. In the field of public safety, timely understanding and responding to emergencies, warning of potential risks, and analyzing abnormal activities all require rapid and accurate summarization of large amounts of text information. Document summarization provides an effective way to extract key information from documents and generate concise summaries that can meet the different needs of users. For example, in the field of public safety, it can extract key information from a large amount of news reports and social media information, helping relevant personnel quickly understand the occurrence and development trends of events and take timely countermeasures. However, traditional methods, such as summarization based on word frequency and sentence similarity, are inefficient and inaccurate when processing large-scale data.
[0003] Summarization technology can be divided into two categories: extractive and generative. Extractive summarization directly selects sentences or phrases related to the topic from the original document, and then sorts and combines them to generate a summary. Therefore, extractive summarization is more reliable in terms of grammar and semantics, but may not be as good as generative summarization in terms of reading fluency. Generative summarization generates new sentences or paragraphs as summaries by semantically understanding and integrating the original document. Generative summarization has more advantages in reading fluency, but may not be as reliable as extractive summarization in terms of grammar and semantics. Therefore, extractive summarization has a good application effect in the fields of news reports and scientific literature summaries, while generative summaries have a good application effect in the fields of creative writing and emotional expression. Multi-document summarization is an important branch of summarization technology. Compared with single-document summarization, it has greater challenges and application value. The task of multi-document summarization is to create a concise summary information for a collection of documents related to the topic. Compared with single-document summarization, it needs to reduce redundancy while ensuring the integrity of the summary information, so it can be said to be more challenging. Extractive multi-document summarization has important application value in the field of public security, which can ensure the authenticity and readability of the summary.
[0004] However, due to the wide range of data sources of public safety documents, including public safety reports, monitoring logs, social media posts, news articles, etc., the existing document summary extraction method is not suitable for the processing of multi-source public safety documents. It is also difficult to automatically obtain cross-document information, and it takes a lot of time to associate multiple public safety documents. As a result, the accuracy and efficiency of summary extraction of multiple public safety documents cannot be guaranteed. Therefore, there is an urgent need to design a multi-document summary automatic extraction method that can ensure the comprehensiveness, accuracy and efficiency of summary extraction of multiple public safety documents. Summary of the invention
[0005] In view of this, the embodiments of the present application provide a summary extraction model training method, a summary extraction method and a device for public security multiple documents to eliminate or improve one or more defects existing in the prior art.
[0006] One aspect of the present application provides a summary extraction model training method for public security multiple documents, including:
[0007] Generate a corresponding multi-document heterogeneous graph based on multiple original documents recording public security content, wherein each node in the multi-document heterogeneous graph has multiple semantic types, including: sentence nodes and non-sentence nodes, and the edge between each node in the multi-document heterogeneous graph is used to represent the association relationship between the two nodes connected by the edge;
[0008] The multi-document heterogeneous graph is used to train a local summary extraction model composed of a graph convolutional network, a graph attention network and a reinforcement learning model connected in sequence, so that the local summary extraction model is used to output multiple target sentences corresponding to the multi-document heterogeneous graph according to the input multi-document heterogeneous graph to form summary data of the multi-document heterogeneous graph.
[0009] In some embodiments of the present application, the multi-document heterogeneous graph is used to train a local summary extraction model composed of a graph convolution network, a graph attention network, and a reinforcement learning model connected in sequence, so that the local summary extraction model is used to output multiple target sentences corresponding to the multi-document heterogeneous graph according to the input multi-document heterogeneous graph to form summary data of the multi-document heterogeneous graph, including:
[0010] Splitting the multi-document heterogeneous graph into topological graphs each with the sentence node as a central node;
[0011] Based on each of the topological graphs, a local summary extraction model composed of a graph convolutional network, a graph attention network and a reinforcement learning model connected in sequence is trained, so that the graph convolutional network updates the node representations of each of the input topological graphs respectively, so as to output the topological graphs after the node representations corresponding to each of the topological graphs are updated; then the graph attention network extracts cross-document information from each of the sentence nodes in the topological graphs after the node representations are updated, and updates the sentence representations of each of the sentence nodes accordingly, so as to output the sentence representations corresponding to the multi-document heterogeneous graph; then the reinforcement learning model is based on a preset multi-step scenario Markov decision process strategy, and according to each of the input sentence representations, multiple target sentences corresponding to the multi-document heterogeneous graph are extracted through multiple time steps to form summary data of the multi-document heterogeneous graph.
[0012] In some embodiments of the present application, after the multi-document heterogeneous graph is used to train the local summary extraction model composed of a graph convolution network, a graph attention network and a reinforcement learning model connected in sequence, the method further includes:
[0013] The trained local summary extraction model is used as the local model parameters of the current iteration round, and the local model parameters are sent to a server belonging to the same federated learning system as itself, so that the server receives the local model parameters and aggregates the local model parameters with the local model parameters of the current iteration round sent by other client devices to obtain the global summary extraction model parameters of the current iteration round. The server then sends the global summary extraction model parameters to each client device in the federated learning system as the local summary extraction model to be trained by each client device in the next iteration round.
[0014] In some embodiments of the present application, the non-sentence nodes include: document nodes, word nodes and entity nodes; each of the document nodes is used to represent different documents; each of the sentence nodes is used to represent each sentence in the document one-to-one; each of the word nodes is used to represent each of the words in the sentence one-to-one; the entity nodes are used to represent each public security entity vocabulary in the document one-to-one;
[0015] Correspondingly, the types of association relationships corresponding to the nodes in the multi-document heterogeneous graph include: edges between different document nodes, edges between the document node and the sentence node, edges between the sentence node and the word node, edges between the sentence node and the entity node, edges between different sentence nodes, edges between different word nodes, and edges between different entity nodes.
[0016] In some embodiments of the present application, the generating of a corresponding multi-document heterogeneous graph based on a plurality of original documents recording public security content includes:
[0017] The documents containing public security content are respectively used as different document nodes, sentences are respectively extracted from the documents and each sentence is respectively used as a different sentence node, words are respectively extracted from the sentences and each word is respectively used as a different word node, and public security entity words are respectively extracted from the documents and each public security entity word is respectively used as a different entity node;
[0018] Based on each of the document nodes, sentence nodes, word nodes and entity nodes, as well as the association relationships between different nodes, a multi-document heterogeneous graph corresponding to each of the documents recording public security content is constructed.
[0019] In some embodiments of the present application, the reinforcement learning model is implemented based on an agent, in which a global sentence encoder, an extraction history encoder and an extractor are sequentially connected;
[0020] The global sentence encoder is used to generate a global context information representation corresponding to each of the sentence representations corresponding to the multi-document heterogeneous graph output by the graph attention network, and then send each of the sentence representations and the global context information representation corresponding to each of the sentence representations to the extraction history encoder and the extractor respectively;
[0021] The extracted history encoder is used to generate, in each time step, for the remaining sentences in the multi-document heterogeneous graph in the current time step except the extracted target sentence, respectively, based on the sentence representations corresponding to the remaining sentences and the global context information representation, respectively, the historical information representations corresponding to the remaining sentences in the current time step, and send the respective historical information representations to the extractor;
[0022] The extractor is used to aggregate the sentence representations, the global context information representations and the historical information representations corresponding to each of the remaining sentences in each of the time steps to obtain the connection representations corresponding to each of the remaining sentences, and then calculate the scores corresponding to each of the remaining sentences according to the connection representations corresponding to each of the remaining sentences, and obtain the summary extraction probability corresponding to the current time step based on the preset multi-head pooling layer, and then determine whether the summary extraction probability is greater than a preset probability threshold. If not, extract the remaining sentence with the highest score in the current time step and use it as the extracted target sentence in the next time step; if so, stop executing the next time step, and use each of the target sentences in the current time step as the summary data of the multi-document heterogeneous graph, and output the summary data.
[0023] Another aspect of the present application provides a summary extraction method for public security multiple documents, comprising:
[0024] Receiving a summary extraction request and obtaining a plurality of target documents containing public security content specified by the summary extraction request;
[0025] Generate a multi-document heterogeneous graph corresponding to each of the target documents, wherein each node in the multi-document heterogeneous graph belongs to a plurality of semantic types, including sentence nodes and non-sentence nodes, and the edge between each node in the multi-document heterogeneous graph is used to represent the association relationship between the two nodes connected by the edge;
[0026] Splitting the multi-document heterogeneous graph into topological graphs each with the sentence node as a central node;
[0027] Each of the topological graphs is input into a local summary extraction model so that the local summary extraction model outputs summary data of the multi-document heterogeneous graph corresponding to each of the target documents, wherein the local summary extraction model is pre-trained based on the aforementioned summary extraction model training method for public security multi-documents.
[0028] The third aspect of the present application provides a summary extraction model training device for public security multi-documents, comprising:
[0029] A heterogeneous graph generation module, used to generate a corresponding multi-document heterogeneous graph based on multiple original documents recording public security content, wherein each node in the multi-document heterogeneous graph belongs to multiple semantic types, including: sentence nodes and non-sentence nodes, and the edge between each node in the multi-document heterogeneous graph is used to represent the association relationship between the two nodes connected by the edge;
[0030] A local model training module is used to use the multi-document heterogeneous graph to train a local summary extraction model composed of a graph convolutional network, a graph attention network and a reinforcement learning model connected in sequence, so that the local summary extraction model is used to output multiple target sentences corresponding to the multi-document heterogeneous graph according to the input multi-document heterogeneous graph to form summary data of the multi-document heterogeneous graph.
[0031] The fourth aspect of the present application provides a summary extraction device for public security multiple documents, comprising:
[0032] A document receiving module, used for receiving a summary extraction request and obtaining a plurality of target documents containing public security content specified by the summary extraction request;
[0033] A multi-document heterogeneous graph generation module is used to generate a multi-document heterogeneous graph corresponding to each of the target documents, wherein each node in the multi-document heterogeneous graph belongs to a variety of semantic types, including: sentence nodes and non-sentence nodes, and the edge between each node in the multi-document heterogeneous graph is used to represent the association relationship between the two nodes connected by the edge;
[0034] A topology graph division module, used for dividing the multi-document heterogeneous graph into topology graphs each with the sentence node as a central node;
[0035] A model extraction module is used to input each of the topological graphs into a local summary extraction model so that the local summary extraction model outputs summary data of the multi-document heterogeneous graph corresponding to each of the target documents, wherein the local summary extraction model is pre-trained based on the aforementioned summary extraction model training method for public security multi-documents.
[0036] The fifth aspect of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the summary extraction model training method for multiple public security documents, and / or implements the summary extraction method for multiple public security documents.
[0037] The sixth aspect of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it implements the summary extraction model training method for multiple public security documents and / or implements the summary extraction method for multiple public security documents.
[0038] The seventh aspect of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the summary extraction model training method for multiple public security documents, and / or implements the summary extraction method for multiple public security documents.
[0039] The eighth aspect of the present application provides a federated learning system, comprising: a server, and client devices respectively connected to the server for communication;
[0040] The client device is used to execute the summary extraction model training method for public security multiple documents, and / or execute the summary extraction method for public security multiple documents;
[0041] The client device is further configured to send the local model parameters in each iteration round to the server, and receive the global summary extraction model parameters sent by the server, so as to use the global summary extraction model parameters as the local summary extraction model to be trained in the next iteration round;
[0042] The server is used to receive the local model parameters sent by each of the client devices in each iteration round, aggregate the local model parameters of the current iteration round to obtain the global summary extraction model parameters of the current iteration round, and then send the global summary extraction model parameters to each of the client devices.
[0043] The present application provides a summary extraction model training method for public security multiple documents, which generates a corresponding multi-document heterogeneous graph based on multiple original documents recording public security content, wherein each node in the multi-document heterogeneous graph belongs to multiple semantic types, including: sentence nodes and non-sentence nodes, and the edges between each node in the multi-document heterogeneous graph are used to represent the association relationship between the two nodes connected by the edge; the multi-document heterogeneous graph is used to train a local summary extraction model composed of a graph convolutional network, a graph attention network and a reinforcement learning model connected in sequence, so that the local summary extraction model is used to output multiple target sentences corresponding to the multi-document heterogeneous graph according to the input multi-document heterogeneous graph to form summary data of the multi-document heterogeneous graph, which can improve the efficiency and reliability of automatically acquiring cross-document information between multiple public security documents, can effectively improve the training efficiency and generalization of the summary extraction model of public security multiple documents, and thus can effectively improve the comprehensiveness, accuracy and efficiency of summary extraction of multiple public security documents.
[0044] Additional advantages, purposes, and features of the present application will be partially described in the following description, and will become partially apparent to those skilled in the art after studying the following, or may be learned from the practice of the present application. The purposes and other advantages of the present application can be achieved and obtained by the structures specifically pointed out in the specification and the drawings.
[0045] Those skilled in the art will understand that the purposes and advantages that can be achieved by the present application are not limited to the above specific description, and the above and other purposes that can be achieved by the present application will be more clearly understood based on the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] The drawings described herein are used to provide a further understanding of the present application, constitute a part of the present application, and do not constitute a limitation of the present application. The components in the drawings are not drawn to scale, but are only for the purpose of illustrating the principles of the present application. In order to facilitate the illustration and description of some parts of the present application, the corresponding parts in the drawings may be enlarged, that is, they may become larger relative to other components in the exemplary device actually manufactured according to the present application. In the drawings:
[0047] Figure 1 This is a first flow chart of a summary extraction model training method for public security multiple documents in one embodiment of the present application.
[0048] Figure 2 This is a second flow chart of a summary extraction model training method for public security multiple documents in one embodiment of the present application.
[0049] Figure 3 This is a schematic diagram of the relationship between documents, sentences, words, entities and entities in one embodiment of the present application.
[0050] Figure 4 Schematic diagram of the logical architecture of the summary extraction model training process for public security multiple documents in one embodiment of the present application.
[0051] Figure 5 It is a flowchart of a summary extraction method for multiple public security documents in one embodiment of the present application.
[0052] Figure 6 It is a structural diagram of a summary extraction model training device for public security multiple documents in one embodiment of the present application.
[0053] Figure 7 It is a structural diagram of a summary extraction device for public security multiple documents in one embodiment of the present application. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the implementation modes and the accompanying drawings. Here, the illustrative implementation modes and descriptions of the present application are used to explain the present application, but are not intended to limit the present application.
[0055] It should also be noted here that in order to avoid obscuring the present application due to unnecessary details, only the structures and / or processing steps closely related to the scheme according to the present application are shown in the accompanying drawings, while other details that are not very relevant to the present application are omitted.
[0056] It should be emphasized that the term “include / comprises” when used herein refers to the presence of features, elements, steps or components, but does not exclude the presence or addition of one or more other features, elements, steps or components.
[0057] It should also be noted that, unless otherwise specified, the term “connection” herein may refer not only to a direct connection but also to an indirect connection involving an intermediate.
[0058] Hereinafter, embodiments of the present application will be described with reference to the accompanying drawings. In the accompanying drawings, the same reference numerals represent the same or similar components, or the same or similar steps.
[0059] In one or more embodiments of the present application, Graph Neural Networks (GNN) is a deep learning model for processing graph data. Graph data is a complex network structure consisting of nodes and edges. The emergence of GNN aims to effectively capture and utilize the structural information in graph data, thereby improving the representation learning and task prediction of nodes or edges. Reinforcement Learning (RL) is a machine learning paradigm whose goal is to learn through the interaction between an agent and an environment so that the agent can take a series of actions in the environment to maximize the accumulated reward signal. Federated Learning is a distributed machine learning method that allows model training on devices or distributed nodes without sharing the original data. The goal of federated learning is to achieve global model training by updating model parameters locally and then aggregating the updated parameters on a central server while protecting user privacy and data security. Multi-Document Summarization is a task in the field of natural language processing, whose goal is to extract key information from multiple documents and generate a concise and comprehensive summary. Different from single-document summarization, multi-document summarization needs to comprehensively consider the information associations between multiple documents to ensure that the generated summary covers all important content.
[0060] First, in order to achieve summary extraction for multiple public security documents (i.e., multiple public security documents), we can consider modeling the relationship between sentences based on graph structures. When the documents discuss the same topic, these methods can effectively obtain overlapping information between documents. However, if the content discussed between documents is complementary, this method will fail. However, due to the differences between multiple public security documents, it is necessary to design a graph structure that can be applied to multiple public security documents and can effectively extract cross-document information between multiple public security documents.
[0061] In addition, Transformer-based pre-trained models (PLMs) have achieved remarkable results in various natural language processing (NLP) fields. Another popular approach is to design PLMs for text summarization. However, it may be difficult to capture the relationship between documents by directly connecting related documents into a sequence. In addition, due to input length limitations and computational complexity, they have to truncate documents when inputting data, which may lose important information. Therefore, it is necessary to design a method that can effectively improve the generalization ability of summary extraction models for public security multi-documents.
[0062] Based on this, the present application proposes a summary extraction model training method for public security multiple documents that combines a multi-document heterogeneous graph and a local summary extraction model composed of a sequentially connected graph convolutional network, a graph attention network and a reinforcement learning model, a summary extraction model training device for public security multiple documents for executing the summary extraction model training method for public security multiple documents, a summary extraction method for public security multiple documents, a summary extraction device for public security multiple documents for executing the summary extraction method for public security multiple documents, a physical device, a computer-readable storage medium and a computer program product, which can improve the efficiency and reliability of automatically acquiring cross-document information between multiple public security documents through a multi-document heterogeneous graph, and can improve the training effectiveness and generalization ability of the summary extraction model for public security multiple documents through a local summary extraction model composed of a sequentially connected graph convolutional network, a graph attention network and a reinforcement learning model.
[0063] The details are described in detail through the following examples.
[0064] Based on this, the embodiment of the present application provides a summary extraction model training method for public security multiple documents that can be implemented by a summary extraction model training device for public security multiple documents, see Figure 1 The summary extraction model training method for public security multi-documents specifically includes the following contents:
[0065] Step 100: Generate a corresponding multi-document heterogeneous graph based on multiple original documents that record public security content, wherein each node in the multi-document heterogeneous graph belongs to multiple semantic types, including: sentence nodes and non-sentence nodes, and the edges between each node in the multi-document heterogeneous graph are used to represent the association relationship between the two nodes connected by the edge.
[0066] Specifically, step 100 models the document as a heterogeneous graph, and by introducing a variety of semantic nodes to enrich the relationship between sentences, it is possible to improve the efficiency and reliability of automatically acquiring cross-document information between multiple public security documents.
[0067] In one or more embodiments of the present application, the multiple original documents recording public safety content may include public safety reports, monitoring logs, social media posts, news articles, and the like.
[0068] Step 200: Use the multi-document heterogeneous graph to train a local summary extraction model composed of a graph convolutional network, a graph attention network and a reinforcement learning model connected in sequence, so that the local summary extraction model is used to output multiple target sentences corresponding to the multi-document heterogeneous graph according to the input multi-document heterogeneous graph to form summary data of the multi-document heterogeneous graph.
[0069] Specifically, a graph attention network (GAT) and a graph convolutional network (GCN) are used to distinguish the relationship between different types of semantic nodes, which helps to extract semantic representations across documents. However, extracting summaries based solely on node probabilities may result in repeated summary information because it ignores attention to historically extracted sentences. In addition, methods based on node probabilities need to select different probability thresholds on different data sets, which limits the generalization of the model. Therefore, in order to solve this problem, step 200 of the embodiment of the present application also adopts a reinforcement learning model, which can then consider the summary extraction history information and the overall information of the document at each time step (also referred to as a time step), and decide whether the network output continues to use the sentence as a summary, which can effectively reduce the redundancy of the summary information and effectively improve the training effectiveness and generalization ability of the summary extraction model for public safety multi-documents.
[0070] From the above description, it can be seen that the summary extraction model training method for multiple public security documents provided in the embodiment of the present application can improve the efficiency and reliability of automatically acquiring cross-document information between multiple public security documents, can effectively improve the training efficiency and generalization of the summary extraction model for multiple public security documents, and thus can effectively improve the comprehensiveness, accuracy and efficiency of summary extraction of multiple public security documents.
[0071] In order to further improve the effectiveness and reliability of the local summary extraction model composed of a graph convolutional network, a graph attention network and a reinforcement learning model connected in sequence by using the multi-document heterogeneous graph training, in a summary extraction model training method for public security multi-documents provided in an embodiment of the present application, see Figure 2 Step 200 in the summary extraction model training method for public security multiple documents specifically includes the following contents:
[0072] Step 210: split the multi-document heterogeneous graph into topological graphs each with the sentence node as a central node.
[0073] Step 220: Based on each of the topological graphs, a local summary extraction model composed of a graph convolutional network, a graph attention network and a reinforcement learning model connected in sequence is trained, so that the graph convolutional network updates the node representations of each of the input topological graphs respectively, so as to output the topological graphs after the node representations corresponding to each of the topological graphs are updated; then the graph attention network extracts cross-document information from each of the sentence nodes in the topological graphs after the node representations are updated, and updates the sentence representations of each of the sentence nodes accordingly, so as to output the sentence representations corresponding to the multi-document heterogeneous graph; and then the reinforcement learning model extracts multiple target sentences corresponding to the multi-document heterogeneous graph based on the preset multi-step scenario Markov decision process strategy and the input sentence representations after multiple time steps to form summary data of the multi-document heterogeneous graph.
[0074] Specifically, the multi-step scenario Markov decision process strategy refers to the multi-step scenario Markov decision process (MDP), which can be implemented using MemSum (multi-step scenario Markov decision process extraction summarizer). By considering the historical information extracted from the summary at each time step and the overall information of the document, the decision network outputs whether to continue to use the sentence as a summary, which can effectively reduce the redundancy of the summary information.
[0075] It is understandable that the embodiments of the present application combine the advantages of graph neural networks, reinforcement learning and federated learning to solve the unique challenges of public safety data. The public safety field usually involves a large amount of text data, which comes from a wide range of sources, including public safety reports, monitoring logs, social media posts, news articles, etc. These data often have the characteristics of strong timeliness, high information sensitivity, large data volume and strong heterogeneity. Therefore, the use of traditional recurrent neural networks for summary extraction will lead to inaccurate and inefficient information processing. When processing monitoring logs or social media posts, due to the real-time and high-frequency update characteristics of the data, directly using a large model for summary extraction is not only computationally complex, but also the limitations of the large model itself may cause errors in the summary results and mislead users. Therefore, in order to improve the computational efficiency of public safety data and the comprehensiveness of the summary, as well as, in order to improve the accuracy and efficiency of processing public safety data, the embodiments of the present application model the data through a graph neural network, which can capture the complex relationships and structural features between massive data. The document is modeled as a heterogeneous graph, and the relationship between sentences is enriched by introducing a variety of semantic nodes.
[0076] In a specific example, a graph convolutional network and a graph attention network are used to update the node representation in a multi-document heterogeneous graph (hereinafter referred to as a heterogeneous graph). For a graph convolutional network, given a heterogeneous graph G and the node features of the lth layer Indicates dimension d h The real vector space of . The graph convolutional network can be expressed as:
[0077]
[0078] in Represents the feature representation of node v in the l+1th layer. At each layer, the state of a node is calculated by summarizing the information of its neighbors. r∈R Represents an aggregation function that aggregates information from neighbor nodes to node v. Here, R represents the set of neighbors’ relationships. is an update function that computes the information of the relationship r from node u to node v. It is the feature representation of node u in layer l.
[0079] For nodes with relationship r, the update design is as follows:
[0080]
[0081] Where R is the set of all relationship types in the heterogeneous graph, It is the feature representation of node v at layer l+1 in the relational subgraph r. is the feature representation of node u at layer l in the relational subgraph r. σ is the ReLU activation function. c ij is a constant that normalizes the contribution of neighbor nodes. is the set of neighbor nodes of node v under relationship r. r is the convolution function of relation type r. r is a subgraph with relation r. is the weight matrix of the lth convolutional layer with relation r, is the bias vector associated with the relationship type r in the lth layer. In the node update process, different relationship representations of the same node are connected as the node representation of the next layer. That is:
[0082]
[0083] in is the feature representation of node v in the subgraph with relation r at layer l. || represents the concatenation vector operation. Taking the update of sentence nodes as an example, by using graph convolutional networks, the structural features of heterogeneous graphs are captured to obtain the semantic node representation in the entire document cluster. At the same time, through the concatenation operation, the feature information of all relationship types is retained to increase the expressiveness of the model.
[0084] For the graph attention network, since the summary is extracted in units of sentences, the focus is on updating the sentence nodes using the graph attention network. In view of the relationship between sentence nodes and other semantic nodes, the heterogeneous graph attention network is designed as follows:
[0085]
[0086]
[0087]
[0088] Where W r,T ,W l are the trainable parameters of the graph attention network, represents the attention score between node s and its neighbor node o in the lth layer of the relationship subgraph r, Represents the attention score of node s and its k-type neighbor nodes in the l-th layer of the relation subgraph r. LeakyReLU is expressed as max(αx,x) where α is a negative slope less than 1. Represents the set of neighbors of node s whose relationship is r. is the attention coefficient between the sentence node and other semantic nodes (including the sentence node). Represents the feature representation of the sentence node at layer l under the relation subgraph r. i,j is the attention weight. W lare the learnable weights of layer l. It is the feature representation of other nodes in the lth layer except the sentence nodes under the relation subgraph r. i is the set of neighbor nodes of the sentence node. The attention coefficient and weight matrix are expanded into multiple heads respectively, and each head is calculated independently. Finally, the multi-head attention mechanism obtained by splicing the results is as follows:
[0089]
[0090] in It is the semantic coefficient between the sentence node and other semantic nodes (including the sentence node) on the h head. l,h are the trainable parameters of the h-th head in the l-th layer. is the feature representation of node o in layer l.
[0091] The final sentence representation is concatenated based on the updated sentence representations of all relations:
[0092]
[0093] in It is the sentence node feature representation of the l+1th layer.
[0094] In order to solve the problem of cross-platform data not being interoperable, and to further ensure the independence and security of various data sources, and to effectively prevent data leakage and unauthorized access, and to maintain the privacy and integrity of data, in a summary extraction model training method for public security multi-documents provided in an embodiment of the present application, see Figure 2 , the summary extraction model training method for public security multiple documents further specifically includes the following contents after step 200:
[0095] Step 300: The trained local summary extraction model is used as the local model parameter of the current iteration round, and the local model parameter is sent to a server belonging to the same federated learning system as the server, so that the server receives the local model parameter and aggregates the local model parameter with the local model parameter of the current iteration round sent by other client devices to obtain the global summary extraction model parameter of the current iteration round. The server then sends the global summary extraction model parameter to each client device in the federated learning system as the local summary extraction model to be trained by each client device in the next iteration round.
[0096] Based on this, the embodiments of the present application can not only extract summaries quickly and efficiently to effectively reduce the redundancy of summary information, but also solve the problem of cross-platform data incompatibility in combination with federated learning.
[0097] That is to say, in order to solve the problem of cross-platform data not being interoperable, the embodiment of the present application combines federated learning, which processes and trains data locally on each device or node, thereby ensuring that no damage is caused to data privacy or integrity during data integration. Specifically, federated learning enables data processing and model training to be completed at the data source end, and only encrypted model parameters are transmitted without the need to transmit original data. This not only ensures the independence and security of each data source, but also effectively prevents data leakage and unauthorized access, and maintains the privacy and integrity of the data.
[0098] Entities contain rich semantic information, which can be regarded as signs of important information, which is very important in the summarization process, and they can reduce the redundancy of summaries. The existing graph structure mainly focuses on the relationship between sentences and words. Based on this, in order to further capture cross-document information between sentences, different attention weights are assigned according to the relationship between nodes, so as to capture important information. In a summary extraction model training method for public security multiple documents provided in an embodiment of the present application, the non-sentence nodes in the summary extraction model training method for public security multiple documents specifically include the following contents:
[0099] Document nodes, word nodes and entity nodes; each of the document nodes is used to represent different documents; each of the sentence nodes is used to represent each sentence in the document one-to-one; each of the word nodes is used to represent each word in the sentence one-to-one; the entity node is used to represent each public security entity vocabulary in the document one-to-one;
[0100] Correspondingly, the types of association relationships corresponding to the nodes in the multi-document heterogeneous graph include: edges between different document nodes, edges between the document node and the sentence node, edges between the sentence node and the word node, edges between the sentence node and the entity node, edges between different sentence nodes, edges between different word nodes, and edges between different entity nodes.
[0101] Specifically, the multi-sample heterogeneous graph contains four types of nodes V s ,V w ,V e ,V d and 7 kinds of edges dd ,e ds ,e sw ,e se ,e ss ,e ww ,e ee . Where V s ,V w ,V e,V d Represents sentence nodes, word nodes, entity nodes, and document nodes respectively. dd ,e ds ,e sw ,e se ,e ss ,e ww ,e ee It represents, in sequence, the edges between different document nodes, the edges between the document node and the sentence node, the edges between the sentence node and the word node, the edges between the sentence node and the entity node, the edges between different sentence nodes, the edges between different word nodes, and the edges between different entity nodes.
[0102] In one or more embodiments of the present application, the entity refers to words such as names of people, organizations, places, times, and products in the document.
[0103] That is, the embodiment of the present application uses a heterogeneous graph to model public security document data, and the heterogeneous graph is composed of four semantic nodes: document, sentence, word, and entity. Then, in step 200, high-level hidden features are generated for each semantic node of the heterogeneous graph through GCN, and the semantic relationship between these nodes is encoded into the hidden features of the node, and the cross-document information between sentences is captured through GAT, and different attention weights are assigned according to the relationship between nodes, thereby capturing important information.
[0104] Based on this, in a summary extraction model training method for public security multi-documents provided in an embodiment of the present application, see Figure 2 Step 100 in the summary extraction model training method for public security multiple documents specifically includes the following contents:
[0105] Step 110: Treat each of the documents that record public security content as a different document node, extract each sentence from each document and treat each sentence as a different sentence node, extract each word from each sentence and treat each word as a different word node, and extract each public security entity vocabulary from each document and treat each public security entity vocabulary as a different entity node.
[0106] See also Figure 3 and Figure 4, a document contains sentences, and sentences contain words and entities. Among them, w represents a word node; e represents an entity node; S represents a sentence node; and d represents a document node. Among them, d1, d2, and d3 represent different document nodes; S1 to S3 represent different sentence nodes; and e1 to e5 represent different entity nodes.
[0107] Step 120: Based on each of the document nodes, sentence nodes, word nodes and entity nodes, and the association relationships between different nodes, a multi-document heterogeneous graph corresponding to each of the documents recording public security content is constructed.
[0108] In a specific example, in order to effectively model documents and capture the relationship between semantic units at different levels, the present application constructs a multi-document heterogeneous graph G = {V, E} to represent document clusters. d ∪V s ∪V w ∪V e is a set of nodes, E = e dd ∪e ds ∪e sw ∪e se ∪e ss ∪e ww ∪e ee is an edge set. First, each document is represented as a document node V in the heterogeneous graph. d Then, a sentence node V is generated for each sentence in the document. s , and generates a word node V for each unique word w At the same time, in order to enrich the semantic nodes, this application also adds entity nodes V e This hierarchical structure helps capture contextual information of different granularities in a document.
[0109] Next, we introduce seven types of edges. They are the edges between documents, dd , the edge between documents and sentences ds , the edge between sentences and words sw , the edge between sentence and entity se , the edge between sentences ss , the edge between words ww , the edge e between entities ee . In addition to e ss They are all undirected edges. In order to obtain the contextual semantics of the sentence, ssThe sentences in the document are sequentially connected. In this way, a connected graph is formed. After multiple layers of message passing, each semantic node can receive messages from its nodes and update its own representation. Use the pre-trained model to obtain word embedding, entity embedding, and sentence embedding (document embedding uses the average of sentence embedding) to initialize the nodes of the heterogeneous graph.
[0110] In order to consider extracting historical information and overall information of the document when iteratively selecting summary sentences through reinforcement learning, reduce the redundancy of the summary and enhance the generalization ability of the model on different data sets, in a summary extraction model training method for public security multi-documents provided in an embodiment of the present application, see Figure 4 , where the original document is public security-related text data. In the federated learning process, the aggregation function uses the FedAvg method: i is aggregated. t is the global parameter of the t-th round model. n is the number of clients participating in the training, w′ t-1,i is the model parameter of client i in round t-1. The reinforcement learning model in the summary extraction model training method for public security multi-documents is implemented based on an intelligent agent, in which a global sentence encoder GlobCE, an extraction history encoder EHE and an extractor Extractor are sequentially connected;
[0111] The global sentence encoder is used to represent each sentence g corresponding to the multi-document heterogeneous graph output by the graph attention network si , respectively generate the global context information representation C corresponding to each of the sentence representations si , and then sending each of the sentence representations and the global context information representations corresponding to each of the sentence representations to the extraction history encoder and the extractor respectively;
[0112] The extracted history encoder is used to, in each time step, respectively target the remaining sentences (Remaining sentences) in the multi-document heterogeneous graph in the current time step except the extracted target sentence (Extracted sentence), based on the sentence representation gsi corresponding to each of the remaining sentences and the global context information representation C si , respectively generate the historical information representation h corresponding to each of the remaining sentences in the current time step si (Combining the extracted sentences and the unextracted sentences to obtain the historical information representation), and each of the historical information representations h si Send to the extractor;
[0113] The extractor is used to respectively represent the sentence representation g corresponding to each of the remaining sentences in each of the time steps. si , the global context information represents C si Aggregate with the historical information representation hsi to obtain the connection representation corresponding to each of the remaining sentences, and then calculate the scores corresponding to each of the remaining sentences according to the connection representation corresponding to each of the remaining sentences. (That is: the final score of each remaining sentence after passing through the extractor, the one with the highest score is selected as the summary content), and the summary extraction probability p corresponding to the current time step is obtained based on the preset multi-head pooling layer MHP stop (i.e., the probability of whether to continue extracting the summary), and then determine whether the probability of extracting the summary is greater than the preset probability threshold p threshold If not, extract the remaining sentences with the highest scores in the current time step to obtain sample sentences and use them as the extracted target sentences in the next time step; if yes, stop executing the next time step, and use each target sentence in the current time step as the summary data of the multi-document heterogeneous graph, and output the summary data, in which the reward (Compute Reward) refers to the arithmetic mean of the ROUGE-1, ROUGE-2 and ROUGE-L scores.
[0114] Specifically, the policy gradient method is one of the commonly used algorithms in reinforcement learning. It continuously adjusts the policy parameters to make the agent more likely to choose actions that receive high rewards. In the process of abstract extraction, this application uses the policy gradient method to find the best strategy and maximize the quality of the abstract. When iteratively extracting abstracts, the reward function represents the overall quality of the abstract, which is usually calculated using indicators such as ROUGE. The reward is calculated as the arithmetic mean of the ROUGE-1, ROUGE-2, and ROUGE-L scores.
[0115] reward=(ROUGE-1+ROUGE-2+ROUGE-L) / 3 (9)
[0116] The policy gradient is calculated as the expected value of the total reward multiplied by the log gradient of the probability of the action chosen according to the policy.
[0117]
[0118]
[0119] Among them, J(θ) represents the expected return function under the policy parameter θ, and π(At|St,θ) represents the expected return function under the given state S t , strategy πθ Select Action A t probability.
[0120] According to the multi-step scenario MDP strategy, the extraction of the summary consists of multiple time steps. At each time step t, the action is to stop or select a sentence to the candidate summary. The strategy is described as follows:
[0121] π(At|St,θt)=p(stop|St,θt)p(at|stop,St,θt) (12)
[0122]
[0123] Where π(At|St,θt) represents the policy function in state S t Next. Perform an action A t The probability of θt is the policy network parameter. p(stop|St,θt) represents the probability of t and the probability of deciding whether to stop under the condition of parameter θt. p(at|stop,St,θt) represents the probability of choosing action a after deciding to stop. t The probability of t represents the set of remaining sentence indices at time step t. j is the remaining sentence score, Perform action a for action t The score of the selected sentences.
[0124] At time step t, the agent will choose whether to stop summarization according to the strategy.
[0125] The global context encoder (GCE) consists of an N g It consists of a bi-LSTM layer, which takes L local sentence embeddings as input and generates a global context information representation for each sentence. Should Encodes global context information, including information such as the position of the sentence in the document and neighboring sentences.
[0126] The Extractive History Encoder (EHE) encodes the extractive history information and generates an extractive history embedding for each remaining sentence EHE consists of a stack of n identical layers. In one layer, there are two multi-head attention sub-layers. One of the sub-layers is used for multi-head self-attention (MHA) between local embeddings so that each remaining sentence can capture the context provided by other remaining sentences. The other attention sub-layer is used for multi-head attention on the embeddings of the extracted sentences so that each remaining sentence can pay attention to all the extracted sentences. The outputs of the two attention sub-layers, one for each remaining sentence, capture the contextual information of the extracted and remaining sentences. The final output of EHE constitutes the extracted history embeddings, one for each remaining sentence.
[0127] The extractor calculates the score of each remaining sentence and outputs an extraction stop signal. As the input of the extractor, this application generates an aggregation layer for each remaining sentence by concatenating the local sentence embedding, the global context embedding, and the extraction history embedding. To generate the sentence score, the concatenated embedding of the remaining sentences is passed to the fully connected layer through the ReLU activation, and then projected into a scalar through the fully connected layer and the sigmoid function, where the sigmoid function is represented as The same fully connected layer is also applied to all the remaining sentences. The extractor can learn to stop extracting based on the status of the remaining sentences. Therefore, MHP is applied to the last hidden vector of all the remaining sentences to output a single vector. This vector is then passed to a linear layer with a sigmoid function to produce the summary extraction probability p stop If p stop If the probability is greater than this threshold, stop extracting the summary sentence; if it is less than or equal to this threshold, continue extracting the summary sentence.
[0128] Among them, the global sentence encoder input is That is, the sentence representation is obtained after the sentence representation is processed by the graph encoder. The output is It is the global context information representation of the sentence. It can be understood that in one or more embodiments of the present application, the representation refers to a vector, for example, the sentence representation is a sentence vector.
[0129] In summary, the embodiment of the present application provides a summary extraction model training method for public security multiple documents, which generates high-level hidden features for each semantic node of the heterogeneous graph through a graph convolutional network, and encodes the semantic relationship between these nodes into the hidden features of the node. The cross-document information between sentences is captured through the graph attention network, and different attention weights are assigned according to the relationship between nodes, thereby capturing important information. In addition, by designing a reinforcement learning module, the extraction of historical information and the overall information of the document is considered when iteratively selecting summary sentences, which can significantly reduce the redundancy of the summary and enhance the generalization ability of the model on different data sets. At the same time, federated learning is used to solve the problem of data incompatibility between different platforms.
[0130] Based on the summary extraction model training method for public security multiple documents provided in the above-mentioned embodiment, the present application also provides an embodiment of a summary extraction method for public security multiple documents. The summary extraction method for public security multiple documents can be implemented by a summary extraction device for public security multiple documents, see Figure 5 The method for extracting abstracts from multiple public security documents specifically includes the following contents:
[0131] Step 400: Receive a summary extraction request and obtain a plurality of target documents containing public security content specified by the summary extraction request.
[0132] Step 500: Generate a multi-document heterogeneous graph corresponding to each of the target documents, wherein each node in the multi-document heterogeneous graph belongs to multiple semantic types, including: sentence nodes and non-sentence nodes, and the edges between each node in the multi-document heterogeneous graph are used to represent the association relationship between the two nodes connected by the edge.
[0133] Step 600: split the multi-document heterogeneous graph into topological graphs each with the sentence node as a central node.
[0134] Step 700: Input each of the topological graphs into a local summary extraction model so that the local summary extraction model outputs summary data of the multi-document heterogeneous graph corresponding to each of the target documents, wherein the local summary extraction model is pre-trained based on the aforementioned summary extraction model training method for public security multi-documents.
[0135] From the above description, it can be seen that the summary extraction method for multiple public security documents provided in the embodiment of the present application can improve the efficiency and reliability of automatically acquiring cross-document information between multiple public security documents, and thus can effectively improve the comprehensiveness, accuracy and efficiency of summary extraction of multiple public security documents.
[0136] From the software level, the present application also provides a summary extraction model training device for public security multiple documents for executing all or part of the summary extraction model training method for public security multiple documents, see Figure 6 The summary extraction model training device for public security multi-documents specifically includes the following contents:
[0137] The heterogeneous graph generation module 10 is used to generate a corresponding multi-document heterogeneous graph based on multiple original documents recording public security content, wherein each node in the multi-document heterogeneous graph belongs to multiple semantic types, including: sentence nodes and non-sentence nodes, and the edges between each node in the multi-document heterogeneous graph are used to represent the association relationship between the two nodes connected by the edge.
[0138] The local model training module 20 is used to use the multi-document heterogeneous graph to train a local summary extraction model composed of a graph convolutional network, a graph attention network and a reinforcement learning model connected in sequence, so that the local summary extraction model is used to output multiple target sentences corresponding to the multi-document heterogeneous graph according to the input multi-document heterogeneous graph to form summary data of the multi-document heterogeneous graph.
[0139] The embodiment of the summary extraction model training device for public security multiple documents provided in the present application can be specifically used to execute the processing flow of the embodiment of the summary extraction model training method for public security multiple documents in the above-mentioned embodiment. Its functions will not be repeated here, and reference can be made to the detailed description of the embodiment of the summary extraction model training method for public security multiple documents.
[0140] The part of the summary extraction model training device for public security multiple documents that performs summary extraction model training for public security multiple documents can be completed in the client device. The specific selection can be based on the processing capability of the client device and the limitations of the user's usage scenario. This application is not limited to this. If all operations are completed in the client device, the client device may also include a processor for specific processing of the summary extraction model training for public security multiple documents.
[0141] The client device may have a communication module (i.e., a communication unit) that can communicate with a remote server to achieve data transmission with the server. The server may include a server on the task scheduling center side, and other implementation scenarios may also include a server on an intermediate platform, such as a server on a third-party server platform that has a communication link with the task scheduling center server. The server may include a single computer device, or a server cluster consisting of multiple servers, or a server structure of a distributed device.
[0142] The server and the client device may communicate with each other using any suitable network protocol, including network protocols that have not yet been developed on the date of filing this application. The network protocols may include, for example, TCP / IP, UDP / IP, HTTP, HTTPS, etc. Of course, the network protocols may also include, for example, RPC (Remote Procedure Call Protocol) and REST (Representational State Transfer) protocols used on top of the above protocols.
[0143] From the above description, it can be seen that the summary extraction model training device for public security multiple documents provided in the embodiment of the present application can improve the efficiency and reliability of automatically acquiring cross-document information between multiple public security documents, can effectively improve the training efficiency and generalization of the summary extraction model for public security multiple documents, and thus can effectively improve the comprehensiveness, accuracy and efficiency of summary extraction of multiple public security documents.
[0144] In order to solve the problem of cross-platform data not being interoperable, and to further ensure the independence and security of various data sources, and to effectively prevent data leakage and unauthorized access, and to maintain the privacy and integrity of data, in a summary extraction model training device for public security multi-documents provided in an embodiment of the present application, see Figure 6 The summary extraction model training device for public security multi-documents also specifically includes the following contents:
[0145] The parameter uploading module 30 is used to use the trained local summary extraction model as the local model parameters of the current iteration round, and send the local model parameters to a server belonging to the same federated learning system as itself, so that the server receives the local model parameters and aggregates the local model parameters with the local model parameters of the current iteration round sent by other client devices to obtain the global summary extraction model parameters of the current iteration round. The server then sends the global summary extraction model parameters to each client device in the federated learning system as the local summary extraction model to be trained by each client device in the next iteration round.
[0146] From the software level, the present application also provides a summary extraction device for public security multiple documents for executing all or part of the summary extraction method for public security multiple documents, see Figure 7 The summary extraction device for public security multiple documents specifically includes the following contents:
[0147] The document receiving module 40 is used to receive a summary extraction request and obtain a plurality of target documents containing public safety content specified by the summary extraction request.
[0148] The multi-document heterogeneous graph generation module 50 is used to generate a multi-document heterogeneous graph corresponding to each of the target documents, wherein each node in the multi-document heterogeneous graph belongs to multiple semantic types, including: sentence nodes and non-sentence nodes, and the edges between each node in the multi-document heterogeneous graph are used to represent the association relationship between the two nodes connected by the edge.
[0149] The topology graph division module 60 is used to divide the multi-document heterogeneous graph into various topology graphs each with the sentence node as a central node.
[0150] The model extraction module 70 is used to input each of the topological graphs into a local summary extraction model so that the local summary extraction model outputs summary data of the multi-document heterogeneous graph corresponding to each of the target documents, wherein the local summary extraction model is pre-trained based on the aforementioned summary extraction model training method for public security multi-documents.
[0151] The embodiment of the summary extraction device for public security multiple documents provided in the present application can be specifically used to execute the processing flow of the embodiment of the summary extraction method for public security multiple documents in the above-mentioned embodiment. Its functions will not be repeated here, and reference can be made to the detailed description of the above-mentioned embodiment of the summary extraction method for public security multiple documents.
[0152] The part of the summary extraction device for public security multiple documents that performs summary extraction for public security multiple documents can be completed in the client device or the server. The specific selection can be based on the processing capability of the client device and the limitations of the user's usage scenario. This application does not limit this. If all operations are completed in the client device, the client device may also include a processor for specific processing of the summary extraction for public security multiple documents.
[0153] The present application also provides a federated learning system, which specifically includes: a server, and various client devices respectively connected to the server for communication;
[0154] The client device is used to execute the aforementioned summary extraction model training method for public security multiple documents, and / or execute the aforementioned summary extraction method for public security multiple documents;
[0155] The client device is further configured to send the local model parameters in each iteration round to the server, and receive the global summary extraction model parameters sent by the server, so as to use the global summary extraction model parameters as the local summary extraction model to be trained in the next iteration round;
[0156] The server is used to receive the local model parameters sent by each of the client devices in each iteration round, aggregate the local model parameters of the current iteration round to obtain the global summary extraction model parameters of the current iteration round, and then send the global summary extraction model parameters to each of the client devices.
[0157] The embodiment of the present application also provides an electronic device, which may include a processor, a memory, a receiver and a transmitter, wherein the processor is used to execute the summary extraction model training method for public security multiple documents and / or the summary extraction method for public security multiple documents mentioned in the above embodiment, wherein the processor and the memory may be connected via a bus or other means, taking the bus connection as an example. The receiver may be connected to the processor and the memory via a wired or wireless manner.
[0158] The processor may be a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips.
[0159] As a non-transient computer-readable storage medium, the memory can be used to store non-transient software programs, non-transient computer executable programs and modules, such as the program instructions / modules corresponding to the summary extraction model training method for multiple public security documents and / or the summary extraction method for multiple public security documents in the embodiments of the present application. The processor executes various functional applications and data processing of the processor by running the non-transient software programs, instructions and modules stored in the memory, that is, implementing the summary extraction model training method for multiple public security documents and / or the summary extraction method for multiple public security documents in the above method embodiments.
[0160] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the processor, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0161] The one or more modules are stored in the memory, and when executed by the processor, perform the summary extraction model training method for public security multiple documents and / or the summary extraction method for public security multiple documents in the embodiment.
[0162] In some embodiments of the present application, the user equipment may include a processor, a memory, and a transceiver unit, which may include a receiver and a transmitter. The processor, memory, receiver, and transmitter may be connected through a bus system. The memory is used to store computer instructions, and the processor is used to execute the computer instructions stored in the memory to control the transceiver unit to send and receive signals.
[0163] As an implementation method, the functions of the receiver and the transmitter in the present application can be considered to be implemented through a transceiver circuit or a dedicated chip for transceiver, and the processor can be considered to be implemented through a dedicated processing chip, a processing circuit or a general chip.
[0164] As another implementation method, it is possible to use a general-purpose computer to implement the server provided in the embodiment of the present application, that is, to store the program code for implementing the functions of the processor, receiver, and transmitter in a memory, and the general-purpose processor implements the functions of the processor, receiver, and transmitter by executing the code in the memory.
[0165] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the summary extraction model training method for public security multiple documents and / or the summary extraction method for public security multiple documents are implemented. The computer-readable storage medium can be a tangible storage medium, such as a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a floppy disk, a hard disk, a removable storage disk, a CD-ROM, or any other form of storage medium known in the technical field.
[0166] It should be understood by those skilled in the art that the exemplary components, systems and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software or a combination of the two. Whether it is specifically performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link via a data signal carried in a carrier.
[0167] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0168] In the present application, features described and / or illustrated for one embodiment may be used in the same manner or in a similar manner in one or more other embodiments, and / or combined with features of other embodiments or replace features of other embodiments.
[0169] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the embodiments of the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A summary extraction model training method for public security multi-documents, characterized in that: include: Generate a corresponding multi-document heterogeneous graph based on multiple original documents recording public security content, wherein each node in the multi-document heterogeneous graph has multiple semantic types, including: sentence nodes and non-sentence nodes, and the edge between each node in the multi-document heterogeneous graph is used to represent the association relationship between the two nodes connected by the edge; The multi-document heterogeneous graph is used to train a local summary extraction model composed of a graph convolutional network, a graph attention network and a reinforcement learning model connected in sequence, so that the local summary extraction model is used to output multiple target sentences corresponding to the multi-document heterogeneous graph according to the input multi-document heterogeneous graph to form summary data of the multi-document heterogeneous graph.
2. The summary extraction model training method for public security multiple documents according to claim 1 is characterized in that: The method of using the multi-document heterogeneous graph to train a local summary extraction model composed of a graph convolution network, a graph attention network, and a reinforcement learning model connected in sequence, so that the local summary extraction model is used to output a plurality of target sentences corresponding to the multi-document heterogeneous graph according to the input multi-document heterogeneous graph to form summary data of the multi-document heterogeneous graph, including: Splitting the multi-document heterogeneous graph into topological graphs each with the sentence node as a central node; Based on each of the topological graphs, a local summary extraction model composed of a graph convolutional network, a graph attention network and a reinforcement learning model connected in sequence is trained, so that the graph convolutional network updates the node representations of each of the input topological graphs respectively, so as to output the topological graphs after the node representations corresponding to each of the topological graphs are updated; then the graph attention network extracts cross-document information from each of the sentence nodes in the topological graphs after the node representations are updated, and updates the sentence representations of each of the sentence nodes accordingly, so as to output the sentence representations corresponding to the multi-document heterogeneous graph; then the reinforcement learning model is based on a preset multi-step scenario Markov decision process strategy, and according to each of the input sentence representations, multiple target sentences corresponding to the multi-document heterogeneous graph are extracted through multiple time steps to form summary data of the multi-document heterogeneous graph.
3. The summary extraction model training method for public security multi-documents according to claim 1 is characterized in that: After the multi-document heterogeneous graph is used to train the local summary extraction model composed of a graph convolution network, a graph attention network and a reinforcement learning model connected in sequence, the method further includes: The trained local summary extraction model is used as the local model parameters of the current iteration round, and the local model parameters are sent to a server belonging to the same federated learning system as itself, so that the server receives the local model parameters and aggregates the local model parameters with the local model parameters of the current iteration round sent by other client devices to obtain the global summary extraction model parameters of the current iteration round. The server then sends the global summary extraction model parameters to each client device in the federated learning system as the local summary extraction model to be trained by each client device in the next iteration round.
4. The summary extraction model training method for public security multiple documents according to claim 1 is characterized in that: The non-sentence nodes include: document nodes, word nodes and entity nodes; each of the document nodes is used to represent different documents; each of the sentence nodes is used to represent each sentence in the document one-to-one; each of the word nodes is used to represent each word in the sentence one-to-one; the entity nodes are used to represent each public security entity vocabulary in the document one-to-one; Correspondingly, the types of association relationships corresponding to the nodes in the multi-document heterogeneous graph include: edges between different document nodes, edges between the document node and the sentence node, edges between the sentence node and the word node, edges between the sentence node and the entity node, edges between different sentence nodes, edges between different word nodes, and edges between different entity nodes.
5. The summary extraction model training method for public security multiple documents according to claim 4 is characterized in that: The generating of a corresponding multi-document heterogeneous graph based on a plurality of original documents recording public security content includes: The documents containing public security content are respectively used as different document nodes, sentences are respectively extracted from the documents and each sentence is respectively used as a different sentence node, words are respectively extracted from the sentences and each word is respectively used as a different word node, and public security entity words are respectively extracted from the documents and each public security entity word is respectively used as a different entity node; Based on each of the document nodes, sentence nodes, word nodes and entity nodes, as well as the association relationships between different nodes, a multi-document heterogeneous graph corresponding to each of the documents recording public security content is constructed.
6. The summary extraction model training method for public security multiple documents according to claim 1 is characterized in that: The reinforcement learning model is implemented based on an intelligent agent, in which a global sentence encoder, an extraction history encoder and an extractor are sequentially connected; The global sentence encoder is used to generate a global context information representation corresponding to each of the sentence representations corresponding to the multi-document heterogeneous graph output by the graph attention network, and then send each of the sentence representations and the global context information representation corresponding to each of the sentence representations to the extraction history encoder and the extractor respectively; The extracted history encoder is used to generate, in each time step, for the remaining sentences in the multi-document heterogeneous graph in the current time step except the extracted target sentence, respectively, based on the sentence representations corresponding to the remaining sentences and the global context information representation, respectively, the historical information representations corresponding to the remaining sentences in the current time step, and send the respective historical information representations to the extractor; The extractor is used to aggregate the sentence representations, the global context information representations and the historical information representations corresponding to each of the remaining sentences in each of the time steps to obtain the connection representations corresponding to each of the remaining sentences, and then calculate the scores corresponding to each of the remaining sentences according to the connection representations corresponding to each of the remaining sentences, and obtain the summary extraction probability corresponding to the current time step based on the preset multi-head pooling layer, and then determine whether the summary extraction probability is greater than a preset probability threshold. If not, extract the remaining sentence with the highest score in the current time step and use it as the extracted target sentence in the next time step; if so, stop executing the next time step, and use each of the target sentences in the current time step as the summary data of the multi-document heterogeneous graph, and output the summary data.
7. A summary extraction method for public security multiple documents, characterized in that: Also includes: Receiving a summary extraction request and obtaining a plurality of target documents containing public security content specified by the summary extraction request; Generate a multi-document heterogeneous graph corresponding to each of the target documents, wherein each node in the multi-document heterogeneous graph belongs to a plurality of semantic types, including sentence nodes and non-sentence nodes, and the edge between each node in the multi-document heterogeneous graph is used to represent the association relationship between the two nodes connected by the edge; Splitting the multi-document heterogeneous graph into topological graphs each with the sentence node as a central node; Each of the topological graphs is input into a local summary extraction model so that the local summary extraction model outputs summary data of the multi-document heterogeneous graph corresponding to each of the target documents, wherein the local summary extraction model is pre-trained based on the summary extraction model training method for public security multiple documents as described in any one of claims 1 to 6.
8. A summary extraction model training device for public security multi-documents, characterized in that: include: A heterogeneous graph generation module, used to generate a corresponding multi-document heterogeneous graph based on multiple original documents recording public security content, wherein each node in the multi-document heterogeneous graph belongs to multiple semantic types, including: sentence nodes and non-sentence nodes, and the edge between each node in the multi-document heterogeneous graph is used to represent the association relationship between the two nodes connected by the edge; A local model training module is used to use the multi-document heterogeneous graph to train a local summary extraction model composed of a graph convolutional network, a graph attention network and a reinforcement learning model connected in sequence, so that the local summary extraction model is used to output multiple target sentences corresponding to the multi-document heterogeneous graph according to the input multi-document heterogeneous graph to form summary data of the multi-document heterogeneous graph.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, it implements the summary extraction model training method for public security multiple documents as described in any one of claims 1 to 6, and / or implements the summary extraction method for public security multiple documents as described in claim 7.
10. A federated learning system, characterized in that: include: A server, and client devices respectively connected to the server for communication; The client device is used to execute the summary extraction model training method for public security multiple documents according to any one of claims 1 to 6, and / or, to execute the summary extraction method for public security multiple documents according to claim 7; The client device is further configured to send the local model parameters in each iteration round to the server, and receive the global summary extraction model parameters sent by the server, so as to use the global summary extraction model parameters as the local summary extraction model to be trained in the next iteration round; The server is used to receive the local model parameters sent by each of the client devices in each iteration round, aggregate the local model parameters of the current iteration round to obtain the global summary extraction model parameters of the current iteration round, and then send the global summary extraction model parameters to each of the client devices.
Citation Information
Patent Citations
Image-text abstract method and system based on heterogeneous graph neural network
CN116958997A
Malicious behavior identification method and system for weighted heterogeneous graph, and storage medium
WO2022088972A1
Heterogeneous graph-based text summarization method and apparatus, storage medium, and terminal
WO2022241913A1