Proposal: Standardized NGSI-LD URN (Identifier) Structure for Federated Digital Twins in V2

Hello everyone,

As we are evaluating the upcoming Civitas Core V2 and exploring the implementation of NGSI-LD for Local Digital Twins (LDTs), I want to open a discussion about a fundamental but critical topic: Unique Identifiers (URNs).

For my master’s thesis and our ongoing smart city projects, we’ve been testing scenarios for „truly federated“ digital twins based on Minimal Interoperability Mechanisms (MIMs). A core requirement (MIM1) is that every entity within the system must have a universally unique identifier.

Currently, without a strict naming convention, different domains, tenants, and external systems tend to generate conflicting or opaque identifiers (e.g., overlapping numeric IDs, untraceable UUIDs, or localized formats like 123/2026). This leads to data silos, prevents cross-domain linking, and causes fatal collisions when we try to federate data from multiple sources (e.g., city council, utility companies, external contractors).

The Proposed Solution

To solve this, I propose adopting a strict, five-segment URN structure for all NGSI-LD entities within the Civitas/Core V2 platform:

Format:
urn:ngsi-ld:{EntityType}:{DataOwner}:{EntitySubtype}:{UniqueId}

Example:
urn:ngsi-ld:Equipment:gov_boston:lamp:1024

Structure Breakdown:

  1. urn:ngsi-ld: (Machine Prefix): The static prefix ensuring adherence to the global ETSI NGSI-LD standard.

  2. {EntityType} (The World/Domain): Broad classification in PascalCase (e.g., Device, Equipment, Building, Contract). Ideally mapped to global ontologies like Smart Data Models.

  3. {DataOwner} (The Digital Stamp): Identifies the organization responsible for the data. Formatted as a reverse-domain (e.g., gov_boston or digital_civitasconnect). This is the core mechanism that enables multi-tenancy and federation.

  4. {EntitySubtype} (Agenda/Classifier): A kebab-case abbreviation grouping similar items (e.g., lamp, air-sensor, invoice).

  5. {UniqueId} (Local ID): The specific, local identifier (e.g., 1024, 2026-145).

Key Benefits for Civitas Core V2

  • Guaranteed Uniqueness Across Federation: If a city and a private contractor both have a lamp with local ID 1024, the {DataOwner} segment ensures they never conflict when data spaces are merged.

  • Semantic Clarity: Unlike opaque UUIDs (e.g., 550e8400-e…), this format is highly human-readable. A developer, data scientist, or even an AI assistant can immediately look at the URN and know exactly what it is and who owns it.

  • Stable and Immutable: The URN represents the physical essence of the object. Volatile properties (like its current street location or current owner) are modeled as entity relationships, not embedded in the ID.

  • AI & Automation Ready: A standardized structure makes it incredibly easy to build integrations. For example, we successfully tested an MCP Server connected to an AI assistant (Claude/Copilot) that could effortlessly read, validate, and display NGSI-LD data directly from the context broker, simply because the entity structures and URNs were predictable.

Trade-offs to consider

  • Identifiers are longer than simple integers.

  • Requires a bit of governance (or automated validation) to ensure {EntitySubtype} abbreviations remain consistent.

  • Legacy systems using invalid characters (like / or spaces) will need their IDs transformed (e.g., replacing slashes with hyphens) to remain URL-safe.

  • Alternatively, should we consider generating identifiers using DIDs? If we do, we lose the ability to easily map data from existing legacy systems to NGSI-LD. Furthermore, if a company loses the private key that controls their did:key:z6M…, they lose their verifiable proof of ownership. On the other hand, implementing DIDs ensures that external parties can cryptographically trust the ownership of the ID, which is a major benefit to consider. However, I suppose that when data needs to be verified, it will typically be fetched directly from the municipality’s public Context Broker API endpoint anyway, which inherently provides an institutional layer of trust.

I strongly believe that implementing this standard natively in V2 will save municipalities massive headaches regarding data silos and make cross-departmental analytics a breeze.

I would love to hear your thoughts on this! How are you currently handling entity identifiers in your local setups? Would this structure fit your municipality’s needs?

Best regards,
Marek Mráz

( ETSI GS CIM 009 and ETSI GS CIM 020 )

Hi,

thanks a lot for bringing up the topic of NGSI-LD and unique identifiers (URNs) — this is definitely a very relevant aspect, especially in the context of interoperability and alignment with MIM1.

Just to clarify our current direction: URN-based identifiers will naturally be introduced together with NGSI-LD, as they are an integral part of the standard and its data modeling approach.

At the moment, however, the NGSI-LD feature itself is relatively low-priority within the CORE community in the roadmap, based on current member needs and use cases. For that reason, it is planned for inclusion in a later version of the platform rather than in the immediate roadmap.

That said, once we move forward with the implementation of NGSI-LD, we will also provide:

  • a comprehensive Architecture Decision Record (ADR)
  • detailed documentation of the implementation patterns
  • including the use of URNs as part of the NGSI-LD approach

Regarding the specific ADR you mentioned:
:point_right: NGSI-LD: Standardized URN (Identifiers) Structure (proposal) (#1277) · Issues · Civitas Connect e.V. / CIVITAS CORE / CIVITAS CORE V2 / CIVITAS CORE Platform · GitLab

We plan to close this as a standalone item, since it does not make sense to introduce URNs independently of NGSI-LD. Instead, it will be fully integrated into the broader NGSI-LD implementation and its corresponding ADR at a later stage.

Thanks again for the valuable input — it definitely aligns with where we want to go, even if it’s slightly further down the roadmap.

Best regards

Mario