Vertical field relationship extraction method, device, electronic device and storage medium

By constructing the target vertical domain knowledge base and entity relationship extraction model, combined with the knowledge base correction processing, the accuracy problem of entity relationship extraction in the existing technology is solved, and a higher quality and efficiency entity relationship extraction is achieved.

CN120181215BActive Publication Date: 2025-08-19BEIJING HOLARDATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510643804.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-19
Publication Date
2025-08-19
Estimated Expiration
2045-05-19

AI Technical Summary

Technical Problem

The existing entity relationship extraction methods have insufficient long-tail relationship learning ability, weak noise processing ability and weak vertical field reasoning ability in specific vertical fields, resulting in inaccurate entity relationship extraction results.

Method used

Build a knowledge base in the target vertical field, combine the knowledge base and the trained entity relationship extraction model to extract the target text entity relationship, and filter out the target entity relationship set through the knowledge base correction processing, introduce external vertical field knowledge base to provide data support for the big model, and combine the knowledge base automatic update mechanism and health management mechanism to enhance noise filtering capabilities.

Benefits of technology

It improves the ability to identify a small number of samples and special vocabulary, makes up for the shortcomings of long-tail relationships and vertical field reasoning ability, and improves the quality and efficiency of extraction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120181215B_ABST
    Figure CN120181215B_ABST
Patent Text Reader

Abstract

The present application relates to a vertical field relationship extraction method, device, electronic device and storage medium, which constructs a knowledge base of a target vertical field, combines the knowledge base of the target vertical field, extracts entity relationships from the target text to obtain a first entity relationship set, uses a trained entity relationship extraction model to extract entity relationships from the target text to obtain a second entity relationship set, and uses the knowledge base to correct the second entity relationship set to obtain a fourth entity relationship set, and combines the knowledge base of the target vertical field to filter out the target entity relationship set from the first entity relationship set and the fourth entity relationship set. By introducing a vertical field knowledge base, external data support is provided for the large model, which makes up for the shortcomings of the existing technology in processing long-tail relationships and vertical field reasoning capabilities. At the same time, combined with joint comparison screening, knowledge base automatic update mechanism and health management mechanism, the filtering ability of noise samples is enhanced, and the extraction quality and efficiency are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of relationship extraction, and in particular to a method, device, electronic device and storage medium for extracting relationships in a vertical field. Background Art

[0002] With the continuous growth of internet data, extracting structured information from unstructured text has become a core challenge in the field of natural language processing. Entity relationship extraction technology, a key task, aims to identify semantic relationships between entities in text to construct structured data such as knowledge graphs.

[0003] However, in the application of entity relationship extraction in specific vertical fields, the existing entity relationship extraction methods have limitations such as insufficient long-tail relationship learning ability, weak noise processing ability, and weak vertical field reasoning ability, which leads to technical problems such as inaccurate entity relationship extraction results. Summary of the Invention

[0004] The present application provides a vertical field relationship extraction method, device, electronic device and storage medium to solve the technical problem that the existing entity relationship extraction method has limitations in the application of entity relationship extraction in a specific vertical field, such as insufficient long-tail relationship learning ability, weak noise processing ability and weak vertical field reasoning ability, which leads to inaccurate entity relationship extraction results.

[0005] In a first aspect, the present application provides a method for extracting vertical domain relationships, the method comprising:

[0006] Constructing a knowledge base in a target vertical field, wherein the knowledge base includes an entity set and a relationship set in the target vertical field;

[0007] In combination with the knowledge base of the target vertical field, entity relationship extraction is performed on the target text to obtain a first entity relationship set, and entity relationship extraction is performed on the target text using a trained entity relationship extraction model to obtain a second entity relationship set, and the second entity relationship set is corrected using the knowledge base to obtain a fourth entity relationship set;

[0008] A target entity relationship set is screened out from the first entity relationship set and the fourth entity relationship set by utilizing the knowledge base of the target vertical field.

[0009] In a possible implementation, the entity relationship extraction is performed on the target text in combination with the knowledge base of the target vertical field to obtain a first entity relationship set, including:

[0010] Constructing prompt words using the knowledge base of the target vertical field and the target text;

[0011] The prompt word is input into a large language model to obtain a first entity relationship set output by the large language model.

[0012] In a possible implementation, extracting entity relationships from the target text using a trained entity relationship extraction model to obtain a second entity relationship set includes:

[0013] The target text is input into a trained entity relationship extraction model, entity relationships are extracted from the target text through the first relationship extraction network in the entity relationship extraction model to obtain a third entity relationship set, and the third entity relationship set and the target text are input into a second relationship extraction network in the entity relationship extraction model, and entity relationships are extracted from the target text by the second relationship extraction network in combination with the third entity relationship set to obtain a second entity relationship set.

[0014] In a possible implementation, inputting the third entity relationship set and the target text into the second relationship extraction network in the entity relationship extraction model includes:

[0015] Constructing graph data for the third entity relationship set and the target text, and inputting the graph data into a second relationship extraction network in the entity relationship extraction model;

[0016] The step of constructing graph data for the third entity relationship set and the target text includes:

[0017] The following processing is performed for each entity relationship group in the third entity relationship set:

[0018] Creating corresponding entity nodes for entities in the entity relationship group, and representing relationships in the entity relationship group as edges connecting the corresponding entity nodes;

[0019] Furthermore, the target text is divided into blocks to obtain a plurality of text blocks; a text block node is created for each of the text blocks, and the text block node is connected to the relevant entity node through an edge.

[0020] In one possible implementation, the entity relationship extraction model is trained in the following manner:

[0021] Obtaining a training sample set, wherein the training sample set includes a plurality of positive training samples and negative training samples, wherein the positive training samples include correctly labeled entity relationship groups, and the negative training samples include incorrectly labeled entity relationship groups;

[0022] Inputting the training sample set into a pre-training model, and initializing the model by the pre-training model based on a contrastive learning mechanism;

[0023] Iteratively training the initialized pre-trained model using the training sample set until it is determined that the set model convergence conditions are met, thereby obtaining a trained entity relationship extraction model;

[0024] In each round of iterative training, the loss value of each training sample is determined, the weight of the training sample is adjusted according to the adaptive noise filtering strategy, and the parameters of the current model are updated according to the weighted loss value.

[0025] In a possible implementation, the correcting the second entity relationship set using the knowledge base to obtain a fourth entity relationship set includes:

[0026] The following processing is performed for each set of entity relationships in the second entity relationship set:

[0027] Searching for a target entity that satisfies a semantic consistency condition with an entity in the entity relationship from an entity set in the knowledge base of the target vertical field, and searching for a target relationship that satisfies a semantic consistency condition with a relationship in the entity relationship from a relationship set in the knowledge base of the target vertical field;

[0028] When the target entity is found, the entity in the entity relationship is modified to the target entity; and / or when the target relationship is found, the relationship in the entity relationship is modified to the target relationship.

[0029] In a possible implementation, the using the knowledge base of the target vertical field to filter out the target entity relationship set from the first entity relationship set and the fourth entity relationship set includes:

[0030] The following processing is performed for each set of entity relationships in the first entity relationship set and the fourth entity relationship set:

[0031] Determining a first degree of association between an entity in the entity relationship and an entity set in a knowledge base of the target vertical field;

[0032] Determining a second degree of association between a relationship in the entity relationship and a relationship set in a knowledge base of the target vertical domain;

[0033] When both the first degree of association and the second degree of association are greater than or equal to a preset degree of association threshold, the entity relationship is included in a target entity relationship set.

[0034] In one possible implementation, building a knowledge base in a target vertical field includes:

[0035] Inputting a preset entity set, a preset relationship set, and a document set in the target vertical field into a trained entity relationship recognition model, so that the entity relationship recognition model recognizes entities and relationships in the target vertical field from the document set based on the preset entity set and the preset relationship set;

[0036] The entities and relationships identified by the entity relationship recognition model are respectively classified into the preset entity set and the preset relationship set to obtain the knowledge base of the target vertical field.

[0037] In a possible implementation, after building the knowledge base of the target vertical field, the method further includes:

[0038] When the set knowledge base update time is reached, determine the update decision parameters of the knowledge base in the current target vertical field;

[0039] When the update decision parameter is greater than or equal to a preset update threshold, updating the knowledge base of the target vertical field;

[0040] The update decision parameters of the knowledge base in the current target vertical field are calculated and determined by the following formula:

[0041]

[0042] in, represents the knowledge base learning rate, represents the update decision parameters, represents the activation function, S represents the similarity score, W represents the weight coefficient, R represents the relevance score, and E represents the complexity. Represents the adjustment factor.

[0043] In a second aspect, the present application provides a vertical field relationship extraction device, the device comprising:

[0044] A vertical domain knowledge base construction module is used to construct a knowledge base of a target vertical domain, wherein the knowledge base includes entity sets and relationship sets within the target vertical domain;

[0045] An entity relationship extraction module is configured to extract entity relationships from a target text in combination with a knowledge base in the target vertical field to obtain a first entity relationship set, extract entity relationships from the target text using a trained entity relationship extraction model to obtain a second entity relationship set, and correct the second entity relationship set using the knowledge base to obtain a fourth entity relationship set;

[0046] The target entity relationship set screening module is used to use the knowledge base of the target vertical field to screen out a target entity relationship set from the first entity relationship set and the fourth entity relationship set.

