Intention event extraction method and device, electronic equipment, and storage medium

By constructing multi-form heterogeneous relational graphs and using the R-GCN model to detect statement intent events, the accuracy problem of statement event extraction in existing technologies is solved, and more efficient statement intent event extraction is achieved.

CN116167382BActive Publication Date: 2026-04-07CHINA TELECOM CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-05
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Existing technologies cannot accurately distinguish the ambiguity of event triggering and understand the correlation between events within and between sentences in sentence event extraction, resulting in poor accuracy in extracting sentence intent events.

Method used

By acquiring at least two semantic feature data of the current statement data, a multi-form heterogeneous relation graph is constructed based on a preset dependency relationship, and input into a pre-trained intent event extraction model. Event detection and parameter extraction are then performed using a relation graph convolutional neural network R-GCN.

Benefits of technology

It effectively improves the accuracy and extraction efficiency of sentence intent events, accurately represents the correlation between intra-sentence events and inter-sentence events, and distinguishes the ambiguity between event trigger words.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116167382B_ABST
    Figure CN116167382B_ABST
Patent Text Reader

Abstract

The present disclosure provides an intent event extraction method and device, an electronic device and a storage medium, and relates to the technical field of natural language processing. The intent event extraction method comprises: acquiring current sentence data to be processed; extracting at least two semantic feature data of the current sentence data; associating the at least two semantic feature data based on a preset dependency relationship to obtain a multi-form heterogeneous relationship graph; inputting the multi-form heterogeneous relationship graph into a pre-trained intent event extraction model to obtain a sentence intent event corresponding to the current sentence data. The technical scheme of the embodiment of the present disclosure effectively mines the semantic information contained in the sentence data by constructing the multi-form heterogeneous relationship graph, accurately expresses the correlation between intra-sentence events and inter-sentence events, and thus effectively improves the accuracy of the extracted sentence intent event.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of natural language processing, and in particular, to an intent event extraction method and device, an electronic device, and a computer readable storage medium. BACKGROUND

[0002] Natural Language Processing (NLP) is an important direction in the field of computer science and artificial intelligence, mainly studying various theories and methods that can realize effective communication between people and computers using natural language. At present, natural language processing is mainly applied to machine translation, automatic abstract, text classification, question answering, text semantic comparison, speech recognition, Optical Character Recognition (OCR), sentence intent event extraction, etc.

[0003] Among them, in the related scheme of sentence event extraction, either the ambiguity triggered by certain types of events in the sentence cannot be distinguished, or the relevance of intra-sentence events and inter-sentence events cannot be understood, resulting in poor accuracy of the sentence intent events extracted from the sentence data.

[0004] It should be noted that the information disclosed in the above background section is only used to strengthen the understanding of the background of the present disclosure, and therefore can include information that does not constitute prior art known to those of ordinary skill in the art. SUMMARY

[0005] The purpose of the embodiments of the present disclosure is to provide an intent event extraction method, an intent event extraction device, an electronic device, and a computer readable storage medium, thereby at least to some extent improving the accuracy of the sentence intent events extracted from the sentence data.

[0006] Other characteristics and advantages of the present disclosure will become apparent from the following detailed description, or will be learned by practice of the present disclosure.

[0007] According to a first aspect of the embodiments of the present disclosure, an intent event extraction method is provided, comprising:

[0008] obtaining current sentence data to be processed;

[0009] extracting at least two semantic feature data of the current sentence data;

[0010] associating the at least two semantic feature data based on a preset dependency relationship to obtain a multi-form heterogeneous relationship graph;

[0011] input the multi-form isomerism relation graph into a pre-trained intention event extraction model to obtain a sentence intention event corresponding to the current sentence data.

[0012] In some example embodiments of the present disclosure, based on the foregoing scheme, the at least two semantic feature data include word feature data, entity feature data, context feature data, and pinyin feature data;

[0013] The at least two semantic feature data of the current sentence data are extracted, including:

[0014] The current sentence data is subjected to word segmentation processing to obtain sentence words, and the sentence words are subjected to word encoding to obtain word feature data;

[0015] The current sentence data is subjected to entity recognition processing to obtain sentence entities, and the sentence entities are subjected to entity encoding to obtain entity feature data;

[0016] The adjacent sentence data corresponding to the current sentence data is obtained, and the adjacent sentence data is subjected to context encoding to obtain context feature data;

[0017] The sentence pinyin corresponding to the current sentence data is obtained, and the sentence pinyin is subjected to pinyin encoding to obtain the pinyin feature data.

[0018] In some example embodiments of the present disclosure, based on the foregoing scheme, the word encoding of the sentence words to obtain word feature data includes:

[0019] The sentence words are subjected to word embedding encoding to obtain a word embedding vector;

[0020] The sentence words are subjected to part-of-speech tagging encoding to obtain a part-of-speech label embedding vector;

[0021] The sentence words are subjected to position encoding to obtain a position embedding vector;

[0022] The sentence words are subjected to entity type tagging encoding to obtain an entity type label embedding vector;

[0023] The word embedding vector, the part-of-speech label embedding vector, the position embedding vector, and the entity type label embedding vector are spliced to generate word feature data.

[0024] In some example embodiments of the present disclosure, based on the foregoing scheme, the context encoding of the adjacent sentence data to obtain context feature data includes:

[0025] The adjacent sentence data is subjected to sentence encoding to obtain an adjacent sentence vector;

[0026] The adjacent sentence vectors are spliced to obtain context feature data corresponding to the current sentence data.

[0027] In some example embodiments of the present disclosure, based on the foregoing scheme, the preset dependency relationship includes any one or a combination of dependency relationships between words, dependency relationships between words and trigger words, dependency relationships between words and entities, dependency relationships between entities, dependency relationships between contexts and entities, and dependency relationships between pinyin and trigger words.

[0028] In some example embodiments of the present disclosure, based on the foregoing scheme, inputting the multi-form heterogeneous relationship graph into the pre-trained intent event extraction model to obtain a sentence intent event corresponding to the current sentence data includes:

