Entity recognition method based on graph neural network and attention mechanism and related equipment

Through the method based on graph neural network and attention mechanism, the problem of inaccurate entity recognition in power text is solved, efficient entity extraction and type recognition are achieved, and knowledge base construction and intelligent development of the power industry are promoted.

CN120493924APending Publication Date: 2025-08-15BEIJING CHINA POWER INFORMATION TECH +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510425660.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-07
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

In the construction of the existing power industry knowledge base, entity identification is not accurate enough, and it is difficult to effectively deal with entities and entity types in power texts, especially in complex contexts and diverse power documents.

Method used

Using a method based on graph neural network and attention mechanism, the bert model is used to encode and word segmentation, predict the entity position, construct multiple isomerographic diagrams and perform graph convolution calculations, and finally, adaptive multi-relational fusion based on attention is carried out to achieve accurate identification of entities.

Benefits of technology

It improves the accuracy of identification of entities in power texts, can efficiently build a high-quality knowledge base, and promotes the standardization and intelligent development of the power industry.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120493924A_ABST
    Figure CN120493924A_ABST
Patent Text Reader

Abstract

The invention provides an entity recognition method based on a graph neural network and an attention mechanism and related equipment. The method comprises the following steps: receiving a plain text for entity recognition; coding processing and word segmentation processing; predicting an initial position and a final position of an entity in the plain text; extracting a plurality of relationships represented by the vector of the predicted entity, and constructing a plurality of isographs; respectively carrying out graph convolution calculation on the plurality of isomorphic graphs; the plurality of isomorphic compositions comprise syntactic relationship isomorphic compositions, sentence-level co-occurrence relationship isomorphic compositions, adjacent paragraph-level co-occurrence relationship isomorphic compositions and title and corresponding paragraph co-occurrence relationship isomorphic compositions; performing attention-based adaptive multi-relation fusion processing on the convolution calculation results of the plurality of graphs to obtain vector features of a final entity corresponding to each node in the same graph composition; and performing classification processing on the vector feature of the final entity corresponding to each node in the same composition to obtain an entity recognition result. The identification accuracy of entities in the power field can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer application technology, and in particular to an entity recognition method and related equipment based on graph neural network and attention mechanism. Background Art

[0002] The power industry is a highly regulated industry, with various standard documents and technical specifications providing crucial guidance for project design, construction, and acceptance. However, as power projects continue to grow in complexity and specialization, the existing standard document system is also growing in size, posing significant challenges to building knowledge bases for the industry. Knowledge bases for the power industry typically require high precision, requiring entities and relationships from a large number of documents. Furthermore, entities in the power industry are often long and diverse in type.

[0003] Therefore, there is an urgent need to develop methods to automatically extract and identify entities and entity types in large amounts of electrical text. Summary of the Invention

[0004] In view of this, the purpose of this application is to propose an entity recognition method and related equipment based on graph neural network and attention mechanism.

[0005] Based on the above objectives, this application provides an entity recognition method based on graph neural network and attention mechanism, including:

[0006] Receive plain text for entity recognition;

[0007] Performing encoding and word segmentation on the plain text to obtain a vector representation and a corresponding position code for each word in the plain text;

[0008] Predicting the start and end positions of entities in the plain text based on the vector representation of each word in the plain text and the corresponding position code, to obtain vector representations of multiple predicted entities;

[0009] Extract multiple relationships of the vector representation of the predicted entity to obtain multiple relationships; construct multiple isomorphic graphs based on the multiple relationships; perform graph convolution calculations on the multiple isomorphic graphs respectively to obtain multiple graph convolution calculation results; wherein the multiple relationships are respectively related to the multiple isomorphic graphs. Figure 1 One-to-one correspondence; the multiple isomorphism graphs include syntactic relationship isomorphism graphs, sentence-level co-occurrence relationship isomorphism graphs, adjacent paragraph-level co-occurrence relationship isomorphism graphs, and title-corresponding paragraph co-occurrence relationship isomorphism graphs;

[0010] Performing attention-based adaptive multi-relation fusion processing on the multiple graph convolution calculation results to obtain the vector features of the final entity corresponding to each node in the isomorphic graph;

[0011] Classify the vector features of the final entity corresponding to each node in the isomorphic graph to obtain an entity recognition result.

[0012] In some embodiments, extracting multiple relationships represented by vectors of predicted entities to obtain multiple relationships; and constructing multiple isomorphic graphs based on the multiple relationships includes:

[0013] Extracting syntactic relations between the vector representations of the plurality of predicted entities to obtain syntactic relations; and constructing the syntactic relation isomorphism graph based on the syntactic relations;

[0014] Extracting the co-occurrence relationship of the vector representations of multiple predicted entities in the sentence at the sentence level to obtain the co-occurrence relationship at the sentence level; constructing the co-occurrence relationship isomorphism graph at the sentence level based on the co-occurrence relationship at the sentence level;

[0015] Extracting the co-occurrence relationship of the vector representations of the multiple predicted entities in the adjacent paragraphs at the adjacent paragraph level to obtain the co-occurrence relationship at the adjacent paragraph level; constructing the co-occurrence relationship isomorphism graph at the adjacent paragraph level based on the co-occurrence relationship at the adjacent paragraph level;

[0016] Extracting a vector representation of at least one predicted entity in a title and vector representations of multiple predicted entities in a corresponding paragraph to obtain a co-occurrence relationship between the title and the corresponding paragraph; and constructing an isomorphic graph of the co-occurrence relationship between the title and the corresponding paragraph based on the co-occurrence relationship between the title and the corresponding paragraph.

[0017] In some embodiments, encoding and segmenting the plain text to obtain a vector representation and a corresponding position code for each word in the plain text includes: using an embedding layer of a BERT model to encode and segment the plain text to obtain a vector representation and a corresponding position code for each word in the plain text;

[0018] The method of predicting the starting position and the ending position of an entity in the plain text based on the vector representation and the corresponding position code of each word in the plain text to obtain vector representations of multiple predicted entities includes: using a pointer network layer of a BERT model to predict the starting position and the ending position of an entity in the plain text based on the vector representation and the corresponding position code of each word in the plain text to obtain vector representations of multiple predicted entities;

[0019] The extracting multiple relationships of the vector representation of the predicted entity to obtain multiple relationships; constructing multiple isomorphic graphs based on the multiple relationships; and performing graph convolution calculations on the multiple isomorphic graphs to obtain multiple graph convolution calculation results include: using the graph neural network layer of the BERT model to extract multiple relationships of the vector representation of the predicted entity to obtain multiple relationships; constructing multiple isomorphic graphs based on the multiple relationships; and performing graph convolution calculations on the multiple isomorphic graphs to obtain multiple graph convolution calculation results.

[0020] The step of performing an attention-based adaptive multi-relation fusion process on the multiple graph convolution calculation results to obtain a vector feature of a final entity corresponding to each node in the isomorphic graph comprises: performing an attention-based adaptive multi-relation fusion process on the multiple graph convolution calculation results to obtain a vector feature of a final entity corresponding to each node in the isomorphic graph using an additive attention mechanism layer of a BERT model;