[0047] In a third aspect, the present application provides an electronic device, a processor and a memory, wherein the processor is used to execute the vertical field relationship extraction method stored in the memory to implement the vertical field relationship extraction method described in any one of the first aspects.

[0048] In a fourth aspect, the present application further provides a storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the vertical field relationship extraction method described in any one of the first aspects.

[0049] The above technical solution provided by the embodiment of the present application has the following advantages over the prior art: the method provided by the embodiment of the present application, by constructing a knowledge base of the target vertical field, combining the knowledge base of the target vertical field, extracting entity relationships from the target text to obtain a first entity relationship set, using the trained entity relationship extraction model to extract entity relationships from the target text to obtain a second entity relationship set, and using the knowledge base to perform correction processing on the second entity relationship set to obtain a fourth entity relationship set, and then combining the knowledge base of the target vertical field to filter out the target entity relationship set from the first entity relationship set and the fourth entity relationship set. This method provides external data support for the large model by introducing an external vertical field knowledge base, improves the recognition ability of a small number of samples and the recognition ability of thematic vocabulary, and makes up for the shortcomings of the prior art in processing long-tail relationships and weak vertical field reasoning ability. At the same time, combined with the knowledge base automatic update mechanism and the knowledge base health management mechanism, it enhances the filtering ability of noise samples and improves the extraction quality and extraction efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0051] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0052] One or more embodiments are exemplarily illustrated by pictures in the corresponding drawings. These exemplifications do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings are represented as similar elements. Unless otherwise stated, the figures in the drawings do not constitute proportional limitations.

[0053] Figure 1 A flowchart of an embodiment of a vertical field relationship extraction method provided in an embodiment of the present application;

[0054] Figure 2 A schematic diagram of a prompt word template provided in an embodiment of the present application;

[0055] Figure 3 An example diagram of a first entity relationship set provided in an embodiment of the present application;

[0056] Figure 4 A flowchart of another embodiment of a vertical field relationship extraction method provided in an embodiment of the present application;

[0057] Figure 5 An example diagram of a positive and negative training sample set provided in an embodiment of the present application;

[0058] Figure 6 A schematic diagram of a second entity relationship set provided in an embodiment of the present application;

[0059] Figure 7 A flowchart of another embodiment of a vertical field relationship extraction method provided in an embodiment of the present application;

[0060] Figure 8 A module diagram of an embodiment of a vertical field relationship extraction method provided in an embodiment of the present application;

[0061] Figure 9 A schematic diagram of a vertical domain relationship extraction device provided in an embodiment of the present application;

[0062] Figure 10 A schematic diagram of the structure of a device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0063] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0064] The disclosure below provides many different embodiments or examples for implementing different structures of the present application. In order to simplify the disclosure of the present application, the components and settings of specific examples are described below. Of course, these are merely examples and are not intended to limit the present application. In addition, the present application may repeat reference numbers and / or letters in different examples. Such repetition is for the purpose of simplicity and clarity and does not in itself indicate the relationship between the various embodiments and / or settings discussed.

[0065] In order to solve the technical problem that in the application of entity relationship extraction in a specific vertical field, the existing entity relationship extraction methods have limitations such as insufficient long-tail relationship learning ability, weak noise processing ability and weak vertical field reasoning ability, which in turn leads to inaccurate entity relationship extraction results, the present application provides a vertical field relationship extraction method, device, electronic device and storage medium, which can provide external data support for large models by introducing an external vertical field knowledge base, improve the recognition ability of a small number of samples and the recognition ability of thematic vocabulary, make up for the defects of the existing technology in processing long-tail relationships and vertical fields, and at the same time combine the knowledge base automatic update mechanism and health management mechanism to enhance the filtering ability of noise samples and improve the extraction quality and efficiency.

[0066] Figure 1 This is a flow chart of an embodiment of a vertical field relationship extraction method provided in the embodiment of this application, which mainly describes how to obtain more accurate entity relationship extraction results in the application of entity relationship extraction in a specific vertical field. Figure 1 As shown, it mainly includes the following steps:

[0067] Step 101: Build a knowledge base in the target vertical field, where the knowledge base includes entity sets and relationship sets in the target vertical field.

[0068] A vertical field refers to the scope of in-depth research and services for a specific industry, profession or demand area.

[0069] A vertical domain knowledge base refers to a collection of knowledge specifically built for a specific industry domain (such as military, medical, or financial). It contains key information within that domain, including entities, attributes, and relationships, and is stored in a structured format. For example, a knowledge base in the military domain contains information about entities within that domain (such as "drones" and "missiles"), attributes (such as the "range" and "payload" of "drones"), and relationships (such as the "execution" relationship between "drones" and "reconnaissance"). This information is stored in a structured manner to facilitate efficient computer processing and query, thereby supporting various complex tasks within that domain.

[0070] A knowledge base in a target vertical field refers to a structured database of information about entities, concepts, attributes, relationships, etc. in a specific vertical field, i.e., the target vertical field. For example, the knowledge base in the target vertical field in the embodiment of the present application can be a knowledge base in the military field.

[0071] For example, Table 1 below is an example of a knowledge base in the military field:

[0072] Table 1

[0073]

[0074] Based on this, the primary purpose of constructing a vertical domain knowledge base in step 101 is to provide a foundation for tasks such as information retrieval, knowledge reasoning, and decision support in specific domains, such as the military. It also provides external data support for large models, enhancing the model's ability to recognize thematic vocabulary. The vertical domain knowledge base encompasses the domain's specialized terminology, proper nouns, and specific relationships, stored in the form of graphs or tables to facilitate rapid retrieval and reasoning by computers or large models. Furthermore, as domain knowledge becomes more rigorous (e.g., with the emergence of new tactics), the knowledge base can be regularly updated to maintain its currency. Furthermore, the domain knowledge in the knowledge base is verified by domain experts, ensuring high credibility and reliability.

[0075] The embodiment of the present application provides a knowledge base management unit, wherein the above-mentioned knowledge base management unit includes an automatic update mechanism and a health management mechanism for the vertical domain knowledge base, which is mainly used to regularly update and manage the knowledge base. Among them, the automatic update mechanism of the knowledge base reduces the need for manual monitoring and manual updating of the knowledge base, avoids the possibility of human errors, and can automatically trigger the update process when new knowledge is detected or knowledge needs to be updated, ensuring that the knowledge base always contains the latest domain knowledge. At the same time, it can comprehensively evaluate the value of new information and avoid the introduction of erroneous or outdated information, thereby improving the accuracy of the knowledge base. In addition, the health management mechanism of the knowledge base ensures that the content of the knowledge base is both accurate and complete by regularly evaluating the quality indicators (such as accuracy and completeness) and overall indicators (such as the number of entities and triples) of the knowledge base, and can promptly discover and feedback problems, optimize the efficiency of the use of the knowledge base, and improve user trust and satisfaction, which helps the model obtain a reliable information basis when performing relationship extraction and reasoning.

[0076] Furthermore, the aforementioned health management mechanism can also provide feedback to the knowledge base regarding missing information. Specifically, when the large model identifies new entities or relationships during entity relationship extraction, the health management mechanism feeds this information back to the knowledge base management unit, which triggers an automatic update mechanism to update the current knowledge base, thereby ensuring the quality of the knowledge base. The knowledge base update mechanism and health management mechanism are described in detail in the following embodiments.

[0077] There are multiple ways to build a knowledge base in a specific field. For example, a knowledge base for a specific field can be constructed manually, semi-automatically, or automatically. Specifically, manual construction involves domain experts manually organizing knowledge to ensure accuracy. Semi-automatic construction utilizes template matching and information extraction techniques to automatically extract knowledge from text, followed by manual review and correction. Automatic construction utilizes natural language processing and machine learning techniques to automatically construct knowledge from large amounts of text, offering high efficiency.

[0078] In one embodiment, the embodiment of the present application adopts a semi-automatic construction method to construct a knowledge base in a vertical field. Specifically, constructing a knowledge base in a target vertical field includes: inputting a preset entity set, a preset relationship set, and a document set in the target vertical field into a trained entity relationship recognition model, so that the entity relationship recognition model can identify entities and relationships in the target vertical field from the document set based on the preset entity set and the preset relationship set; and classifying the entities and relationships identified by the entity relationship recognition model into the preset entity set and the preset relationship set, respectively, to obtain a knowledge base in the target vertical field.

[0079] Specifically, the above-mentioned preset entity set and preset relationship set refer to the entity set and relationship set preset by the user in advance, for example, the entity set and relationship set extracted by the user from documents in the relevant field in advance, and then the preset entity set and relationship set and the document set in the target vertical field are input into the trained entity relationship recognition model. Among them, the above-mentioned entity relationship recognition model is trained in advance, and the specific training method is not limited in the embodiment of this application. Then, the entity relationship model identifies the entities and relationships in the target vertical field from the document set based on the input preset entity set and relationship set. The entities and relationships identified by the entity relationship recognition model are merged with the preset entity set and preset relationship set to obtain a knowledge base of the target vertical field, wherein the knowledge base includes the entity set and relationship set in the target vertical field, such as shown in Table 1 above.

