A knowledge graph construction method and device for a ship power system design task
By constructing a knowledge graph for ship electrical systems, the problem of low efficiency for designers when querying standards and specifications is solved, and intelligent management of design knowledge and efficient information retrieval are realized, thereby improving the level of intelligence in the design process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HANGZHOU DIANZI UNIV
- Filing Date
- 2022-12-22
- Publication Date
- 2026-05-08
AI Technical Summary
During the design process of ship electrical systems, designers need to manually consult a large number of standards and specifications, resulting in low design efficiency, high error rates, and insufficient level of intelligence.
A knowledge graph for ship power systems is constructed. Through schema layer design, data preprocessing, entity and relation annotation, model training, entity and relation extraction, and graph fusion, a knowledge graph containing design tasks is formed, which improves information retrieval efficiency and user experience.
It effectively expresses the relationships between design knowledge, improves the intelligence level of the design process, reduces manual queries, and enhances design efficiency and accuracy.
Smart Images

Figure CN115905574B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent ship design, and in particular relates to a method and apparatus for constructing a knowledge graph for ship power system design tasks. Background Technology
[0002] In the design of marine electrical systems, designers need to develop customized design tasks based on different business requirements. However, marine electrical systems have numerous functional modules, such as power supply units, power distribution units, power grids, and power system protection, each involving diverse design knowledge. Furthermore, there are complex interrelationships between different design knowledge areas. Therefore, designers often need to manually consult numerous standards and specifications, and even seek remote technical support from domain experts, resulting in a time-consuming, inefficient, and error-prone design process that impacts progress. Thus, the level of intelligent design is urgently needed.
[0003] Currently, artificial intelligence (AI) technology has developed rapidly and has been applied maturely in many fields. Knowledge graphs, as a major branch of AI, have been widely used in search engines, intelligent recommendations, intelligent question answering, and other related fields. If knowledge graphs can be applied to the ship design stage, storing and representing diverse design knowledge in graph form to construct a knowledge graph for ship design, it is expected to improve the level of intelligence in ship design. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this invention proposes a knowledge graph construction method and apparatus for ship power system design tasks.
[0005] This invention can effectively model ship design knowledge and the relationships between knowledge, thereby providing support for designers to quickly obtain design tasks and related information in the field of ship electrical systems. By parsing the original unstructured data, a domain knowledge graph is constructed, improving information retrieval efficiency and user experience.
[0006] The specific technical solution of the present invention is as follows:
[0007] One aspect of the present invention provides a knowledge graph construction method for ship power system design tasks, comprising the following steps:
[0008] S1: Design and define the concepts of the ship's electrical system and the relationships between these concepts at the schema level;
[0009] S2: Perform data preprocessing on unstructured data in ship design manuals, design specifications, and design standards;
[0010] S3: Based on the concepts in the schema layer and the relationships between concepts, the entities and the relationships between entities are labeled to obtain the entity dataset and the entity relationship dataset;
[0011] S4: The labeled entity dataset and entity relationship dataset are trained using the ALBERT+bidirectional LSTM+CRF algorithm and the BERT+bidirectional GRU+Attention+FC algorithm, respectively, to obtain the entity recognition model and the entity relationship recognition model.
[0012] S5: Based on the obtained entity recognition model and entity relationship recognition model, triples are extracted and imported into the Neo4j graph database to form a conceptual knowledge graph of the ship's power system.
[0013] S6: Combining domain expert knowledge and the product structure of ship power systems, analyze the design business process, extract design tasks, and use Protege to perform hierarchical modeling to form a knowledge graph of ship power system design tasks.
[0014] S7: By entity alignment and disambiguation, the obtained ship power system concept knowledge graph and design task knowledge graph are integrated to form the final knowledge graph for ship power system design tasks.
[0015] Furthermore, the pattern layer design in step S1 is based on expert experience, defining the conceptual types of the ship's electrical system and the relationships between these concepts. It includes eight types of entities: functional components, component attributes, personnel, characteristics, contexts, measures, products, and locations; and ten types of entity relationships: Belong to, Trait of, Part of, Kind of, Condition of, Position of, Apply to, Infer to, Participate in, and Equivalent to.
[0016] Furthermore, in step S2, unstructured data such as ship design manuals, design specifications, and design standards are cleaned and converted into txt files.
[0017] Furthermore, the entity annotation in step S3 is based on the concepts defined in S1, and is annotated using the LabelStudio annotation tool. The data is exported as a CSV file and then converted into a BIO file using code. The entity relationship annotation is based on the conceptual relationships defined in S1 and is converted into a TXT file using code.
[0018] Furthermore, in step S5, triple extraction is a combination of entity extraction and relation extraction, resulting in triples in the form of <entity, relation, entity>. The triple data is then imported into the Neo4j graph database by first processing the triples into entity.csv and relationship.csv formats and importing them into the Neo4j graph database using the Neo4j-import method, thus forming a conceptual knowledge graph of the ship's power system.
[0019] Furthermore, step S6, the design business process, includes the design of radio communication and navigation systems, lighting systems, electric traction systems, electric propulsion systems, ship electrical systems, ship automation systems, and communication systems. After the ontology is built in Protege, it is imported into the Neo4j graph database to form a design task knowledge graph.
[0020] Another aspect of this invention provides a knowledge graph construction apparatus for ship electrical system design tasks, the apparatus including a processor; and a memory arranged to store computer-executable instructions, which, when executed, cause the processor to perform any of the knowledge graph construction methods described above.
[0021] The beneficial effects of this invention are as follows:
[0022] (1) Compared with traditional plain text data, knowledge graphs can more effectively express the relationships between ship power system design knowledge. At the same time, they facilitate the structured management of data and provide support for the intelligent application of design knowledge in the future.
[0023] (2) The knowledge graph in this invention not only includes traditional ship design concept knowledge, but also design tasks, which is closer to the actual needs of designers. Attached Figure Description
[0024] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the embodiments will be briefly described below. Referring to the accompanying drawings will provide a clearer understanding of the features and advantages of the present invention. The drawings are illustrative and should not be construed as limiting the present invention in any way. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort. Wherein:
[0025] Figure 1 This is a flowchart of the knowledge graph construction method for ship power system design tasks according to the present invention;
[0026] Figure 2 This is a diagram illustrating the conceptual layer of the present invention and the relationships between these concepts.
[0027] Figure 3 This is a schematic diagram of the conceptual knowledge graph of the ship's electrical system of the present invention;
[0028] Figure 4 This is a schematic diagram of the ship design task body construction of the present invention;
[0029] Figure 5 This is a schematic diagram of the design task knowledge graph of the present invention;
[0030] Figure 6 This is a schematic diagram of the knowledge graph construction device for ship power system design tasks according to the present invention. Detailed Implementation
[0031] To better understand the above-mentioned advantages, features, and objectives of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and examples. Many specific details of the present invention are set forth in the following description, and the described embodiments are merely some examples of the present invention. Therefore, other embodiments by those skilled in the art are within the scope of protection of the present invention.
[0032] like Figure 1 As shown, this invention provides a knowledge graph construction method for ship power system design tasks, including schema layer design, data preprocessing, entity and relation dataset labeling, entity extraction and relation extraction model training, triple extraction, design task graph construction, and graph fusion.
[0033] To facilitate understanding of the above technical solutions of the present invention, a specific embodiment is provided below to illustrate the above technical solutions in detail: a knowledge graph construction method for ship power system design tasks includes the following steps:
[0034] S1: Based on expert experience, conduct a model-level design, defining the concepts of the ship's electrical system and the relationships between these concepts, such as... Figure 2 As shown, it includes 8 types of entities: functional components, component attributes, personnel, characteristics, context, measures, products, and locations; and 10 types of entity relationships: Belong to, Trait of, Part of, Kind of, Condition of, Position of, Apply to, Infer to, Participate in, and Equivalent to.
[0035] S2: Perform data preprocessing on unstructured data such as ship design manuals, design specifications, and design standards. Ship design manuals contain a large amount of unstructured data, such as formulas, tables, and images, which need to be cleaned and processed into text-only format and saved as TXT files.
[0036] S3: Based on the concepts in the schema layer and the relationships between concepts, entities and the relationships between entities are labeled to obtain entity datasets and entity relationship datasets. Entity labeling is performed using the Label Studio labeling tool based on the concepts defined in S1. Label Studio adds labels for the eight types of entities in S1, such as diesel engine, prime mover, and electric motor as functional components; speed and power as component attributes; surveying ship, ferry, and icebreaker as products; and port traffic arteries and narrow waterways as contexts. After labeling, the data is exported in CSV format.
[0037] The exported CSV file is converted into BIO data format by conversion code, as shown in Table 1. The text is "The propulsion transformer should be protected against short circuits on the secondary side". The propulsion transformer is a functional component. The "push" is the head entity and is marked with a "B". The rest of the text also begins with "B" and so on.
[0038] Table 1
[0039]
[0040]
[0041] The BIO file is then divided into training and test set files using code partitioning. Entity relationship annotation is based on the conceptual relationships defined in S1. The `unknown` relation is added to indicate that two entities in a sentence have no relationship, as shown in Table 2. For example, the relationship between a functional component and a component attribute is `Part of`, expressed as a triple: `Component Attribute Part of Functional Component`; the relationship between a feature and a functional component is `Trait of`, expressed as a triple: `Feature Trait of Functional Component`; and the relationship between a position and a functional component is `Condition of`, expressed as a triple: `Position Condition of Functional Component`. After annotation, the data is converted to TXT format using code. The script is then run to generate `train.txt` and `test.txt` files.
[0042] Table 2
[0043]
[0044]
[0045] S4: Train the entity extraction model and the relation extraction model. The entity extraction training algorithm is BERT + bidirectional LSTM + CRF. BERT + bidirectional LSTM + CRF is an end-to-end deep learning model that does not require manual feature generation. The BERT layer is used to extract text features. The embedding vector is replaced with word vectors output by the BERT pre-trained model, transferring a large amount of semantic information to fine-tune the downstream task. The BERT output is used as the input to the bidirectional LSTM, which can obtain the sequence information of the context. Finally, the CRF layer decodes and outputs the most probable predicted label sequence that meets the label transfer constraints. In this dataset, with 450 epochs, the entity extraction accuracy is 90.86%.
[0046] The relation extraction training algorithm uses BERT + Bidirectional GRU + Attention + FC. The BERT layer extracts text features, the Bidirectional GRU layer obtains feature vectors from the original sentence through a bidirectional GRU neural network, the Attention layer generates weight vectors, and the feature vectors obtained from the GRU layer are multiplied by the corresponding weight vectors to obtain character- or sentence-level feature vectors. The FC layer integrates the feature vectors obtained from the previous layers. On this dataset, with 300 epochs, the relation extraction accuracy is 85%.
[0047] S5: Perform triple extraction using the Pipeline model, combining entity extraction and relation extraction. First, use a sequence labeling model to predict entities, then use a relation classification model to determine the type of entity relation, filtering out cases where the relation type is unknown. The resulting triples are in the form of: <entity, relation, entity>, such as <current, part of, prime mover>, <applies to, apply to, high-power electric propulsion>, <directly installed, position of, on the motor shaft>. After triple extraction, save the extracted triples to a txt file.
[0048] To import triplet data into the Neo4j graph database, the triples are first processed into entity.csv and relationship.csv formats, and then imported into the Neo4j graph database using the Neo4j-import method to form a conceptual knowledge graph of the ship's electrical system, such as... Figure 3 As shown.
[0049] S6: The design business process includes the design of radio communication and navigation systems, lighting systems, electric traction systems, electric propulsion systems, marine electrical systems, marine automation systems, and communication systems. Ontologies are built in Protege, such as... Figure 4 As shown.
[0050] The constructed ontology is exported as an OWL file in RDF / XML format. The OWL file is then converted to an RDF file using a JAR file and imported into the Neo4j graph database to form a design task knowledge graph. Figure 5 As shown.
[0051] S7: After fusing the knowledge graphs obtained in steps S5 and S6, entity alignment and disambiguation are performed to obtain the final knowledge graph for ship power system design tasks.
[0052] like Figure 6 As shown, the knowledge graph construction apparatus includes a processor; and a memory arranged to store computer-executable instructions, which, when executed, cause the processor to perform any of the knowledge graph construction methods described above.
[0053] At the hardware level, the electronic device includes a processor, and optionally also an internal bus, network interface, and memory. The memory may include main memory, such as high-speed random-access memory (RAM), or non-volatile memory, such as at least one disk storage device. Of course, the electronic device may also include other hardware required for its functions. The processor, network interface, and memory can be interconnected via an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 6 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0054] Memory is used to store programs. Specifically, programs may include program code, which includes computer operation instructions. Memory may include main memory and non-volatile memory, and it provides instructions and data to the processor.
[0055] The processor reads the corresponding computer program from non-volatile memory into main memory and then runs it, forming a knowledge graph construction device at the logical level. The processor executes the program stored in memory and specifically performs the following operations:
[0056] The process involves: designing the schema layer to define the concepts of ship power systems and the relationships between them; preprocessing unstructured data; labeling entities and their relationships to obtain entity datasets and entity relationship datasets; training the labeled entity datasets and entity relationship datasets to obtain entity recognition models and entity relationship recognition models; extracting triples from the obtained entity recognition models and entity relationship recognition models, importing them into the Neo4j graph database to form a knowledge graph of ship power system concepts; using Protege for modeling to form a knowledge graph of ship power system design tasks; and performing graph fusion to form the final knowledge graph oriented towards ship power system design tasks.
[0057] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0058] The above description is merely a specific embodiment of the present invention. Under the teachings of the present invention, those skilled in the art can make other improvements or modifications based on the above embodiments. Those skilled in the art should understand that the above specific description is only to better explain the purpose of the present invention, and the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for constructing a knowledge graph for ship electrical system design tasks, characterized in that, Includes the following steps: S1: Design and define the concepts of the ship's electrical system and the relationships between these concepts at the schema level; S2: Perform data preprocessing on unstructured data in ship design manuals, design specifications, and design standards; S3: Based on the concepts in the schema layer and the relationships between concepts, the entities and the relationships between entities are labeled to obtain the entity dataset and the entity relationship dataset; S4: The ALBERT+bidirectional LSTM+CRF algorithm and the BERT+bidirectional GRU+Attention+FC algorithm are used to train the labeled entity dataset and entity relationship dataset respectively to obtain the entity recognition model and the entity relationship recognition model. In the ALBERT+Bidirectional LSTM+CRF algorithm, the ALBERT layer is used to extract text features, replacing the embedding vector with word vectors output by the ALBERT pre-trained model, transferring a large amount of semantic information to fine-tune the downstream task, using the ALBERT output as the input of the bidirectional LSTM, which can obtain the sequence information of the context, and finally decoding and outputting the most likely predicted label sequence that meets the label transfer constraint conditions through the CRF layer. In the BERT+Bidirectional GRU+Attention+FC algorithm, the BERT layer is used to extract text features, the Bidirectional GRU layer obtains the feature vector of the original sentence through a bidirectional GRU neural network, the Attention layer is the attention mechanism layer that generates weight vectors, and the feature vectors obtained by the GRU layer are multiplied by the corresponding weight vectors to obtain feature vectors based on the word or sentence level, and FC is a fully connected layer that integrates the feature vectors obtained by the previous layer. S5: Based on the obtained entity recognition model and entity relationship recognition model, triples are extracted and imported into the Neo4j graph database to form a conceptual knowledge graph of the ship's power system. S6: Combining domain expert knowledge and the product structure of ship power systems, analyze the design business process, extract design tasks, and use Protege to perform hierarchical modeling to form a knowledge graph of ship power system design tasks; S7: By entity alignment and disambiguation, the obtained ship power system concept knowledge graph and design task knowledge graph are merged to form the final knowledge graph for ship power system design tasks. The relationships defined in step S1 include a total of 8 types of entities and 10 types of entity relationships; The eight types of entities are: functional components, component attributes, personnel, characteristics, context, measures, products, and locations; The 10 types of entity relationships are: Belong to, Trait of, Part of, Kind of, Condition of, Position of, Apply to, Infer to, Participate in, and Equivalent to; In step S2, unstructured data from ship design manuals, design specifications, and design standards are cleaned and converted into txt text. The entity annotation in step S3 is based on the concepts defined in S1, and is annotated using the Label Studio annotation tool. The data is exported as a CSV file and then converted into a BIO file using code. The entity relationship annotation is based on the conceptual relationships defined in S1 and is converted into a TXT file using code. The design process in step S6 includes the design of radio communication and navigation systems, lighting systems, electric traction systems, electric propulsion systems, ship electrical systems, ship automation systems, and communication systems. After the ontology is built in Protege, it is imported into the Neo4j graph database to form a design task knowledge graph.
2. The knowledge graph construction method for ship power system design tasks according to claim 1, characterized in that, In step S5, triple extraction is a combination of entity extraction and relation extraction. The resulting triples are in the form of <entity, relation, entity>. The triple data is then imported into the Neo4j graph database. First, the triples are processed into entity.csv and relationship.csv formats and then imported into the Neo4j graph database using the Neo4j-import method to form a conceptual knowledge graph of the ship's power system.
3. A knowledge graph construction device for ship electrical system design tasks, characterized in that, The apparatus includes a processor; and a memory arranged to store computer-executable instructions, which, when executed, cause the processor to perform the knowledge graph construction method as described in any one of claims 1 or 2.
Citation Information
Patent Citations
Knowledge graph construction method and device, computer equipment and computer storage medium
CN112948596A