[0021] The classifying and processing the vector features of the final entity corresponding to each node in the isomorphic graph to obtain the entity recognition result includes: using the fully connected layer of the BERT model to classify and process the vector features of the final entity corresponding to each node in the isomorphic graph to obtain the entity recognition result.

[0022] In some embodiments, performing attention-based adaptive multi-relation fusion processing on the multiple graph convolution calculation results to obtain the vector features of the final entity corresponding to each node in the isomorphic graph includes:

[0023] Calculating the association relationships between each pair of the vector representations of the plurality of predicted entities; obtaining corresponding relationship subgraphs for each association relationship, thereby obtaining a plurality of relationship subgraphs;

[0024] Attention-based adaptive multi-relationship fusion processing is performed on the multiple relationship subgraphs to obtain vector features of the final entity corresponding to each node in the isomorphic graph.

[0025] In some embodiments, the vector feature of the final entity corresponding to each node in the isomorphic graph is Among them, h i is the vector feature of the final entity corresponding to each node; K is the type of association relationship between all predicted entities in the text used for entity recognition; a r is the weight coefficient of each association relationship r; exp is the natural exponential function; W r is the weight; br is the bias term; LeakyReLU(·) is the activation function.

[0026] The entity recognition device based on graph neural network and attention mechanism provided in the embodiment of the present application includes:

[0027] a data receiving module configured to receive plain text for entity recognition;

[0028] A word segmentation processing module is configured to perform encoding and word segmentation processing on the plain text to obtain a vector representation and a corresponding position code for each word in the plain text;

[0029] an entity prediction module configured to predict the start and end positions of entities in the plain text based on the vector representation of each word in the plain text and the corresponding position code, thereby obtaining vector representations of a plurality of predicted entities;

[0030] The graph convolution calculation module is configured to extract multiple relationships of the vector representation of the predicted entity to obtain multiple relationships; construct multiple isomorphic graphs based on the multiple relationships; perform graph convolution calculations on the multiple isomorphic graphs respectively to obtain multiple graph convolution calculation results; wherein the multiple relationships are respectively related to the multiple isomorphic graphs. Figure 1 One-to-one correspondence; the multiple isomorphism graphs include syntactic relationship isomorphism graphs, sentence-level co-occurrence relationship isomorphism graphs, adjacent paragraph-level co-occurrence relationship isomorphism graphs, and title-corresponding paragraph co-occurrence relationship isomorphism graphs;

[0031] A fusion module is configured to perform attention-based adaptive multi-relation fusion processing on the multiple graph convolution calculation results to obtain the vector features of the final entity corresponding to each node in the isomorphic graph;

[0032] The entity recognition module is configured to classify the vector features of the final entity corresponding to each node in the isomorphic graph to obtain an entity recognition result.

[0033] In some embodiments, the graph convolution calculation module is configured to: extract the co-occurrence relationship of the vector representations of multiple predicted entities in a sentence at the sentence level to obtain the co-occurrence relationship at the sentence level; construct the co-occurrence relationship isomorphism graph at the sentence level based on the co-occurrence relationship at the sentence level;

[0034] Extracting the co-occurrence relationship of the vector representations of the multiple predicted entities in the adjacent paragraphs at the adjacent paragraph level to obtain the co-occurrence relationship at the adjacent paragraph level; constructing the co-occurrence relationship isomorphism graph at the adjacent paragraph level based on the co-occurrence relationship at the adjacent paragraph level;

[0035] Extracting a vector representation of at least one predicted entity in a title and vector representations of multiple predicted entities in a corresponding paragraph to obtain a co-occurrence relationship between the title and the corresponding paragraph; and constructing an isomorphic graph of the co-occurrence relationship between the title and the corresponding paragraph based on the co-occurrence relationship between the title and the corresponding paragraph.

[0036] In some embodiments, the word segmentation processing module is configured to: use the embedding layer of the BERT model to perform encoding and word segmentation processing on the plain text to obtain a vector representation and corresponding position code of each word in the plain text;

[0037] The entity prediction module is configured to: use the pointer network layer of the BERT model to predict the start and end positions of entities in the plain text based on the vector representation of each word in the plain text and the corresponding position encoding, and obtain vector representations of multiple predicted entities;

[0038] The graph convolution calculation module is configured to: use the graph neural network layer of the BERT model to extract multiple relationships represented by vectors of the predicted entity to obtain multiple relationships; construct multiple isomorphic graphs based on the multiple relationships; and perform graph convolution calculations on the multiple isomorphic graphs respectively to obtain multiple graph convolution calculation results;

[0039] The fusion module is configured to: utilize the additive attention mechanism layer of the BERT model to perform attention-based adaptive multi-relation fusion processing on the multiple graph convolution calculation results to obtain the vector features of the final entity corresponding to each node in the isomorphic graph;

[0040] The entity recognition module is configured to: use the fully connected layer of the BERT model to classify the vector features of the final entity corresponding to each node in the isomorphic graph to obtain an entity recognition result.

[0041] In some embodiments, the fusion module is configured to:

[0042] Calculating the association relationships between each pair of the vector representations of the plurality of predicted entities; obtaining corresponding relationship subgraphs for each association relationship, thereby obtaining a plurality of relationship subgraphs;

[0043] Attention-based adaptive multi-relationship fusion processing is performed on the multiple relationship subgraphs to obtain vector features of the final entity corresponding to each node in the isomorphic graph.

[0044] In some embodiments, the vector feature of the final entity corresponding to each node in the isomorphic graph is Among them, h i is the vector feature of the final entity corresponding to each node; K is the type of association relationship between all predicted entities in the text used for entity recognition; a r is the weight coefficient of each association relationship r; exp is the natural exponential function; W r is the weight; br is the bias term; LeakyReLU(·) is the activation function.

[0045] An embodiment of the present application further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any of the above methods when executing the program.

[0046] An embodiment of the present application further provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute any of the methods described above.

[0047] An embodiment of the present application further provides a computer program product, comprising computer program instructions, which, when executed on a computer, causes the computer to execute any of the methods described above.

[0048] From the above, it can be seen that the entity recognition method based on graph neural network and attention mechanism provided by this application can effectively extract entities from various types of texts, and can extract entities and identify entity types based on the specific context of the entities and the mutual relationship between entities. It can help business personnel more efficiently and quickly extract the entities required for the knowledge base from a large amount of power text and build a high-quality knowledge base. It can promote the development of standardization and intelligence in the power industry and promote the application of artificial intelligence and natural language processing technologies in the power field. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the technical solutions in this application or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are merely embodiments of this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0050] Figure 1 A flowchart of an entity recognition method based on a graph neural network and an attention mechanism according to an embodiment of the present application;

[0051] Figure 2 A schematic diagram of coding and word segmentation according to an embodiment of the present application;

[0052] Figure 3 A schematic diagram of entity location prediction according to an embodiment of the present application;

[0053] Figure 4 This is a schematic diagram of the types of isomorphic graphs according to an embodiment of the present application;

[0054] Figure 5 A schematic diagram of the process of constructing multiple isomorphic graphs according to an embodiment of the present application;

