Railway four-power digital engineering model space detection method based on knowledge graph
Through the detection method based on knowledge graph, the existing railway four-electric digital engineering detection method relies on the design platform and poor adaptability, and achieve more efficient and accurate spatial relationship detection.
Patent Information
- Application Number
- CN202411643406.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-03-11
AI Technical Summary
The existing railway four-electric digital engineering detection method relies on the design platform, has poor adaptability and is easy to miss spatial relationship detection.
Using a detection method based on knowledge graph, the field relation database and knowledge graph are established, and the Bi-LSTM-CRF model is used for entity recognition and relationship extraction, so as to detect the spatial relationship of the railway four-electric digital engineering model.
It reduces the dependence of detection on the design platform, improves the adaptability and accuracy of detection, and reduces the probability of missing space relationship detection.
Smart Images

Figure CN119597851A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of railway four-electric digital engineering detection technology, and in particular to a railway four-electric digital engineering model space detection method based on knowledge graph. Background Art
[0002] The railway four-electric digital engineering model is a collection of overall BIM engineering models composed of railway four-electric professional BIM models. Among them, the spatial relationships between engineering models, such as subordinate relationships, orientation relationships, intersection relationships, link relationships, distance relationships, etc., are the goals of railway four-electric digital engineering detection.
[0003] The traditional railway four-electric digital engineering detection method is based on the BIM design platform, such as Bentley's Microstation platform, AutoDesk's Revit platform, etc., which is usually based on the design platform for secondary development, and the BIM engineering model is opened in the design platform for detection. The spatial relationship between engineering models is stored in the database as a standard, and the detection is achieved by obtaining the actual model information from the platform and comparing it with the database standard. Therefore, the current detection is dependent on the design platform throughout the process, and the detection content is customized through secondary development in the design platform. The implementation process is highly dependent on the standard. Once the standard is modified a little, the detection program must be modified, the adaptability is poor, and the spatial relationship detection is prone to omissions.
[0004] Therefore, it is necessary to propose new measures to overcome the above-mentioned defects. Summary of the invention
[0005] The purpose of the present invention is to provide a spatial detection method for the railway four-electric digital engineering model based on a knowledge graph, so as to solve the problems of existing detection methods relying on the design platform, poor adaptability, and easy omissions in spatial relationship detection.
[0006] In order to achieve the above object, the technical solution adopted by the present invention is:
[0007] A spatial detection method for a railway four-electric digital engineering model based on a knowledge graph, the method comprising:
[0008] Establishing a domain relationship database, wherein the domain relationship database includes standard entries, and the standard entries include relationship information;
[0009] The design information of the inspected component is obtained for preprocessing, wherein the preprocessing includes calculating and completing the relationship information of the inspected component according to the standard items to form the actual items;
[0010] Label the model data for the detected component and train the Bi-LSTM-CRF model based on the model data;
[0011] Use the trained Bi-LSTM-CRF model for entity recognition;
[0012] Extract relationships from identified entities, import the identified entities and extracted relationships into a graph database, and build a knowledge graph;
[0013] Obtain standard entries from the domain relational database, find the corresponding actual entries in the knowledge graph for comparison, and complete the detection.
[0014] Furthermore, the relationship information in the standard entry includes the detected component object type, related component object type, spatial relationship, logic, and standard value.
[0015] Furthermore, the design information of the detected component is obtained, including:
[0016] Export exchange format files, i.e. .fbx files, from design software;
[0017] Perform specific calculations on the design information in the .fbx file and store the results in a text file.
[0018] Furthermore, model data is annotated for the detected component, including entity data and relationship data.
[0019] Furthermore, Bi-LSTM-CRF model training is performed based on the model data, including:
[0020] Get model data;
[0021] Load the railway communication professional field dictionary;
[0022] Perform model training.
[0023] Furthermore, the railway communications professional field dictionary is a collection of railway electrical professional vocabulary that has been reviewed and compiled by experts.
[0024] Furthermore, relations are extracted from the identified entities, including:
[0025] Predefined relationship rules;
[0026] According to the relationship rules, four types of relationships involved in standard entries are extracted: entity relationship, attribute relationship, link relationship, and orientation relationship.
[0027] Furthermore, the identified entities and extracted relationships are imported into the graph database to build a knowledge graph, including:
[0028] Import the identified entities and extracted relationships into the Neo4j graph database;
[0029] Taking entities as nodes, the nodes are connected according to the relationship and the distance between entities to form a knowledge graph.
[0030] Furthermore, standard entries are obtained from the domain relational database, and the corresponding actual entries in the knowledge graph are found for comparison until the comparison ends at the leaf node, completing the detection of the sub-item, and then completing the detection of all sub-items one by one.
[0031] On the other hand, a knowledge graph-based railway four-electric digital engineering model space detection system is provided, and the system is used to implement the method described, including:
[0032] A standard building module, used to establish a domain relationship database, wherein the domain relationship database includes standard entries, and the standard entries include relationship information;
[0033] A data preprocessing module is used to obtain the design information of the inspected component for preprocessing, wherein the preprocessing includes calculating and completing the relationship information of the inspected component according to the standard items to form the actual items;
[0034] The model training module is used to label the model data for the detected components and perform Bi-LSTM-CRF model training based on the model data;
[0035] Entity recognition module, used to perform entity recognition using the trained Bi-LSTM-CRF model;
[0036] The knowledge graph construction module is used to extract relationships from the identified entities, import the identified entities and the extracted relationships into the graph database, and build a knowledge graph;
[0037] The detection module is used to obtain standard entries from the domain relational database, find the corresponding actual entries in the knowledge graph for comparison, and complete the detection.
[0038] Compared with the prior art, the present invention has the following beneficial effects:
[0039] The present invention provides a spatial detection method for railway four-electric digital engineering models based on knowledge graph, defines standard items and establishes a domain relationship database, converts the design information of the components to be detected into actual items, and uses the knowledge graph to perform comparative detection between items. It no longer relies on the design platform for BIM model entity detection, but uses the standard data format as the detection data input, which is more adaptable. By constructing a knowledge graph relationship network, the relationship between entities can be more fully mined, thereby effectively reducing the probability of missed detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] 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 or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, drawings of other embodiments can be obtained based on these drawings without paying creative work.
[0041] Figure 1 It is a flow chart of the method of the present invention. DETAILED DESCRIPTION
[0042] In order to facilitate the understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. The preferred embodiments of the present invention are given in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present invention more thoroughly understood.
[0043] It should be noted that the terms "comprises", "comprising", "includes", "comprises" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or apparatus comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products or apparatuses.
[0044] In addition, steps "S1", "S2" and the like involved in the embodiments are only for the convenience of describing the technical solutions and understanding the specific steps and contents of the embodiments, and should not be understood as limitations on the order of the steps. Any changes to the order of the steps should be within the scope of protection of the present invention.
[0045] The present invention provides a method for spatial detection of railway four-electric digital engineering models based on knowledge graph, such as Figure 1 , specifically including the following steps:
[0046] S1: Establish a domain relation database, wherein the domain relation database includes standard entries, and the standard entries include relation information. The relation information in the standard entries includes the detected component object type, related component object type, spatial relationship, logic, and standard value.
[0047] S2: Obtain design information of the inspected component for preprocessing, wherein the preprocessing includes calculating and completing the relationship information of the inspected component according to standard items to form actual items.
[0048] Obtain the design information of the component being tested, including:
[0049] S201: Export the exchange format file, i.e. .fbx file, from the design software;
[0050] S202: Perform specific calculations on the design information in the .fbx file and store the results in a text file.
[0051] S3: Label model data for the detected component and perform Bi-LSTM-CRF model training based on the model data.
[0052] The model data annotated for the detected components includes entity data and relationship data. When obtaining model data for training, the railway communication professional dictionary is loaded, which is the railway four electrical professional vocabulary reviewed and sorted by experts.
[0053] Perform model training.
[0054] S4: Use the trained Bi-LSTM-CRF model for entity recognition.
[0055] S5: Extract relationships from the identified entities, import the identified entities and extracted relationships into the graph database, and build a knowledge graph.
[0056] Extract relations from the identified entities, including:
[0057] S501: predefine relationship rules;
[0058] S502: According to the relationship rules, four types of relationships involved in the standard entries are extracted: entity relationship, attribute relationship, link relationship, and orientation relationship.
[0059] Import the identified entities and extracted relationships into the graph database to build a knowledge graph, including:
[0060] S503: Import the identified entities and extracted relationships into the Neo4j graph database;
[0061] S504: Take entities as nodes, connect the nodes according to the relationship and the distance between entities, and form a knowledge graph.
[0062] S6: Get standard entries from the domain relational database, find the corresponding actual entries in the knowledge graph for comparison, until the comparison ends at the leaf node, complete the detection of the sub-item, and then complete the detection of all sub-items one by one.
[0063] On the other hand, the present invention provides a knowledge graph-based railway four-electric digital engineering model space detection system for implementing the above method, including:
[0064] Standard building blocks, used to build a domain relational database, corresponding to S1 of the above method;
[0065] A data preprocessing module, used to obtain the design information of the inspected component for preprocessing, corresponding to S2 of the above method;
[0066] The model training module is used to label the model data for the detected component and perform Bi-LSTM-CRF model training based on the model data, corresponding to S3 of the above method;
[0067] The entity recognition module is used to perform entity recognition using the trained Bi-LSTM-CRF model, corresponding to S4 of the above method;
[0068] A knowledge graph construction module is used to extract relationships from the identified entities, import the identified entities and the extracted relationships into a graph database, and build a knowledge graph, corresponding to S5 of the above method;
[0069] The detection module is used to obtain standard entries from the domain relational database and find the corresponding actual entries in the knowledge graph for comparison, which corresponds to S6 of the above method.
[0070] The method of the present invention is described in detail below through specific embodiments:
[0071] S1: Establish a domain relational database.
[0072] Based on the established railway four-electric detection standards, a domain relationship database is established. Each standard entry contains the detected component object type, the spatial relationship between its related component object type, and the standard requirements that constitute the railway four-electric digital engineering space model, specifically the detected component object type, related component object type, spatial relationship, logic, and standard value. For example, the standard "the distance between the cabinet component model and the wall model is <=1200mm" is decomposed into the content shown in the first item in the table below. The component object type "cabinet" is the detected object, and the related component object type is "wall". The detection relationship required by the standard is "spacing", and its standard value is "<=1200".
[0073]
[0074] S2: Obtain design information of the inspected component for preprocessing.
[0075] Based on the design software, the exchange format file is exported, here it is exported as .fbx file, and then the file is processed to calculate the specific information in the file. For example, the minimum distance from the cabinet vertex to the wall is calculated based on the vertex information in .fbx and the wall vertex information. The vertex coordinates of the cabinet are parsed, and then the minimum distance from each vertex coordinate to the wall plane is calculated. Specifically:
[0076] The wall plane can still be constructed by the wall vertex coordinates (x, y, z), and the plane equation is:
[0077] Ax+By+Cz+D=0
[0078] If A, B, and C are not all 0 at the same time, then use the vertices to calculate the values of A, B, C, and D to get the plane equation. A, B, C, and D are constants.
[0079] Next, calculate the minimum distance d from each cabinet to the wall plane using the minimum distance calculation formula from a space point to a plane:
[0080]
[0081] Among them, (x 0 ,y 0 , z 0 ) are the cabinet vertex coordinates.
[0082] This is then recorded as the minimum distance from the vertex to the wall.
[0083] Then the shortest distance from the cabinet to the wall is calculated by comparison, and the final information is stored in a text file.
[0084] S3: Label model data for the detected component and perform Bi-LSTM-CRF model training based on the model data.
[0085] First, mark the entity data. When marking all entities in the railway four-electric digital engineering inspection, such as: battery cabinets, AC distribution cabinets, UPS cabinets, wiring cabinets, transmission cabinets, etc. are marked as "cabinets", anti-static floors are marked as "floors", and data cables and coaxial cables are marked as "cables".
[0086] Secondly, the relationship data is marked, such as: the transmission cabinet (cabinet) and the communication room (room) are marked as a "subordinate" relationship, the communication room-wall and the communication room are marked as a "subordinate" relationship, the transmission cabinet and the communication room-wall are marked as a spatial "spacing" relationship, which contains the attribute "length", and the cabinet and the cable are marked as a "link" relationship.
[0087] S4: Use the trained Bi-LSTM-CRF model for entity recognition.
[0088] Load the railway communication professional dictionary, which contains more than 500 railway four electrical professional terms reviewed and sorted by experts. At the same time, use the Bi-LSTM-CRF model that has been trained on 5,000 annotated data to perform entity recognition on the pre-processed data.
[0089] S5: Extract relationships from the identified entities, import the identified entities and extracted relationships into the graph database, and build a knowledge graph.
[0090] In the process of relationship extraction, we first perform preliminary relationship matching through more than 100 predefined relationship rules, such as "If the entities of a room and a cabinet appear at the same time and the distance information is within a certain range, there is a connection between the two." Then, we use a model based on a graph neural network to further analyze the data and mine more complex relationships, such as "Based on the relationship between the wall of the room and the room, and the relationship between the cabinet of the room and the room, we can determine the spatial relationship between the cabinet and the wall."
[0091] In the knowledge graph construction phase, the identified entities and extracted relationships are imported into the Neo4j graph database to construct a knowledge graph in the railway communication field. For example, in the knowledge graph, "Communication Machinery Room 01" is a node, which is connected to nodes such as "UPS Cabinet" and "Wall 01" through the "Connection" relationship edge. At the same time, "Wall 01" is connected to "UPS Cabinet", and the relationship is connected to the "1000m" node through the "Distance" relationship edge.
[0092] S6: By obtaining the standard entries in the railway digital engineering standard database, the entries in the graph database are searched one by one and compared until the leaf node is reached. If the conditions are met, it means that the sub-item has passed the test. This process is repeated until all the entries are tested and a test report is output.
[0093] Those skilled in the art will appreciate that all or part of the functions of the embodiments of the present invention may be implemented by hardware or by computer programs. When all or part of the functions in the above-mentioned embodiments are implemented by computer programs, the program may be stored in a computer-readable storage medium, and the storage medium may include: a read-only memory, a random access memory, a disk, an optical disk, a hard disk, etc., and the program is executed by a computer to implement the above-mentioned functions. For example, the program is stored in the memory of the device, and when the program in the memory is executed by the processor, all or part of the above-mentioned functions can be implemented. In addition, when all or part of the functions in the above-mentioned embodiments are implemented by computer programs, the program may also be stored in a storage medium such as a server, another computer, a disk, an optical disk, a flash disk or a mobile hard disk, and is downloaded or copied and saved in the memory of the local device, or the system of the local device is updated, and when the program in the memory is executed by the processor, all or part of the functions in the above-mentioned embodiments can be implemented.
[0094] The above specific examples are used to illustrate the present invention, which is only used to help understand the present invention and is not intended to limit the present invention. For those skilled in the art, according to the concept of the present invention, some simple deductions, modifications or substitutions can be made.
Claims
1. A spatial detection method for railway four-electric digital engineering model based on knowledge graph, characterized by: The method comprises: Establishing a domain relationship database, wherein the domain relationship database includes standard entries, and the standard entries include relationship information; The design information of the inspected component is obtained for preprocessing, wherein the preprocessing includes calculating and completing the relationship information of the inspected component according to the standard items to form the actual items; Label the model data for the detected component and train the Bi-LSTM-CRF model based on the model data; Use the trained Bi-LSTM-CRF model for entity recognition; Extract relationships from identified entities, import the identified entities and extracted relationships into a graph database, and build a knowledge graph; Obtain standard entries from the domain relational database, find the corresponding actual entries in the knowledge graph for comparison, and complete the detection.
2. According to claim 1, the method for spatial detection of railway four-electric digital engineering models based on knowledge graph is characterized by: The relationship information in the standard entry includes the detected component object type, related component object type, spatial relationship, logic, and standard value.
3. According to claim 2, the method for spatial detection of railway four-electric digital engineering models based on knowledge graph is characterized by: Obtain design information of the component being inspected, including: Export exchange format files, i.e. .fbx files, from design software; Perform specific calculations on the design information in the .fbx file and store the results in a text file.
4. The method for spatial detection of railway four-electric digital engineering models based on knowledge graph according to claim 3 is characterized by: Label the model data for the detected components, including entity data and relationship data.
5. The method for spatial detection of railway four-electric digital engineering models based on knowledge graph according to claim 4 is characterized in that: According to the model data, Bi-LSTM-CRF model training is performed, including: Get model data; Load the railway communication professional field dictionary; Perform model training.
6. The method for spatial detection of railway four-electric digital engineering models based on knowledge graph according to claim 5 is characterized by: The railway communications professional dictionary is a collection of railway electrical professional vocabulary reviewed and compiled by experts.
7. The method for spatial detection of railway four-electric digital engineering models based on knowledge graph according to claim 6 is characterized by: Extract relations from identified entities, including: Predefined relationship rules; According to the relationship rules, four types of relationships involved in standard entries are extracted: entity relationship, attribute relationship, link relationship, and orientation relationship.
8. The method for spatial detection of railway four-electric digital engineering models based on knowledge graph according to claim 7 is characterized in that: Import the identified entities and extracted relationships into the graph database to build a knowledge graph, including: Import the identified entities and extracted relationships into the Neo4j graph database; Taking entities as nodes, the nodes are connected according to the relationship and the distance between entities to form a knowledge graph.
9. The method for spatial detection of railway four-electric digital engineering models based on knowledge graph according to claim 8 is characterized in that: Obtain standard entries from the domain relational database, find the corresponding actual entries in the knowledge graph for comparison, until the comparison ends at the leaf node, complete the detection of the sub-item, and then complete the detection of all sub-items one by one.
10. The railway four-electric digital engineering model spatial detection system based on knowledge graph is characterized by: The system is used to implement the method according to claim 1, comprising: A standard building module, used to establish a domain relationship database, wherein the domain relationship database includes standard entries, and the standard entries include relationship information; A data preprocessing module is used to obtain the design information of the inspected component for preprocessing, wherein the preprocessing includes calculating and completing the relationship information of the inspected component according to the standard items to form the actual items; The model training module is used to label the model data for the detected components and perform Bi-LSTM-CRF model training based on the model data; Entity recognition module, used to perform entity recognition using the trained Bi-LSTM-CRF model; The knowledge graph construction module is used to extract relationships from the identified entities, import the identified entities and the extracted relationships into the graph database, and build a knowledge graph; The detection module is used to obtain standard entries from the domain relational database, find the corresponding actual entries in the knowledge graph for comparison, and complete the detection.