Automatic abstraction method of urban rail transit equipment ontology model from bottom to top based on knowledge graph

By using a bottom-up approach based on knowledge graphs, the ontological model of urban rail transit equipment is automatically abstracted, solving the problem of cross-disciplinary understanding of equipment instance data and achieving efficient equipment management and fault diagnosis support.

CN123178647APending Publication Date: 2026-11-27JIANGSU I FRONT SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611548208.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-08
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

In the management of urban rail transit equipment, there are problems such as difficulty in understanding, sharing, and reusing equipment instance data across disciplines. Existing technologies lack clear pattern definitions, manual abstraction is costly, classification standards are difficult to unify, and the granularity of abstraction is difficult to grasp.

Method used

Based on a bottom-up approach to knowledge graphs, this method extracts the five-dimensional feature vectors of device instances, groups instances using a weighted comprehensive similarity model, and generates a multi-layered OWL ontology model using three abstract operators: generalization, aggregation, and merging. It automatically infers cardinality, range, and functional constraints.

Benefits of technology

It achieves a high degree of automation, requires no manual modeling, has an abstraction level consistent with the division of labor in professional maintenance, has controllable quality, supports incremental updates for newly commissioned equipment, and can complete semantic management of equipment ledgers, cross-professional data integration, and fault diagnosis reasoning in milliseconds.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123178647A_ABST
    Figure CN123178647A_ABST
Patent Text Reader

Abstract

The application provides a bottom-up automatic abstraction method of urban rail transit equipment ontology model based on a knowledge graph, belongs to the cross technical field of urban rail transit equipment management and knowledge graph engineering, and solves the problems of missing of an existing urban rail transit equipment knowledge graph mode, high artificial abstraction cost, difficulty in unifying classification caliber, and difficulty in grasping an abstract granularity, which leads to the problems of difficulty in cross-professional understanding, sharing and reasoning reuse of equipment instance data. The application takes pure ABox as input, extracts a five-dimensional feature vector, calculates comprehensive similarity according to attributes 0.4, relations 0.3 and value modes 0.3, and clusters and groups, and then generates a multi-layer OWL ontology from bottom to top through generalization, aggregation and merging, and automatically infers a base number, a value range and a functional constraint. The effect is automatic modeling, reasonable hierarchy, controllable quality, and incremental updating, 29 instances are abstracted into 16 classes and 3 layers, the grouping accuracy is 100%, the information retention degree is 0.947, and the comprehensive quality is 0.748.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the interdisciplinary field of urban rail transit equipment management and knowledge graph engineering, and in particular to a bottom-up automatic abstraction method for urban rail transit equipment ontology models based on knowledge graphs. Background Technology

[0002] The equipment knowledge graph accumulated from urban rail transit operations typically contains a large amount of instance data (equipment entities associated with asset ledgers and maintenance records), but lacks a clear schema definition (TBox / ontology). In the rail transit industry, this problem manifests specifically as follows: (1) Lack of model: The equipment management systems of various subway specialties (vehicle EAM, signal MSS, power supply SCADA, electromechanical BAS) have accumulated a large amount of equipment instance data, but generally only have triple data and no formal equipment ontology definition, which makes it difficult for the data to be understood, shared and reasoned for across specialties. (2) High cost of manual abstraction: There are tens of thousands of types of subway equipment (for example, there are dozens of models of signal equipment on a certain line). It takes a long time for experts from various disciplines to analyze the equipment classification system from the example data, and the classification criteria are difficult to unify. (3) Difficulty in grasping the granularity of abstraction: If the abstraction is too fine (classified by model), the ontology will be huge and redundant. If it is too coarse (only divided into one large category of equipment), the professional semantic distinction will be lost, and it will be unable to support business reasoning such as differentiated maintenance strategies for signal equipment and vehicle equipment.

[0003] Therefore, a method is needed to automatically abstract a reasonably granular equipment ontology model from an instance map of rail transit equipment. Summary of the Invention

[0004] This invention proposes an automatic abstraction method for urban rail transit equipment ontology models based on a bottom-up approach using knowledge graphs. By taking an urban rail transit equipment instance knowledge graph (pure ABox) as input, it extracts five-dimensional feature vectors of equipment instances, including type, attributes, outgoing edges, incoming edges, and value patterns. A weighted comprehensive similarity model is used to group instances, and three abstraction operators—generalization, aggregation, and merging—are used to generate a multi-layered OWL ontology (TBox) from the bottom up, consisting of "specific equipment class—specialized equipment class—rail transit equipment root class." The method automatically infers cardinality, value range, and functional constraints. This addresses the problems of existing urban rail transit equipment knowledge graphs lacking patterns, high manual abstraction costs, difficulty in unifying classification standards, and difficulty in controlling abstraction granularity, which hinder cross-disciplinary understanding, sharing, and reuse of equipment instance data.

[0005] A bottom-up, knowledge graph-based automatic abstraction method for urban rail transit equipment ontology models includes the following steps: S1. Obtain the knowledge graph of urban rail transit equipment instances. The knowledge graph of equipment instances is a pure ABox, including attribute assertions and relation assertion triples of equipment instances. S2. Extract features from the device instance to obtain the feature vector of the device instance; S3. Calculate the comprehensive similarity between device instances based on the feature vectors; S4. Cluster the device instances according to the comprehensive similarity to obtain multiple instance groups; S5. Perform bottom-up hierarchical abstraction on multiple instance groups to generate a multi-layer OWL device ontology model, i.e., TBox; S6. Refine and evaluate the quality of the OWL equipment body model, and output the final urban rail transit equipment body model.

[0006] Furthermore, in S2, the feature vector includes five-dimensional features: type feature, attribute feature, outgoing edge relationship feature, incoming edge relationship feature, and value pattern feature, wherein, In a pure ABox scenario, the type feature is empty; The attribute features are the set of attribute predicates possessed by the device instance; The outgoing edge relationship feature is a set of relational predicates for device instances; The value pattern feature is the structural pattern of the values ​​of each attribute.