[0055] Figure 6A schematic diagram of the fusion of isomorphic graphs according to an embodiment of the present application;

[0056] Figure 7 Schematic diagram of an entity recognition device based on a graph neural network and an attention mechanism according to an embodiment of the present application;

[0057] Figure 8 Schematic diagram of the hardware structure of the electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0058] In order to make the objectives, technical solutions and advantages of this application more clear, this application is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.

[0059] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should have the usual meanings understood by people with ordinary skills in the field to which this application belongs. The "first", "second" and similar words used in the embodiments of the present application do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0060] In the power industry, first of all, both search and question-answering tools require a highly accurate power knowledge base, and both knowledge graphs and other data persistence methods require entities and relationships in a large number of data files.

[0061] Secondly, entities in the power industry are long and have very diverse types. The same entity may appear as different entity types in different documents, paragraphs, or even sentences.

[0062] To address these challenges, there is an urgent need to develop methods for automatically extracting and identifying entities and entity types from large amounts of power text. In recent years, the rapid development of artificial intelligence and natural language processing technologies has provided new ideas for solving this problem.

[0063] Traditional entity extraction is more about extracting the entity itself. It is difficult to effectively identify the current type of the entity based on the relationship between entities in the context. Therefore, there is a problem of inaccurate entity recognition.

[0064] Based on this, the embodiment of the present application provides a method for named entity recognition based on a pointer network, a graph neural network, and an attention mechanism. By parsing data from log documents related to the power industry to obtain plain text, the Bert pre-trained model is used to encode paragraphs to solve the problem of text semantic information extraction. The pointer network is used to identify the location of entities in the paragraph, which can handle the situation of overlapping entities. A heterogeneous relationship graph is constructed based on the semantic and positional relationships between multiple entities. Taking into account the context, accurate recognition of entities in the power industry is achieved. This can solve the problem of inaccurate entity recognition in the power field to a certain extent, thereby effectively building a knowledge base for the power industry.

[0065] The embodiment of the present application provides an entity recognition method based on graph neural network and attention mechanism, such as Figure 1 As shown, the entity recognition method based on graph neural network and attention mechanism may include:

[0066] S100, receiving text for entity recognition; the text for entity recognition is plain text;

[0067] S200, performing encoding and word segmentation processing on the plain text to obtain a vector representation and a corresponding position code for each word in the plain text;

[0068] S300, predicting the start position and end position of an entity in the plain text based on the vector representation of each word in the plain text and the corresponding position code, to obtain vector representations of multiple predicted entities;

[0069] S400, extracting multiple relationships represented by vectors of predicted entities to obtain multiple relationships; constructing multiple isomorphic graphs based on the multiple relationships; performing graph convolution calculations on the multiple isomorphic graphs to obtain multiple graph convolution calculation results; wherein the multiple relationships are respectively related to the multiple isomorphic graphs. Figure 1 One-to-one correspondence; the multiple isomorphism graphs include syntactic relationship isomorphism graphs, sentence-level co-occurrence relationship isomorphism graphs, adjacent paragraph-level co-occurrence relationship isomorphism graphs, and title-corresponding paragraph co-occurrence relationship isomorphism graphs;

[0070] S500, performing attention-based adaptive multi-relation fusion processing on the multiple graph convolution calculation results to obtain the vector features of the final entity corresponding to each node in the isomorphic graph;

[0071] S600: Classify the vector features of the final entity corresponding to each node in the isomorphic graph to obtain an entity recognition result.

[0072] The entity recognition method based on graph neural network and attention mechanism provided in the embodiment of the present application can effectively extract entities from various types of texts, and can extract entities and identify entity types based on the specific context of the entities and the mutual relationship between entities. It can help business personnel more efficiently and quickly extract the entities required for the knowledge base from a large amount of power text and build a high-quality knowledge base. It can promote the development of standardization and intelligence in the power industry and promote the application of artificial intelligence and natural language processing technologies in the power field.

[0073] In some embodiments, in step S100, the text used for entity recognition can be a standard specification document related to the power industry or a power log document. Generally, the text used for entity recognition can be preprocessed to obtain the text used for entity recognition in plain text form. In other words, the plain text used for entity recognition can be received.

[0074] In some instances, power log documents (e.g., power clause data) may be in various formats, such as PDF, Word, or web page text. When pre-processing power log documents in different formats, corresponding processing tools and techniques may be used for each format.

[0075] In some embodiments, the pre-processing may include:

[0076] Extract the text content from the text used for entity recognition; usually, for a file in PDF format (such as a scanned PDF file), OCR (Optical Character Recognition) technology can be used for preprocessing to obtain plain text.

[0077] The extracted text content is then cleaned of non-text content and formatted to produce uniformly formatted text content. Non-text content may include images, charts, or special symbols, as well as information unrelated to the power terms, such as headers, footers, or page numbers. A uniform format can be understood as having uniform line breaks, spaces, and tabs.

[0078] The described text content with uniform format is divided according to chapter title / numbering, and connects chapter title / numbering and corresponding paragraph.Particularly, can adopt special symbol to connect, to identify chapter title / numbering.Usually, in the text content with uniform format, the paragraph that is next to current chapter title / numbering is acquiesced to as the paragraph corresponding with this chapter title / numbering.For example, can connect and process with paragraph by symbol " # " to chapter title / numbering, to obtain the long text of " # title ## paragraph text " form.

[0079] In some embodiments, in step S200, encoding and segmenting the plain text to obtain a vector representation and a corresponding position code for each word in the plain text may include: using an embedding layer (embedding) of a BERT model to encode and segment the plain text to obtain a vector representation and a corresponding position code for each word in the plain text.

[0080] In some embodiments, the embedding layer of the BERT model can be the encoding layer of the pointer network in the BERT model. Through the processing of the embedding layer, the text (plain text) used for entity recognition can be encoded and segmented to segment the text used for entity recognition into words, and the segmented words are converted into vector forms that can be processed by the model, such as Figure 2 and Figure 3 shown.

[0081] In some embodiments, in step S300, predicting the starting position and the ending position of the entity in the plain text based on the vector representation and the corresponding position code of each word in the plain text to obtain the vector representations of multiple predicted entities may include: using the pointer network layer of the BERT model to predict the starting position and the ending position of the entity in the plain text based on the vector representation and the corresponding position code of each word in the plain text to obtain the vector representations of multiple predicted entities.

[0082] In some embodiments, the pointer network layer of the BERT model can use 0 / 1 pointer decoding to identify the position of the entity in the text for entity recognition obtained after encoding and word segmentation. In this way, the starting position and end position of the entity can be predicted. For example, the head pointer and tail pointer of the "system" entity can identify the "TT system" in the text for entity recognition obtained after encoding and word segmentation; the head pointer and tail pointer of the "conductor" entity can identify "conductor (PE)". According to the vector representation of the word in step S200 and the corresponding position information (such as position coding), the vector representation and position coding of each word in the identified starting position and end position can be averaged to obtain the vector representation of the entity. In this way, the initialization for the node in the subsequent isomorphic graph is obtained. Usually, the vector representation of the entity is obtained by the mean-pooling method for the recognized entity embedding.