[0029] inputting the multi-form heterogeneous relationship graph into the pre-trained intent event extraction model to obtain event trigger words and event content information;

[0030] generating a sentence intent event corresponding to the current sentence data based on the event trigger words and the event content information.

[0031] In some example embodiments of the present disclosure, based on the foregoing scheme, the intent event extraction model includes a relationship graph convolutional neural network (R-GCN).

[0032] According to a second aspect of the embodiments of the present disclosure, an intent event extraction apparatus is provided, including:

[0033] a sentence data acquisition module configured to acquire current sentence data to be processed;

[0034] a semantic feature extraction module configured to extract at least two kinds of semantic feature data of the current sentence data;

[0035] a semantic relationship graph construction module configured to associate the at least two kinds of semantic feature data based on a preset dependency relationship to obtain a multi-form heterogeneous relationship graph;

[0036] a sentence intent event determination module configured to input the multi-form heterogeneous relationship graph into a pre-trained intent event extraction model to obtain a sentence intent event corresponding to the current sentence data.

[0037] According to a third aspect of the embodiments of the present disclosure, an electronic device is provided, including a processor and a memory having computer readable instructions stored thereon, the computer readable instructions being executed by the processor to implement the intent event extraction method described in any one of the preceding aspects.

[0038] According to a fourth aspect of the embodiments of the present disclosure, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program. The computer program is executed by a processor to implement the intent event extraction method according to any one of the above.

[0039] The technical solutions provided by the embodiments of the present disclosure can have the following beneficial effects.

[0040] The intent event extraction method in the example embodiments of the present disclosure can extract at least two kinds of semantic feature data contained in the current sentence data, then associate the at least two kinds of semantic feature data based on a preset dependency relationship to obtain a multi-form heterogeneous relationship graph, and then input the multi-form heterogeneous relationship graph into a pre-trained intent event extraction model to obtain a sentence intent event corresponding to the current sentence data. By constructing the multi-form heterogeneous relationship graph, the semantic information contained in the current sentence data can be effectively mined, the semantic expression is strengthened, the correlation between intra-sentence events and inter-sentence events is accurately represented, and the ambiguity between event trigger words is accurately distinguished, thereby effectively improving the accuracy of the extracted sentence intent event.

[0041] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF DRAWINGS

[0042] The accompanying drawings, which are incorporated into and form part of the specification, illustrate embodiments consistent with the present disclosure and, together with the specification, serve to explain the principles of the present disclosure. It is obvious that the drawings in the following description are only some embodiments of the present disclosure, and other drawings can be obtained from these drawings without creative labor for those skilled in the art. In the drawings:

[0043] Figure 1 A schematic diagram of a system architecture of an exemplary application environment of an intent event extraction method and device to which the embodiments of the present disclosure can be applied is shown;

[0044] Figure 2 A flowchart of an intent event extraction method according to some embodiments of the present disclosure is schematically shown;

[0045] Figure 3 A flowchart of generating word feature data according to some embodiments of the present disclosure is schematically shown;

[0046] Figure 4 A flowchart of implementing sentence intent event extraction according to some embodiments of the present disclosure is schematically shown;

[0047] Figure 5 A schematic diagram of a multi-form heterogeneous relationship graph according to some embodiments of the present disclosure is schematically shown;

[0048] Figure 6 schematically shows a schematic diagram of an intention event extraction device according to some embodiments of the present disclosure;

[0049] Figure 7 schematically shows a structural schematic diagram of a computer system of an electronic device according to some embodiments of the present disclosure;

[0050] Figure 8 schematically shows a schematic diagram of a computer readable storage medium according to some embodiments of the present disclosure.

[0051] In the drawings, identical or corresponding reference signs indicate identical or corresponding parts. DETAILED DESCRIPTION

[0052] Example implementations will now be described more fully with reference to the accompanying drawings. Example implementations may, however, be implemented in many different forms and should not be construed as limited to the examples set forth herein; rather, these implementations are provided so that this disclosure will be thorough and complete, and will fully convey the scope of example implementations to those skilled in the art.

[0053] Moreover, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the implementations can be practiced without one or more of the specific details, or with other methods, components, materials, and so forth. In other instances, well-known structures, devices, and operations have not been shown or described in detail to avoid obscuring aspects of the disclosure.

[0054] Furthermore, the diagrams depicted are only schematic and are not necessarily drawn to scale. The schematics in the drawings illustrate the functional principles of the illustrative embodiments; however, the drawing is not intended to be limiting of the scope of the present disclosure. The functional blocks of the diagrams can be implemented in software, hardware, or a combination thereof. It is to be understood that the functional blocks depicted in the diagrams can be implemented in software, hardware, or a combination thereof.

[0055] Figure 1 schematically shows a structural schematic diagram of a system architecture of an example application environment of an intention event extraction method and device to which embodiments of the present disclosure can be applied.

[0056] As Figure 1As shown, the system architecture 100 can include one or more of terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is a medium for providing a communication link between the terminal devices 101, 102, 103 and the server 105. The network 104 can include various connection types, such as wired, wireless communication links, or fiber optic cables, etc. The terminal devices 101, 102, 103 can be various electronic devices with artificial intelligence processing functions, including but not limited to desktop computers, portable computers, smart phones, and tablet computers, etc. It should be understood that Figure 1 The number of terminal devices, networks, and servers in the above description is only illustrative. Depending on the implementation needs, there can be any number of terminal devices, networks, and servers. For example, the server 105 can be a server cluster composed of multiple servers, etc.

[0057] The intent event extraction method provided by the embodiments of the present disclosure is generally executed in the server 105, and accordingly, the intent event extraction apparatus is generally arranged in the server 105. However, it is easily understood by those skilled in the art that the intent event extraction method provided by the embodiments of the present disclosure can also be executed by the terminal devices 101, 102, 103, and accordingly, the intent event extraction apparatus can also be arranged in the terminal devices 101, 102, 103, which is not specially limited in the present exemplary embodiment.