[0080] The semi-automatic construction method of the knowledge base in the target vertical field, on the one hand, expands the coverage of the knowledge base, allowing the knowledge base to contain more potential knowledge information that is difficult for humans to pre-identify. On the other hand, by introducing manually preset entity sets and relationship sets, it can provide a clear boundary and guide for the model, ensuring that the model will not deviate from the target vertical field during the extraction process.

[0081] The above step 101 mainly describes the method of using a semi-automated method to construct a knowledge base in the target vertical field. It not only avoids the limitations of manual settings, but also avoids the problem of model out-of-bounds through the guidance of manual settings, enriches the content of the knowledge base, and ensures the accuracy and reliability of the knowledge base, providing external data support for the large model.

[0082] Step 102: Combine the knowledge base of the target vertical field to extract entity relationships from the target text to obtain a first entity relationship set, and use the trained entity relationship extraction model to extract entity relationships from the target text to obtain a second entity relationship set, and use the knowledge base to correct the second entity relationship set to obtain a fourth entity relationship set.

[0083] The target text is the text to be recognized, that is, the text for which relationship extraction is performed. Specifically, the target text can be a sentence, a paragraph, or an article. For example, the target text might be: "At the XX Air Show, the J fighter jet demonstrated its stealth combat capabilities, while the Y fighter jet conducted a series of flight demonstrations."

[0084] The target text and the target vertical domain knowledge base belong to the same specific target vertical domain, which can be one of multiple fields such as military field and medical field.

[0085] Entity relationship extraction is a core technology in natural language processing. It aims to automatically identify and extract entities (such as names of people, places, organizations, military equipment, etc.) and the relationships between them (such as affiliation, actions, attributes, etc.) from unstructured text, and represent these relationships as structured data forms (such as triples), where triples are composed of (entity 1-relationship-entity 2).

[0086] A trained entity relationship extraction model is a model that is obtained by training a pre-trained model in advance and can be used for entity relationship extraction. The training process of the pre-trained model will be described in detail below.

[0087] In one embodiment, entity relationships are extracted from the target text in combination with a knowledge base of the target vertical field to obtain a first entity relationship set, and entity relationships are extracted from the target text using a trained entity relationship extraction model to obtain a second entity relationship set, and the second entity relationship set is corrected using the knowledge base to obtain a fourth entity relationship set.

[0088] The above embodiment extracts entity relationships from the target text using two parallel approaches. These approaches are: first, integrating the target vertical domain's professional knowledge base to conduct in-depth analysis of the target text, thereby extracting the associations between entities and forming a first entity relationship set; second, leveraging a well-trained entity relationship extraction model to automatically detect entity relationships in the same target text, deriving a second entity relationship set, and then correcting this second entity relationship set using the knowledge base to obtain a fourth entity relationship set.

[0089] Specifically, in the first approach, the knowledge base of the target vertical field is closely integrated with the target text, and professional knowledge in the vertical field is used to assist in identifying entities in the text and their relationships. Ultimately, a series of triplets consisting of entity-relationship-entity are sorted out. These triplets together constitute the first entity relationship set. In the second strategy, a pre-trained entity relationship extraction model is used. This model has the ability to automatically identify and extract entity relationships from text. The target text is deeply analyzed and a second entity relationship set consisting of multiple triplets is also obtained. In addition, the second entity relationship set is corrected using the knowledge base to obtain a more accurate fourth entity relationship set. These two parallel approaches complement each other and aim to improve the comprehensiveness and accuracy of entity relationship extraction.

[0090] As an optional implementation, a large language model is used to extract entity relationships from the target text using the knowledge base of the target vertical domain to obtain a first entity relationship set. Specifically, this includes constructing prompt words using the knowledge base of the target vertical domain and the target text, inputting the prompt words into the large language model, and obtaining the first entity relationship set output by the large language model.

[0091] The above prompt words are mainly used to guide large models to more accurately understand and extract entity relationships in text processing in specific fields (such as military). Figure 2 A schematic diagram of a prompt word template provided in the embodiment of the present application, see Figure 2 The prompt word template consists of the target text, i.e. the paragraph to be identified, the knowledge base in the vertical field, and the task guide words, which can reduce the model's overhead in understanding the text intent. Among them, the task guide word means: "Based on the entities and relationships provided by the external knowledge base, deduce the potential entities and relationships of the input paragraph and generate triples." It is used to guide the model to focus on relationship extraction and generate triples. The knowledge base in the vertical field is used to help the model identify proper nouns in a specific field (such as military). The target text is the input text paragraph, for example Figure 2 The input paragraph shown in .

[0092] The above-mentioned large language model can be GPT-4 (Generative Pre-trained Transformer 4, abbreviated as GPT-4), DeepSeek V3, claude, etc. In addition, it can also be other types of large language models, which is not limited in the embodiments of this application.

[0093] For example, if we input the target text "At the XX Air Show, the XX fighter jet demonstrated its stealth combat capabilities, while the Y-X conducted a series of flight demonstrations" and the vertical domain knowledge base (Table 1) into a large language model, we can obtain the output of the large language model, such as (J-X, display, stealth combat capability). The large language model refers to an existing large language model that can directly extract entity relationships from the input target text and output entity relationship extraction results. The output of the large language model is used as the first entity relationship set.

[0094] Figure 3 This is an example diagram of a first entity relationship set provided in an embodiment of the present application, see Figure 3 As shown, the first entity relationship set provided by the embodiment of the present application is output and displayed in a structured form of triples by the large language model. In addition, the corresponding first entity relationship set can also be obtained and displayed in other forms, such as json file format, etc. The embodiment of the present application does not limit this.

[0095] By pre-building a knowledge base for the target vertical field, combining the knowledge base for the target vertical field with the target text and then performing relationship extraction, external data support is provided for the large model. This can retain relatively rare but correct entity relationships, and at the same time recognize the proper nouns in the field, as well as different expressions of the same entity, such as "strong tank (main battle tank)" and the abbreviation "tank". This overcomes the limitations of existing technologies in processing long-tail relationships and vertical fields, and further obtains a first entity relationship set with higher accuracy in the field.

[0096] The above embodiment constructs a knowledge base in the target vertical field, combines the knowledge base in the vertical field and the target text, and uses a large model to capture the first entity relationship set. This method introduces a knowledge base in an external vertical field, provides external data support for the large model, enhances the model's ability to recognize a small number of samples and thematic vocabulary in a specific field, and further improves the accuracy of the relationship extraction results.

[0097] The above-mentioned embodiment provided in the present application, as an optional implementation method, uses a trained entity relationship extraction model to extract entity relationships from the target text, uses the output result of the trained entity relationship extraction model as the second entity relationship set, and uses the knowledge base to correct the second entity relationship set to obtain a fourth entity relationship set. How to obtain the second entity relationship set based on the trained model and how to use the knowledge base to correct the second entity relationship set to obtain the fourth entity relationship set will be described in detail below.

[0098] Step 103: Utilize the knowledge base of the target vertical field to filter out the target entity relationship set from the first entity relationship set and the fourth entity relationship set.

[0099] In one embodiment, a target entity relationship set is screened from the first and fourth entity relationship sets using a knowledge base in the target vertical domain. Specifically, the first and fourth entity relationship sets can be merged to obtain a candidate entity relationship set, which is then combined with the knowledge base in the target vertical domain to screen out a final, accurate, and noise-filtered target entity relationship set from the candidate entity relationship set.

[0100] For example, the first entity relationship set includes: (J-X, display, stealth combat capability), the fourth entity relationship set includes: (transportation, support, strategic transportation), and the candidate entity relationship set constructed based on the first entity relationship set and the fourth entity relationship set is: {(J-X, display, stealth combat capability), (transportation, support, strategic transportation)}. Further, the knowledge base of the target vertical field is combined to filter out the final target entity relationship set after noise filtering. In addition, the first entity relationship set and the fourth entity relationship set can be directly combined with the knowledge base of the target vertical field to filter, and then the filtered first entity relationship set and the fourth entity relationship set are merged to obtain the final target entity relationship set.

[0101] The method provided in the embodiment of the present application constructs a knowledge base of the target vertical field, combines the knowledge base of the target vertical field, extracts entity relationships from the target text to obtain a first entity relationship set, uses a trained entity relationship extraction model to extract entity relationships from the target text to obtain a second entity relationship set, and uses the knowledge base to correct the second entity relationship set to obtain a fourth entity relationship set, and then combines the knowledge base of the target vertical field to filter out the target entity relationship set from the first entity relationship set and the fourth entity relationship set. This method introduces an external vertical field knowledge base to provide external data support for the large model, improves the recognition ability of a small number of samples and the recognition ability of thematic vocabulary, and makes up for the shortcomings of the existing technology in processing long-tail relationships and vertical field reasoning capabilities. At the same time, combined with the knowledge base automatic update mechanism and the knowledge base health management mechanism, it enhances the filtering ability of noise samples and improves the extraction quality and extraction efficiency.

[0102] Figure 4 This is a flow chart of another embodiment of a vertical field relationship extraction method provided in an embodiment of the present application. Figure 4 The process shown in Figure 1 Based on the process shown in the figure, this paper mainly describes how to train the entity relationship extraction model, and use the trained entity relationship extraction model to extract entity relationships to obtain the second entity relationship set, and use the knowledge base to correct the second entity relationship set to obtain the fourth entity relationship set as shown in the figure. Figure 4 As shown, it mainly includes the following steps:

