Hot line event classification method based on dual-channel memory network
By combining a dual-channel memory network with a graph convolutional neural network and a pre-trained language model, the problem of insufficient deep semantic understanding in the text classification of hotline events is solved, and higher event classification accuracy and robustness are achieved.
Patent Information
- Application Number
- CN202411155367.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2024-11-29
AI Technical Summary
Traditional text classification methods are unable to effectively understand deep semantic information when dealing with complex hotline incident texts, resulting in a weak ability to identify hotline incident types.
A dual-channel memory network approach is adopted, combining graph memory networks and text memory networks. Graph features of hotline events are extracted through graph convolutional neural networks, and semantic encoding is performed using a pre-trained language model. The multi-layer memory network structure is fused to improve the accuracy of event classification.
It improves the accuracy of semantic encoding of hotline event texts and the robustness of the model, enabling better acquisition of prior knowledge and related information of historical hotline events, thereby improving the accuracy of hotline event classification.
Smart Images

Figure CN119046758A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of hotline event classification, and in particular relates to a hotline event classification method based on a dual-channel memory network. Background Art
[0002] China's government hotline has played an important role in promoting the government to perform its duties, meet the needs of the masses, and resolve social conflicts. In recent years, governments have achieved certain results in promoting the digital transformation of government hotlines, but there are still problems in the event dispatch process. Since there are usually hundreds of types of hotline events, it is difficult for hotline operators to quickly and effectively analyze all relevant label information of an event after receiving a phone call from a citizen. Therefore, the operator may misidentify the event type, resulting in the event being assigned to the wrong department, and the citizen's appeal may not be handled in a timely manner. Traditional text classification has a weak ability to understand complex event texts and cannot effectively understand the deep semantic information of the input text, resulting in a weak ability to recognize the type of hotline events. Summary of the invention
[0003] The present invention provides a hotline event classification method based on a dual-channel memory network, aiming to solve the problem that text classification has a weak ability to understand complex event texts and cannot effectively understand the deep semantic information of the input text, thereby resulting in a weak ability to recognize the type of hotline events.
[0004] The present invention is implemented as follows: a hotline event classification method based on a dual-channel memory network comprises the following steps:
[0005] Step 1: hotline event text encoding, wherein the hotline event text encoding is used to encode a given hotline event text into a representation vector containing text semantic structure information and topic information, so as to be input into a graph memory network and a text memory network for subsequent processing;
[0006] Step 2: A graph memory network is used to construct a graph memory through historical hotline event cases to store the graph structure and subject information of historical hotline events, and use the graph memory network to extract graph features from the input new hotline event text to obtain new hotline event graph features containing historical prior knowledge;
[0007] Step 3: a text memory network is used to obtain a more accurate case text encoding by combining the case text encoding vector to be encoded with the case text encoding in the historical case library;
[0008] Step 4: Classify hotline events.
[0009] Preferably, the hotline event text s given in step 1 i , text representation vector ui The calculation method is as follows:
[0010] u i =LM(s i ) (1)
[0011] Where LM(·) represents the BERT pre-trained language model.
[0012] Preferably, the graph feature extraction based on the graph memory network in step 2 mainly includes the following contents:
[0013] (1) Construction of hotline event map;
[0014] (2) Historical hotline event map memory construction;
[0015] (3) Construction of historical hotline event map memory.
[0016] Preferably, the hotline event graph is constructed by: using the AMR parsing algorithm to construct a key information graph of hotline events; then using the VG-AMRCoref model to predict potential relationships in the hotline event key information graph, and using additional information as new relationship graph nodes to further enhance and correct the relationship graph.
[0017] Preferably, the VG-AMRCoref model diagram is used to further enhance and modify the relationship diagram, and the specific process is as follows:
[0018] Step 1. Obtain information that does not exist in the hotline event text to enhance the basic information graph: the time of the event, the type, the region, the source channel, etc. are used as new nodes of the VG-AMRCoref graph and connected with the event text;
[0019] Step 2. Obtain the time, type, region, and other information of the hotline event, and compare it with the corresponding information in the hotline event graph: If there is any inconsistency, enter the information node into the graph and correct the inconsistent nodes in the hotline event graph; otherwise, do not correct them and directly enter the information node into the graph.
[0020] Preferably, the historical hotline event graph memory construction process is as follows:
[0021] First, based on expert experience, we select N pieces of historical data corresponding to the most typical M types (number of hotline event classification categories) of hotline events from the historical hotline event database, and use these M×N pieces of historical hotline events as the basic data for building graph memory.
[0022] Secondly, the selected M×N basic hotline event data are processed using the hotline event graph construction algorithm mentioned above to construct M×N historical hotline event graphs;
[0023] Then, according to the processing basis and processing results of the selected M×N historical hotline events, the processing basis node and processing result node of the hotline event are constructed, and the constructed processing node is connected to the "event ID" point of the corresponding graph;
[0024] Finally, the constructed M×N historical hotline event graph set is used as the historical hotline event graph memory, thereby providing additional prior knowledge for the feature extraction of historical hotline event graphs.
[0025] Preferably, the historical hotline event graph memory construction includes using a graph convolutional neural network (GCN) combined with a memory network framework to extract graph features of new hotline events;
[0026] The graph convolutional neural network includes operating each word in the hotline event text after word segmentation using word embedding to obtain a word embedding sequence W:
[0027]
[0028] in, is the word embedding representation of node information in the AMR graph, w j is the word embedding representation that does not enter the AMR graph, and w j Share the same embedding vocabulary.
[0029] The position embedding information is added to each node in the AMR graph, and the corresponding position information embedding sequence is as follows:
[0030]
[0031] in, is the node information word position embedding representation in the AMR graph, p j is the word position embedding representation that does not enter the AMR graph.
[0032] Finally, the node word embedding and position embedding are combined by additive fusion to obtain the final embedding representation of the node:
[0033] e i =w i +p i (4)
[0034]
[0035] in, is the final embedding representation of the node information word in the AMR graph, e jis the final embedding representation of the words that have not entered the AMR graph. Renumber the final embedding representations of the node words in the AMR graph to obtain the final AMR graph representation sequence E.
[0036]
[0037] For the extra information node, its word embedding is used as its final embedding representation and added to the representation sequence E to obtain the final hotline event graph representation sequence V:
[0038] V={v 1 ,v 2 ,...,v i ,...,v j ,...} (7)
[0039] Among them, the first i vectors represent the hotline event text representation vector, and the vectors after i+1 represent the representation vector of the additional information node.
[0040] After the vertex representation vector set V is calculated, it is input into GCN to extract the features of the hotline event graph. The present invention adopts the standard GCN model to extract the graph features. Therefore, the standard GCN follows the following hierarchical propagation rules:
[0041]
[0042] Where A is the adjacency matrix of the hotline event graph, I N is the identity matrix, W (l) is the learnable weight matrix, σ(·) is the activation function (the present invention uses ReLU as the activation function of GCN), H (l) is the input of layer l, H (0) =X.
[0043] Preferably, the historical hotline event graph memory construction also includes a graph memory network, which uses AMR combined with additional information to construct a graph to obtain a corresponding hotline event graph, and performs node embedding to obtain a corresponding representation vector. For the input node representation vector set V, a two-layer GCN is used for feature extraction, and a weighted fusion calculation is performed to obtain the corresponding representation vector Specifically, as shown in formulas (10)-(11):
[0044]
[0045] Among them, W (0) ,W (1) are the learning matrices for the input layer and the output layer respectively.
[0046] Preferably, each hotline event graph in the historical hotline event graph memory construction uses a three-layer GCN for feature extraction, and uses the output result of the second layer of GCN as the input graph memory representation vector set M={m i}, and Instead of performing inner product operations and softmax processing separately, we can calculate the association probability p between the new hotline event graph and the historical hotline event graph. i ,
[0047]
[0048] At the same time, the output result of the third layer GCN is used as the output graph memory representation vector set C = {c i}, the final graph memory representation vector o is represented as the association probability p i and the output graph memory representation vector c i The weighted summation result is
[0049]
[0050] Finally, the representation vector of the fused input hotline event graph Calculate the feature representation vector V based on the graph memory network gcn ,
[0051] Vgcn=W[v^gcn;o]+b′. (15)
[0052] Preferably, the main process of using the text memory network to encode information in step 3 is as follows: low-level information encoding, middle-level information encoding and high-level information encoding;
[0053] The low-level information encoding is given by a historical case library X consisting of a series of historical case texts = {x i |i=1,...,n}, use the Bert pre-trained language model to encode the case text in the historical case library, and take the output vector results of the lower layer (1-4 layers) and As the input feature encoding and output feature encoding of the surface memory network. After encoding, the surface memory network based on Bert outputs o l The calculation method is as follows:
[0054]
[0055] where w l ,b l is a learnable surface weight matrix, and u represents the case text encoding vector to be encoded.
[0056] The intermediate layer information is encoded, and the output vector result of the Bert encoding intermediate layer (5-8 layers) is and As the input feature encoding and output feature encoding of the syntactic layer memory network. After encoding, the syntactic layer memory network based on Bert outputs o m The calculation method is as follows:
[0057]
[0058] where w m ,b m is the learnable surface weight matrix.
[0059] The high-level information encoding is to encode the output vector result of the high-level (9th-12th layers) of Bert encoding and As the input feature encoding and output feature encoding of the semantic layer memory network. After encoding, the semantic layer memory network based on Bert outputs o h The calculation method is as follows:
[0060]
[0061] where w h ,b h is the learnable syntactic layer weight matrix.
[0062] After the three-layer memory network representation is completed, the attention mechanism is used to extract the memory representation vector o l ,o m ,o h The corresponding output vector u is obtained respectively l ,u m ,u h , and superimposed to the next layer of memory network, where the output vector u of the semantic layer network h As the overall output of the text memory network module.
[0063] In step 4, the hotline event classification is performed by dividing the three types of representation vectors u, u h ,V gcn Fusion to obtain V fuse ,
[0064] V fuse =ω 1 u+ω 2 u h +ω 3 V gcn (twenty two)
[0065] Among them, ω 1 ,ω 2 ,ω3 is the fusion parameter, satisfying ω 1 +ω 2 +ω 3 =1. V fuse Input the classifier to complete the classification of hotline events:
[0066] p=softmax(WV fuse +b) (23)
[0067] Among them, W,b are learnable parameters, and p is the predicted probability of the classification. The cross entropy of the two classifications is used as the training loss function:
[0068]
[0069] Among them, y i is the label of sample i, p i is the predicted probability of sample i.
[0070] Compared with the prior art, the embodiments of the present application have the following beneficial effects:
[0071] The present invention designs a text memory network based on the multi-layer structure of pre-trained language model and memory network. On the one hand, the semantic encoding advantage of pre-trained language model is used to improve the accuracy of semantic encoding of hotline event text by the model. On the other hand, the storage and retrieval advantage of memory network is used to obtain the prior knowledge of historical hotline event text, thereby improving the effect of model extracting potential information in hotline event cases. Based on graph convolutional neural network and memory network framework, a graph memory network is designed, and GCN is used to realize feature extraction of hotline event information graph. At the same time, the storage and retrieval advantage of memory network is used to enable the model to obtain hotline event graph features containing graph-related prior knowledge. The ability of the model to obtain the related information of current hotline events and historical hotline events is improved. A dual-channel memory network integrating graph memory network and text memory network is proposed. The advantages of text memory network and graph memory network are complemented by the fusion of dual-channel memory network, thereby enabling the model to obtain the potential information of hotline event text and discover the related information between hotline events, thereby improving the accuracy and robustness of hotline event classification model. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] Figure 1 It is a schematic diagram of the algorithm flow chart structure of the present invention;
[0073] Figure 2 It is a schematic diagram of the hotline event graph construction structure of the present invention;
[0074] Figure 3 It is a flow chart of the text memory network of the present invention; DETAILED DESCRIPTION
[0075] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of this application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of this application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0076] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0077] The embodiment of the present invention provides a hotline event classification method based on a dual-channel memory network, as shown in the figure, comprising the following steps:
[0078] Step 1: Hotline event text encoding: Hotline event text encoding is used to encode a given hotline event text into a representation vector containing text semantic structure information and topic information, so as to be input into the graph memory network and the text memory network for subsequent processing;
[0079] Step 2: A graph memory network is used to construct a graph memory through historical hotline event cases to store the graph structure and subject information of historical hotline events, and use the graph memory network to extract graph features from the input new hotline event text to obtain new hotline event graph features containing historical prior knowledge;
[0080] Step 3: a text memory network is used to obtain a more accurate case text encoding by combining the case text encoding vector to be encoded with the case text encoding in the historical case library;
[0081] Step 4: Classify hotline events.
[0082] The hotline event text s given in step 1 i , text representation vector u i The calculation method is as follows:
[0083] u i =LM(s i ) (1)
[0084] Where LM(·) represents the BERT pre-trained language model.
[0085] The graph feature extraction based on the graph memory network in step 2 mainly includes the following contents:
[0086] (1) Construction of hotline event map;
[0087] (2) Historical hotline event map memory construction;
[0088] (3) Construction of historical hotline event map memory.
[0089] The hotline event graph is constructed as follows: the AMR parsing algorithm is used to construct the key information graph of hotline events; then the VG-AMRCoref model is used to predict the potential relationships in the hotline event key information graph, and additional information is used as new relationship graph nodes to further enhance and modify the relationship graph.
[0090] Using the VG-AMRCoref model diagram, the relationship diagram is further enhanced and modified. The specific process is as follows:
[0091] Step 1. Obtain information that does not exist in the hotline event text to enhance the basic information graph: the time of the event, the type, the region, the source channel, etc. are used as new nodes of the VG-AMRCoref graph and connected with the event text;
[0092] Step 2. Obtain the time, type, region, and other information of the hotline event, and compare it with the corresponding information in the hotline event graph: If there is any inconsistency, enter the information node into the graph and correct the inconsistent nodes in the hotline event graph; otherwise, do not correct them and directly enter the information node into the graph.
[0093] The process of building the memory of the historical hotline event graph is as follows:
[0094] First, based on expert experience, we select N pieces of historical data corresponding to the most typical M types (number of hotline event classification categories) of hotline events from the historical hotline event database, and use these M×N pieces of historical hotline events as the basic data for building graph memory.
[0095] Secondly, the selected M×N basic hotline event data are processed using the hotline event graph construction algorithm mentioned above to construct M×N historical hotline event graphs;
[0096] Then, according to the processing basis and processing results of the selected M×N historical hotline events, the processing basis node and processing result node of the hotline event are constructed, and the constructed processing node is connected to the "event ID" point of the corresponding graph;
[0097] Finally, the constructed M×N historical hotline event graph set is used as the historical hotline event graph memory, thereby providing additional prior knowledge for the feature extraction of historical hotline event graphs.
[0098] The construction of the historical hotline event graph memory includes using a graph convolutional neural network (GCN) combined with a memory network framework to extract graph features of new hotline events;
[0099] The graph convolutional neural network includes operating each word in the hotline event text after word segmentation using word embedding to obtain the word embedding sequence W:
[0100]
[0101] in, is the word embedding representation of node information in the AMR graph, w j is the word embedding representation that does not enter the AMR graph, and w j Share the same embedding vocabulary.
[0102] The position embedding information is added to each node in the AMR graph, and the corresponding position information embedding sequence is as follows:
[0103]
[0104] in, is the node information word position embedding representation in the AMR graph, p j is the word position embedding representation that does not enter the AMR graph.
[0105] Finally, the node word embedding and position embedding are combined by additive fusion to obtain the final embedding representation of the node:
[0106] e i =w i +p i (4)
[0107]
[0108] in, is the final embedding representation of the node information word in the AMR graph, e j is the final embedding representation of the words that have not entered the AMR graph. Renumber the final embedding representations of the node words in the AMR graph to obtain the final AMR graph representation sequence E.
[0109]
[0110] For the extra information node, its word embedding is used as its final embedding representation and added to the representation sequence E to obtain the final hotline event graph representation sequence V:
[0111] V={v 1 ,v 2 ,...,v i ,...,v j ,...} (7)
[0112] Among them, the first i vectors represent the hotline event text representation vector, and the vectors after i+1 represent the representation vector of the additional information node.
[0113] After the vertex representation vector set V is calculated, it is input into GCN to extract the features of the hotline event graph. The present invention adopts the standard GCN model to extract the graph features. Therefore, the standard GCN follows the following hierarchical propagation rules:
[0114]
[0115] Where A is the adjacency matrix of the hotline event graph, I N is the identity matrix, W (l) is the learnable weight matrix, σ(·) is the activation function (the present invention uses ReLU as the activation function of GCN), H (l) is the input of layer l, H (0) =X.
[0116] The historical hotline event graph memory construction also includes a graph memory network. The graph memory network uses AMR combined with additional information to construct the corresponding hotline event graph, and performs node embedding to obtain the corresponding representation vector. For the input node representation vector set V, a two-layer GCN is used for feature extraction, and a weighted fusion calculation is performed to obtain the corresponding representation vector Specifically, as shown in formulas (10)-(11):
[0117]
[0118] Among them, W (0) ,W (1) are the learning matrices for the input layer and the output layer respectively.
[0119] For each hotline event graph in the historical hotline event graph memory construction, a three-layer GCN is used for feature extraction, and the output result of the second layer of GCN is used as the input graph memory representation vector set M = {m i}, and Instead of performing inner product operations and softmax processing separately, we can calculate the association probability p between the new hotline event graph and the historical hotline event graph. i ,
[0120]
[0121] At the same time, the output result of the third layer GCN is used as the output graph memory representation vector set C = {c i}, the final graph memory representation vector o is represented as the association probability p i and the output graph memory representation vector c i The weighted summation result is
[0122]
[0123] Finally, the representation vector of the fused input hotline event graph Calculate the feature representation vector V based on the graph memory network gcn ,
[0124] Vgcn=W[v^gcn;o]+bc. (15)
[0125] In step 3, the main process of using the text memory network to encode information is as follows: low-level information encoding, middle-level information encoding, and high-level information encoding;
[0126] Low-level information encoding, given a historical case library X consisting of a series of historical case texts = {x i |i=1,...,n}, use the Bert pre-trained language model to encode the case text in the historical case library, and take the output vector results of the lower layer (1-4 layers) and As the input feature encoding and output feature encoding of the surface memory network. After encoding, the surface memory network based on Bert outputs o l The calculation method is as follows:
[0127]
[0128] where w l ,b l is a learnable surface weight matrix, and u represents the case text encoding vector to be encoded.
[0129] Intermediate layer information encoding, Bert encoding intermediate layer (5-8 layers) output vector results and As the input feature encoding and output feature encoding of the syntactic layer memory network. After encoding, the syntactic layer memory network based on Bert outputs o m The calculation method is as follows:
[0130]
[0131] where wm ,b m is the learnable surface weight matrix.
[0132] High-level information encoding, the output vector result of the high-level (9th-12th layers) of Bert encoding and As the input feature encoding and output feature encoding of the semantic layer memory network. After encoding, the semantic layer memory network based on Bert outputs o h The calculation method is as follows:
[0133]
[0134] where w h ,b h is the learnable syntactic layer weight matrix.
[0135] After the three-layer memory network representation is completed, the attention mechanism is used to extract the memory representation vector o l ,o m ,o h The corresponding output vector u is obtained respectively l ,u m ,u h , and superimposed to the next layer of memory network, where the output vector u of the semantic layer network h As the overall output of the text memory network module.
[0136] Similarly, in order to improve the effect of the multi-layer text memory network, the multi-layer memory network is trained in a similar way to the training of the single-layer memory network. Specifically: First, the training set is divided into two parts: the network training set and the model training set according to the application time at a certain time point. The historical case documents in the network training set are used as input, and the encoder Bert1 based on the Bert language model is used to encode the historical case documents. Secondly, based on the historical case library, according to the real label results of the cases in the network training set, a softmax classifier is connected thereafter to train the parameter matrix in the memory network to obtain the trained memory network M. Finally, during the secondary training, the parameters corresponding to M are fixed, and the model is trained using the data of the model training set to obtain a new encoder Bert2, and the corresponding output vector o' is obtained accordingly.
[0137] In step 4, the hotline event classification is performed by dividing the three types of representation vectors u,u h ,V gcn Fusion to obtain V fuse ,
[0138] V fuse =ω 1 u+ω 2 uh +ω 3 V gcn (twenty two)
[0139] Among them, ω 1 ,ω 2 ,ω 3 is the fusion parameter, satisfying ω 1 +ω 2 +ω 3 =1. V fuse Input the classifier to complete the classification of hotline events:
[0140] p=softmax(WV fuse +b) (23)
[0141] Among them, W,b are learnable parameters, and p is the predicted probability of the classification. The cross entropy of the two classifications is used as the training loss function:
[0142]
[0143] Among them, y i is the label of sample i, p i is the predicted probability of sample i.
[0144] The present invention designs a text memory network based on the multi-layer structure of pre-trained language model and memory network. On the one hand, the semantic encoding advantage of pre-trained language model is used to improve the accuracy of semantic encoding of hotline event text by the model. On the other hand, the storage and retrieval advantage of memory network is used to obtain the prior knowledge of historical hotline event text, thereby improving the effect of model extracting potential information in hotline event cases. Based on graph convolutional neural network and memory network framework, a graph memory network is designed, and GCN is used to realize feature extraction of hotline event information graph. At the same time, the storage and retrieval advantage of memory network is used to enable the model to obtain hotline event graph features containing graph-related prior knowledge. The ability of the model to obtain the related information of current hotline events and historical hotline events is improved. A dual-channel memory network integrating graph memory network and text memory network is proposed. The advantages of text memory network and graph memory network are complemented by the fusion of dual-channel memory network, thereby enabling the model to obtain the potential information of hotline event text and discover the related information between hotline events, thereby improving the accuracy and robustness of hotline event classification model.
[0145] First, use BERT to process the input hotline event text to obtain the semantic encoding vector of the hotline event. Secondly, use the AMR algorithm and additional knowledge to construct a hotline event graph for the input hotline event text, and use the graph memory network combined with GCN to extract graph features to obtain the graph feature representation vector of the hotline event. Then, the text feature extraction of the input description text is performed based on a multi-level memory network structure to obtain the text feature representation vector of the hotline event. Finally, the semantic encoding vector, graph feature representation vector and text feature representation vector are fused, and the softmax function is used to calculate the final hotline event score.
[0146] It should be noted that, for the above-mentioned embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described order of actions, because according to the present invention, some steps may be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0147] In the several embodiments provided in the present application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are merely schematic, such as the division of the above-mentioned units. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or units can be in the form of telecommunication or other forms.
[0148] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0149] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the scope of protection of the invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. Based on these embodiments, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in this field can still combine, add, delete or make other adjustments to the features in the various embodiments of the present invention according to the circumstances without conflict, without making creative work, so as to obtain different other technical solutions that do not deviate from the concept of the present invention in essence, and these technical solutions also belong to the scope of protection of the present invention.
Claims
1. A hotline event classification method based on dual-channel memory network, It is characterized in that The following steps are involved: Step 1: hotline event text encoding, wherein the hotline event text encoding is used to encode a given hotline event text into a representation vector containing text semantic structure information and topic information, so as to be input into a graph memory network and a text memory network for subsequent processing; Step 2: A graph memory network is used to construct a graph memory through historical hotline event cases to store the graph structure and subject information of historical hotline events, and use the graph memory network to extract graph features from the input new hotline event text to obtain new hotline event graph features containing historical prior knowledge; Step 3: a text memory network is used to obtain a more accurate case text encoding by combining the case text encoding vector to be encoded with the case text encoding in the historical case library; Step 4: Classify hotline events.
2. A hotline event classification method based on a dual-channel memory network as claimed in claim 1, It is characterized in that The hotline event text s given in step 1 i , text representation vector u i The calculation method is as follows: u i =LM(s i ) (1) Where LM(·) represents the BERT pre-trained language model.
3. A hotline event classification method based on a dual-channel memory network as claimed in claim 1, It is characterized in that The graph feature extraction based on the graph memory network in step 2 mainly includes the following contents: (1) Construction of hotline event map; (2) Historical hotline event map memory construction; (3) Construction of historical hotline event map memory.
4. A hotline event classification method based on a dual-channel memory network as claimed in claim 3, It is characterized in that The hotline event graph is constructed by: using the AMR parsing algorithm to construct a key information graph of hotline events; then using the VG-AMRCoref model to predict potential relationships in the hotline event key information graph, and using additional information as new relationship graph nodes to further enhance and modify the relationship graph.
5. A hotline event classification method based on a dual-channel memory network as claimed in claim 4, It is characterized in that The VG-AMRCoref model diagram is used to further enhance and modify the relationship diagram. The specific process is as follows: Step 1. Obtain information that does not exist in the hotline event text to enhance the basic information graph: the time of the event, the type, the region, the source channel, etc. are used as new nodes of the VG-AMRCoref graph and connected with the event text; Step 2. Obtain the time, type, region, and other information of the hotline event, and compare it with the corresponding information in the hotline event graph: If there is any inconsistency, enter the information node into the graph and correct the inconsistent nodes in the hotline event graph; otherwise, do not correct them and directly enter the information node into the graph.
6. A hotline event classification method based on a dual-channel memory network as claimed in claim 3, It is characterized in that The historical hotline event graph memory construction process is as follows: First, based on expert experience, we select N pieces of historical data corresponding to the most typical M types (number of hotline event classification categories) of hotline events from the historical hotline event database, and use these M×N pieces of historical hotline events as the basic data for building graph memory. Secondly, the selected M×N basic hotline event data are processed using the hotline event graph construction algorithm mentioned above to construct M×N historical hotline event graphs; Then, according to the processing basis and processing results of the selected M×N historical hotline events, the processing basis node and processing result node of the hotline event are constructed, and the constructed processing node is connected to the "event ID" point of the corresponding graph; Finally, the constructed M×N historical hotline event graph set is used as the historical hotline event graph memory, thereby providing additional prior knowledge for the feature extraction of historical hotline event graphs.
7. A hotline event classification method based on a dual-channel memory network as claimed in claim 3, It is characterized in that The historical hotline event graph memory construction includes using a graph convolutional neural network (GCN) combined with a memory network framework to extract graph features of new hotline events; The graph convolutional neural network includes operating each word in the hotline event text after word segmentation using word embedding to obtain a word embedding sequence W: in, is the word embedding representation of node information in the AMR graph, w j is the word embedding representation that does not enter the AMR graph, and w j Share the same embedding vocabulary. The position embedding information is added to each node in the AMR graph, and the corresponding position information embedding sequence is as follows: in, is the node information word position embedding representation in the AMR graph, p j is the word position embedding representation that does not enter the AMR graph. Finally, the node word embedding and position embedding are combined by additive fusion to obtain the final embedding representation of the node: have been i =w i + p i (4) in, is the final embedding representation of the node information word in the AMR graph, e j is the final embedding representation of the words that have not entered the AMR graph. Renumber the final embedding representations of the node words in the AMR graph to obtain the final AMR graph representation sequence E. For the extra information node, its word embedding is used as its final embedding representation and added to the representation sequence E to obtain the final hotline event graph representation sequence V: V={v 1 ,v 2 ,...,v i ,...,v j ,...} (7) Among them, the first i vectors represent the hotline event text representation vector, and the vectors after i+1 represent the representation vector of the additional information node. After the vertex representation vector set V is calculated, it is input into GCN to extract the features of the hotline event graph. The present invention adopts the standard GCN model to extract the graph features. Therefore, the standard GCN follows the following hierarchical propagation rules: Where A is the adjacency matrix of the hotline event graph, I N is the identity matrix, W (l) is the learnable weight matrix, σ(·) is the activation function (the present invention uses ReLU as the activation function of GCN), H (l) is the input of layer l, H (0) =X.
8. A hotline event classification method based on a dual-channel memory network as claimed in claim 7, It is characterized in that The historical hotline event graph memory construction also includes a graph memory network. The graph memory network uses AMR combined with additional information to construct the corresponding hotline event graph, and performs node embedding to obtain the corresponding representation vector. For the input node representation vector set V, a two-layer GCN is used for feature extraction, and a weighted fusion calculation is performed to obtain the corresponding representation vector Specifically, as shown in formulas (10)-(11): Among them, W (0) ,W (1) are the learning matrices for the input layer and the output layer respectively.
9. A hotline event classification method based on a dual-channel memory network as claimed in claim 8, It is characterized in that Each hotline event graph in the historical hotline event graph memory construction adopts three layers of GCN for feature extraction, and uses the output result of the second layer of GCN as the input graph memory representation vector set M={m i }, and Instead of performing inner product operations and softmax processing separately, we can calculate the association probability p between the new hotline event graph and the historical hotline event graph. i , At the same time, the output result of the third layer GCN is used as the output graph memory representation vector set C = {c i }, the final graph memory representation vector o is represented as the association probability p i and the output graph memory representation vector c i The weighted sum of Finally, the representation vector of the fused input hotline event graph Calculate the feature representation vector V based on the graph memory network gcn , Vgcn=W[v^gcn;o]+b′.
10. A hotline event classification method based on a dual-channel memory network as claimed in claim 9, It is characterized in that In the step 3, the text memory network is used to encode information mainly in the following processes: low-level information encoding, middle-level information encoding and high-level information encoding; The low-level information encoding is given by a historical case library X consisting of a series of historical case texts = {x i |i=1,...,n}, use the Bert pre-trained language model to encode the case text in the historical case library, and take the output vector results of the lower layer (1-4 layers) and As the input feature encoding and output feature encoding of the surface memory network. After encoding, the surface memory network based on Bert outputs o l The calculation method is as follows: where w l ,b l is a learnable surface weight matrix, and u represents the case text encoding vector to be encoded. The intermediate layer information is encoded, and the output vector result of the Bert encoding intermediate layer (5-8 layers) is and As the input feature encoding and output feature encoding of the syntactic layer memory network. After encoding, the syntactic layer memory network based on Bert outputs o m The calculation method is as follows: where w m ,b m is the learnable surface weight matrix. The high-level information encoding is to encode the output vector result of the high-level (9th-12th layers) of Bert encoding and As the input feature encoding and output feature encoding of the semantic layer memory network. After encoding, the semantic layer memory network based on Bert outputs o h The calculation method is as follows: where w h ,b h is the learnable syntactic layer weight matrix. After the three-layer memory network representation is completed, the attention mechanism is used to extract the memory representation vector o l ,o m ,o h The corresponding output vector u is obtained respectively l ,u m ,u h , and superimposed to the next layer of memory network, where the output vector u of the semantic layer network h As the overall output of the text memory network module. In step 4, the hotline event classification is performed by dividing the three types of representation vectors u, u h ,V gcn Fusion to obtain V fuse , V fuse =ω 1 u+ω 2 you h +oh 3 V gcn (22) Among them, ω 1 ,ω 2 ,ω 3 is the fusion parameter, satisfying ω 1 +ω 2 +ω 3 =1. V fuse Input the classifier to complete the classification of hotline events: p=softmax(WV fuse +b) (23) Among them, W,b are learnable parameters, and p is the predicted probability of the classification. The cross entropy of the two classifications is used as the training loss function: Among them, y i is the label of sample i, p i is the predicted probability of sample i.
Citation Information
Patent Citations
Cross-sentence multilayer bidirectional network event detection method based on external knowledge
CN117236436A
Loan fraud prediction method and device fusing external knowledge, and storage medium
CN117314623A
Cited By
Method and system for reasoning and revising multimedia case classification with assistance of external information
CN121681854A