[0007] Furthermore, in S3, the overall similarity is calculated according to the following formula: Sim(e1,e2) = w_a·Jac(A1,A2) + w_r·Jac(R1,R2) + w_v·ValSim(V1,V2) Where Sim(e1,e2) is the comprehensive similarity between device instances e1 and e2; Jac(A1,A2) is the Jaccard coefficient of the attribute feature set of device instances e1 and e2; Jac(R1,R2) is the Jaccard coefficient of the relation feature set of device instances e1 and e2; ValSim(V1,V2) is the value pattern similarity between device instances e1 and e2, which is the proportion of consistent value patterns in the attribute set; w_a, w_r, and w_v are the weights of attribute features, relation features, and value pattern features, respectively, and (w_a,w_r,w_v)=(0.4,0.3,0.3).

[0008] Furthermore, in S4, hierarchical agglomerative clustering with average joins is used to group the device instances, dividing the device instance set E into k disjoint subsets G1...Gk, where the similarity of instances within a group exceeds the threshold θ_group=0.80; the physical meaning of θ_group is to allow approximately 20% of the ledger field to be missing noise.

[0009] Furthermore, in S5, the bottom-up hierarchical abstraction includes: S51. Use the generalization operator to generalize the group of instances with common attribute patterns into the parent class, and generate the L1 layer device concrete class; S52. Use the aggregation operator to merge classes with inter-group similarity exceeding the threshold θ_union=0.50 into a union class to generate L2 layer professional equipment classes; S53. Use the merge operator to merge the professional equipment classes that semantically belong to the fixed assets of rail transit into the L3 level rail transit equipment root class under the threshold θ_merge=0.30; Among them, θ_union=0.50 corresponds to the boundary of professional maintenance division of labor, and θ_merge=0.30 corresponds to the common attributes of fixed assets.

[0010] Furthermore, in S5, generating a multi-layered OWL device ontology model includes: generating an OWL class for each instance group, with labels and URIs generated from common attribute patterns; generating owl:DatatypeProperty from the common attribute predicates of the group, with its domain being the class; generating owl:ObjectProperty from the relation predicates, with its domain being the professional class and its range being the set of relation target objects; and generating the subClassOf axiom based on the abstraction level, satisfying reflexivity, transitivity, and antisymmetry.

[0011] Furthermore, in S6, the refining and quality assessment includes: Eliminate semantically redundant classes and attributes; Inferring attribute constraints from instance data: If each instance in the group has exactly one value for a certain attribute, then the cardinality constraint is inferred as exactly1; the range constraint is inferred from the value pattern. Calculate the information retention rate I = the proportion of instance triples covered by TBox attributes / relationships; The structural simplicity C is calculated as 1 - |C| / |E|, where |C| is the number of classes and |E| is the number of instances. Calculate the overall quality Q = 0.6·I + 0.4·C.

[0012] Furthermore, it also includes an incremental update step: when a new device instance is added, if its similarity with the existing instance group is ≥θ_group, it is assigned to the existing class for class extension; otherwise, a new class is created for new class discovery, and the subClassOf relationship is locally recalculated for hierarchical adjustment.

[0013] A storage medium storing a computer program, which, when executed by a processor, implements the aforementioned method for automatic abstraction of urban rail transit equipment ontology models based on a knowledge graph from the bottom up.

[0014] A computer device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the above-described automatic abstraction method for urban rail transit equipment ontology models based on a knowledge graph from the bottom up.

[0015] Compared with the prior art, the present invention achieves significant beneficial effects through the above technical solution: This invention uses a knowledge graph of urban rail transit equipment instances (pure ABox) as input to extract five-dimensional feature vectors of equipment instance type, attributes, outgoing edges, incoming edges, and value patterns. It employs a weighted comprehensive similarity model (attribute 0.4, relation 0.3, value pattern 0.3) and hierarchical agglomerative clustering to group instances. Furthermore, it utilizes three abstract operators (generalization, aggregation, and merging) and a three-level threshold system (θ_group=0.80, θ_union=0.50, θ_merge=0.30) to generate a bottom-up three-layer OWL equipment ontology model: "Specific Equipment Class—Specialized Equipment Class—Rail Transit Equipment Root Class," automatically inferring cardinality, value range, and functional approximation. This approach offers several advantages, including high automation, no need for manual modeling, consistent abstraction levels with the professional maintenance division of rail transit, controllable ontology quality, support for incremental updates of newly commissioned equipment, and strong engineering practicality. In simulation verification, 29 equipment instances were automatically abstracted into 16 classes, 3 class hierarchies, 15 subClassOf axioms, 61 data attributes, and 8 object attributes, with a grouping accuracy of 100%, information retention of 0.947, structural simplicity of 0.448, and overall quality of 0.748. All calculations were completed in milliseconds, enabling applications such as semantic management of equipment ledgers, semantic integration of cross-professional equipment data, construction of operation and maintenance knowledge graphs, and fault diagnosis reasoning. Attached Figure Description

[0016] Figure 1 The technical architecture diagram of this invention shows the complete pipeline of "ABox instance data input → instance feature extraction (five-dimensional vector and comprehensive similarity) → instance grouping (hierarchical agglomerative clustering, θ_group=0.80) → hierarchical abstraction (generalization / aggregation / merging three operators) → TBox generation and refinement (constraint inference, quality assessment)". Figure 2 This is an example diagram of the knowledge graph instance layer structure of the present invention, showing equipment instance nodes such as pantographs, bogies, switch machines, and signal machines, partOf / maintainedBy / installedAt relationship edges, as well as attribute assertions and general attributes (asset number / line / installation date). Figure 3The diagram illustrates the bottom-up ontology abstraction process of this invention, showing the layer-by-layer abstraction process from L0 instance layer (29 instances) → L1 specific equipment classes (11 classes) → L2 specialized equipment classes (4 classes) → L3 root class of rail transit equipment, as well as the roles of the three thresholds. Figure 4 This is a comparison diagram of the knowledge graph before and after abstraction in this invention. The left side is the pure instance layer before abstraction (no schema, difficult to reuse), and the right side is the complete ontology after abstraction (16 classes, 3 levels, 61 data attributes, quality index I=0.947 / C=0.448 / Q=0.748). Detailed Implementation