[0103] Step 401: Build a knowledge base in the target vertical field, where the knowledge base includes entity sets and relationship sets in the target vertical field.

[0104] Step 402: Combine the knowledge base of the target vertical field and extract entity relationships from the target text to obtain a first entity relationship set.

[0105] For detailed description of steps 401 and 402, please refer to the description of the above related embodiments.

[0106] Step 403: Input the target text into the trained entity relationship extraction model, perform entity relationship extraction on the target text through the first relationship extraction network in the entity relationship extraction model to obtain a third entity relationship set, and input the third entity relationship set and the target text into the second relationship extraction network in the entity relationship extraction model, and perform entity relationship extraction on the target text by the second relationship extraction network combined with the third entity relationship set to obtain a second entity relationship set.

[0107] In one embodiment, the above-mentioned trained entity relationship extraction model is trained in the following manner: obtaining a training sample set, the training sample set including multiple positive training samples and negative training samples, the positive training samples contain correctly labeled entity relationship groups, and the negative training samples contain incorrectly labeled entity relationship groups; inputting the training sample set into a pre-training model, and the pre-training model initializes the model based on a contrastive learning mechanism; using the training sample set to iteratively train the initialized pre-training model until it is determined that the set model convergence conditions are met, thereby obtaining a trained entity relationship extraction model; wherein, in each round of iterative training, the loss value of each training sample is determined, and the weight of the training sample is adjusted according to the adaptive noise filtering strategy, and the parameters of the current model are updated according to the weighted loss value.

[0108] Specifically, a positive training sample set and a negative training sample set are obtained, wherein the positive training sample set includes multiple positive training samples and negative training samples. Figure 5 This is an example diagram of a positive and negative training sample set provided in the embodiment of the present application, see Figure 5 As shown in , the positive training sample set consists of multiple positive samples (valid relations) in the form of triplets, and the negative training sample set consists of multiple negative samples (noise information) in the form of triplets.

[0109] In addition, the positive training sample set and the negative training sample set can be annotated in the document in the form of document annotation and input into the pre-training model for model training together with the document, or they can be annotated in the form of document annotation. Figure 5 The positive and negative training sample sets and target documents are respectively input into the pre-training model for training in the form of, which is not limited in this embodiment of the present application.

[0110] The embodiment of the present application uses a contrastive learning mechanism to initialize the model, and then uses a training sample set to iteratively train the initialized pre-trained model until it is determined that the set model convergence conditions are met, and then stops training to obtain a trained entity relationship extraction model. The specific process of using the contrastive loss function to train the model in the embodiment of the present application is as follows:

[0111] (1) Calculate the distance between sample pairs

[0112] D(A,B)=distance(A,B)

[0113] Where D(A,B) represents the distance between sample A and sample B; distance(A,B) represents a specific distance function, which uses Euclidean distance to calculate the distance between the two based on the feature vectors of the samples.

[0114] (2) Setting the threshold

[0115] T=threshold

[0116] Among them, T represents the threshold, which is used to distinguish positive and negative samples; threshold represents the specific value of the threshold.

[0117] (3) Contrastive loss function

[0118] …………Formula (1)

[0119] Among them, L represents the loss value of the contrast loss function, which is used to measure the model's ability to distinguish between positive and negative samples. The smaller the loss, the stronger the model's ability to distinguish between positive and negative samples; N represents the total number of sample pairs; Represents the label of sample pair i, where =0 means i is a negative sample pair, =1 means i is a positive sample pair; Represents the distance between sample pair i, i.e. D( , ); T represents the threshold, which is used to distinguish positive and negative samples.

[0120] (4) Contrastive learning loss function after training

[0121] …(Formula 2)

[0122] Among them, margin represents the distance threshold, which can be set to 0.5; f() represents the feature extraction function; Represents the contrastive learning loss function, which is used to measure the model's ability to distinguish between positive and negative samples; represents a positive sample, represents a negative sample; d(a,b) represents the distance between vector a and vector b.

[0123] The model is iteratively trained using the contrastive learning loss function until the set model convergence condition is met, and training is stopped. For example, a maximum number of iterations can be pre-set, and when the model is trained to the maximum number of iterations, training is stopped to obtain a trained entity relationship extraction model. In addition, other methods can be used to determine whether the model has met the set model convergence condition, and the embodiments of the present application are not limited to this.

[0124] In each round of iterative training, the loss value of each training sample is determined, and the weight of the training sample is adjusted according to the adaptive noise filtering strategy, and the current model parameters are updated according to the weighted loss value. Specifically, the loss value of each training sample is determined according to the above formula (2), and then according to the loss value of the sample, its weight is dynamically adjusted to filter the noise. Samples with abnormally high loss values are given lower weights to reduce their interference with model training. Samples that appear infrequently but are important are given higher weights to avoid the model ignoring long-tail relationships due to too many noise samples. The specific formula is as follows:

[0125] .........Formula (3)

[0126] in, represents the weight of sample i; Represents the adjustment coefficient, which can be set to 5 to control the magnitude of weight changes; Represents the sample loss of the current training sample i; Represents the average loss of the current training round. Based on the above formula, the weight of each training sample is dynamically adjusted, and the parameters of the current model are updated according to the weighted sample loss value, thereby achieving the goal of optimizing model training.

[0127] By dynamically adjusting weights, we influence the calculation of the loss function and optimize model training, so that higher-weighted samples contribute more to the loss, thereby guiding the model to pay more attention to these samples. When dealing with long-tail relationships, we assign higher weights to rare category samples to increase their learning importance, while lowering the weights of noise samples to reduce their interference with the model training process.

[0128] Based on this, by introducing the knowledge base of the target vertical field to train the entity relationship extraction model, the model is helped to reason with the help of external knowledge, thereby improving the model's ability to identify long-tail relationships, enhancing the model's semantic understanding ability, and improving the accuracy of the model's relationship extraction, so that the trained entity relationship extraction model can more accurately extract entity relationships from the target text and obtain the second entity relationship set.

[0129] In one embodiment, entity relationship extraction is performed on a target text using a trained entity relationship extraction model, including: inputting the target text into the trained entity relationship extraction model, performing entity relationship extraction on the target text through a first relationship extraction network in the entity relationship extraction model to obtain a third entity relationship set, and inputting the third entity relationship set and the target text into a second relationship extraction network in the entity relationship extraction model, performing entity relationship extraction on the target text by the second relationship extraction network in combination with the third entity relationship set to obtain a second entity relationship set.

[0130] Specifically, the target text to be identified is first input into a trained entity relationship extraction model, and entity relationships are extracted from the target text through the first relationship extraction network in the entity relationship extraction model to obtain a third entity relationship set. The first relationship extraction network can be the above-mentioned trained entity relationship extraction model or other entity relationship extraction models, and the embodiment of the present application does not limit this. Secondly, the third entity relationship set and the target text are input into the second relationship extraction network in the entity relationship extraction model, and the second relationship extraction network is combined with the third entity relationship set to extract entity relationships from the target text to obtain a second entity relationship set. Figure 6 A schematic diagram of a second entity relationship set provided in an embodiment of the present application is shown in FIG. Figure 6 As shown, it mainly consists of several entity-relationship pairs in the form of triples.

[0131] In one embodiment, inputting a third entity relationship set and a target text into a second relationship extraction network in an entity relationship extraction model includes: constructing graph data for the third entity relationship set and the target text, and inputting the graph data into the second relationship extraction network in the entity relationship extraction model. Constructing the graph data for the third entity relationship set and the target text includes: performing the following processing for each entity relationship group in the third entity relationship set: creating corresponding entity nodes for the entities in the entity relationship group, and representing the relationships in the entity relationship group as edges connecting the corresponding entity nodes; and, segmenting the target text into multiple text segments; creating a text segment node for each text segment, and connecting the text segment node to the relevant entity nodes via edges.

[0132] Specifically, the third entity relationship set and the target text are input into the second relationship extraction network of the entity relationship extraction model in the form of a structured graph. The specific implementation method for constructing the graph data using the third entity relationship set and the target text is as follows: First, an entity node is created for each entity in each entity relationship group in the third entity relationship set (e.g., "JX" and "stealth combat capability"). Node attributes include entity type (e.g., fighter jet, drone), name, and unique identifier. Second, a relationship within the entity relationship group (e.g., "has") is represented as an edge connecting two entity nodes. For example, the "JX" entity node is connected to the "stealth combat capability" entity node via the "has" edge. The target text is then processed in chunks, segmenting the target text into multiple text chunks based on logical units. For example, a long paragraph is split into several text chunks. Next, a node is created for each text chunk, with node attributes including content summary and source document. The text chunk node is connected to the entity node mentioned via edges. For example, if a text chunk node mentions "JX has stealth combat capability," the text chunk node is connected to the entity node "JX" and the entity node "stealth combat capability," respectively.

[0133] Exemplarily, the constructed graph data and the target text are input together into the second relation extraction network. First, the graph data can be encoded using a graph convolutional neural network, wherein the graph convolutional neural network has 2 layers, the hidden layer dimension is 256, and the activation function is RELU to generate embedded representations of nodes and edges. For example, the entity node embedding may contain semantic information and relation context.