[0058] For example, in an exemplary embodiment, the user can collect the current sentence data through the terminal devices 101, 102, 103, and upload the current sentence data to the server 105. The server generates the sentence intent event through the intent event extraction method provided by the embodiments of the present disclosure, and then transmits the sentence intent event to the terminal devices 101, 102, 103, etc. for processing.

[0059] In related sentence intent event extraction schemes, either only the semantic information of a single form of sentence data is considered, however, a single word can express completely different intents in different sentences, which can trigger different events, and for this case, it is often difficult to distinguish the ambiguity of some types of event triggers; or it is difficult to model the correlation between intra-sentence events and inter-sentence events, since a sentence can express several related events at the same time, the current scheme has weak modeling ability for the mutual dependence relationship between related events, and has never modeled the entire event extraction task, resulting in poor accuracy of the finally extracted sentence intent.

[0060] Based on the problems existing in the related art, in the present exemplary embodiment, first, an intent event extraction method is provided, and the intent event extraction method in the present embodiment is specifically described below taking the server executing the method as an example.

[0061] Figure 2 A flowchart of an intention event extraction method according to some embodiments of the present disclosure is schematically shown. Referring to Figure 2 As shown, the intention event extraction method can include the following steps:

[0062] In step S210, current sentence data to be processed is acquired.

[0063] In step S220, at least two kinds of semantic feature data of the current sentence data are extracted.

[0064] In step S230, the at least two kinds of semantic feature data are associated based on a preset dependency relationship, to obtain a multi-form heterogeneous relationship graph.

[0065] In step S240, the multi-form heterogeneous relationship graph is input into a pre-trained intention event extraction model, to obtain a sentence intention event corresponding to the current sentence data.

[0066] According to the intention event extraction method in the present example embodiment, by means of the multi-form heterogeneous relationship graph constructed, semantic information contained in the current sentence data can be effectively mined, semantic expression can be strengthened, correlation between intra-sentence events and inter-sentence events can be accurately represented, and ambiguity between event trigger words can be accurately distinguished, thereby effectively improving the accuracy of the extracted sentence intention event.

[0067] In the following, the intention event extraction method in the present example embodiment will be further described.

[0068] In step S210, current sentence data to be processed is acquired.

[0069] In an example embodiment of the present disclosure, the current sentence data refers to sentence data selected from a sentence paragraph for intention event extraction. For example, for a sentence paragraph composed of 6 sentences, if sentence 3 in the sentence paragraph needs to be extracted for intention event at the current time, then the sentence 3 can be the current sentence data.

[0070] The current sentence data to be processed can be sentence data input in real time by a user through a relevant interaction mode, can be sentence data pre-stored in a storage unit, or can be sentence data recognized by a translation tool or an OCR tool. The present example embodiment does not specially limit the source of the current sentence data.

[0071] In step S220, at least two kinds of semantic feature data of the current sentence data are extracted.

[0072] In an example embodiment of the present disclosure, the semantic feature data refers to data representing semantic information corresponding to the current sentence data in any form. For example, the semantic feature data can be a word feature corresponding to the current sentence data, or an entity feature in the current sentence data, and of course, can also be a context feature, a pinyin feature, a tone feature, a voice feature, etc. corresponding to the current sentence data. The example embodiment does not make any special limitation on the type of semantic feature data.

[0073] At least two semantic feature data contained in the current sentence data can be extracted. For example, the number of semantic feature data can be 2, 3, 4, 5, etc. The example embodiment does not make any special limitation on the number of semantic feature data. Generally, the more semantic feature data extracted from the current sentence data, the better.

[0074] For example, the word feature, entity feature, context feature, and pinyin feature of the current sentence data can be extracted. Assuming that the current sentence data has corresponding voice data, the tone feature and tone feature (such as happy tone, angry tone, etc.) corresponding to the voice data can also be used as semantic feature data of the current sentence data. The example embodiment is not limited thereto.

[0075] In step S230, the at least two semantic feature data are associated based on the preset dependency relationship to obtain a multi-form heterogeneous relationship graph.

[0076] In an example embodiment of the present disclosure, the preset dependency relationship refers to data that is set in advance and is used to mine the correlation between semantic feature data. For example, the preset dependency relationship can be any one or a combination of multiple of the dependency relationship between words, the dependency relationship between words and trigger words, the dependency relationship between words and entities, the dependency relationship between words and entities, the dependency relationship between entities, the dependency relationship between context and entities, and the dependency relationship between pinyin and trigger words. Of course, the preset dependency relationship can also be other types of data used to mine the correlation between semantic feature data, such as the dependency relationship between context and tone, the dependency relationship between tone and trigger words, etc. The example embodiment does not make any special limitation thereon.

[0077] The multi-form heterogeneous relationship graph refers to a relationship graph obtained by taking the preset dependency relationship as an edge, taking the semantic feature data as a node, and connecting different forms of nodes through the edge. Through the multi-form heterogeneous relationship graph, the information of related events in the current sentence data can be aggregated, and the mutual dependency relationship between events can be obtained, thereby effectively improving the extraction effect of the sentence intent event and improving the accuracy of the extracted sentence intent event.

[0078] In step S240, the multi-form heterogeneous relationship graph is input into the pre-trained intent event extraction model to obtain a sentence intent event corresponding to the current sentence data.

[0079] In an example embodiment of the present disclosure, the intent event extraction model refers to a deep learning model for aggregating node information in the multi-form heterogeneous relationship graph and reasoning the relationship interaction between the node information. For example, the intent event extraction model can be a deep learning model based on a relationship graph convolutional neural network (R-GCN). Of course, the intent event extraction model can also be other deep learning models capable of aggregating node information in the multi-form heterogeneous relationship graph and reasoning the relationship interaction between the node information, such as a gate recurrent unit (GRU), and the like. The present example embodiment does not specially limit this.