[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0018] A bottom-up, knowledge graph-based automatic abstraction method for urban rail transit equipment ontology models includes the following steps: S1. Obtain the knowledge graph of urban rail transit equipment instances. The knowledge graph of equipment instances is a pure ABox, including attribute assertions and relation assertion triples of equipment instances. S2. Extract features from the device instance to obtain the feature vector of the device instance; S3. Calculate the comprehensive similarity between device instances based on the feature vectors; S4. Cluster the device instances according to the comprehensive similarity to obtain multiple instance groups; S5. Perform bottom-up hierarchical abstraction on multiple instance groups to generate a multi-layer OWL device ontology model, i.e., TBox; S6. Refine and evaluate the quality of the OWL equipment body model, and output the final urban rail transit equipment body model.

[0019] Specifically, this invention uses a pure ABox (Object-Oriented Box) knowledge graph of urban rail transit equipment as input. Without relying on manually pre-designed ontology models, it automatically generates a multi-layered OWL (Overall Working Level) equipment ontology model containing class hierarchies, attribute definitions, and constraints through feature extraction, comprehensive similarity calculation, clustering, and bottom-up hierarchical abstraction. This significantly reduces the manual cost of ontology modeling and unifies classification standards. The multi-layered OWL equipment ontology model generated by this invention has a hierarchical structure of "specific equipment class—specialized equipment class—rail transit equipment root class," consistent with the professional maintenance division of rail transit vehicles, signaling, power supply, and electromechanical systems. This avoids the problems of overly detailed abstraction leading to a large and redundant ontology and overly coarse abstraction leading to the loss of professional semantics. Through refinement and quality assessment, this invention can automatically infer cardinality constraints, value range constraints, and functional constraints, and output quantitative indicators such as information retention, structural simplicity, and overall quality, making the ontology quality controllable and assessable. In one embodiment of this invention, 29 equipment instances are automatically abstracted into 16 classes, 3 class hierarchies, 15 subClassOf axioms, 61 data attributes, and 8 object attributes. The grouping accuracy reaches 100%, information retention is 0.947, structural simplicity is 0.448, and overall quality is 0.748. All calculations are completed in milliseconds without manual intervention. This invention also supports incremental classification or triggering of new class discovery for newly commissioned equipment instances, adapting to the continuously growing business characteristics of subway line equipment. It can serve scenarios such as equipment ledger semantic management, cross-professional equipment data semantic integration, operation and maintenance knowledge graph construction, and fault diagnosis reasoning.

[0020] Furthermore, in S2, the feature vector includes five-dimensional features: type feature, attribute feature, outgoing edge relationship feature, incoming edge relationship feature, and value pattern feature, wherein, In a pure ABox scenario, the type feature is empty; The attribute features are the set of attribute predicates possessed by the device instance; The outgoing edge relationship feature is a set of relational predicates for device instances; The value pattern feature is the structural pattern of the values ​​of each attribute.

[0021] Specifically, this invention extracts five-dimensional feature vectors—type features, attribute features, outbound edge relationship features, inbound edge relationship features, and value pattern features—of device instances. This enables the effective characterization of the semantic structure of device instances in a pure ABox scenario. The empty type feature is precisely the target that this invention needs to discover from instance data. The attribute features, outbound edge relationship features, and value pattern features support subsequent comprehensive similarity calculations and instance grouping from three aspects: what attributes are measured, where they are attached and who maintains them, and what their values ​​look like. This allows the semantic characterization of device instances to be independent of manually predefined type information, thus laying the foundation for automatically abstracting the device ontology from pure instance data. In this invention, attribute features are the set of attribute predicates possessed by a device instance, such as a pantograph instance having hasCarbonStripThickness, hasContactForce, hasMileage, etc. Outbound relationship features are the set of relation predicates possessed by a device instance, such as partOf, maintainedBy. Value pattern features are the structural patterns of the values ​​of each attribute, such as numerical type, line enumeration, date, asset number, voltage level, etc. These specific features enable the classification of rail transit equipment to first look at what attribute is being measured, then where it is mounted and who maintains it, and finally what the value looks like, thereby ensuring that the subsequent instance grouping and abstraction results are consistent with the business logic of rail transit equipment classification.

[0022] Furthermore, in S3, the overall similarity is calculated according to the following formula: Sim(e1,e2) = w_a·Jac(A1,A2) + w_r·Jac(R1,R2) + w_v·ValSim(V1,V2) Where Sim(e1,e2) is the comprehensive similarity between device instances e1 and e2; Jac(A1,A2) is the Jaccard coefficient of the attribute feature set of device instances e1 and e2; Jac(R1,R2) is the Jaccard coefficient of the relation feature set of device instances e1 and e2; ValSim(V1,V2) is the value pattern similarity between device instances e1 and e2, which is the proportion of consistent value patterns in the attribute set; w_a, w_r, and w_v are the weights of attribute features, relation features, and value pattern features, respectively, and (w_a,w_r,w_v)=(0.4,0.3,0.3).

[0023] Specifically, this invention employs a comprehensive similarity model that weights attribute features, relational features, and value pattern features, setting the weights to 0.4 for attributes, 0.3 for relations, and 0.3 for value patterns. This ensures that the similarity calculation between equipment instances accurately reflects the business logic of rail transit equipment classification. First, it considers what attribute is being measured; second, it considers where the equipment is attached and who maintains it; and third, it considers the appearance of the values. This provides accurate and physically meaningful similarity data for subsequent instance grouping and hierarchical abstraction. In this invention, attribute and relation similarity uses the Jaccard coefficient, and value pattern similarity is the proportion of attributes with consistent value patterns. The physical meaning of the weights (w_a, w_r, w_v) = (0.4, 0.3, 0.3) is that rail transit equipment classification first considers what attribute is being measured. A weight of 0.4 corresponds to measuring the thickness and contact pressure of the carbon sliding plate for pantographs, and measuring the switching force and switching time for switch machines. Second, it considers where the equipment is attached and who maintains it. A weight of 0.3 corresponds to onboard equipment for electric multiple units (EMUs) and trackside signaling equipment for turnout sections. Next, look at what the value looks like. The value pattern corresponding to a weight of 0.3 reflects the measurement type.

