Diagram Parsing

The Diagram Parsing system enables users to onboard, interpret, and match physical diagrams (e.g., P&IDs, wiring diagrams, system layouts) with real-world Reliability Assets and Sensors. This connection enables richer metadata-driven monitoring and improves onboarding at scale.

Mermaid Diagram


Core Concepts

ConceptDescription
ParsableDiagramRepresents a diagram ready to be parsed. Stores the raw source and an extracted image version. Tracks parsing status and extracted objects.
ParsedAssetRepresents detected equipment (assets) on the diagram. Connected to diagram extracts and bounding boxes for layout.
ParsedSensorRepresents detected sensors. Parsed text (e.g., label IDs) are linked to MasterSensor objects to validate accuracy.
MasterSensorCanonical sensors in the system, allowing parsed sensor text to be validated and matched against known assets.
SourceParsableDiagramRepresents the raw source file uploaded for parsing. Supports triggering parsing workflows and creating ParsableDiagram entries.
LabeledDiagramContains annotations (bounding boxes, labels) for assets and sensors over the diagram image.
DiagramParsingMatchingHelperAssists matching parsed sensor labels to existing sensors in the system using heuristics and confidence scores.

Key Processes

ProcessDescription
Upload DiagramUpload P&ID or system diagram as a SourceParsableDiagram.
Trigger ParsingStart an extraction workflow that identifies bounding boxes, parses text, and attempts auto-matching.
Parsed Sensor / Asset ReviewUsers validate matches or manually correct parsed sensors and assets.
Asset/Sensor ConnectionParsed items are linked to ReliabilityAsset and Sensor entities in the database.
Annotation & ReviewBounding boxes and extracted annotations are stored in LabeledDiagram for visual review and editing.
Parsing Status TrackingparsingStatus field in ParsableDiagram tracks the lifecycle: Pending → Processing → Completed.
Handling Collisions and DuplicatesColliding sensors and duplicate detections are flagged for manual review.

Important Fields

FieldMeaning
parsingStatusIndicates parsing progress (e.g., Pending, Parsing, Parsed, Failed).
parsedTextThe raw OCR output text for a parsed sensor candidate.
matchConfidenceScoreNumerical score representing the likelihood of correct sensor match (higher = better).
connectedSymbolsSet of symbol IDs in the diagram that are considered logically connected (e.g., piping flow).
boundingBoxCoordinates of parsed assets and sensors, supporting UI overlays for diagram visualization.

How This Supports Reliability

Diagram parsing accelerates the onboarding and configuration of Reliability systems, especially in environments with thousands of assets and sensors.
Instead of manually setting up every sensor, facilities can upload diagrams, semi-automatically parse asset/sensor data, verify matches, and link everything directly to Reliability monitoring models.
It drastically reduces onboarding time, increases data fidelity, and supports scalable deployments across facilities.