[0134] The target text is encoded using a trained entity relationship extraction model, with a maximum sentence length of 128 and a hidden layer dimension of 768, to generate a context-sensitive text representation. Graph embedding is then combined with text encoding (e.g., concatenated or using an attention mechanism), allowing the model to extract relationships from both structured knowledge graphs and unstructured text, yielding a second set of entity relationships. This approach allows the model to leverage both local information (text blocks) and global knowledge (graph structure) in the target text, improving the accuracy and robustness of relationship extraction, particularly when processing complex text and long-tail relationships.

[0135] In this embodiment, knowledge augmentation and knowledge denoising technologies can be used to extract entities using the Open Information Extraction (OpenIE) tool, combining text-based and graph-based approaches, to obtain a second entity relationship set. Knowledge augmentation refers to a series of techniques that introduce additional knowledge during model training or application to improve model performance, generalization, and interpretability. This additional knowledge can be structured knowledge (such as knowledge graphs) or unstructured knowledge (such as text knowledge bases). Knowledge augmentation addresses the shortcomings of existing technologies in handling long-tail relationships and reasoning in vertical domains. Knowledge denoising addresses noise in data or knowledge to improve data and knowledge quality. Noise refers to erroneous, redundant, inconsistent, or misleading information. Knowledge denoising enhances the ability to filter out noisy samples, addressing the weak noise processing capabilities of existing technologies.

[0136] Among them, the open information extraction tool OpenIE is an unsupervised / weakly supervised information extraction technology that aims to automatically extract triples (such as "J-XX fighter jet, with stealth combat capability") from unstructured text without pre-defining relationship types or domain knowledge.

[0137] Specifically, OpenIE's Text-Based Extraction involves using OpenIE to extract entities and relationships from the original text (e.g., "At the XX Air Show, the J-XX fighter jet demonstrated its stealth combat capability"), forming preliminary triples (e.g., "J-XX fighter jet, demonstrated, stealth combat capability"). Graph-Based Integration involves importing the entities and relationships generated by OpenIE into the knowledge graph. Specifically, this involves: 1. Node Creation: If the entity (e.g., "J-XX fighter jet") does not exist in the graph, a new node is created and associated with attributes (e.g., "Type: fighter jet"). 2. Edge Update: If the relationship (e.g., "possess, stealth combat capability") already exists, its weight or attributes are updated; if not, a new edge is added. Finally, the text data is combined with the derived graph structure to generate synthetic training samples for model training. For example, the original text reads: "The Yun-XX transport aircraft demonstrated long-range delivery." The graph knowledge states: "The Yun-XX transport aircraft" and "Z-XX helicopter" have a "support transport" relationship. The synthetic sample then reads: "The Yun-XX transport aircraft supported the Z-XX helicopter's tactical deployment through long-range delivery."

[0138] Through OpenIE's Text_Based extraction and Graph_Based integration, the transformation from unstructured text to structured knowledge is achieved (for example, converting "electronic warfare system coordinated with drones" into "electronic warfare system, collaboration, drones" in the graph), dynamic expansion of domain knowledge (such as the timely inclusion of new equipment in the military field), and improved model generalization capabilities (enhancing the learning effect of long-tail relationships through synthetic samples). The above method is suitable for specific professional fields such as the military, which retains the flexibility of text processing and strengthens the semantic reasoning ability of the model with the help of the graph structure.

[0139] In the embodiment described in step 403 above, a first relation extraction network (large model initial extraction) is used to perform preliminary entity relation extraction on the target text, generating a third entity relation set. This is then followed by a second relation extraction network (distantly supervised refinement extraction) to perform refined extraction on the target text, generating a second entity relation set. This two-stage cascaded optimization approach complements each other, improving the robustness of the entity relation extraction results and the model's ability to learn long-tail relations. Furthermore, the construction of graph data provides a visual path for relation extraction, facilitating manual verification and model tuning.

[0140] Step 404: Use the knowledge base to perform correction processing on the second entity relationship set to obtain a fourth entity relationship set.

[0141] In one embodiment, the second entity relationship set is corrected using the knowledge base to obtain the fourth entity relationship set. The specific implementation method is: for each group of entity relationships in the second entity relationship set, the following processing is performed: from the entity set in the knowledge base of the target vertical field, the target entity that meets the semantic consistency condition with the entity in the entity relationship, and from the relationship set in the knowledge base of the target vertical field, the target relationship that meets the semantic consistency condition with the relationship in the entity relationship; when the target entity is found, the entity in the entity relationship is modified to the target entity; and / or, when the target relationship is found, the relationship in the entity relationship is modified to the target relationship.

[0142] Specifically, the following processing is performed for each group of entity relationships in the second entity relationship set: based on the entities and relationships in the entity relationship, the target entities and target relationships that meet the semantic consistency with the entities and relationships in the above entity relationship are searched from the entity set and relationship set of the knowledge base in the target vertical field. Herein, meeting the semantic consistency means that the semantic similarity is greater than the set threshold. Specifically, the semantic similarity between the entity in the above entity relationship and each entity in the entity set of the knowledge base is calculated, and the entities in the knowledge base with the semantic similarity greater than the set threshold are used as target entities, and then the target entities are used to replace the entities in the group of entity relationships. Similarly, the semantic similarity between the relationships in the above entity relationship and each relationship in the relationship set of the knowledge base is calculated, and the relationships in the knowledge base with the semantic similarity greater than the set threshold are used as target relationships, and then the target relationships are used to replace the relationships in the group of entity relationships. In addition, if no entities and relationships that meet the semantic consistency can be found from the entity set and relationship set of the knowledge base, no additional processing is performed.

[0143] This processing method calculates the semantic similarity between entities / relationships and elements in the knowledge base, and replaces any ambiguous expressions, synonyms, or non-standardized terms in the entity relationship with standardized target entities / relationships in the knowledge base, thereby making the textual expressions of entities and / or relationships in the fourth entity relationship set more accurate and standardized.

[0144] For example, assuming the entity relationships in the second entity relationship set are: (XX Airborne Division, affiliated with, XX Pacific Fleet), then the knowledge base entity set is queried based on the entities (XX Airborne Division) and (XX Pacific Fleet), and the semantic similarity between each entity in the knowledge base entity set and the aforementioned entities is calculated. If the semantic similarity exceeds a set threshold, the corresponding entity in the knowledge base entity set is determined as the target entity. Similarly, based on the relationship (affiliated with) in the aforementioned entity relationship, the knowledge base relationship set is searched, and the semantic similarity between the aforementioned relationship and each relationship in the knowledge base relationship set is calculated. If the semantic similarity exceeds a set threshold, the corresponding relationship in the knowledge base relationship set is determined as the target relationship.

[0145] The above is merely an example. In addition, the second entity relationship set may be corrected using the knowledge base in other ways, which is not limited in the embodiments of the present application.

[0146] Step 405: Utilize the knowledge base of the target vertical field to filter out a target entity relationship set from the first entity relationship set and the fourth entity relationship set.

[0147] For a detailed description of step 405, see the Figure 1 Description of the relevant processes of the embodiment shown.

[0148] pass Figure 4 The relevant description of the illustrated embodiment significantly improves the accuracy and robustness of vertical field relationship extraction tasks by training the entity relationship extraction model through a comparative learning mechanism and an adaptive denoising mechanism, dynamically adjusting the weights of noise samples to reduce their interference with model training, constructing a knowledge graph, processing the target text in blocks, and a cascaded complementary relationship extraction network.

[0149] Figure 7 This is a flowchart of another embodiment of a vertical field relationship extraction method provided in an embodiment of the present application. Figure 7 The process shown in Figure 1 Based on the process shown in , this paper mainly describes how to perform joint screening based on the first entity relationship set and the fourth entity relationship set to obtain the final target entity relationship set, such as Figure 7 As shown, it mainly includes the following steps:

[0150] Step 701: Build a knowledge base in the target vertical field, where the knowledge base includes entity sets and relationship sets in the target vertical field.

[0151] Step 702: Combine the knowledge base of the target vertical field to extract entity relationships from the target text to obtain a first entity relationship set, and use the trained entity relationship extraction model to extract entity relationships from the target text to obtain a second entity relationship set, and use the knowledge base to correct the second entity relationship set to obtain a fourth entity relationship set.

[0152] For a detailed description of the above steps 701 and 702, please refer to the description of the relevant steps in the process of the embodiment shown above, which will not be repeated here.

[0153] In the technical solution of the embodiment of the present application, the first entity relationship set and the fourth entity relationship set can also be input into a trained entity relationship filtering model to retain valid entity relationships.

[0154] The above trained relation filtering model and Figure 7 The training method for the entity relationship extraction model in the illustrated embodiment is the same. In addition, other types of entity relationship filtering models can also be used, and the embodiments of the present application are not limited to this. The main function of the trained relationship filtering model is to distinguish between correct entity relationships and incorrect entity relationships (noise data), and filter out valid entity relationships.

[0155] In one embodiment, the first entity relationship set and the fourth entity relationship set are input into a trained entity relationship filtering model to obtain the first entity relationship set and the fourth entity relationship set that retain only valid entity relationships. Specifically, the first entity relationship set and the fourth entity relationship set are respectively input into the trained entity relationship filtering model, and the noisy data is filtered to retain only valid entity relationships, ultimately obtaining the processed first entity relationship set and the fourth entity relationship set as output by the model.

[0156] For example, the first entity relationship set contains the correct entity relationship (transport X, support, strategic transportation) and the noise entity relationship (pre-XX, provide, ammunition). At this time, the entity relationship filtering model can filter out the noise entity relationship (pre-XX, provide, ammunition) in the first entity relationship set and only retain the correct and valid entity relationship (transport X, support, strategic transportation).

