Ship entity relation extraction method based on large model

Through the ship entity relationship extraction method based on the big model, special markers and natural language prompt words are used, combined with the ship domain feature filtering rules, the complexity of entity relationship extraction and labeled data requirements are solved, and efficient and accurate entity relationship extraction is achieved.

CN120296176APending Publication Date: 2025-07-11CHINA ACADEMY OF SPACE TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510205148.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-24
Publication Date
2025-07-11

Smart Images

  • Figure CN120296176A_ABST
    Figure CN120296176A_ABST
Patent Text Reader

Abstract

The invention relates to a ship entity relationship extraction method based on a large model. The ship entity relationship extraction method comprises the following steps: performing special marking on identified entities in an input text; all the large models with the special mark symbols are prompted to be entities; constructing a natural language cue word according to the to-be-extracted relationship type; the model returns a result through a filling [MASK] method based on the cue word; making a filtering rule based on the ship domain characteristics and the relation type; and according to a rule filtering model return result, obtaining a final entity relationship. According to the method, the proper natural language cue words are constructed according to the features and the relationship types of the ship field, construction of a large amount of complex field features and Chinese features is avoided, a large amount of annotation data is not needed, the problem that the ship field lacks large-scale annotation data is solved, and entity relationship extraction of the ship field is efficiently achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of natural language processing, and particularly relates to a method for extracting ship entity relationships based on a large model. Background Art

[0002] In today's digital age, knowledge graphs, as a powerful tool for knowledge representation and management, play a crucial role in many fields. For the ship field, constructing an accurate and comprehensive knowledge graph can effectively integrate a vast amount of ship-related information and provide strong support for scientific research, ship maintenance, and many other aspects. In the process of constructing a knowledge graph for the ship field, entity relationship extraction is a crucial link, which directly determines the quality and application value of the knowledge graph.

[0003] Traditional methods for extracting ship entity relationships mainly rely on constructing complex language and domain knowledge features. These methods require in-depth analysis and refinement of language structures, semantic rules, and professional knowledge in the ship field to design a series of fine-grained feature sets. However, this process not only requires profound linguistic and domain expertise but is also extremely time-consuming and laborious. At the same time, to train models based on these features, strict and large amounts of labeled data are indispensable. The acquisition of labeled data requires professionals to spend a lot of time and effort on manual annotation, which is not only costly but also difficult to ensure the consistency and accuracy of annotation. Once the labeled data is biased or incomplete, it will directly affect the performance of the model and the accuracy of relationship extraction.

[0004] Currently, there is a lack of a general entity relationship extraction method based on a large model for the Chinese ship field. Summary of the Invention

[0005] In view of the above technical problems, the present invention proposes a method for extracting ship entity relationships based on a large model, which can efficiently and accurately extract the relationships between ship entities, avoid constructing complex language and domain knowledge features, and also do not require a large amount of labeled data, effectively improving the efficiency of Chinese ship entity relationship extraction.

[0006] To achieve the object of the present invention, the present invention provides a method for extracting ship entity relationships based on a large model, including the following steps:

[0007] Step S1, specially mark the entities identified in the input text;

[0008] Step S2, prompt the large model that those with special marking symbols are all entities;

[0009] Step S3, construct natural language prompt words according to the relationship type to be extracted;

[0010] Step S4: The model returns the result by filling the [MASK] method based on the prompt words;

[0011] Step S5: Formulate filtering rules based on the characteristics of the ship domain and the relationship types;

[0012] Step S6: Filter the results returned by the model according to the rules to obtain the final entity relationship.

[0013] According to a technical solution of the present invention, in the step S1, the special mark is to add a specific symbol or label after the entity, including at least one of "Org", "Ship", "Weapon".

[0014] According to a technical solution of the present invention, in the step S2, the model is clearly informed through the prompt language that the text with the marked symbol is the entity for which the relationship is to be extracted.

[0015] According to a technical solution of the present invention, in the step S3, different prompt words are constructed for different entity types and relationship types.

[0016] According to a technical solution of the present invention, in the step S4, the model predicts the relationship between entities by filling the [MASK] in the prompt words.

[0017] According to a technical solution of the present invention, in the step S5, the rules include entity type matching conditions.

[0018] According to a technical solution of the present invention, in the step S6, the results returned by the model are matched with the rules, and the entity relationships that meet the rules are retained, while the relationships that do not meet or are incorrect are excluded.

[0019] According to a technical solution of the present invention, it is applicable to Chinese ship domain texts and does not require relying on a large amount of labeled data.

[0020] Compared with the prior art, the present invention has the following beneficial effects:

