Concept | Description |
---|---|
ParsableDiagram | Represents a diagram ready to be parsed. Stores the raw source and an extracted image version. Tracks parsing status and extracted objects. |
ParsedAsset | Represents detected equipment (assets) on the diagram. Connected to diagram extracts and bounding boxes for layout. |
ParsedSensor | Represents detected sensors. Parsed text (e.g., label IDs) are linked to MasterSensor objects to validate accuracy. |
MasterSensor | Canonical sensors in the system, allowing parsed sensor text to be validated and matched against known assets. |
SourceParsableDiagram | Represents the raw source file uploaded for parsing. Supports triggering parsing workflows and creating ParsableDiagram entries. |
LabeledDiagram | Contains annotations (bounding boxes, labels) for assets and sensors over the diagram image. |
DiagramParsingMatchingHelper | Assists matching parsed sensor labels to existing sensors in the system using heuristics and confidence scores. |
Process | Description |
---|---|
Upload Diagram | Upload P&ID or system diagram as a SourceParsableDiagram . |
Trigger Parsing | Start an extraction workflow that identifies bounding boxes, parses text, and attempts auto-matching. |
Parsed Sensor / Asset Review | Users validate matches or manually correct parsed sensors and assets. |
Asset/Sensor Connection | Parsed items are linked to ReliabilityAsset and Sensor entities in the database. |
Annotation & Review | Bounding boxes and extracted annotations are stored in LabeledDiagram for visual review and editing. |
Parsing Status Tracking | parsingStatus field in ParsableDiagram tracks the lifecycle: Pending → Processing → Completed. |
Handling Collisions and Duplicates | Colliding sensors and duplicate detections are flagged for manual review. |
Field | Meaning |
---|---|
parsingStatus | Indicates parsing progress (e.g., Pending , Parsing , Parsed , Failed ). |
parsedText | The raw OCR output text for a parsed sensor candidate. |
matchConfidenceScore | Numerical score representing the likelihood of correct sensor match (higher = better). |
connectedSymbols | Set of symbol IDs in the diagram that are considered logically connected (e.g., piping flow). |
boundingBox | Coordinates of parsed assets and sensors, supporting UI overlays for diagram visualization. |