[0157] The fourth entity relationship set is processed in the same manner as the first entity relationship set. In addition, the entity relationship filtering model can also perform deduplication processing on the entity relationships in the first entity relationship set and the fourth entity relationship set, and retain valid entity relationships.

[0158] Step 703: Perform the following processing for each group of entity relationships in the first entity relationship set and the fourth entity relationship set: determine a first degree of association between the entities in the entity relationship and the entity set in the knowledge base of the target vertical field; determine a second degree of association between the relationships in the entity relationship and the relationship set in the knowledge base of the target vertical field; and when both the first degree of association and the second degree of association are greater than or equal to a preset degree of association threshold, classify the entity relationship into the target entity relationship set.

[0159] The degree of association refers to the association between the entities or relationships in the candidate entity relationship set and the entities or relationships in the knowledge base of the vertical field, so as to determine whether the candidate entities in the current candidate entity relationship set conform to the technical terms of the entities in the target vertical field, and whether the candidate relationships in the current candidate entity relationship set conform to the technical terms of the relationships in the knowledge base of the target vertical field based on the above-mentioned degree of association.

[0160] In one embodiment, the following processing is performed for each group of entity relationships in the candidate entity relationship set: determining a first degree of association between the entities in the entity relationship and the entity set in the knowledge base of the target vertical field; determining a second degree of association between the relationships in the entity relationship and the relationship set in the knowledge base of the target vertical field; and classifying the entity relationship into the target entity relationship set when both the first degree of association and the second degree of association are greater than or equal to a preset degree of association threshold.

[0161] By comparing the correlations, valid entity relationships are screened out, invalid relationships are filtered out, and thematic relationships based on external knowledge bases are accurately extracted. This joint screening method not only improves the accuracy of relationship extraction, but also improves the field verticality of relationship extraction, realizing the advantages of joint screening technology. The specific implementation method of screening out valid relationships by comparing the correlations is as follows: a first group of entity relationships is selected from the candidate entity relationship set, a first correlation between the entities in the entity relationship and all entities in the entity set in the knowledge base of the target vertical field is determined, and then a second correlation between the relationships in the entity relationship and all relationships in the relationship set in the knowledge base of the target vertical field is determined. If both the first correlation and the second correlation are greater than or equal to the preset correlation threshold, the entity relationship is included in the target entity relationship set, and the other entity relationships in the candidate entity relationship set are screened and processed in turn.

[0162] For example, the semantic similarities between the entities in a set of entity relationships (Transport, Support, Strategic Transport) and all entities in the entity set in the target vertical domain knowledge base are determined, and the semantic similarity with the highest value is selected as the first degree of association. If the set of entity relationships includes two entities, the average of the semantic similarities with the highest values corresponding to the two selected entities can be calculated, and the calculated average value is used as the first degree of association between the entities in the set of entity relationships and the target vertical domain knowledge base. Next, the semantic similarities between the relationships in the entity relationship (Transport, Support, Strategic Transport) and all relationships in the relationship set in the target vertical domain knowledge base are determined, and the semantic similarity with the highest value is used as the second degree of association. If both the first and second degrees of association are greater than or equal to a preset degree of association threshold, the entity relationship is included in the target entity relationship set, ultimately obtaining the target entity relationship set.

[0163] In addition, by using the knowledge base of the target vertical field, after screening out the target entity relationship set from the first entity relationship set and the fourth entity relationship set, the health management mechanism in the knowledge base management unit will automatically mark some entity relationships that are considered to be "outdated" or "wrong" and feed them back to the knowledge base management unit. The knowledge base management unit triggers the automatic update mechanism to update and repair the current knowledge base.

[0164] pass Figure 7The relevant description of the illustrated embodiment is that the first entity relationship set and the fourth entity relationship set are subjected to entity relationship filtering, and then the final target entity relationship set is screened from the filtered and corrected first entity relationship set and the fourth entity relationship set in combination with the knowledge base of the target vertical field. This joint screening mechanism combined with the knowledge base of the target vertical field jointly screens the results of the preliminary extraction of the large language model and the results of the trained entity relationship extraction model to filter out noise, significantly improving the accuracy and domain verticality of the entity relationship extraction results.

[0165] In addition, the embodiment of the present application also provides an automatic update mechanism and health management mechanism for the vertical field knowledge base, which mainly updates and manages the vertical field knowledge base by updating decision parameters and health scores, as follows:

[0166] In one embodiment, when a set knowledge base update time is reached, an update decision parameter of the knowledge base in the current target vertical field is determined; if the update decision parameter is greater than or equal to a preset update threshold, the knowledge base in the target vertical field is updated; wherein the update decision parameter of the knowledge base in the current target vertical field is calculated and determined by the following formula:

[0167] .........Formula (4)

[0168] in, represents the knowledge base learning rate, represents the update decision parameters, represents the activation function, S represents the similarity score, W represents the weight coefficient, R represents the relevance score, and E represents the complexity. Represents the adjustment factor.

[0169] For example, S represents a similarity score, which is used to measure the similarity between the extracted triples and the existing triples in the knowledge base, that is, the similarity between the extracted target entity relationship set and the entity relationship set of the knowledge base in the target vertical field, and is automatically calculated through an algorithm or model. R represents a relevance score, which is used to evaluate the value of new information to the knowledge base and is automatically calculated through an algorithm, such as information entropy, field relevance, etc. Parameters such as the knowledge base learning rate, adjustment factor, and weight coefficient are manually set by experts or knowledgeable people in specific fields. These parameters can be manually adjusted dynamically to adapt to the update needs of knowledge bases in different fields.

[0170] By combining the similarity score and the relevance score of new information to automatically update the knowledge base of the target vertical field, multi-factor integration is considered. During the relationship extraction process, when the newly extracted indication cannot find the corresponding entity in the target vertical field knowledge base, the knowledge base is flexibly updated to optimize the management of the knowledge base and improve the performance of relationship extraction.

[0171] The above-mentioned automatic knowledge base update mechanism improves the dynamic adaptability of the vertical field knowledge base, solves the long-tail entity problem, and can effectively deal with rare entities unique to vertical fields (such as "infrared-guided missiles" in the military field). The introduction of learning rate and adjustment factor can avoid frequent invalid updates or excessive conservatism, and balance the update frequency and stability of the knowledge base. At the same time, parameters such as weight coefficients are set by expert experience to ensure the authority of domain knowledge. For example, in the military field knowledge base, core relationships such as "strategic coordination" can be given higher weights, and related entities can be updated first.

[0172] The embodiment of the present application also provides a health management mechanism for a vertical field knowledge base, which can further determine whether to update the knowledge base of the current target vertical field by calculating the health score of the knowledge base of the current target vertical field and comparing the relationship between the health score and the preset health score threshold; specifically, if the calculated health score threshold is less than the preset health score threshold, it is determined not to update the knowledge base, and if the calculated health score threshold is greater than or equal to the preset health score threshold, it is determined to update the knowledge base. The health score of the knowledge base of the current target vertical field is calculated and determined by the following formula:

[0173] .........Formula (5)

[0174] Among them, H represents the health score, Q represents the quality index, Represents the overall indicator, C represents the normalization factor, which is used to ensure that the health score is within a reasonable value range. represents the weight coefficient of the quality index, Indicates the weight coefficient of the overall indicator.

[0175] For example, through manual or algorithmic testing, we collect quality metrics (such as entity error rate) and overall metrics (such as the number of entity-relationship triples) of the knowledge base. This is then combined with user feedback (such as query failure rate and user error correction records) to enrich the evaluation dimensions. By weighting these quality and overall metrics, we improve the accuracy of manual evaluations of knowledge base quality. By combining user feedback, we can determine the quality of the knowledge base in the current target vertical. If the health score is low, we can update the knowledge base, thereby improving the accuracy and credibility of the model during the relationship extraction process.

[0176] The knowledge base health management mechanism in the above-mentioned vertical fields comprehensively considers quality indicators and scale indicators to conduct quantitative quality assessments. Regular health assessments (for example, once a month) can promptly detect knowledge base aging problems, trigger manual review updates, and enable the knowledge base to have continuous optimization capabilities. Setting health score thresholds can detect potential problems in advance, giving the knowledge base a risk warning function. At the same time, multi-dimensional quality indicators are considered to ensure the comprehensiveness of the knowledge base quality. A high-quality knowledge base improves model performance.

[0177] These two mechanisms, through synergistic effects such as dynamic expansion, quality monitoring, and intelligent decision-making, build a sustainable evolutionary system for vertical domain knowledge bases. This provides reliable knowledge support for relationship extraction models, demonstrating significant advantages particularly in specialized fields such as the military. The automatic update mechanism dynamically expands the knowledge base boundaries, while the health management mechanism ensures internal quality, forming a closed loop of "expansion-verification-optimization." For example, after new equipment information is automatically updated to the knowledge base, the health management module verifies its logical consistency with existing knowledge. The synergistic effect of these two mechanisms enhances domain adaptability, reduces the need for manual intervention, and lowers maintenance costs.

[0178] Figure 8 This is a module diagram of an embodiment of a vertical field relationship extraction method provided in an embodiment of the present application, such as Figure 8 As shown in the figure, it mainly includes four modules: large model, remote supervision, joint comparison and screening, and knowledge base management module.