[0021] According to the concept of the present invention, a method for extracting ship entity relationships based on a large model is proposed. First, special marks are made on the entities that have been identified in the data source; then, natural language prompt words (Prompts) for the relationship types to be extracted are constructed respectively; the prompt words (Prompts) are used to guide the model to output the relationships between entities; finally, the irrelevant or incorrect relationships are filtered out through the set rules to obtain the final relationships between entities. It is not necessary to construct complex features, and only need to construct corresponding natural language prompt words according to the domain characteristics of the ship and the types of relationships to be extracted to achieve the extraction of entity relationships; it is not necessary to perform a large amount of annotation on the source data, and only a small amount of annotation is required to achieve high-quality relationship extraction, avoiding wasting a lot of manpower. Description of the Drawings

[0022] Figure 1 A schematic diagram schematically shows a flow chart of a method for extracting ship entity relationships based on a large model according to an embodiment of the present invention;

[0023] Figure 2 A diagram schematically showing a physical special symbol marking diagram according to an embodiment of the present invention. DETAILED DESCRIPTION

[0024] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0025] The present invention will be described in detail below in conjunction with the accompanying drawings and specific embodiments. The embodiments cannot be described one by one here, but the embodiments of the present invention are not therefore limited to the following embodiments.

[0026] like Figure 1 and Figure 2 As shown, a method for extracting ship entity relationships based on a large model of the present invention comprises the following steps:

[0027] Step S1, specially marking the entities identified in the input text;

[0028] In order to accurately extract the relationship between entities, we first need to tell the big model which entities the model is concerned about. In step S1, the entities in the input text are marked with special symbols, such as Figure 2 As shown, in “The fixed-wing carrier-based aircraft that the Italian Navy plans to equip on the Cavour is the STOVL version of the F-35 fighter (JSF) developed under the leadership of the United States”, the symbols ‘Org’, ‘Ship’ and ‘Weapon’ are marked on ‘Italian Navy’, ‘Cavour’ and ‘STOVL version of the F-35 fighter (JSF)’ respectively.

[0029] By adding specific symbols or labels such as "Org", "Ship", "Weapon" and so on after the identified entities for special marking, we can accurately identify the entities of interest to the model, allowing the model to clearly know the objects to focus on when extracting relationships, laying the foundation for the subsequent accurate extraction of entity relationships.

[0030] Step S2, prompting that all the large models with special marking symbols are entities;

[0031] Based on the annotations in step S1, inform the large model that "entities with the identifiers 'Org','Ship', and 'Weapon' in the input are entities for which relationships are to be extracted."

[0032] Clearly inform the model through the prompt language that the text with the marked symbols is an entity for which the relationship is to be extracted, enabling the model to identify the entities in the input text, and then perform relationship extraction around these entities to improve the pertinence and accuracy of the extraction.

[0033] Step S3: Construct natural language prompt words according to the relationship types to be extracted;

[0034] According to the annotated entity types, construct natural language prompt words (Prompts). For the entity types 'Org' and 'Ship', the constructed Prompts are "The entity marked as 'Ship' is [MASK], belonging to [MASK]." For the entity types 'Ship' and 'Weapon', the constructed Prompts are "The entity marked as 'Ship' is [MASK], equipped with [MASK]."

[0035] Constructing differentiated prompt words for different entity types and relationship types can guide the model to more accurately extract the relationships between entities.

[0036] Step S4: The model returns the results by filling the [MASK] method based on the prompt words;

[0037] According to the Prompts constructed in step S3, "The entity marked as 'Ship' is [MASK], belonging to [MASK]." and "The entity marked as 'Ship' is [MASK], equipped with [MASK].", the results returned by the model are respectively "The name of the entity marked as Ship is the Cavour, belonging to the Italian Navy" and "The entity marked as 'Ship' is the Cavour, equipped with the STOVL version of the F-35 fighter."

[0038] The model predicts the relationships between entities by filling the [MASK] in the prompt words, utilizes the powerful text understanding and prediction capabilities of the large model, and outputs the possible relationships between entities based on the constructed prompt words, providing basic data for subsequent obtaining accurate entity relationships.

[0039] Step S5: Formulate filtering rules based on the characteristics of the ship domain and relationship types;

[0040] According to the characteristics of the ship domain and the relationship type characteristics, the rule formulated for the "belongs to" relationship is that "the types of Entity 1 and Entity 2 are 'Ship' and 'Org' respectively". The rule formulated for the "equipped with" relationship is that "the types of Entity 1 and Entity 2 are 'Ship' and 'Weapon' respectively", that is, the "belongs to" relationship needs to satisfy that the entity types are "Ship" and "Org", and the "equipped with" relationship needs to satisfy that the entity types are "Ship" and "Weapon".