[0083] In some embodiments, in step S400, multiple relationships can be extracted from the vector representation of the predicted entity obtained in step S300, and corresponding isomorphism graphs can be constructed based on the multiple relationships extracted to obtain multiple isomorphism graphs. The multiple relationships may include syntactic relationships between entities, co-occurrence relationships at the sentence level, co-occurrence relationships at the paragraph level, and co-occurrence relationships between titles and contents. Specifically, the syntactic relationships between entities can be extracted from the entire text used for entity recognition, and the sentence-level co-occurrence relationships of entities can be extracted from the same sentence; the paragraph-level co-occurrence relationships of entities can be extracted from the same paragraph; the "title-content" relationship between the entity in the title and the entity in the corresponding paragraph of the title can be extracted, and corresponding isomorphism graphs can be constructed based on the above relationships. The forms of the multiple isomorphism graphs can be as follows. Figure 4 shown.

[0084] In some embodiments, the extraction of multiple relationships of the vector representation of the predicted entity to obtain multiple relationships; constructing multiple isomorphic graphs based on the multiple relationships may include: utilizing the graph neural network layer of the BERT model (such as the LTP embedded in the preprocessing stage of the graph neural network) to extract multiple relationships of the vector representation of the predicted entity to obtain multiple relationships; utilizing the graph neural network layer of the BERT model to construct multiple isomorphic graphs based on the multiple relationships; performing graph convolution calculations on the multiple isomorphic graphs respectively to obtain multiple graph convolution calculation results. Typically, after the graph convolution calculation, the number of corresponding entity nodes in each graph does not change, but the characteristics of each entity node corresponding to each graph change, such as an increase in the dimension.

[0085] In some embodiments, such as Figure 5 As shown, extracting multiple relationships represented by vectors of predicted entities to obtain multiple relationships; and constructing multiple isomorphic graphs based on the multiple relationships may include:

[0086] Step S401: extracting syntactic relations between the vector representations of the plurality of predicted entities to obtain syntactic relations; and constructing the syntactic relation isomorphism graph based on the syntactic relations;

[0087] Step S402: extracting the co-occurrence relationship of the vector representations of the multiple predicted entities in the sentence at the sentence level to obtain the co-occurrence relationship at the sentence level; and constructing a co-occurrence relationship isomorphism graph at the sentence level based on the co-occurrence relationship at the sentence level;

[0088] Step S403: extracting the co-occurrence relationship of the vector representations of the multiple predicted entities in the adjacent paragraphs at the adjacent paragraph level to obtain the co-occurrence relationship at the adjacent paragraph level; and constructing a co-occurrence relationship isomorphism graph at the adjacent paragraph level based on the co-occurrence relationship at the adjacent paragraph level.

[0089] Step S404: extract the vector representation of at least one predicted entity in the title and the vector representations of multiple predicted entities in the corresponding paragraph to obtain a co-occurrence relationship between the title and the corresponding paragraph; and construct an isomorphic graph of the co-occurrence relationship between the title and the corresponding paragraph based on the co-occurrence relationship between the title and the corresponding paragraph.

[0090] In some embodiments, in step S401, the syntactic relationship between the vector representations of the multiple predicted entities can be extracted through the graph neural network layer of the BERT model (e.g., LTP embedded in the preprocessing stage of the graph neural network). For example, for the following full text for entity recognition:

[0091] "110kV bus voltage transformer grounding failure leads to excessive dielectric loss detection and analysis

[0092] Phase A of the 110kV busbar voltage transformer at a 110kV substation was manufactured by xx Transformer Co., Ltd., model JCC1m-110, with oil-immersed insulation and electromagnetic construction. Its serial number was 1Y007-12, and its date of manufacture was February 1990. It was put into operation in December 1992. At approximately 10:00 AM on May 7, 2016, a power supply company conducted routine testing on the No. 1 main transformer system following a planned power outage and discovered that the dielectric loss factor of the winding insulation of this phase voltage transformer was 4.6%, significantly exceeding the standard.

[0093] Winding insulation dielectric loss factor test

[0094] To find out the cause, Zhang Qiang, an employee of the electrical testing team, used an AI-6000K insulation dielectric loss factor tester to measure the winding insulation dielectric loss factor of a 110kV busbar voltage transformer A in a 110kV substation. He found that the capacitance value was 17.86pF, while the dielectric loss factor was as high as 4.6%.

[0095] Fluke 177 multimeter test

[0096] Li Hong used a Fluke 177 multimeter to measure the resistance of busbar voltage transformer A from the ground terminal X to the ground terminal of the dielectric loss factor tester. She found that the resistance was over 100Ω, significantly too high and unstable.

[0097] To determine whether the fault was caused by poor grounding contact, tester Zhao Peng connected a dedicated grounding wire directly from the voltage transformer's X ground terminal to the ground terminal of the insulation loss factor tester and re-measured the winding insulation loss factor of voltage transformer A. The measured loss factor was 0.334%, and the capacitance was 17.85pF. Comparison of the two test results revealed that the significant deviation from the regulatory precautionary value for the loss factor was due to poor grounding between the voltage transformer's metal casing and its concrete column grounding steel support due to severe corrosion.

[0098] By analyzing the relationship between words (that is, entities and entities), we can analyze each sentence "Electrical test team employee Zhang used the AI-6000K insulation dielectric loss factor tester to measure the winding insulation dielectric loss factor of the 110kV bus phase voltage transformer A of a 110kV substation". Through syntactic relationship analysis, we can parse the subject-predicate-object relationship of the three entities Zhang, AI-6000K insulation dielectric loss factor tester and voltage transformer A in the syntax. Afterwards, based on the parsed syntactic relationship, we can construct a heterogeneous graph at the syntactic relationship level and obtain a syntactic relationship isomorphism graph. In this way, we can parse the syntactic dependency between the two entities and then obtain the relationship between the two entities from the perspective of natural language.

[0099] In some embodiments, in step S402, the syntactic relationship between the vector representations of the multiple predicted entities can be extracted through the graph neural network layer of the BERT model (such as the LTP embedded in the preprocessing stage of the graph neural network). For example, the syntactic relationship between words can be parsed. For example, for the text "Electrical test team employee Zhang used AI-6000K insulation dielectric loss factor tester to measure the winding insulation dielectric loss factor of 110kV bus phase voltage transformer A of a 110kV substation", through syntactic relationship parsing, the subject-predicate-object relationship of the three entities "Zhang", "AI-6000K insulation dielectric loss factor tester" and "voltage transformer A" in the syntax can be parsed. Afterwards, a heterogeneous graph at the syntactic relationship level can be constructed based on the parsed syntactic relationship to obtain a syntactic relationship isomorphism graph. In this way, the syntactic dependency relationship between the two entities can be parsed, and then the relationship between the two entities in the natural language perspective can be obtained.