[0179] See also Figure 8 As shown, the embodiment of the present application can use the large model of module one to extract relationships to obtain relationship extraction Version 1, then use the remote supervision of module two to extract relationships to obtain relationship extraction Version 2, and finally use module three to perform a joint comparison and screening of the extracted relationship extraction Version 1 and relationship extraction Version 2 to obtain the final target relationship extraction result. The knowledge base management module of module four combines the automatic update mechanism and the health management mechanism to provide real-time feedback and automatic updates of the knowledge base content, ensuring the quality and accuracy of the content stored in the knowledge base, so that the knowledge base can provide reliable and high-quality data support for the system at any time.

[0180] Module 1 uses pre-built vertical domain prompts (relationship extraction model prompts) and is interconnected with Module 4's knowledge base management module. This adds the vertical domain external knowledge base to Module 4 to address domain-specific issues. Inputting the pre-built vertical domain external knowledge base into the large language model as prompts enables the large language model to reason based on existing knowledge, deriving potential entity relationships and helping the model address long-tail relationships. By pre-building the relationship extraction model prompts, the model can integrate external knowledge from the vertical domain to achieve more accurate relationship extraction (Version 1).

[0181] The distant supervision module combines sentence encoding and representation, joint denoising, and knowledge enhancement to achieve the final relation extraction version 2. First, the sentence encoding and representation step encodes the input sentence using a pretrained language model (such as the BERT model or the RoBERT model) to generate a contextual vector representation of the sentence. Then, the joint denoising step uses contrastive learning to denoise and construct positive and negative samples, improving the model's ability to discriminate against noisy labels. Adaptive noise filtering and dynamic threshold setting are also employed to adjust the threshold for association strength based on the co-occurrence frequency between entities to exclude occasional but irrelevant relationships. The pretrained large language model is trained through the joint denoising step, enabling the trained large language model to effectively filter out noisy samples. Finally, the knowledge enhancement step uses Open Information Extraction (OpenIE) to obtain business entities and relationships. These business entities and relationships are mapped to corresponding nodes in the graph result to generate a structured knowledge graph. This structured knowledge graph is then combined with text data to create synthetic samples, which are input into the trained large language model. This simulates real-world scenarios that are less common in the dataset, resulting in more accurate relation extraction results. Combined with the above-mentioned knowledge denoising and knowledge enhancement steps, entity relationship extraction is performed on the sentences input into the trained large language model. In addition, the knowledge base management module of the joint module four corrects the entity relationship extraction results to obtain a more accurate relationship extraction Version 2.

[0182] Specifically, the health management mechanism of the knowledge base management module in module four monitors the quality of the entity relationship extraction results of module two's remote supervision and provides real-time feedback. It also corrects the entity relationship extraction results of module two. After receiving feedback from the health management mechanism, the knowledge base management module in module four triggers an automatic update mechanism to update and repair the current knowledge base, forming a closed-loop management system to ensure the timeliness and high quality of the vertical domain knowledge base.

[0183] Module 3's joint comparative screening calculates the similarity between Relationship Extraction Version 1 and Relationship Extraction Version 2 and a pre-built external knowledge base in a specific vertical domain, performing comparative screening to retain the most accurate entity relationships, i.e., the target relationship extraction results. Simultaneously, Module 4's Knowledge Base Management Module automatically annotates outdated or erroneous entity relationships and updates and repairs the knowledge base.

[0184] The knowledge base management module of the embodiment of the present application includes an automatic update mechanism and a knowledge base health management mechanism. Among them, the knowledge base automatic update mechanism can solve the problem of failing to find relevant entities in the external knowledge base during triple knowledge extraction by regularly automatically updating the external knowledge base in the vertical field. The knowledge base health management mechanism can evaluate the quality of the knowledge base through manual inspection and regularly score its health, thereby ensuring the quality of the external knowledge base in the vertical field and thus ensuring the accuracy and efficiency of entity relationship extraction.

[0185] Figure 9 A schematic diagram of a vertical domain relationship extraction device provided in an embodiment of the present application is shown as follows: Figure 9 As shown, it mainly includes:

[0186] A vertical domain knowledge base construction module 901 is used to construct a knowledge base in a target vertical domain, wherein the knowledge base includes entity sets and relationship sets in the target vertical domain;

[0187] Entity relationship extraction module 902 is used to extract entity relationships from the target text in combination with the knowledge base of the target vertical field to obtain a first entity relationship set, and to extract entity relationships from the target text using a trained entity relationship extraction model to obtain a second entity relationship set, and to correct the second entity relationship set using the knowledge base to obtain a fourth entity relationship set;

[0188] The target entity relationship set screening module 903 is configured to screen a target entity relationship set from the first entity relationship set and the fourth entity relationship set entity relationship set by utilizing the knowledge base of the target vertical field.

[0189] In one possible implementation, the entity relationship extraction module 902 includes:

[0190] A prompt word construction unit, configured to construct prompt words using the knowledge base of the target vertical field and the target text;

[0191] The first entity relationship set output unit is used to input the prompt word into the large language model to obtain the first entity relationship set output by the large language model.

[0192] In one possible implementation, the entity relationship extraction module 902 includes:

[0193] The second entity relationship acquisition unit is used to input the target text into a trained entity relationship extraction model, perform entity relationship extraction on the target text through the first relationship extraction network in the entity relationship extraction model to obtain a third entity relationship set, and input the third entity relationship set and the target text into the second relationship extraction network in the entity relationship extraction model, and perform entity relationship extraction on the target text by the second relationship extraction network in combination with the third entity relationship set to obtain a second entity relationship set.

[0194] In a possible implementation manner, the second entity relationship acquisition unit is specifically configured to:

[0195] Constructing graph data for the third entity relationship set and the target text, and inputting the graph data into a second relationship extraction network in the entity relationship extraction model;

[0196] The step of constructing graph data for the third entity relationship set and the target text includes:

[0197] The following processing is performed for each entity relationship group in the third entity relationship set:

[0198] Creating corresponding entity nodes for entities in the entity relationship group, and representing relationships in the entity relationship group as edges connecting the corresponding entity nodes;

[0199] Furthermore, the target text is divided into blocks to obtain a plurality of text blocks; a text block node is created for each of the text blocks, and the text block node is connected to the relevant entity node through an edge.

[0200] In one possible implementation, the entity relationship extraction model is trained in the following manner:

[0201] Obtaining a training sample set, wherein the training sample set includes a plurality of positive training samples and negative training samples, wherein the positive training samples include correctly labeled entity relationship groups, and the negative training samples include incorrectly labeled entity relationship groups;

[0202] Inputting the training sample set into a pre-training model, and initializing the model by the pre-training model based on a contrastive learning mechanism;

[0203] Iteratively training the initialized pre-trained model using the training sample set until it is determined that the set model convergence conditions are met, thereby obtaining a trained entity relationship extraction model;

[0204] In each round of iterative training, the loss value of each training sample is determined, the weight of the training sample is adjusted according to the adaptive noise filtering strategy, and the parameters of the current model are updated according to the weighted loss value.

[0205] In a possible implementation, the entity relationship extraction module 902 is specifically configured to:

[0206] The following processing is performed for each set of entity relationships in the second entity relationship set:

[0207] Searching for a target entity that satisfies a semantic consistency condition with an entity in the entity relationship from an entity set in the knowledge base of the target vertical field, and searching for a target relationship that satisfies a semantic consistency condition with a relationship in the entity relationship from a relationship set in the knowledge base of the target vertical field;

[0208] When the target entity is found, the entity in the entity relationship is modified to the target entity; and / or when the target relationship is found, the relationship in the entity relationship is modified to the target relationship.

[0209] In a possible implementation, the target entity relationship set screening module 903 is specifically configured to:

[0210] The following processing is performed for each set of entity relationships in the candidate entity relationship set:

[0211] Determining a first degree of association between an entity in the entity relationship and an entity set in a knowledge base of the target vertical field;

[0212] Determining a second degree of association between a relationship in the entity relationship and a relationship set in a knowledge base of the target vertical domain;

[0213] When both the first degree of association and the second degree of association are greater than or equal to a preset degree of association threshold, the entity relationship is included in a target entity relationship set.

[0214] In one possible implementation, the vertical domain knowledge base construction module 901 is specifically configured to:

[0215] Inputting a preset entity set, a preset relationship set, and a document set in the target vertical field into a trained entity relationship recognition model, so that the entity relationship recognition model recognizes entities and relationships in the target vertical field from the document set based on the preset entity set and the preset relationship set;

[0216] The entities and relationships identified by the entity relationship recognition model are respectively classified into the preset entity set and the preset relationship set to obtain the knowledge base of the target vertical field.

[0217] In a possible implementation, after building the knowledge base of the target vertical field, the method further includes:

[0218] When the set knowledge base update time is reached, determine the update decision parameters of the knowledge base in the current target vertical field;

[0219] When the update decision parameter is greater than or equal to a preset update threshold, updating the knowledge base of the target vertical field;

[0220] The update decision parameters of the knowledge base in the current target vertical field are calculated and determined by the following formula:

[0221]

[0222] in, represents the knowledge base learning rate, represents the update decision parameters, represents the activation function, S represents the similarity score, W represents the weight coefficient, R represents the relevance score, and E represents the complexity. Represents the adjustment factor.