[0041] Step S6: Filter the results returned by the rule filtering model to obtain the final entity relationship.

[0042] According to the rule for the "belongs to" relationship, "the types of Entity 1 and Entity 2 are 'Ship' and 'Org' respectively", judge the categories of 'Cavour' and 'Italian Navy' in the result obtained in Step S4, "The name marked as Ship is Cavour, which belongs to the Italian Navy". If the rule is satisfied, keep it; if not, discard it. According to the rule for the "equipped with" relationship, "the types of Entity 1 and Entity 2 are 'Ship' and 'Weapon' respectively", judge the categories of 'Cavour' and 'STOVL version of F-35 fighter' in the result obtained in Step S4, "The entity marked as 'Ship' is Cavour, equipped with the STOVL version of the F-35 fighter". If the rule is satisfied, keep it; if not, discard it. Thus, it can effectively improve the accuracy and reliability of the extraction results, remove the unreasonable or incorrect parts in the results returned by the model, and obtain a final entity relationship that more conforms to the actual situation.

[0043] Compared with the prior art, the present invention has the following advantages:

[0044]

[0045] In summary, the present invention proposes a method for extracting ship entity relationships based on a large model, including: Step S1, specially mark the entities identified in the input text; Step S2, prompt the large model that those with special marking symbols are all entities; Step S3, construct natural language prompt words according to the relationship type to be extracted; Step S4, the model returns results through the [MASK] filling method based on the prompt words; Step S5, formulate filtering rules based on the ship domain characteristics and relationship types; Step S6, filter the results returned by the model according to the rules to obtain the final entity relationship. For the characteristics of the ship domain and the relationship types, appropriate natural language prompt words are constructed, avoiding a large number of complex domain characteristics and Chinese characteristics construction, and not requiring a large amount of labeled data, overcoming the problem of the lack of large-scale labeled data in the ship domain, and efficiently realizing the extraction of ship domain entity relationships.

[0046] In addition, it should be noted that the present invention can be provided as a method, an apparatus, or a computer program product. Therefore, the embodiments of the present invention can take the form of an all-hardware embodiment, an all-software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments of the present invention can take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code.

[0047] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each flow and / or block in the flowchart and / or block diagram, as well as the combination of flows and / or blocks in the flowchart and / or block diagram, can be realized by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, an embedded processor, or other programmable data processing terminal devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing terminal devices generate a device for realizing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0048] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device realizes the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks. These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device, such that a series of operation steps are executed on the computer or other programmable terminal device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable terminal device provide steps for realizing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0049] It should also be noted that in this document, the terms "including", "comprising", or any other variant thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device including a series of elements not only includes those elements but also includes other elements not explicitly listed, or further includes elements inherent to such process, method, article, or terminal device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, method, article, or terminal device including the said element.

[0050] Finally, it should be noted that the above description is the preferred embodiment of the present invention. It should be pointed out that although the preferred embodiments of the present invention have been described, for those skilled in the art of this technology, once they know the basic creative concept of the present invention, without departing from the principle described in the present invention, several improvements and refinements can still be made, and these improvements and refinements should also be regarded as the protection scope of the present invention. Therefore, the appended claims are intended to be construed as including the preferred embodiments and all changes and modifications falling within the scope of the embodiments of the present invention.

Claims

1. A method for extracting ship entity relationships based on large models, comprising the following steps: Step S1: Special mark the entities identified in the input text; Step S2: Prompt the large model that the text with special marking symbols are all entities; Step S3: Construct natural language prompt words according to the relationship types to be extracted; Step S4: The model returns results through the [MASK] filling method based on the prompt words; Step S5: Formulate filtering rules based on ship domain characteristics and relationship types; Step S6: Filter the results returned by the model according to the rules to obtain the final entity relationships.

2. The method according to claim 1, characterized in that In the said Step S1, the special marking is adding specific symbols or labels after the entities, including at least one of "Org", "Ship", "Weapon".

3. The method according to claim 1, characterized in that, In the said Step S2, clearly inform the model through the prompt language that the text with marking symbols are the entities of the relationships to be extracted.

4. The method according to claim 1, wherein In the said Step S3, construct differentiated prompt words for different entity types and relationship types.

5. The method according to claim 1, wherein In the said Step S4, the model predicts the relationships between entities by filling the [MASK] in the prompt words.

6. The method according to claim 1, wherein In the said Step S5, the rules include entity type matching conditions.

7. The method according to claim 1, wherein In the said Step S6, perform rule matching on the results returned by the model, retain the entity relationships that meet the rules, and eliminate the relationships that do not meet or are incorrect.

8. The method according to claim 1, wherein It is applicable to Chinese ship domain texts and does not rely on large-scale labeled data.