[0100] In some embodiments, in step S403, the graph neural network layer of the BERT model (e.g., the LTP embedded in the preprocessing stage of the graph neural network) can be used to extract the co-occurrence relationship of the vector representations of multiple predicted entities in the sentence at the adjacent paragraph level. For example, the co-occurrence relationship between words at the adjacent paragraph level can be analyzed.

[0101] For example, for paragraph 1, "The voltage transformer phase A of the 110kV busbar A of a 110kV substation was manufactured by xx Transformer Co., Ltd., model JCC1m-110, with oil-immersed insulation and electromagnetic structure. Its factory serial number is 1Y007-12, and its factory date is February 1990. It was put into operation in December 1992. At around 10:00 on May 7, 2016, a power supply company conducted a routine test on the No. 1 main transformer system after a planned power outage and found that the dielectric loss factor of the winding insulation of the phase voltage transformer was 0.001mm. The quality loss factor is 4.6%, significantly exceeding the standard."; Paragraph 2: "FLUKE177 Multimeter Test: Li Hong used a FLUKE177 multimeter to measure the resistance of busbar voltage transformer A from ground terminal X to the ground terminal of the insulation dielectric loss factor tester. The resistance value was found to be over 100Ω, significantly excessive and unstable." By parsing the co-occurrence relationships of co-occurring entity pairs between adjacent paragraphs, it can be determined that "110kV busbar voltage transformer A" in paragraph 1 and "Li Hong" in paragraph 2 have a "test" relationship. Subsequently, based on this parsed co-occurrence relationship at the adjacent paragraph level, a co-occurrence relationship heterogeneous graph can be constructed, thereby obtaining a co-occurrence relationship isomorphic graph at the adjacent paragraph level. This allows the co-occurrence relationships between co-occurring entity pairs between adjacent paragraphs to be parsed, and furthermore, the relationship between the two co-occurring entities in adjacent paragraphs from a natural language perspective to be derived. This improves the accuracy of extracting entity co-occurrence relationships at the adjacent paragraph level in the power sector.

[0102] In some embodiments, in step S404, the co-occurrence relationship between the predicted entity in the title and the multiple predicted entities in the corresponding paragraph can be extracted through the graph neural network layer of the BERT model (such as the LTP embedded in the preprocessing stage of the graph neural network). For example, the co-occurrence relationship between words can be parsed. For example, for the subtitle "FLUKE177 Multimeter Test" entity in the aforementioned text and the "Bus Voltage Transformer A" entity in the corresponding paragraph, by parsing the co-occurrence relationship between the title and the corresponding paragraph, the "FLUKE177 Multimeter" entity in the subtitle, the "Bus Voltage Transformer A" entity in the corresponding paragraph, and the co-occurrence relationship between the title and the corresponding paragraph can be parsed. Afterwards, a co-occurrence relationship isomorphism graph can be constructed based on the co-occurrence relationship between the title and the corresponding paragraph, thereby obtaining a co-occurrence relationship isomorphism graph of the title and the corresponding paragraph. In this way, the syntactic dependency between the two entities can be parsed, and then the relationship between the two entities in the natural language perspective can be obtained.

[0103] In this way, through subsequent relationship fusion, the vector features of the final entities corresponding to each node in the isomorphic graph can have a "test" relationship. However, from the perspective of the explicit relationship of the target text, only by exploring the possible semantic relationships between entities as much as possible can we achieve more accurate entity recognition. Since the semantic relationships between different entities affect the entity type, this method can help identify entities more accurately.

[0104] In some embodiments, in step S500, performing an attention-based adaptive multi-relation fusion process on the multiple graph convolution calculation results to obtain the vector features of the final entity corresponding to each node in the isomorphic graph may include: utilizing the additive attention mechanism layer of the BERT model to perform an attention-based adaptive multi-relation fusion process on the multiple graph convolution calculation results to obtain the vector features of the final entity corresponding to each node in the isomorphic graph.

[0105] In some of the examples, performing attention-based adaptive multi-relation fusion processing on the multiple graph convolution calculation results to obtain the vector features of the final entity corresponding to each node in the isomorphic graph includes:

[0106] Calculate the association relationships between each of the vector representations of the multiple predicted entities; obtain corresponding relationship subgraphs for each association relationship, and obtain multiple relationship subgraphs.

[0107] Attention-based adaptive multi-relationship fusion processing is performed on the multiple relationship subgraphs to obtain vector features of the final entity corresponding to each node in the isomorphic graph.

[0108] In some embodiments, such as Figure 6 As shown in the figure, in each relationship subgraph, the node attributes (vector representation) of a given entity i usually contain its own input feature information (i.e., the vector representation of the predicted entity mentioned above). For the text used for entity recognition, there are many types of association relationships between all entities (i.e., between all entities), for example, K types. Then, there is an association relationship matrix between all entities (i.e., between all entities), for example, R1, R2, ..., R k . Usually, entity i is represented by h based on each relationship r i,r Satisfaction

[0109] Where l is the number of layers of the graph neural network. When l = 0, they are the initial input feature vectors of the corresponding nodes, i.e. v i and v j σ(·) is the activation function. j is the neighbor node. N i ,r is the set of all neighbor nodes of entity i based on the association relationship r. i,ris the constant coefficient used for normalization. is the weight parameter of the l-th layer neural network in the association relationship r, and this parameter cannot be shared in different association relationships. l is the weight parameter set of all associations in the l-th layer neural network. is the vector feature of entity j in the l-th layer of neural network; is the vector feature of entity i in the l-th layer of the neural network.

[0110] In some embodiments, the vector feature of the final entity corresponding to each node in the isomorphic graph is Among them, h i The vector feature of the final entity corresponding to each node contains both the information of the entity itself (derived from the encoding of the BERT model) and the information of the various associations between the entity and other entities (that is, the remaining entities in all entities) in the text. K is the type of association between entities (that is, between all entities). r is the weight coefficient of each relationship r, which is used to indicate the importance of the relationship. The weight is a normalized value, indicating that the model pays more attention to the information learned based on which relationship, so that the weight of each relationship can be compared. r and br are weight and bias terms, respectively, which are parameters for task-oriented learning. LeakyReLU(·) is the activation function. r is the entity feature vector calculated under the association relationship r (i.e., the feature for a specific relationship type) and h k are respectively the entity feature vectors calculated under the association relationship k (i.e., features for another specific relationship type).

[0111]

[0112] In this way, the vector features of the final entity corresponding to each node in the isomorphic graph can be comprehensively derived based on the entity's own state and different associations, which is more consistent with the actual situation in natural language. This attention-based adaptive multi-relation fusion algorithm can better distinguish the degree to which the target entity (i.e., any entity among the multiple predicted entities) is affected by different associations on the entity category. Finally, this representation serves as the final representation vector of the target entity (i.e., any entity among the multiple predicted entities), serving the final multi-classification layer (i.e., the fully connected layer of the BERT model) to determine the specific type of the entity.

[0113] In some embodiments, in step S600, the classifying and processing the vector features of the final entity corresponding to each node in the isomorphic graph to obtain the entity recognition result may include: using the fully connected layer of the BERT model to classify and process the vector features of the final entity corresponding to each node in the isomorphic graph to obtain the entity recognition result, such as Figure 6 shown.