[0080] The sentence intent event refers to a trigger event extracted from the current sentence data to represent the sentence intent. For example, for the current sentence data "In 2022, Xiaoming was born in A city", the corresponding sentence intent event can be "event trigger word: birth; event character: Xiaoming; event location: A; event time: 2022". Of course, this is only an illustrative example and should not cause any special limitation to the present example embodiment.

[0081] The multi-form heterogeneous relationship graph can be input into the pre-trained intent event extraction model in the form of a feature vector, and the sentence intent event corresponding to the current sentence data can be generated. The generated sentence intent event can be used in the chat reply scenario of intelligent customer service, the scenario of answering the question of the person in the form of text or voice of the intelligent robot, intelligent text generation, and the like. The present example embodiment does not specially limit the application scenario of the obtained sentence intent event.

[0082] Through the constructed multi-form heterogeneous relationship graph, the semantic information contained in the current sentence data can be effectively mined, the semantic expression can be strengthened, the correlation between intra-sentence events and inter-sentence events can be accurately represented, and the ambiguity between event trigger words can be accurately distinguished, thereby effectively improving the accuracy of the extracted sentence intent event. Through the multi-form heterogeneous relationship graph and the pre-trained intent event extraction model, the extraction efficiency of the sentence intent event can be effectively improved, and the application scope can be improved.

[0083] Next, steps S210 to S240 are described in detail.

[0084] In some exemplary embodiments of the present disclosure, at least two types of semantic feature data may include word feature data, entity feature data, context feature data, and pinyin feature data; optionally, if there is corresponding speech data for the current statement data, tone feature data, mood feature data, etc. corresponding to the current statement data may also be extracted from the speech data, and the tone feature data and mood feature data may also be used as semantic feature data of the current statement data; of course, it may also be other types of data characterizing the semantic features of the current statement data, and the present exemplary embodiments are not limited thereto.

[0085] Specifically, the current statement data may be segmented to obtain statement words, and the statement words may be encoded to obtain word feature data. The segmentation process refers to the process of splitting the current statement data into words and characters. For example, the current statement data may be segmented into statement words through a word dictionary, or the current statement data may be segmented into statement words through a pre-trained segmentation tool. The present exemplary embodiments do not make special limitations on this.

[0086] Optionally, meaningless words may be removed from the data after the segmentation process. For example, words such as "ah" and "ne" that have no specific semantic information in the current statement data may be deleted to reduce the workload.

[0087] Optionally, the encoding of the statement words may be achieved by looking up in an embedding matrix. Specifically, the encoding of the statement words may be achieved through the steps in Figure 3 to obtain word feature data. As shown in Figure 3 , it may specifically include:

[0088] Step S310, performing word embedding encoding on the statement words to obtain word embedding vectors;

[0089] Step S320, performing词性标注编码 (it seems there is a mistake here, it might be "positional tagging encoding") on the statement words to obtain positional tag embedding vectors;

[0090] Step S330, performing position encoding on the statement words to obtain position embedding vectors;

[0091] Step S340, performing entity type tagging encoding on the statement words to obtain entity type tag embedding vectors;

[0092] Step S350, concatenating the word embedding vectors, the positional tag embedding vectors, the position embedding vectors, and the entity type tag embedding vectors to generate word feature data.

[0093] The word embedding encoding refers to an encoding process of obtaining a word embedding vector by querying a pre-trained word embedding matrix (such as GloVe) according to a word in a sentence.

[0094] The POS (Part-Of-Speech) tagging encoding refers to an encoding process of generating a POS tag embedding vector by querying a randomly initialized POS tag embedding table. The POS tagging encoding is actually a classification of words, such as nouns, verbs, adjectives, adverbs, etc. By studying the POS tags, more relationships between words in a sentence can be learned, such as determiners generally before nouns and nouns generally followed by verbs.

[0095] The position encoding refers to a feature encoding process of the position of a word in a sentence in the current sentence data. For example, assuming that the parameter w i and w c represent words in the current sentence data that have a certain distance position relationship, the relative distance i-c of w i to w c can be encoded into a real-valued vector by querying a randomly initialized position embedding table, to obtain a position embedding vector.

[0096] The entity type tagging encoding refers to an encoding process of tagging all words in the current sentence data with entity types. For example, referring to the process of the POS tagging encoding, the BIO tagging mode can be used to tag all words in the current sentence data with entity types, and the entity type tags can be converted into real-valued vectors by querying an embedding table, to obtain entity type tag embedding vectors. The BIO mode refers to tagging each word in a sentence as “B-X”, “I-X”, or “O”, where “B-X” indicates that the word belongs to the X type (such as the X type can include an entity type or not an entity type) and is the beginning of the current sentence data, “I-X” indicates that the word belongs to the X type and is in the middle of the current sentence data, and “O” indicates that the word does not belong to any type.

[0097] After obtaining the word embedding vector, the POS tag embedding vector, the position embedding vector, and the entity type tag embedding vector, the word embedding vector, the POS tag embedding vector, the position embedding vector, and the entity type tag embedding vector can be concatenated as word feature data of the current sentence data.

[0098] By encoding the sentence words in the current sentence data from multiple aspects, deep semantic information in the current sentence data can be effectively mined, and different forms of encoding vectors can be used as word feature data of the current sentence data, so as to effectively distinguish the ambiguity of the sentence words in different sentences, and ensure that the generated word feature data can accurately represent the semantic information of the current sentence data.

[0099] Specifically, the current sentence data can be subjected to entity recognition processing to obtain sentence entities, and the sentence entities can be subjected to entity encoding to obtain entity feature data. The entity recognition refers to a process of matching all sentence words in the current sentence data with entities to determine words with entity meanings. For example, entity words in the current sentence data can be extracted through an entity dictionary, or entity words in the current sentence data can be extracted through a pre-trained entity recognition model, and the present example embodiment does not make special limitation thereto.