[0223] like Figure 10 As shown, an embodiment of the present application provides an electronic device, including a processor 111, a communication interface 112, a memory 113 and a communication bus 114, wherein the processor 111, the communication interface 112, and the memory 113 communicate with each other through the communication bus 114.

[0224] Memory 113, for storing computer programs;

[0225] Constructing a knowledge base in a target vertical field, wherein the knowledge base includes an entity set and a relationship set in the target vertical field;

[0226] In combination with the knowledge base of the target vertical field, entity relationship extraction is performed on the target text to obtain a first entity relationship set, and entity relationship extraction is performed on the target text using a trained entity relationship extraction model to obtain a second entity relationship set;

[0227] Constructing a candidate entity relationship set using the first entity relationship set and the second entity relationship set;

[0228] The target entity relationship set is screened out from the candidate entity relationship set by utilizing the knowledge base of the target vertical field.

[0229] In one embodiment of the present application, the processor 111 is configured to execute a program stored in the memory 113 to implement the vertical domain relationship extraction method provided by any of the aforementioned method embodiments, including:

[0230] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the vertical field relationship extraction method provided in any of the aforementioned method embodiments are implemented.

[0231] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment.

[0232] Through the description of the above embodiments, those skilled in the art will clearly understand that each embodiment can be implemented using software plus a general hardware platform, or of course, hardware. Based on this understanding, the essence of the above technical solution, or the portion that contributes to the relevant technology, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, or an optical disk, and includes a number of instructions for causing a computer device (such as a personal computer, server, or network device) to execute the methods described in each embodiment or certain portions of the embodiments.

[0233] It should be understood that the terms used herein are for the purpose of describing specific example embodiments only and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "comprise", "include", "contain" and "have" are inclusive and therefore specify the presence of stated features, steps, operations, elements and / or parts, but do not exclude the presence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not to be construed as necessarily requiring them to be performed in the specific order described or illustrated, unless the order of execution is clearly indicated. It should also be understood that additional or alternative steps may be used.

[0234] The foregoing is merely a list of specific embodiments of the present application, intended to enable those skilled in the art to understand or implement the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but is intended to conform to the broadest scope consistent with the principles and novel features of the present application.

Claims

1. A vertical domain relationship extraction method, characterized in that: The method comprises: Constructing a knowledge base in a target vertical field, wherein the knowledge base includes an entity set and a relationship set in the target vertical field; In combination with the knowledge base of the target vertical field, entity relationship extraction is performed on the target text to obtain a first entity relationship set, including: using the knowledge base of the target vertical field and the target text to construct prompt words; inputting the prompt words into a large language model to obtain a first entity relationship set output by the large language model, and using a trained entity relationship extraction model to perform entity relationship extraction on the target text to obtain a second entity relationship set, including: inputting the target text into a trained entity relationship extraction model, performing entity relationship extraction on the target text through a first relationship extraction network in the entity relationship extraction model to obtain a third entity relationship set, and inputting the third entity relationship set and the target text into a second relationship extraction network in the entity relationship extraction model, and Taking the network in combination with the third entity relationship set to extract entity relationships from the target text to obtain a second entity relationship set, and using the knowledge base to perform correction processing on the second entity relationship set to obtain a fourth entity relationship set, including: performing the following processing on each group of entity relationships in the second entity relationship set: searching for target entities that meet semantic consistency conditions with entities in entity relationships from the entity set in the knowledge base of the target vertical field, and searching for target relationships that meet semantic consistency conditions with relationships in entity relationships from the relationship set in the knowledge base of the target vertical field; in case of finding the target entity, modifying the entity in the entity relationship to the target entity; and / or, in case of finding the target relationship, modifying the relationship in the entity relationship to the target relationship; Utilizing the knowledge base of the target vertical field, a target entity relationship set is screened out from the first entity relationship set and the fourth entity relationship set, including: performing the following processing on each group of entity relationships in the first entity relationship set and the fourth entity relationship set: determining a first degree of association between the entities in the entity relationship and the entity set in the knowledge base of the target vertical field; determining a second degree of association between the relationships in the entity relationship and the relationship set in the knowledge base of the target vertical field; and when both the first degree of association and the second degree of association are greater than or equal to a preset degree of association threshold, classifying the entity relationship into the target entity relationship set.

2. The method according to claim 1, characterized in that The step of inputting the third entity relationship set and the target text into the second relationship extraction network in the entity relationship extraction model comprises: Constructing graph data for the third entity relationship set and the target text, and inputting the graph data into a second relationship extraction network in the entity relationship extraction model; The step of constructing graph data for the third entity relationship set and the target text includes: The following processing is performed for each entity relationship group in the third entity relationship set: Creating corresponding entity nodes for entities in the entity relationship group, and representing relationships in the entity relationship group as edges connecting the corresponding entity nodes; Furthermore, the target text is divided into blocks to obtain a plurality of text blocks; a text block node is created for each of the text blocks, and the text block node is connected to the relevant entity node through an edge.

3. The method according to claim 1, characterized in that The entity relationship extraction model is trained in the following way: Obtaining a training sample set, wherein the training sample set includes a plurality of positive training samples and negative training samples, wherein the positive training samples include correctly labeled entity relationship groups, and the negative training samples include incorrectly labeled entity relationship groups; Inputting the training sample set into a pre-training model, and initializing the model by the pre-training model based on a contrastive learning mechanism; Iteratively training the initialized pre-trained model using the training sample set until it is determined that the set model convergence conditions are met, thereby obtaining a trained entity relationship extraction model; In each round of iterative training, the loss value of each training sample is determined, the weight of the training sample is adjusted according to the adaptive noise filtering strategy, and the parameters of the current model are updated according to the weighted loss value.

4. The method according to claim 1, wherein The construction of the knowledge base in the target vertical field includes: Inputting a preset entity set, a preset relationship set, and a document set in the target vertical field into a trained entity relationship recognition model, so that the entity relationship recognition model recognizes entities and relationships in the target vertical field from the document set based on the preset entity set and the preset relationship set; The entities and relationships identified by the entity relationship recognition model are respectively classified into the preset entity set and the preset relationship set to obtain the knowledge base of the target vertical field.

5. The method according to claim 1, wherein After building the knowledge base of the target vertical field, the following steps are also included: When the set knowledge base update time is reached, determine the update decision parameters of the knowledge base in the current target vertical field; When the update decision parameter is greater than or equal to a preset update threshold, updating the knowledge base of the target vertical field; The update decision parameters of the knowledge base in the current target vertical field are calculated and determined by the following formula: in, represents the knowledge base learning rate, represents the update decision parameters, represents the activation function, S represents the similarity score, W represents the weight coefficient, R represents the relevance score, and E represents the complexity. Represents the adjustment factor.

6. A vertical domain relationship extraction device, characterized in that: The device comprises: A vertical domain knowledge base construction module is used to construct a knowledge base of a target vertical domain, wherein the knowledge base includes entity sets and relationship sets within the target vertical domain; The entity relationship extraction module is used to extract entity relationships from the target text in combination with the knowledge base of the target vertical field to obtain a first entity relationship set, including: using the knowledge base of the target vertical field and the target text to construct prompt words; inputting the prompt words into a large language model to obtain a first entity relationship set output by the large language model, and using a trained entity relationship extraction model to extract entity relationships from the target text to obtain a second entity relationship set, including: inputting the target text into a trained entity relationship extraction model, extracting entity relationships from the target text through a first relationship extraction network in the entity relationship extraction model to obtain a third entity relationship set, and inputting the third entity relationship set and the target text into a second relationship extraction network in the entity relationship extraction model, by which The second relationship extraction network extracts entity relationships from the target text in combination with the third entity relationship set to obtain a second entity relationship set, and uses the knowledge base to perform correction processing on the second entity relationship set to obtain a fourth entity relationship set, including: performing the following processing on each group of entity relationships in the second entity relationship set: searching for target entities that meet semantic consistency conditions with entities in entity relationships from the entity set in the knowledge base of the target vertical field, and searching for target relationships that meet semantic consistency conditions with relationships in entity relationships from the relationship set in the knowledge base of the target vertical field; when the target entity is found, modifying the entity in the entity relationship to the target entity; and / or, when the target relationship is found, modifying the relationship in the entity relationship to the target relationship; A target entity relationship set screening module is used to use the knowledge base of the target vertical field to screen out a target entity relationship set from the first entity relationship set and the fourth entity relationship set, including: performing the following processing for each group of entity relationships in the first entity relationship set and the fourth entity relationship set: determining a first degree of association between the entities in the entity relationship and the entity set in the knowledge base of the target vertical field; determining a second degree of association between the relationships in the entity relationship and the relationship set in the knowledge base of the target vertical field; and when both the first degree of association and the second degree of association are greater than or equal to a preset degree of association threshold, classifying the entity relationship into the target entity relationship set.

7. An electronic device, characterized in that: include: A processor and a memory, wherein the processor is used to execute a vertical field relationship extraction program stored in the memory to implement the vertical field relationship extraction method according to any one of claims 1 to 5.

8. A storage medium, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the vertical field relationship extraction method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Entity relation joint extraction method and system oriented to vertical field

    CN117633247A

  • Intelligent robot prototype aided design method based on knowledge graph

    CN119442531A