[0114] In this way, the entity recognition method based on graph neural network and attention mechanism in the embodiment of the present application constructs a heterogeneous relationship graph based on the semantic and positional relationships between multiple entities during the recognition process, considers the context, and can realize end-to-end entity recognition through the BERT model, thereby realizing accurate recognition of entities in the power industry.

[0115] In some embodiments, the BERT model can be a trained BERT pre-trained model. Specifically, the model can be trained using the same steps as the aforementioned steps S100 to S600. During training, step S600 can specifically include calculating the cross-entropy loss of the entity recognition results obtained from the training samples (text samples used for entity recognition) and the corresponding labels (that is, the actual results of the entities in the training samples), and iterative training until the calculation results meet the training requirements of the BERT model, that is, the training of the BERT model is completed. It should be understood that the main function of the cross-entropy loss is to fit the entity type to the training data, so that the BERT model's representation of the entity can be more integrated with the relationship information between the entities to obtain the final model parameters.

[0116] The entity recognition method based on a graph neural network and an attention mechanism, provided in this application embodiment, has been proven to achieve promising results in improving work efficiency, reducing safety risks, promoting the development of intelligent systems in the power industry, and resolving entity relationship identification issues within the power system. In the task of extracting entities from power technical documents, compared to traditional methods, the accuracy of entities increased by 1% and the accuracy of entity types by 5%, effectively reducing manual review costs by 10%.

[0117] It is understandable that before using the technical solutions of each embodiment of the present disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved will be informed to the user in an appropriate manner, and the user's authorization will be obtained.

[0118] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operation of the disclosed technical solution based on the prompt message.

[0119] As an optional but non-limiting implementation, in response to a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.

[0120] It is understandable that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0121] It should be noted that the method of the embodiment of the present application can be performed by a single device, such as a computer or server. The method of this embodiment can also be applied in a distributed scenario and performed by multiple devices working together. In such a distributed scenario, one of the multiple devices may only perform one or more steps of the method of the embodiment of the present application, and the multiple devices will interact with each other to complete the method.

[0122] It should be noted that the above description is limited to some embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in an order different from that described in the above embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order or sequential order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0123] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides an entity recognition device based on graph neural network and attention mechanism.

[0124] refer to Figure 7 The entity recognition device 800 based on graph neural network and attention mechanism includes:

[0125] A data receiving module 810 is configured to receive plain text for entity recognition;

[0126] The word segmentation processing module 820 is configured to perform encoding and word segmentation processing on the plain text to obtain a vector representation and a corresponding position code for each word in the plain text;

[0127] An entity prediction module 830 is configured to predict the start and end positions of entities in the plain text based on the vector representation of each word in the plain text and the corresponding position code, thereby obtaining vector representations of multiple predicted entities;

[0128] The graph convolution calculation module 840 is configured to extract multiple relationships of the vector representation of the predicted entity to obtain multiple relationships; construct multiple isomorphic graphs based on the multiple relationships; perform graph convolution calculations on the multiple isomorphic graphs respectively to obtain multiple graph convolution calculation results; wherein the multiple relationships are respectively related to the multiple isomorphic graphs. Figure 1 One-to-one correspondence; the multiple isomorphism graphs include syntactic relationship isomorphism graphs, sentence-level co-occurrence relationship isomorphism graphs, adjacent paragraph-level co-occurrence relationship isomorphism graphs, and title-corresponding paragraph co-occurrence relationship isomorphism graphs;

[0129] A fusion module 850 is configured to perform attention-based adaptive multi-relation fusion processing on the multiple graph convolution calculation results to obtain a vector feature of the final entity corresponding to each node in the isomorphic graph;

[0130] The entity recognition module 860 is configured to classify the vector features of the final entity corresponding to each node in the isomorphic graph to obtain an entity recognition result.

[0131] In some embodiments, the graph convolution calculation module 840 is configured to: extract the co-occurrence relationship of the vector representations of multiple predicted entities in a sentence at the sentence level to obtain the co-occurrence relationship at the sentence level; construct the co-occurrence relationship isomorphism graph at the sentence level based on the co-occurrence relationship at the sentence level;

[0132] Extracting the co-occurrence relationship of the vector representations of the multiple predicted entities in the adjacent paragraphs at the adjacent paragraph level to obtain the co-occurrence relationship at the adjacent paragraph level; constructing the co-occurrence relationship isomorphism graph at the adjacent paragraph level based on the co-occurrence relationship at the adjacent paragraph level;

[0133] Extracting a vector representation of at least one predicted entity in a title and vector representations of multiple predicted entities in a corresponding paragraph to obtain a co-occurrence relationship between the title and the corresponding paragraph; and constructing an isomorphic graph of the co-occurrence relationship between the title and the corresponding paragraph based on the co-occurrence relationship between the title and the corresponding paragraph.

[0134] In some embodiments, the word segmentation processing module 820 is configured to: use the embedding layer of the BERT model to perform encoding and word segmentation on the plain text to obtain a vector representation and a corresponding position code for each word in the plain text;

[0135] The entity prediction module 830 is configured to: use the pointer network layer of the BERT model to predict the start and end positions of entities in the plain text based on the vector representation of each word in the plain text and the corresponding position code, and obtain vector representations of multiple predicted entities;

[0136] The graph convolution calculation module 840 is configured to: use the graph neural network layer of the BERT model to extract multiple relationships represented by the vector representation of the predicted entity to obtain multiple relationships; construct multiple isomorphic graphs based on the multiple relationships; and perform graph convolution calculations on the multiple isomorphic graphs respectively to obtain multiple graph convolution calculation results;

[0137] The fusion module 850 is configured to: utilize the additive attention mechanism layer of the BERT model to perform attention-based adaptive multi-relation fusion processing on the multiple graph convolution calculation results to obtain the vector features of the final entity corresponding to each node in the isomorphic graph;

[0138] The entity recognition module 860 is configured to: use the fully connected layer of the BERT model to classify the vector features of the final entity corresponding to each node in the isomorphic graph to obtain an entity recognition result.

[0139] In some embodiments, the fusion module 850 is configured to:

[0140] Calculating the association relationships between each pair of the vector representations of the plurality of predicted entities; obtaining corresponding relationship subgraphs for each association relationship, thereby obtaining a plurality of relationship subgraphs;

[0141] Attention-based adaptive multi-relationship fusion processing is performed on the multiple relationship subgraphs to obtain vector features of the final entity corresponding to each node in the isomorphic graph.

[0142] In some embodiments, the vector feature of the final entity corresponding to each node in the isomorphic graph is Among them, h i is the vector feature of the final entity corresponding to each node; K is the type of association relationship between all predicted entities in the text used for entity recognition; a r is the weight coefficient of each association relationship r; exp is the natural exponential function; W r is the weight; br is the bias term; LeakyReLU(·) is the activation function.

[0143] For the convenience of description, the above devices are described as being divided into various modules according to their functions. Of course, when implementing this application, the functions of each module can be implemented in the same or multiple software and / or hardware.