[0100] The word embedding vectors of all sentence words constituting the entity can be subjected to mean pooling operation to calculate an entity embedding vector, i.e., the entity feature data. The entity encoding herein is different from the entity type label encoding mentioned in the word encoding: the entity type label embedding vector is obtained by performing entity type labeling on all words in the entire sentence and then embedding; and the entity in the entity encoding specifically refers to an entity in the sentence, such as a person name and a place name, which are entities, and some words in the sentence are not entities.

[0101] Specifically, the current sentence data can be subjected to entity recognition processing to obtain sentence entities, and the sentence entities can be subjected to entity encoding to obtain entity feature data. The entity recognition refers to a process of matching all sentence words in the current sentence data with entities to determine words with entity meanings. For example, entity words in the current sentence data can be extracted through an entity dictionary, or entity words in the current sentence data can be extracted through a pre-trained entity recognition model, and the present example embodiment does not make special limitation thereto.

[0102] Optionally, the adjacent sentence data can be sentence encoded to obtain adjacent sentence vectors, and then the adjacent sentence vectors can be spliced to obtain the context feature data corresponding to the current sentence data. For example, the two sentence data before and after the current sentence data are obtained as adjacent sentence data. For each adjacent sentence data, the word embedding vectors of all sentence words in the adjacent sentence data are determined, and the word embedding vectors are spliced to obtain the adjacent sentence vector corresponding to the adjacent sentence data. Finally, the four adjacent sentence vectors are spliced to obtain the context feature data corresponding to the current sentence data.

[0103] Specifically, the pinyin of the current sentence data can be obtained, and the pinyin of the sentence can be pinyin encoded to obtain the pinyin feature data. The pinyin corresponding to the sentence word constituting the current sentence data can be represented by a vector using a pre-trained pinyin embedding matrix to obtain the pinyin feature data.

[0104] By encoding the sentence words in the current sentence data from multiple aspects such as words, entities, contexts, and pinyins, deep semantic information in the current sentence data can be effectively mined, and different forms of encoding vectors can be used as word feature data of the current sentence data, which can effectively distinguish the ambiguity of the sentence words in different sentences, and ensure that the generated word feature data can accurately represent the semantic information of the current sentence data.

[0105] In some example embodiments of the present disclosure, at least two semantic feature data can be associated based on a preset dependency relationship to obtain a multi-form heterogeneous relationship graph.

[0106] The preset dependency relationship can include any one or a combination of the dependency relationship between words and words, the dependency relationship between words and trigger words, the dependency relationship between words and entities, the dependency relationship between words and entities, the dependency relationship between entities, the dependency relationship between contexts and entities, and the dependency relationship between pinyins and trigger words.

[0107] The dependency relationship between the words can be determined by the syntax dependency tree; the dependency relationship between the words and the trigger words can be determined by the trigger word lookup table; the dependency relationship between the words and the entities can be determined by the belonging relationship between the words and the entities (for example, the words belong to an entity); if an entity and a word have ever appeared in an event, the two can be determined as the association relationship between the words and the entities; if the types of two entities are parameters involved in the same event, the two entities can be determined as the dependency relationship between the entities and the entities; if an entity appears in a context, the dependency relationship between the context and the entity can be determined; the pinyin code of the current sentence data is connected with the trigger word as the dependency relationship between the pinyin and the trigger word. Of course, there can be other types of dependency relationships, which are not specially limited in the example embodiments.

[0108] The preset dependency relationship can be used as an edge of the multi-form heterogeneous relationship graph, and the semantic feature data (for example, words, entities, contexts, pinyins, and the like) can be used as nodes of the multi-form heterogeneous relationship graph, different forms of nodes are connected through short paths at the same time through the edges, and a multi-form heterogeneous relationship graph corresponding to the current sentence data is obtained.

[0109] In some example embodiments of the present disclosure, the multi-form heterogeneous relationship graph can be input into a pre-trained intent event extraction model to obtain event trigger words and event content information, and based on the event trigger words and the event content information, a sentence intent event corresponding to the current sentence data is generated. For example, for the current sentence data "In 2022, Xiaoming was born in A city", the corresponding multi-form heterogeneous relationship graph is input into the pre-trained intent event extraction model, and the corresponding event trigger word is "born", the corresponding event content information is that the event character is "Xiaoming", the event location is "A city", and the event time is "2022". Therefore, the sentence intent event corresponding to the current sentence data "In 2022, Xiaoming was born in A city" is "event trigger word: born; event character: Xiaoming; event location: A city; event time: 2022". Of course, this is only an illustrative example and should not cause any special limitation to the example embodiments.

[0110] In some example embodiments of the present disclosure, the intent event extraction model can be a relationship graph convolutional neural network R-GCN.

[0111] The relational graph convolutional neural network (R-GCN) can aggregate different forms of node information in the multi-form heterogeneous relational graph and the relationship interaction between the nodes to extract the sentence intent event. The R-GCN performs information propagation on the model, and when updating the nodes, the R-GCN can well process high-dimensional relationship data, distinguish multiple different edge types, and realize the propagation of information on the graph nodes through aggregation. After L times of information propagation, the information of each node is propagated to the nodes at a distance of L, generating a node representation of L-hop reasoning perception relationship to update the embedding encoding of the entity and the sentence word.

[0112] In the embodiment, the intent event extraction task is defined as a sequence labeling task, and each sentence word in the current sentence data is assigned a label that is helpful for event annotation. Specifically, the BIO annotation mode can be applied to assign trigger labels to each sentence word, and the label "O" indicates that the corresponding word is irrelevant to the target event. The other two labels "B-type" and "I-type" are composed of two parts, i.e., the position of the word in the trigger and any event type. After aggregating the word and entity node embedding representations from the R-GCN, the word representation is input into a fully connected network, and then the Softmax function is used to calculate the distribution of all event types, and the event label with the maximum probability is selected as the classification result. After obtaining the trigger candidates of a specific type from the trigger labels, the role of each entity in the event needs to be predicted, and the word embedding representation is aggregated to trigger candidate vectors and entity vectors through average pooling along the sequence length dimension. The candidate vector is composed of the words combined into the trigger words, which are connected together and input into a new fully connected network to predict the parameter role.