[0024] Furthermore, in S4, hierarchical agglomerative clustering with average joins is used to group the device instances, dividing the device instance set E into k disjoint subsets G1...Gk, where the similarity of instances within a group exceeds the threshold θ_group=0.80; the physical meaning of θ_group is to allow approximately 20% of the ledger field to be missing noise.

[0025] Specifically, this invention uses hierarchical agglomerative clustering with average connectivity to group equipment instances. This allows for bottom-up merging of the most similar clusters without pre-setting the number of classes, thus adapting to the reality of diverse urban rail transit equipment and the difficulty in pre-determining classification systems. The invention sets the intra-group instance similarity threshold to θ_group=0.80, which physically allows for approximately 20% noise from missing entries in the ledger fields. This ensures that even if the similarity of similar equipment is slightly lower than perfect consistency due to missing entries in the actual equipment ledger, they can still be correctly classified into the same instance group. A similarity below 0.80 indicates different equipment types, thereby enhancing robustness to ledger noise while ensuring grouping accuracy. In one embodiment of this invention, hierarchical agglomerative clustering divides 29 instances into 11 groups, each with 100% purity, achieving 100% grouping accuracy.

[0026] Furthermore, in S5, the bottom-up hierarchical abstraction includes: S51. Use the generalization operator to generalize the group of instances with common attribute patterns into the parent class, and generate the L1 layer device concrete class; S52. Use the aggregation operator to merge classes with inter-group similarity exceeding the threshold θ_union=0.50 into a union class to generate L2 layer professional equipment classes; S53. Use the merge operator to merge the professional equipment classes that semantically belong to the fixed assets of rail transit into the L3 level rail transit equipment root class under the threshold θ_merge=0.30; Among them, θ_union=0.50 corresponds to the boundary of professional maintenance division of labor, and θ_merge=0.30 corresponds to the common attributes of fixed assets.

[0027] Specifically, this invention employs three abstraction operators—generalization, aggregation, and merging—to perform hierarchical abstraction from the bottom up. This allows for the layered derivation of specific equipment classes, specialized equipment classes, and the root class of rail transit equipment from instance groups, forming a multi-layered hierarchical structure perfectly consistent with the professional maintenance division of rail transit. This avoids the problems of overly granular abstraction leading to a large and redundant ontology and overly coarse abstraction resulting in the loss of professional semantics. This invention sets the inter-group similarity threshold for the aggregation operator to θ_union=0.50, which physically corresponds to the organizational boundary of the professional maintenance division of rail transit. This ensures that equipment of the same specialty, with an inter-class similarity of approximately 0.65 due to shared maintenance units and onboard installation relationships, can be merged, while cross-specialty equipment with a similarity of only approximately 0.33 is correctly isolated. This guarantees that the division of specialized equipment classes is consistent with the professional maintenance divisions of vehicles, signaling, power supply, and electromechanical systems. This invention sets the threshold of the merging operator to θ_merge=0.30. Its physical meaning is that it corresponds to the commonalities of fixed asset attributes, ensuring that even though the attributes of various specialized equipment differ, when they share common fixed asset attributes such as asset number, line affiliation, and installation date, the similarity is approximately 0.33≥0.30, thus merging them into the root class of rail transit equipment. This achieves unified management of equipment assets while preserving the semantic distinctions between different specialties. In this invention, the parent class label of the generalization operator is automatically generated from the common attribute pattern. The fewer common attributes, the broader the semantics of the generalized class and the more it satisfies the subclass inclusion relationship. The hierarchical abstraction algorithm converges within a maximum of |C1| steps, and the class hierarchy depth is ≤log2(N)+1. In one embodiment of this invention, the L1 layer generalizes into 11 specific equipment classes, the L2 layer aggregates into 4 specialized equipment classes: vehicle equipment, signaling equipment, power supply equipment, and electromechanical equipment, and the L3 layer merges them into the root class of rail transit equipment. The class hierarchy depth is 3 layers, satisfying the upper bound inference of depth ≤log2(29)+1=5.

[0028] Furthermore, in S5, generating a multi-layered OWL device ontology model includes: generating an OWL class for each instance group, with labels and URIs generated from common attribute patterns; generating owl:DatatypeProperty from the common attribute predicates of the group, with its domain being the class; generating owl:ObjectProperty from the relation predicates, with its domain being the professional class and its range being the set of relation target objects; and generating the subClassOf axiom based on the abstraction level, satisfying reflexivity, transitivity, and antisymmetry.

[0029] Specifically, this invention generates OWL classes for each instance group and automatically generates tags and URIs from common attribute patterns. This ensures that the naming and identification of specific device classes directly derive from the common attribute characteristics of instance data, eliminating the need for manual naming and definition, and guaranteeing the consistency between class tags and the actual semantics of the device. This invention generates owl:DatatypeProperty for the common attribute predicate of the group, with its domain being the class, and owl:ObjectProperty for the relation predicate, with its domain being the professional class and its range being the set of relational target objects. This allows both data attributes and object attributes to be automatically derived from instance data, and the domain and value range of the attributes have clear device semantic references, thereby supporting semantic understanding and reasoning reuse of cross-professional device data. Based on the abstract level, this invention generates the subClassOf axiom and satisfies reflexivity, transitivity, and antisymmetry, giving the generated multi-layered OWL device ontology model a strict class hierarchy logical foundation, capable of supporting the pattern-level reasoning requirements of the fault diagnosis reasoning engine. In one embodiment of the present invention, 16 OWL classes, 15 subClassOf axioms, 61 data attributes, and 8 object attributes are generated. Among them, the data attributes such as hasCarbonStripThickness have the domain of pantograph, the range of numeric type, and the cardinality of exactly1. The object attributes such as partOf have the domain of vehicle equipment and the range of {electric bus T0216}. The domain of maintainedBy has the domain of each professional class and the range of {corresponding maintenance center}. The object attributes such as installedAt, suppliesTo, and locatedAt are also automatically generated from the instance data.