[0144] The device of the above embodiment is used to implement the corresponding entity recognition method based on graph neural network and attention mechanism in any of the aforementioned embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.

[0145] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and runnable on the processor. When the processor executes the program, it implements the entity recognition method based on graph neural network and attention mechanism described in any of the above embodiments.

[0146] Figure 8 10 is a schematic diagram showing a more specific hardware structure of an electronic device provided in this embodiment. The device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are communicatively connected to each other within the device via the bus 1050.

[0147] The processor 1010 can be implemented using a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0148] The memory 1020 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage devices, dynamic storage devices, etc. The memory 1020 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1020 and is called and executed by the processor 1010.

[0149] The input / output interface 1030 is used to connect input / output modules to implement information input and output. The input / output modules can be configured as components within the device (not shown in the figure) or can be externally connected to the device to provide corresponding functions. Input devices may include a keyboard, mouse, touch screen, microphone, various sensors, etc., and output devices may include a display, speaker, vibrator, indicator light, etc.

[0150] The communication interface 1040 is used to connect to a communication module (not shown) to enable communication between the device and other devices. The communication module can communicate via a wired method (such as USB, network cable, etc.) or a wireless method (such as mobile network, WiFi, Bluetooth, etc.).

[0151] The bus 1050 comprises a path for transmitting information between the various components of the device (eg, the processor 1010 , the memory 1020 , the input / output interface 1030 , and the communication interface 1040 ).

[0152] It should be noted that although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040, and the bus 1050, in a specific implementation, the device may also include other components necessary for normal operation. In addition, it will be understood by those skilled in the art that the above device may only include the components necessary to implement the embodiments of this specification, and does not necessarily include all the components shown in the figure.

[0153] The electronic device of the above embodiment is used to implement the corresponding entity recognition method based on graph neural network and attention mechanism in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.

[0154] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable the computer to execute the entity recognition method based on graph neural network and attention mechanism as described in any of the above embodiments.

[0155] The computer-readable media of this embodiment include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.

[0156] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the entity recognition method based on graph neural network and attention mechanism as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0157] Based on the same inventive concept, corresponding to the entity recognition method based on a graph neural network and an attention mechanism described in any of the above embodiments, the present disclosure also provides a computer program product comprising computer program instructions. In some embodiments, the computer program instructions can be executed by one or more processors of a computer to cause the computer and / or the processor to perform the entity recognition method based on a graph neural network and an attention mechanism. Corresponding to the execution subject corresponding to each step in each embodiment of the entity recognition method based on a graph neural network and an attention mechanism, the processor that executes the corresponding step may belong to the corresponding execution subject.

[0158] The computer program product of the above embodiment is used to enable the computer and / or the processor to execute the entity recognition method based on graph neural network and attention mechanism as described in any of the above embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0159] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present application (including the claims) is limited to these examples. Within the scope of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.

[0160] In addition, for simplicity of description and discussion, and in order not to make the embodiment of the application difficult to understand, the known power supply / ground connection with integrated circuit (IC) chip and other components may or may not be shown in the accompanying drawings provided. In addition, the device can be shown in the form of a block diagram to avoid making the embodiment of the application difficult to understand, and this also takes into account the following fact, that is, the details of the embodiment of these block diagram devices are highly dependent on the platform to be implemented in the embodiment of the application (that is, these details should be fully within the scope of understanding of those skilled in the art). When specific details (for example, circuit) are set forth to describe exemplary embodiments of the application, it will be apparent to those skilled in the art that the embodiment of the application can be implemented without these specific details or when these specific details are changed. Therefore, these descriptions should be considered to be illustrative rather than restrictive.

[0161] Although the present invention has been described in conjunction with specific embodiments thereof, many alternatives, modifications, and variations of these embodiments will be apparent to those skilled in the art based on the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may utilize the embodiments discussed.

[0162] The embodiments of the present application are intended to cover all such substitutions, modifications, and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the scope of protection of this application.

Claims

1. An entity recognition method based on graph neural network and attention mechanism, characterized in that: include: Receive plain text for entity recognition; Performing encoding and word segmentation on the plain text to obtain a vector representation and a corresponding position code for each word in the plain text; Predicting the start and end positions of entities in the plain text based on the vector representation of each word in the plain text and the corresponding position code, to obtain vector representations of multiple predicted entities; Extract multiple relationships represented by vectors of predicted entities to obtain multiple relationships; Constructing multiple isomorphic graphs based on the multiple relationships; performing graph convolution calculations on the multiple isomorphic graphs to obtain multiple graph convolution calculation results; wherein the multiple relationships correspond one-to-one to the multiple isomorphic graphs; the multiple isomorphic graphs include a syntactic relationship isomorphism graph, a sentence-level co-occurrence relationship isomorphism graph, an adjacent paragraph-level co-occurrence relationship isomorphism graph, and a title-corresponding paragraph co-occurrence relationship isomorphism graph; Performing attention-based adaptive multi-relation fusion processing on the multiple graph convolution calculation results to obtain the vector features of the final entity corresponding to each node in the isomorphic graph; Classify the vector features of the final entity corresponding to each node in the isomorphic graph to obtain an entity recognition result.

2. The entity recognition method based on graph neural network and attention mechanism according to claim 1 is characterized in that Extracting multiple relationships represented by vectors of the predicted entities to obtain multiple relationships; Constructing multiple isomorphic graphs based on the multiple relationships includes: Extracting syntactic relations between the vector representations of the plurality of predicted entities to obtain syntactic relations; and constructing the syntactic relation isomorphism graph based on the syntactic relations; Extracting the co-occurrence relationship of the vector representations of multiple predicted entities in the sentence at the sentence level to obtain the co-occurrence relationship at the sentence level; constructing the co-occurrence relationship isomorphism graph at the sentence level based on the co-occurrence relationship at the sentence level; Extracting the co-occurrence relationship of the vector representations of the multiple predicted entities in the adjacent paragraphs at the adjacent paragraph level to obtain the co-occurrence relationship at the adjacent paragraph level; constructing the co-occurrence relationship isomorphism graph at the adjacent paragraph level based on the co-occurrence relationship at the adjacent paragraph level; Extracting a vector representation of at least one predicted entity in a title and vector representations of multiple predicted entities in a corresponding paragraph to obtain a co-occurrence relationship between the title and the corresponding paragraph; and constructing an isomorphic graph of the co-occurrence relationship between the title and the corresponding paragraph based on the co-occurrence relationship between the title and the corresponding paragraph.