[0113] Figure 4 A flowchart for implementing sentence intent event extraction according to some embodiments of the disclosure is schematically shown.

[0114] Reference Figure 4 As shown, in step S410, the current sentence data is obtained, and the current sentence data is subjected to sentence encoding (such as word encoding, entity encoding, and pinyin encoding) and context encoding to obtain voice feature data such as word nodes, entity nodes, context nodes, and pinyin nodes;

[0115] In step S420, a preset dependency relationship is obtained, and the word nodes, the entity nodes, the context nodes, and the pinyin nodes are modeled for event correlation with the preset dependency relationship as edges to obtain a multi-form heterogeneous relational graph.

[0116] At step S430, the multi-form isomeric relationship graph can be input into the pre-trained intent event extraction model R-GCN in the form of an embedded vector, and the aggregated node information is calculated by R-GCN, and the information is propagated on the graph nodes through aggregation; after L times of information propagation, the information of each node is propagated to the nodes at a distance of L, and the node representation of L-hop reasoning perception relationship is generated to update the entity embedding encoding and the word embedding encoding.

[0117] At step S440, event detection and parameter extraction are performed based on R-GCN to obtain event trigger words and event content information, and the sentence intent event corresponding to the current sentence data is determined according to the event trigger words and the event content information.

[0118] For example, for the sentence paragraph "Xiaoming is an old customer. Recently he feels that the network speed is not very fast. Therefore, Xiaoming opened a 5G package with operator A. Xiaoming has been using a 4G package from operator A for 8 years since the last time he upgraded the package.", assuming that the current sentence data is "Therefore, Xiaoming opened a 5G package with operator A", the specific extraction process of the sentence intent event is as follows:

[0119] First, the current sentence data "Therefore, Xiaoming opened a 5G package with operator A" is processed by word segmentation, and stop words (i.e. meaningless words) are removed, and the obtained sentence words can be {Xiaoming, operator A, open, 5G package}. First, the word encoding (including but not limited to word embedding encoding, part-of-speech tagging encoding, position encoding, entity type tagging encoding) of these sentence words is performed to obtain word feature data; entity recognition is performed on the current sentence data, and the obtained entities are {Xiaoming, operator A, 5G package}, and the entities are encoded to obtain entity feature data; the adjacent sentence data corresponding to the current sentence data are "Xiaoming is an old customer", "Recently he feels that the network speed is not very fast", "Xiaoming has been using a 4G package from operator A for 8 years since the last time he upgraded the package", and for these adjacent sentence data, after word segmentation, word embedding encoding is performed on the sentence words, and the obtained word embedding vectors are spliced to obtain adjacent sentence vectors, and the four adjacent sentence data are spliced to obtain the context feature data corresponding to the current sentence data; the sentence pinyin of the current sentence data can be extracted by a related algorithm, and the pinyin encoding of the sentence pinyin is performed to obtain pinyin feature data.

[0120] Secondly, the semantic feature data in different forms can be associated according to preset dependency relationships, such as dependency relationship 1 between words, dependency relationship 2 between words and trigger words, dependency relationship 3 between words and entities, dependency relationship 4 between words and entities, dependency relationship 5 between entities, dependency relationship 6 between context and entities, and dependency relationship 7 between pinyin and trigger words, to obtain a multi-form heterogeneous relationship graph. Figure 5 A schematic diagram of a multi-form heterogeneous relationship graph according to some embodiments of the present disclosure is schematically shown with reference to Figure 5 As shown, it can be represented as a multi-form heterogeneous relationship graph 500, in which the labels of edges correspond to the above seven preset dependency relationships.

[0121] The multi-form heterogeneous relationship graph 500 is input into a pre-trained intent event extraction model in the form of an embedded vector, and it is found that the sentence intent event corresponding to the current sentence data "Then, Xiaoming opened a 5G package at Operator A" is "event trigger word: open; event character: Zhang Qiang; event location: China Telecom; event content: 5G package". Of course, this is only a schematic example, and the form of the sentence intent event can also be other ways, and should not cause any special limitation to the present example embodiment.

[0122] It should be noted that although the steps of the method in the present disclosure are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired result. In addition or alternatively, some steps can be omitted, a plurality of steps can be combined into one step, and / or one step can be divided into a plurality of steps, etc.

[0123] In addition, in the present example embodiment, an intent event extraction device is also provided. With reference to Figure 6 As shown, the intent event extraction device 600 includes:

[0124] The sentence data acquisition module 610 is configured to acquire current sentence data to be processed;

[0125] The semantic feature extraction module 620 is configured to extract at least two kinds of semantic feature data of the current sentence data;

[0126] The semantic relationship graph construction module 630 is configured to associate the at least two kinds of semantic feature data based on preset dependency relationships, to obtain a multi-form heterogeneous relationship graph;

[0127] The sentence intent event determination module 640 is configured to input the multi-form heterogeneous relationship graph into a pre-trained intent event extraction model, to obtain a sentence intent event corresponding to the current sentence data.

[0128] In some example embodiments of the present disclosure, based on the foregoing scheme, the at least two semantic feature data can include word feature data, entity feature data, context feature data, and pinyin feature data; and the semantic feature extraction module 620 can be configured to:

[0129] performing word segmentation processing on the current sentence data to obtain sentence words, and performing word encoding on the sentence words to obtain word feature data;

[0130] performing entity recognition processing on the current sentence data to obtain sentence entities, and performing entity encoding on the sentence entities to obtain entity feature data;

[0131] obtaining adjacent sentence data corresponding to the current sentence data, and performing context encoding on the adjacent sentence data to obtain context feature data;

[0132] obtaining sentence pinyin corresponding to the current sentence data, and performing pinyin encoding on the sentence pinyin to obtain the pinyin feature data.