[0030] Furthermore, in S6, the refining and quality assessment includes: Eliminate semantically redundant classes and attributes; Inferring attribute constraints from instance data: If each instance in the group has exactly one value for a certain attribute, then the cardinality constraint is inferred as exactly1; the range constraint is inferred from the value pattern. Calculate the information retention rate I = the proportion of instance triples covered by TBox attributes / relationships; The structural simplicity C is calculated as 1 - |C| / |E|, where |C| is the number of classes and |E| is the number of instances. Calculate the overall quality Q = 0.6·I + 0.4·C.

[0031] Specifically, this invention refines and evaluates the quality of the generated multi-layered OWL device ontology model, eliminating semantically redundant classes and attributes, resulting in a compact ontology structure without losing device semantics. This invention can automatically infer attribute constraints from instance data. When each instance in a group has exactly one value for a certain attribute, it infers that the attribute is a functional attribute and assigns a cardinality constraint of exactly1. For example, each device has a unique asset number. Simultaneously, it infers value range constraints from the value pattern, such as hasMileage being numeric and hasLine being line enumeration. This ensures that the generated TBox not only has class hierarchy and attribute definitions but also constraints that can be used for consistency detection and reasoning. This invention quantifies the abstraction results using information retention (I), structural simplicity (C), and overall quality (Q). Information retention is the proportion of instance triples covered by TBox attributes / relationships; structural simplicity is the compression rate of the number of classes relative to the number of instances; and overall quality (Q = 0.6·I + 0.4·C), with a weight of 0.6 reflecting the business principle of prioritizing information retention over structural simplicity in the construction of the operation and maintenance ontology. This is because missing device classes can lead to missed fault reasoning, which is more costly than a slightly bloated ontology. In one embodiment of the present invention, 215 out of 227 triples in 29 device instances are covered by TBox attributes / relationships, the information retention rate I is 0.947, the structural simplicity rate C is 0.448, the overall quality Q is 0.748, and the grouping accuracy rate is 100%. These multi-dimensional indicators jointly support the assessment of ontology quality.

[0032] Furthermore, it also includes an incremental update step: when a new device instance is added, if its similarity with the existing instance group is ≥θ_group, it is assigned to the existing class for class extension; otherwise, a new class is created for new class discovery, and the subClassOf relationship is locally recalculated for hierarchical adjustment.

[0033] Specifically, this invention, by setting an incremental update step, enables newly added equipment instances to automatically determine whether to be assigned to an existing class for class expansion or to create a new class for new class discovery based on whether their similarity to existing instance groups reaches θ_group. It also locally recalculates the subClassOf relationship for hierarchical adjustment, thus eliminating the need to re-execute the complete clustering and abstraction process every time new equipment is added, significantly improving the ontology model's adaptability to the continuous growth of subway line equipment. This invention, through the coexistence of class expansion and new class discovery mechanisms, can quickly incorporate newly added similar equipment into existing equipment specific classes to maintain the stability of the ontology structure, while also timely expanding the ontology class hierarchy to cover new equipment semantics when new equipment types appear, thereby balancing the stability and scalability of the ontology model. This invention, by locally recalculating the subClassOf relationship rather than globally reconstructing the class hierarchy, ensures that incremental updates only affect the local class hierarchy structure related to the newly added equipment, reducing update computational overhead and guaranteeing the consistency of the ontology model. In one embodiment of this invention, when adding a pantograph instance, if its similarity to the pantograph group is approximately 1.0 and not lower than θ_group, it is directly assigned to an existing class to complete the incremental update.

[0034] A storage medium storing a computer program, which, when executed by a processor, implements the aforementioned method for automatic abstraction of urban rail transit equipment ontology models based on a knowledge graph from the bottom up.

[0035] A computer device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the above-described automatic abstraction method for urban rail transit equipment ontology models based on a knowledge graph from the bottom up.

[0036] Specifically, this invention solidifies the aforementioned bottom-up knowledge graph-based automatic abstraction method for urban rail transit equipment ontology models into a computer program on a storage medium. This program is then executed by the processor of a computer device. This allows the method to be copied, deployed, and integrated into urban rail transit equipment management systems, operation and maintenance knowledge graph construction platforms, or fault diagnosis inference engines, significantly improving its engineering feasibility and ease of promotion. When the processor executes the program, it can automatically abstract from a pure ABox equipment instance knowledge graph to a multi-layered OWL equipment ontology model without manual modeling or intervention. All calculations can be completed in milliseconds. End-to-end abstraction at a scale of 29 instances requires no manual intervention, and at a scale of tens of thousands of equipment instances, it can meet practical requirements through professional parallelism and indexing. Therefore, this invention not only remains at the method level but can also run stably in actual business environments using storage media and computer devices as carriers. The device ontology model generated by this invention can serve scenarios such as semantic management of device ledgers, semantic integration of cross-professional device data, construction of operation and maintenance knowledge graphs and fault diagnosis reasoning. The form of storage media and computer equipment further reduces the deployment threshold of these application scenarios, enabling the automated ontology abstraction capability to be directly called and reused by existing device management systems.