3. The entity recognition method based on graph neural network and attention mechanism according to claim 1 is characterized in that The encoding and segmentation processing of the plain text to obtain a vector representation and a corresponding position code of each word in the plain text includes: using an embedding layer of a BERT model to encode and segment the plain text to obtain a vector representation and a corresponding position code of each word in the plain text; The method of predicting the starting position and the ending position of an entity in the plain text based on the vector representation and the corresponding position code of each word in the plain text to obtain vector representations of multiple predicted entities includes: using a pointer network layer of a BERT model to predict the starting position and the ending position of an entity in the plain text based on the vector representation and the corresponding position code of each word in the plain text to obtain vector representations of multiple predicted entities; The extracting multiple relationships of the vector representation of the predicted entity to obtain multiple relationships; constructing multiple isomorphic graphs based on the multiple relationships; and performing graph convolution calculations on the multiple isomorphic graphs to obtain multiple graph convolution calculation results include: using the graph neural network layer of the BERT model to extract multiple relationships of the vector representation of the predicted entity to obtain multiple relationships; constructing multiple isomorphic graphs based on the multiple relationships; and performing graph convolution calculations on the multiple isomorphic graphs to obtain multiple graph convolution calculation results. The step of performing an attention-based adaptive multi-relation fusion process on the multiple graph convolution calculation results to obtain a vector feature of a final entity corresponding to each node in the isomorphic graph comprises: performing an attention-based adaptive multi-relation fusion process on the multiple graph convolution calculation results to obtain a vector feature of a final entity corresponding to each node in the isomorphic graph using an additive attention mechanism layer of a BERT model; The classifying and processing the vector features of the final entity corresponding to each node in the isomorphic graph to obtain the entity recognition result includes: using the fully connected layer of the BERT model to classify and process the vector features of the final entity corresponding to each node in the isomorphic graph to obtain the entity recognition result.

4. The entity recognition method based on graph neural network and attention mechanism according to claim 1 is characterized in that The step of performing attention-based adaptive multi-relation fusion processing on the multiple graph convolution calculation results to obtain the vector features of the final entity corresponding to each node in the isomorphic graph includes: Calculating the association relationships between each pair of the vector representations of the plurality of predicted entities; obtaining corresponding relationship subgraphs for each association relationship, thereby obtaining a plurality of relationship subgraphs; Attention-based adaptive multi-relationship fusion processing is performed on the multiple relationship subgraphs to obtain vector features of the final entity corresponding to each node in the isomorphic graph.

5. The entity recognition method based on graph neural network and attention mechanism according to claim 4 is characterized in that The vector feature of the final entity corresponding to each node in the isomorphic graph is Among them, h i is the vector feature of the final entity corresponding to the node; K is the type of association relationship between all predicted entities in the text used for entity recognition; a r is the weight coefficient of each association relationship r; exp is the natural exponential function; W r is the weight; br is the bias term; LeakyReLU(·) is the activation function; h r is the entity feature vector calculated under the association relationship r; h k are the entity feature vectors calculated under the association relationship k.

6. An entity recognition device based on graph neural network and attention mechanism, characterized in that: include: a data receiving module configured to receive plain text for entity recognition; A word segmentation processing module is configured to perform encoding and word segmentation processing on the plain text to obtain a vector representation and a corresponding position code for each word in the plain text; an entity prediction module configured to predict the start and end positions of entities in the plain text based on the vector representation of each word in the plain text and the corresponding position code, thereby obtaining vector representations of a plurality of predicted entities; A graph convolution calculation module is configured to extract multiple relationships of the vector representation of the predicted entity to obtain multiple relationships; Constructing multiple isomorphic graphs based on the multiple relationships; performing graph convolution calculations on the multiple isomorphic graphs to obtain multiple graph convolution calculation results; wherein the multiple relationships correspond one-to-one to the multiple isomorphic graphs; the multiple isomorphic graphs include a syntactic relationship isomorphism graph, a sentence-level co-occurrence relationship isomorphism graph, an adjacent paragraph-level co-occurrence relationship isomorphism graph, and a title-corresponding paragraph co-occurrence relationship isomorphism graph; A fusion module is configured to perform attention-based adaptive multi-relation fusion processing on the multiple graph convolution calculation results to obtain the vector features of the final entity corresponding to each node in the isomorphic graph; The entity recognition module is configured to classify the vector features of the final entity corresponding to each node in the isomorphic graph to obtain an entity recognition result.

7. The entity recognition device according to claim 6, characterized in that The graph convolution calculation module is configured to: extract the co-occurrence relationship of the vector representations of multiple predicted entities in a sentence at the sentence level to obtain the co-occurrence relationship at the sentence level; Constructing a co-occurrence relationship isomorphism graph at the sentence level based on the co-occurrence relationship at the sentence level; Extract the co-occurrence relationship of the vector representations of multiple predicted entities in adjacent paragraphs at the adjacent paragraph level to obtain the co-occurrence relationship at the adjacent paragraph level; Constructing a co-occurrence relationship isomorphism graph at the adjacent paragraph level based on the co-occurrence relationship at the adjacent paragraph level; Extracting a vector representation of at least one predicted entity in a title and vector representations of multiple predicted entities in a corresponding paragraph to obtain a co-occurrence relationship between the title and the corresponding paragraph; and constructing an isomorphic graph of the co-occurrence relationship between the title and the corresponding paragraph based on the co-occurrence relationship between the title and the corresponding paragraph.

8. The entity recognition device according to claim 6, characterized in that The word segmentation processing module is configured to: use the embedding layer of the BERT model to perform encoding and word segmentation processing on the plain text to obtain a vector representation and corresponding position code of each word in the plain text; The entity prediction module is configured to: use the pointer network layer of the BERT model to predict the start and end positions of entities in the plain text based on the vector representation of each word in the plain text and the corresponding position encoding, and obtain vector representations of multiple predicted entities; The graph convolution calculation module is configured to: use the graph neural network layer of the BERT model to extract multiple relationships represented by vectors of predicted entities to obtain multiple relationships; Constructing multiple isomorphic graphs based on the multiple relationships; performing graph convolution calculations on the multiple isomorphic graphs respectively to obtain multiple graph convolution calculation results; The fusion module is configured to: utilize the additive attention mechanism layer of the BERT model to perform attention-based adaptive multi-relation fusion processing on the multiple graph convolution calculation results to obtain the vector features of the final entity corresponding to each node in the isomorphic graph; The entity recognition module is configured to: use the fully connected layer of the BERT model to classify the vector features of the final entity corresponding to each node in the isomorphic graph to obtain an entity recognition result.

9. The entity recognition device according to claim 6, characterized in that The fusion module is configured to: Calculating the association relationships between each pair of the vector representations of the plurality of predicted entities; obtaining corresponding relationship subgraphs for each association relationship, thereby obtaining a plurality of relationship subgraphs; Attention-based adaptive multi-relationship fusion processing is performed on the multiple relationship subgraphs to obtain vector features of the final entity corresponding to each node in the isomorphic graph.

10. The entity recognition device according to claim 9, characterized in that The vector feature of the final entity corresponding to each node in the isomorphic graph is Among them, h i is the vector feature of the final entity corresponding to each node; K is the type of association relationship between all predicted entities in the text used for entity recognition; a r is the weight coefficient of each association relationship r; exp is the natural exponential function; W r is the weight; br is the bias term; LeakyReLU(·) is the activation function; h r is the entity feature vector calculated under the association relationship r; h k are the entity feature vectors calculated under the association relationship k.

11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 5 when executing the program. 12 . A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are configured to cause a computer to execute the method according to claim 1 .

13. A computer program product comprising computer program instructions, which, when executed on a computer, cause the computer to perform the method according to any one of claims 1 to 5.