[0133] In some example embodiments of the present disclosure, based on the foregoing scheme, the semantic feature extraction module 620 can be configured to:

[0134] performing word embedding encoding on the sentence words to obtain a word embedding vector;

[0135] performing part-of-speech tagging encoding on the sentence words to obtain a part-of-speech label embedding vector;

[0136] performing position encoding on the sentence words to obtain a position embedding vector;

[0137] performing entity type tagging encoding on the sentence words to obtain an entity type label embedding vector;

[0138] concatenating the word embedding vector, the part-of-speech label embedding vector, the position embedding vector, and the entity type label embedding vector to generate word feature data.

[0139] In some example embodiments of the present disclosure, based on the foregoing scheme, the semantic feature extraction module 620 can be configured to:

[0140] performing sentence encoding on the adjacent sentence data to obtain an adjacent sentence vector;

[0141] concatenating the adjacent sentence vector to obtain context feature data corresponding to the current sentence data.

[0142] In some example embodiments of the present disclosure, based on the foregoing scheme, the preset dependency relationship can include any one or a combination of dependency relationship between words, dependency relationship between words and trigger words, dependency relationship between words and entities, association relationship between words and entities, dependency relationship between entities, dependency relationship between context and entities, and dependency relationship between pinyin and trigger words.

[0143] In some example embodiments of the present disclosure, based on the foregoing scheme, the sentence intent event determination module 640 can be configured to:

[0144] input the multi-form heterogeneous relationship graph into a pre-trained intent event extraction model to obtain event trigger words and event content information;

[0145] generate a sentence intent event corresponding to the current sentence data based on the event trigger words and the event content information.

[0146] In some example embodiments of the present disclosure, based on the foregoing scheme, the intent event extraction model can include a relationship graph convolutional neural network (R-GCN).

[0147] The specific details of the modules of the intent event extraction apparatus described above have been described in detail in the corresponding intent event extraction method, and therefore will not be described here.

[0148] It should be noted that, although several modules or units of the intent event extraction apparatus are mentioned in the foregoing detailed description, such division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units for embodiment.

[0149] In addition, in the example embodiments of the present disclosure, an electronic device capable of implementing the above-mentioned intent event extraction method is also provided.

[0150] Those skilled in the art can understand that each aspect of the present disclosure can be implemented as a system, a method or a program product. Therefore, each aspect of the present disclosure can be embodied as a complete hardware embodiment, a complete software embodiment (including firmware, microcode, etc.), or an embodiment combining hardware and software aspects, which can be collectively referred to as "circuitry", "module" or "system" herein.

[0151] The electronic device 700 according to such embodiments of the present disclosure will be described below with reference to Figure 7 Figure 7 ​The electronic device 700 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.

[0152] like Figure 7 As shown, the electronic device 700 is manifested in the form of a general-purpose computing device. The components of the electronic device 700 may include, but are not limited to: at least one processing unit 710, at least one storage unit 720, a bus 730 connecting different system components (including storage unit 720 and processing unit 710), and a display unit 740.

[0153] The storage unit stores program code that can be executed by the processing unit 710, causing the processing unit 710 to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of this disclosure. For example, the processing unit 710 can perform actions such as... Figure 1 As shown in step S210, the current statement data to be processed is obtained; step S220, at least two semantic feature data of the current statement data are extracted; step S230, the at least two semantic feature data are associated based on a preset dependency relationship to obtain a multi-form heterogeneous relationship graph; step S240, the multi-form heterogeneous relationship graph is input into a pre-trained intent event extraction model to obtain the statement intent event corresponding to the current statement data.

[0154] Storage unit 720 may include a readable medium in the form of a volatile storage unit, such as random access memory (RAM) 721 and / or cache memory 722, and may further include a read-only memory (ROM) 723.

[0155] The storage unit 720 may also include a program / utility 724 having a set (at least one) of program modules 725, including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.

[0156] Bus 730 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.

[0157] The electronic device 700 can also communicate with one or more external devices 770 such as a keyboard or pointing device, a Bluetooth device, or a database, and / or one or more devices that enable a user to interact with the electronic device 700 and / or one or more devices (e.g., routers, modems, or the like) that enable the electronic device 700 to communicate with one or more other computing devices. Such communication can occur via Input / Output (I / O) interface 750. Still yet, the electronic device 700 can communicate with one or more networks, such as a local area network (LAN), a wide area network (WAN), and / or the Internet through network adapter 760. As depicted, network adapter 760 communicates with the other components of the electronic device 700 via bus 730. It should be appreciated that although not shown, other hardware and / or software modules could be used in connection with the electronic device 700. Such modules include, but are not limited to, microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archival storage systems, etc.

[0158] From the above description of the embodiments, it is easy for those skilled in the art to understand that the example embodiments described herein can be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solutions according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash disk, a mobile hard disk, or the like) or a network, and includes a number of instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to perform the methods according to the embodiments of the present disclosure.

[0159] In the example embodiments of the present disclosure, a computer-readable storage medium having a program product stored thereon capable of implementing the above-mentioned method of the present disclosure is also provided. In some possible embodiments, various aspects of the present disclosure can also be implemented in the form of a program product, which includes program codes for causing a terminal device to perform the steps according to various example embodiments of the present disclosure described in the above-mentioned "example method" section of the present specification when the program product is run on the terminal device.

[0160] Reference Figure 8 As shown, a program product 800 for implementing the above-mentioned intent event extraction method according to the embodiments of the present disclosure is described, which can adopt a portable compact disc read-only memory (CD-ROM) and include program codes, and can be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited to this, and in the present document, the readable storage medium can be any tangible medium containing or storing a program, which can be used or combined with an instruction execution system, device, or apparatus.

