Traffic Guardian Domain Model

Understanding the Domain Model

The domain model represents the key entities in our Traffic Guardian system and their relationships. This model guides our development and ensures that our implementation aligns with the real-world domain of traffic monitoring and incident response.

Core Entities

TrafficCamera

Represents physical cameras deployed across the road network. Each camera has a unique identifier, geolocation coordinates, operational status, and a URL for accessing its video stream.

  • cameraId: String
  • location: GeoCoordinates
  • status: Status
  • streamUrl: URL

VideoStream

Represents the live video feed from a traffic camera. Each stream has metadata about its source, quality, and timing information.

  • streamId: String
  • sourceCamera: Camera
  • startTime: DateTime
  • quality: Quality

IncidentDetection

Represents the system's detection of a potential incident. Contains information about confidence level, timestamp, and the frame data that triggered the detection.

  • detectionId: String
  • timestamp: DateTime
  • confidence: float
  • frameData: Image

TrafficIncident

Represents a confirmed traffic incident. Contains detailed information about the type, location, severity, and current status of the incident.

  • incidentId: String
  • type: IncidentType
  • location: GeoCoordinates
  • severity: Severity
  • status: Status

Alert

Represents a notification sent to operators or emergency services about an incident. Contains information about priority, timestamp, and current status.

  • alertId: String
  • incident: Incident
  • timestamp: DateTime
  • status: AlertStatus
  • priority: Priority

Operator

Represents a traffic control center operator who uses the system. Contains information about their role, status, and contact details.

  • operatorId: String
  • name: String
  • role: Role
  • status: Status
  • contactInfo: Contact

IncidentArchive

Represents the historical record of a traffic incident. Contains media files, metadata, and links to the original incident record.

  • archiveId: String
  • incident: Incident
  • mediaFiles: List<Media>
  • metadata: Metadata

Key Relationships

TrafficCamera → VideoStream

A traffic camera provides one or more video streams. This relationship is essential for tracing detected incidents back to their source cameras.

VideoStream → IncidentDetection

Video streams are analyzed by our AI system to produce incident detections. Multiple detections may occur from a single stream.

IncidentDetection → TrafficIncident

An incident detection, once confirmed (either automatically or by an operator), becomes a traffic incident in the system.

TrafficIncident → Alert

A traffic incident triggers one or more alerts to notify operators and emergency services.

Alert → Operator

Alerts notify operators who can then take appropriate action based on the incident information.

TrafficIncident → IncidentArchive

Traffic incidents are stored in the incident archive for historical analysis and reporting.

Operator → IncidentArchive

Operators can access the incident archive to review historical incidents and generate reports.