[0037] The following are embodiments of the present invention: Formal foundational definitions: Definition 1 (Equipment Knowledge Graph): K=(E,R,T,A), where E is the set of equipment instances (e.g., pantograph #A0101, switch machine #X10113), R is the set of relations (partOf, installedAt, maintainedBy, suppliesTo, locatedAt, etc.), T is the set of triples, and A is the set of attributes (data attributes and object attributes such as hasAssetId, hasMileage, hasSIL, hasVoltageRating, etc.).

[0038] Definition 2 (ABox): The set of device instance assertions, including attribute assertions (such as hasCarbonStripThickness(A0101, 18.5mm)) and relation assertions (such as partOf(A0101, Electric Bus T0216)). Definition 3 (TBox): The device ontology schema layer definition, including class hierarchy, attribute definitions, and constraints.

[0039] Definition 4 (OWL Device Ontology): O = (TBox, ABox), where TBox contains a set of classes C (pantograph, bogie, vehicle equipment, rail transit equipment, etc.), a set of attributes P, and a set of axioms Ax (subClassOf, cardinality constraints, etc.). Definition 5 (Abstract Mapping): The mapping α: E → C from the device instance space to the device conceptual space.

[0040] Definition 6 (Abstract Level): Partial order structure (L, ≤), where L1 is the finest-grained concrete class layer for equipment, and L3 is the coarsest root class layer for rail transit equipment. Definition 7 (Abstract Quality): Q = λ·I + (1 λ)·C, where I is the information retention degree and C is the structural simplicity degree, and λ=0.6—its physical meaning is: in the construction of the operation and maintenance ontology, information retention takes precedence over structural simplicity (missing device classes will lead to missed judgments in fault reasoning, and the cost is higher than that of the ontology and slightly bloated).

[0041] Instance layer analysis: Device instance feature vector: For a device instance e, its feature vector F(e) = (type feature, attribute feature, outbound relationship feature, inbound relationship feature, value pattern feature). In a pure ABox scenario, the type feature is empty (which is exactly what we want to discover). The core features are: attribute feature A(e) = the set of attribute predicates that the instance has (e.g., a pantograph instance has hasCarbonStripThickness, hasContactForce, hasMileage, etc.); outbound relationship feature R_out(e) = the set of relationship predicates that the instance has (e.g., partOf, maintainedBy); value pattern feature V(e) = the structural pattern of each attribute value (numerical / line enumeration / date / asset number / voltage level, etc.).

[0042] Overall similarity of instances: Sim(e1,e2)=w_a·Jac(A1,A2)+w_r·Jac(R1,R2)+w_v·ValSim(V1,V2), weights (w_a,w_r,w_v)=(0.4,0.3,0.3). Physical meaning: The classification of rail transit equipment first considers what attribute is being measured (weight 0.4—measuring carbon plate thickness and contact pressure is for pantographs, measuring switching force and switching time is for switch machines); secondly, it considers where it is attached and who maintains it (weight 0.3—partOf the electric train is onboard equipment, installedAt the turnout section is trackside signaling equipment); and thirdly, it considers the appearance of the values ​​(weight 0.3—value patterns reflect the measurement type). Attribute and relationship similarity uses the Jaccard coefficient, and value pattern similarity is the proportion of attributes with consistent value patterns.

[0043] Instance grouping: Definition 8 (Instance Grouping): The set of device instances E is divided into k disjoint subsets G1…Gk, where the similarity of instances within a group exceeds the threshold θ_group=0.80. Physical meaning: Devices of the same type (e.g., 4 pantograph instances) have almost identical attribute sets (similarity ≈ 1.0). A similarity of 0.80 allows for approximately 20% noise from missing entries in the ledger fields (real device ledgers often have missing items); a similarity below 0.80 indicates different device types. The grouping algorithm uses hierarchical agglomerative clustering with average joins, requiring no pre-defined number of classes.

[0044] Hierarchical abstraction: Definition 9 (Generalization Operator): Generalizes a group of instances with a common attribute pattern to a parent class. The parent class label is automatically generated by the common attribute pattern (e.g., a group with the common attribute "hasCarbonStripThickness" is generalized to the pantograph class). The L1 layer is the specific device class. Theorem 1 (Generalization Monotonicity): The fewer the common attributes, the broader the semantics of the generalized class, satisfying the subclass inclusion relationship.

[0045] Definition 10 (Aggregation Operator Union): Merges classes with inter-group similarity exceeding θ_union=0.50 into a union class, generating an L2 specialized equipment class. Physical meaning: Equipment of the same specialty (such as pantograph and bogie) has an inter-class similarity of approximately 0.65 due to sharing the maintenance unit (vehicle maintenance center) and on-board installation relationship (partOf electric train); equipment across specialties (such as pantograph and switch machine) has a similarity of only approximately 0.33 and is correctly isolated—θ_union=0.50 falls precisely between the two class intervals, corresponding to the organizational boundary of the division of labor in rail transit professional maintenance.

[0046] Definition 11 (Merge operator): Merge specialized equipment classes that semantically belong to the fixed assets of rail transit into the root class rail transit equipment at the threshold of θ_merge=0.30. Although the specialized equipment has different attributes, it shares common fixed asset attributes such as asset number, line to which it belongs, and installation date (similarity ≈0.33 ≥ 0.30).

[0047] Algorithm 1 (Bottom-up Hierarchical Abstraction): Initialize L1 = {Generalize(Gk)}; perform Union / Merge on classes that meet the similarity threshold layer by layer, and converge when the number of classes within a layer no longer decreases. Theorem 2 (Convergence): The algorithm converges in at most |C1| steps; Corollary 1: Class hierarchy depth ≤ log2(N) + 1.

[0048] TBox generation: Class generation: Each instance group generates an OWL class, with tags and URIs generated from a common attribute pattern; Attribute generation: The common attribute predicate of the group generates owl:DatatypeProperty (domain is the class), and the relation predicate generates owl:ObjectProperty (domain is the professional class, range is the set of relational target objects); Class hierarchy construction: The subClassOf axiom is generated based on the abstraction level, satisfying reflexivity, transitivity, and antisymmetry.

[0049] Body Refinement: (1) Redundancy elimination: Eliminate semantically repetitive classes and attributes; (2) Constraint inference: Infer attribute constraints from instance data—if each instance in the group has exactly one value for a certain attribute, then infer cardinality constraints exactly 1 (functional attributes, such as unique asset numbers for each device); infer value range constraints from value patterns (such as hasMileage being numeric and hasLine being line enumeration type); (3) Abstraction quality assessment: Information retention I = the proportion of instance triples covered by TBox attributes / relationships; Structural simplicity C = 1 |C| / |E| (compression ratio of class number relative to instance number); overall quality Q=0.6·I+0.4·C. (4) Incremental update: when a new device instance is added, if the similarity is ≥θ_group, it is assigned to an existing class (class extension); otherwise, a new class is created (new class discovery), and the subClassOf relationship is recalculated locally (hierarchical adjustment).

[0050] This method is implemented using a knowledge graph of subway line equipment (pure ABox, 29 equipment instances, 227 triples) as input: Example 1 (Instance Grouping): Hierarchical agglomerative clustering divides the 29 instances into 11 groups: 4 pantograph groups, 4 switch machine groups, 3 bogie groups, 3 traction motor groups, 3 signal machine groups, and 2 each of the door system / axle counter / contact wire section / main transformer / platform door / gate machine groups. The purity of each group is 100%.

[0051] Example 2 (Hierarchical Abstraction): The L1 layer generalizes into 11 specific equipment classes; the L2 layer aggregates into 4 professional classes: vehicle equipment (pantograph / bogie / traction motor / door system), signaling equipment (switcher / signal / axle counter), power supply equipment (overhead contact line section / main transformer), and electromechanical equipment (platform door / turnstile); the L3 layer is merged into the root class of rail transit equipment.

[0052] Example 3 (TBox Generation): Generates 16 OWL classes, 15 subClassOf axioms; 61 data attributes (e.g., hasCarbonStripThickness, domain=pantograph, range=numeric, cardinality exactly 1); 8 object attributes (partOf: domain=vehicle equipment, range={electric bus T0216}; maintainBy: domain=various professional classes, range={corresponding maintenance center}; installedAt / suppliesTo / locatedAt, etc.).

[0053] Example 4 (Quality Assessment and Incremental Update): Overall quality Q = 0.748; When adding a new pantograph instance, its similarity to the pantograph group is ≈1.0≥θ_group, so it is directly classified into the existing class to complete the incremental update. See Chapter 10 for simulation verification for detailed calculation process.

[0054] Explanation of relevant technical terms:

[0055] Other materials that may aid in understanding: (1) Application scenarios: ontological transformation of subway equipment ledger system, automatic discovery of operation and maintenance knowledge graph pattern layer, cross-professional equipment data semantic integration, and pattern support for fault diagnosis reasoning engine.

[0056] (2) Relationship with related patents: This patent constructs a TBox based on the knowledge graph of equipment instances, which complements the association rule relationship discovery method based on work order text. The generated TBox can be connected to ontology consistency detection and operation and maintenance reasoning applications.

[0057] (3) Algorithm complexity: similarity matrix calculation O(N²·|A|), hierarchical agglomerative clustering O(N²logN), hierarchical abstraction O(|C1|²); under the scale of tens of thousands of device instances, it can meet practical requirements through professional parallelism and indexing.

[0058] Simulation verification: Overall Project Implementation Description: A complete simulation program (Src / main.py) is implemented based on the Python standard library. The input is mock data of a knowledge graph of subway equipment instances (Input / equipment_kg.json), and the output is an abstract result (Output / result.json) and console logs (Output / run_log.txt). The program executes according to the following steps: S1 (ABox parsing): Loads attribute assertions and relation assertions for 29 device instances, totaling 227 triples; extracts the attribute predicate set, relation predicate set, and value pattern (numeric / line enumeration / date / asset number / voltage level, etc.) for each instance.

[0059] S2 (Similarity Calculation): Calculate the comprehensive similarity matrix of 406 pairs of instances according to Sim=0.4·attribute Jaccard+0.3·relationship Jaccard+0.3·value pattern matching rate.

[0060] S3 (Instance Grouping): Average Connection Hierarchical Agglomerative Clustering, merging the two groups with the highest similarity in each round, stopping when the highest similarity is lower than θ_group=0.80.

[0061] S4 (Hierarchical Abstraction): L1 Generalization (instance group → specific device class) → L2 Aggregation (merge classes with average inter-class similarity ≥ θ_union = 0.50 into a professional class, implemented using a disjoint set) → L3 Merging (merge classes with average inter-class similarity ≥ θ_merge = 0.30 into a root class).

[0062] S5 (TBox Generation and Constraint Inference): Generates OWL classes, subClassOf axioms, data attributes (domain / range / cardinality constraints), and object attributes.

[0063] S6 (Quality Assessment): Grouping accuracy (compared to expert annotations), Information retention (I), Structural simplicity (C), Overall quality (Q).

[0064] Overview of simulation input data: The input knowledge graph covers 29 instances of 11 equipment categories across four disciplines: vehicle discipline (pantograph 4, bogie 3, traction motor 3, door system 2), signaling discipline (switch machine 4, signal 3, axle counter 2), power supply discipline (overhead contact line section 2, main transformer 2), and electromechanical discipline (platform door 2, turnstile 2). Each instance contains general attributes (asset ID hasAssetId, line number hasLine, installation date hasInstallDate), discipline attributes (vehicle hasMileage / signal hasSIL / power supply hasVoltageRating / electromechanical hasStationId), equipment-specific attributes (e.g., pantograph hasCarbonStripThickness, switch machine hasThrowForce), and two relation assertions (partOf electric train / installedAt switch section / suppliesTo traction substation / locatedAt station, maintainedBy corresponding maintenance center). To simulate real-world ledger noise, the last instance in each category with ≥3 instances is missing a specific attribute field. Each instance is accompanied by an expert-annotated category (used only for accuracy evaluation and not involved in feature calculation).

[0065] Intermediate calculation results: The similarity calculation results for representative instances are shown in the table below (the complete matrix can be found in the calculation log in result.json):

[0066] Instance grouping results (θ_group=0.80, 29 instances → 11 groups, each group has 100% purity):

[0067] Grouping accuracy: 29 / 29 = 100% (compared to expert annotations).

[0068] Hierarchical abstraction and TBox generation results: Level 1 (11 specific equipment categories): pantograph, bogie, traction motor, door system, switch machine, signal, axle counter, overhead contact line section, main transformer, platform screen door, and turnstile.

[0069] Layer L2 (4 specialized equipment items, θ_union=0.50):

[0070] L3 (root class): Rail transit equipment, with 4 subclasses of professional equipment (θ_merge=0.30, cross-professional similarity 0.333≥0.30 triggers merging).

[0071] TBox statistics: 16 OWL classes, 15 subClassOf axioms (11 specific classes → professional classes + 4 professional classes → root class), 61 data attributes, and 8 object attributes. Constraint inference example: `hasAssetId` appears exactly once in all instances within the group, inferred to be a functional attribute (cardinality exactly 1), corresponding to the ledger management rule of "unique asset number for each device"; `hasMileage` value range is inferred to be numeric, and `hasLine` value range is inferred to be line enumeration type.

[0072] Abstract quality assessment and results analysis:

[0073] Results analysis: (1) The three-level threshold system correctly reproduced the business structure of rail transit equipment classification - θ_group=0.80 distinguishes equipment types (same type similarity 1.0, noisy instance 0.88 both passed), θ_union=0.50 distinguishes professional boundaries (same professional 0.65 passed, cross professional 0.33 isolated), θ_merge=0.30 identifies commonalities of fixed assets (0.33 passed merged into root class); (2) The hierarchical structure is completely consistent with the actual professional maintenance division of labor (vehicle / signaling / power supply / electromechanical maintenance center), verifying that "data-driven abstraction results conform to industry organizational structure"; (3) The reason why the information retention rate did not reach 1.0 is that the unique attributes of the noise missing instance did not enter the group common attributes - this is in line with the design expectation: occasionally missing fields should not become the defining attributes of the class, reflecting the robustness of the method to ledger noise; (4) All calculations are completed in milliseconds, and the end-to-end abstraction of 29 instances does not require manual intervention, verifying the engineering practicality of the method.

[0074] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A bottom-up automatic abstraction method for urban rail transit equipment ontology models based on knowledge graphs, characterized in that: Includes the following steps: S1. Obtain the knowledge graph of urban rail transit equipment instances. The knowledge graph of equipment instances is a pure ABox, including attribute assertions and relation assertion triples of equipment instances. S2. Extract features from the device instance to obtain the feature vector of the device instance; S3. Calculate the comprehensive similarity between device instances based on the feature vectors; S4. Cluster the device instances according to the comprehensive similarity to obtain multiple instance groups; S5. Perform bottom-up hierarchical abstraction on multiple instance groups to generate a multi-layer OWL device ontology model, i.e., TBox; S6. Refine and evaluate the quality of the OWL equipment body model, and output the final urban rail transit equipment body model.

2. The automatic abstraction method for urban rail transit equipment ontology model based on bottom-up knowledge graph as described in claim 1, characterized in that, In S2, the feature vector includes five-dimensional features: Type features, attribute features, outbound edge features, inbound edge features, and value pattern features, among which, In a pure ABox scenario, the type feature is empty; The attribute features are the set of attribute predicates possessed by the device instance; The outgoing edge relationship feature is a set of relational predicates for device instances; The value pattern feature is the structural pattern of the values ​​of each attribute.

3. The automatic abstraction method for urban rail transit equipment ontology model based on bottom-up knowledge graph as described in claim 2, characterized in that, In S3, the overall similarity is calculated according to the following formula: Sim(e1,e2) = w_a·Jac(A1,A2) + w_r·Jac(R1,R2) + w_v·ValSim(V1,V2) Where Sim(e1,e2) is the comprehensive similarity between device instances e1 and e2; Jac(A1,A2) is the Jaccard coefficient of the attribute feature set of device instances e1 and e2; Jac(R1,R2) is the Jaccard coefficient of the relation feature set of device instances e1 and e2; ValSim(V1,V2) is the value pattern similarity between device instances e1 and e2, which is the proportion of consistent value patterns in the attribute set; w_a, w_r, and w_v are the weights of attribute features, relation features, and value pattern features, respectively, and (w_a,w_r,w_v)=(0.4,0.3,0.3).

4. The automatic abstraction method for urban rail transit equipment ontology model based on bottom-up knowledge graph as described in claim 3, characterized in that, In S4, hierarchical agglomerative clustering with average joins is used to group device instances, dividing the device instance set E into k disjoint subsets G1...Gk, where the similarity of instances within a group exceeds the threshold θ_group=0.80; the physical meaning of θ_group is to allow approximately 20% of the ledger fields to be missing noise.

5. The automatic abstraction method for urban rail transit equipment ontology model based on bottom-up knowledge graph as described in claim 4, characterized in that, In S5, the bottom-up hierarchical abstraction includes: S51. Use the generalization operator to generalize the group of instances with common attribute patterns into the parent class, and generate the L1 layer device concrete class; S52. Use the aggregation operator to merge classes with inter-group similarity exceeding the threshold θ_union=0.50 into a union class to generate L2 layer professional equipment classes; S53. Use the merge operator to merge the professional equipment classes that semantically belong to the fixed assets of rail transit into the L3 level rail transit equipment root class under the threshold θ_merge=0.30; Among them, θ_union=0.50 corresponds to the boundary of professional maintenance division of labor, and θ_merge=0.30 corresponds to the common attributes of fixed assets.

6. The automatic abstraction method for urban rail transit equipment ontology model based on bottom-up knowledge graph as described in claim 5, characterized in that, In S5, generating a multi-layered OWL device ontology model includes: generating an OWL class for each instance group, with labels and URIs generated from common attribute patterns; generating owl:DatatypeProperty from the common attribute predicates of the group, with its domain being the class; generating owl:ObjectProperty from the relation predicates, with its domain being the professional class and its range being the set of relation target objects; and generating the subClassOf axiom based on the abstraction level, satisfying reflexivity, transitivity, and antisymmetry.

7. The automatic abstraction method for urban rail transit equipment ontology model based on bottom-up knowledge graph as described in claim 6, characterized in that, In S6, the refining and quality assessment includes: Eliminate semantically redundant classes and attributes; Inferring attribute constraints from instance data: If each instance in the group has exactly one value for a certain attribute, then the cardinality constraint is inferred as exactly1; the range constraint is inferred from the value pattern. Calculate the information retention rate I = the proportion of instance triples covered by TBox attributes / relationships; The structural simplicity C is calculated as 1 - |C| / |E|, where |C| is the number of classes and |E| is the number of instances. Calculate the overall quality Q = 0.6·I + 0.4·C.

8. The automatic abstraction method for urban rail transit equipment ontology model based on bottom-up knowledge graph as described in claim 1, characterized in that, It also includes an incremental update step: when a new device instance is added, if its similarity with the existing instance group is ≥ θ_group, it is assigned to the existing class for class extension; otherwise, a new class is created for new class discovery, and the subClassOf relationship is locally recalculated for hierarchical adjustment.

9. A storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the automatic abstraction method for urban rail transit equipment ontology model based on knowledge graph bottom-up as described in any one of claims 1-8.

10. A computer device, characterized in that, include: The method includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the automatic abstraction method for urban rail transit equipment ontology model based on knowledge graph from bottom to top, as described in any one of claims 1-8.