[0161] The program product can employ any combination of one or more computer-readable media. The computer-readable media can be a computer-readable storage medium or a computer-readable signal medium. The computer-readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium include the following: an electrical connection having one or more wires, a portable disc, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0162] The computer-readable signal medium can include a computer-readable storage medium that is propagated as a carrier wave. The computer-readable signal medium can further be any computer-readable medium that is not a storage medium. The computer-readable signal medium can be a computer-readable storage medium that is a propagated signal on a computer-readable storage medium.

[0163] The program code embodied on the computer-readable media can be transmitted using any appropriate medium, including but not limited to wireless, wired, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0164] The program code can be executed by one or more programmable processors, which can be implemented in one or more computer systems. In this context, a computer system generally includes a plurality of these programmable processors, which work in concert to perform a task. Additionally, the program code can be downloaded from an external source, including the internet, to the computer system.

[0165] Furthermore, the aforementioned diagrams are merely schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended for a limiting purpose. It is readily understood that the processes shown in the aforementioned diagrams do not indicate or limit the time sequence of the processes. In addition, it is readily understood that the processes can be executed in synchronization or asynchronously, for example, in a plurality of modules.

[0166] Those skilled in the art can easily understand, through the above description of the embodiments, that the example embodiments described herein can be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solutions according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a U disk, a mobile hard disk, etc.) or a network, and includes a number of instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to perform the methods according to the embodiments of the present disclosure.

[0167] Other embodiments of the present disclosure will be apparent to those skilled in the art with the accomplishment of the present disclosure as set forth in the specification and practice of the invention disclosed herein. The present application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include known or customary practice in the art of the present disclosure not specifically disclosed. The specification and examples are to be regarded as illustrative only, and the true scope and spirit of the present disclosure are indicated by the claims.

[0168] It should be understood that the present disclosure is not limited to the precise structures described above and illustrated in the drawings and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the claims appended hereto.

Claims

1. A method for extracting intent events, characterized in that, include: Get the current statement data to be processed; Extract at least two semantic feature data from the current statement data; The at least two types of semantic feature data include word feature data, entity feature data, context feature data, and pinyin feature data; Based on preset dependency relationships, the at least two semantic feature data are associated to obtain a multi-form heterogeneous relationship graph; the preset dependency relationship refers to the data that is pre-set to mine the correlation between the at least two semantic feature data; the multi-form heterogeneous relationship graph refers to the relationship graph obtained by using the preset dependency relationship as edges, the semantic feature data as nodes, and connecting nodes of different forms through edges via short paths. The multi-form heterogeneous relationship graph is input into a pre-trained intent event extraction model to obtain the sentence intent event corresponding to the current sentence data.

2. The intent event extraction method according to claim 1, characterized in that, The extraction of at least two semantic feature data from the current statement data includes: The current sentence data is segmented into words to obtain sentence words, and the sentence words are then encoded to obtain word feature data. The current statement data is processed by entity recognition to obtain statement entities, and the statement entities are encoded to obtain entity feature data. Obtain the adjacent statement data corresponding to the current statement data, and perform context encoding on the adjacent statement data to obtain context feature data; Obtain the pinyin of the statement corresponding to the current statement data, and encode the pinyin of the statement to obtain the pinyin feature data.

3. The intention event extraction method according to claim 2, characterized in that, The word encoding of the words in the statement to obtain word feature data includes: The words in the statement are encoded using word embedding to obtain word embedding vectors; The words in the statement are coded with part-of-speech tags to obtain part-of-speech tag embedding vectors; The words in the statement are positionally encoded to obtain position embedding vectors; The entity type of the words in the statement is encoded to obtain the entity type label embedding vector; Word feature data is generated by concatenating the word embedding vector, the part-of-speech tag embedding vector, the position embedding vector, and the entity type tag embedding vector.

4. The intention event extraction method according to claim 2, characterized in that, The step of performing context encoding on the adjacent statement data to obtain context feature data includes: The adjacent statement data is encoded to obtain adjacent statement vectors; The adjacent statement vectors are concatenated to obtain the context feature data corresponding to the current statement data.

5. The intention event extraction method according to claim 1, characterized in that, The preset dependency relationships include any one or more combinations of the following: dependency relationships between words, dependency relationships between words and trigger words, subordinate relationships between words and entities, association relationships between words and entities, dependency relationships between entities, dependency relationships between context and entities, and dependency relationships between pinyin and trigger words.

6. The intent event extraction method according to claim 1, characterized in that, The step of inputting the multi-form heterogeneous relationship graph into a pre-trained intent event extraction model to obtain the sentence intent event corresponding to the current sentence data includes: The multi-form heterogeneous relationship graph is input into a pre-trained intent event extraction model to obtain event trigger words and event content information; Based on the event trigger word and the event content information, a statement intent event corresponding to the current statement data is generated.

7. The intention event extraction method according to claim 1 or 6, characterized in that, The intent event extraction model includes a relational graph convolutional neural network (R-GCN).

8. An intent event extraction device, characterized in that, include: The statement data acquisition module is used to acquire the current statement data to be processed. The semantic feature extraction module is used to extract at least two semantic feature data from the current statement data; The at least two types of semantic feature data include word feature data, entity feature data, context feature data, and pinyin feature data; A semantic relationship graph construction module is used to associate the at least two semantic feature data based on preset dependency relationships to obtain a multi-form heterogeneous relationship graph; the preset dependency relationship refers to data that is pre-set to mine the correlation between the at least two semantic feature data; the multi-form heterogeneous relationship graph refers to a relationship graph obtained by using the preset dependency relationship as an edge, the semantic feature data as a node, and connecting nodes of different forms through the edge via short paths. The statement intent event determination module is used to input the multi-form heterogeneous relationship graph into a pre-trained intent event extraction model to obtain the statement intent event corresponding to the current statement data.

9. An electronic device, characterized in that, include: processor; as well as A memory storing computer-readable instructions that, when executed by the processor, implement the intent event extraction method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the intent event extraction method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Syntax and entity relation graph convolutional network fused event joint extraction method

    CN112163416A

  • News event detection method and system fusing various text semantic structure chart representations

    CN115034224A