Web3.0 Commerce Ontology Experiment

-------------------------------------------  Draft:   starting 7/8/2023 and ending 8/1/2023  ------------------------------------------

Ontology to support Web3.0 Commerce solution development.  

A clear semantic representation of Web3.0 commerce is essential to constructing future applications and composable services.  A robust ontology that captures classes, relationships and constraints is foundational to: 

  


Experiment Goals:


Solution

RichCanvas Commerce Ontology (comm-rc) is dedicated to capturing modern commerce classes and their relationships.   

comm-rc Ontology fundamentally builds upon W3C Provenance and Planning Ontology principles of Agent, Entity and Activity

   

To keep comm-rc Ontology as simple as possible we focus on core commerce entities and associated behavior.   

Web3.0 app's need to trace provenance of commerce entities back to their Blockchain counterparts.  comm-rc Ontology must maintain ontological alignment with Ethereum NFT's, associated Smart Contracts, Accounts and Wallets.

comm-rc Ontology layers on top of our flow-rc Ontology.  flow-rc Ontology brings together Provenance and Planning.  flow-rc also brings in Ethereum Smart Contract, Transaction and NFT references.

Custom Ontologies and Knowledge Bases can be built upon comm-rc.  The diagram below shows how it can be extended to create a metaverse ontology.

flow-rc Ontology

flow-rc includes the Prov Ontology concept of Influence (Agent Influence, Activity Influence, and Entity Influence).  This allows for the Ontology to capture Agent Behavior and Entity Generation.  

Notice the Execution layer is above the Specification layer

eth-rc Ontology is used by flow-rc to capture the Ethereum relationships for Agent, Entity and Activity.  There are times when third party applications will want to query the knowledge base using blockchain terms.  For example, an app might want to query for all Ethereum contract addresses which support an ERC721 Interface which can mint metaverse land NFT Assets.  This query can use the eth-rc Ontology to query the Metaverse Knowledge Base.  Now that's cool.

comm-rc Ontology extension of flow-rc Ontology

comm-rc Ontology extends flow-rc to introduce commerce specific entities of Asset, Offering, Category, and Catalog.  It also introduces the concept of Factory which represents an Software Agent that initiates Tasks. 

Notice the Execution layer is above the Specification layer.

metaverse knowledge base leverages the comm-rc Ontology

A metaverse Land Asset Creation scenario is depicted in the diagram below.  Individual Instances of each of the comm-rc and flow-rc classes are shown.  

Notice the Specification is above the Execution layer in this diagram below.

turtle representation of CreateAssetTask and associated Factory CreateAssetBehavior

SPARQL Query to retrieve factory specification (smart contract specification) for 'land asset' specifications

SELECT DISTINCT ?entitySpec ?generationSpec ?factorySpec  ?assetTypeSpec ?assetTypeName WHERE { ?entitySpec flow-rc:qualifiedGenerationSpec ?generationSpec. ?entitySpec prov:wasAttributedTo ?factorySpec. ?entitySpec comm-rc:definedByAssetTypeSpec ?assetTypeSpec. ?assetTypeSpec foaf:name ?assetTypeName. FILTER( ?assetTypeName = 'land')  }

query result:

[["r0:", "[['?entitySpec', 'commgen-test-out.landSpec_1'], ['?generationSpec', 'commgen-test-out.landGenerationSpec_1'], ['?factorySpec', 'commgen-test-out.landFactory_1'], ['?assetTypeSpec', 'commgen-test-out.landTypeSpec_1'], ['?assetTypeName', 'land']]"]]

Related Works

The challenge in building a rich commerce ontology is to make it "usable" while also maintaining the alignment to established and key abstract classes and relationships found in W3C standards for example Provenance Ontology link.  

With the emergence of the Artificial Intelligence hysteria, comes a renewed focus on the semantics of data and ontology.   A lesser hyped quest for composability is also driving the need for well defined API's and unification of classes and relationships behind those API's.   The requirement of information provenance and control essential in uses cases like AI and GDPR.

 

Legacy Foundational Work

Provenance and Commerce are key areas of the comm-rc ontology.

The W3C Provenance Ontology was established around 2013 and serves as the foundation for our commerce ontology.  PROV-O shown below, capture the three key classes of Agent, Entity and Activity along with all the relationships between these classes.  This ontology also captures the key concept of collections. 

The PROV-O ontology captures the chronology of the What, When, Why, Where, hoW, Who and Which in producing things within a system.  This is sometimes referred to as the "Execution" model.  These models helps capture the Execution of things.

Other key terms


PLAN-P ontology, and extension of PROV-O, captures an abstract description of the workflows.  Kind of a workflow template.  This is sometimes referred to as the "Description" model.  It describes the steps involved in a particular past execution.  A Plan is intended for the discovery phase when a user would like to examine the capabilities of the system.

Semantic web service description and discovery (W7 Ontology) link.  Extends the P-Plan ontology to support web service description.  

This model closely resembles the behavior of Ethereum Smart contracts.  An NFT, in concert with its associated Smart Contract, brings together data and code. 


Open Provenance Model for Workflows

Built around 2015

Extends Prov and works along side Plan

https://www.opmw.org/model/OPMW/

OPMW extends PROV, OPM and P-Plan in order to capture the execution traces of a workflow template (process view provenance) 

Good overview of different flow related ontologies

Provenance Description of Metadata using PROV with PREMIS for Long-term Use of Metadata 


Community focusing on this area (more recent)

https://www.opmw.org/interoperability.html


OWL-S (formally known as DAML-S) in 2004 link

Services on the Semantic Web (Service Discovery and Invocation)

Service Profile:  similar to prov-o:plan

This is a good foundation for describing the behavior and operations of an Ethereum smart contract.


EthOn (Ethereum Ontology)

Built by Consensys, Started around 2017



EthOn and BLONDiE Ontologies do a good job of representing Blockchain and Ethereum structure, but do little to capture associated behavioral mechanics.   

https://github.com/ConsenSys/EthOn

https://github.com/ethereum/yellowpaper (6-9 years ago)

https://ethon.consensys.net/

http://ethon.consensys.net/Contracts/v0/


example

https://finregont.com/2017/02/21/ethereum_fibo_alignment/


EthExtras (extension of EthOn)

A middleware for systems consumes Ethereum data in soft real-time: a Semantic Web approach

Focusing in on NFT and IPFS

Implementation using EthExtras, https://github.com/celiomarcio/semanticethon/blob/main/lib/semantics.py

Future work: NFT,  Tokens,  ENS,  IPFS  and  somefamous  Oracle  Services

 

BLONDiE

Blockchain Ontology with Dynamic Extensibility (BLONDiE), Started in 2008

Blockchain based (sits over bitcoin and ethereum,  not really factor in smart contract principles

https://arxiv.org/pdf/2008.09518.pdf

Does not cover concepts of Contract or workflow/supply chain

BLONDiE is not as detailed as EthOn with Contract extension so we are extending EthOn for our eth-rc Ontology

 

Solidity smart contract model

Solidity Ontology link  

https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=9548044

 

good overview and ties into ethon

https://ieeexplore.ieee.org/document/9548044


GBO modern Ethereum extension of EthOn (very detailed)

https://repositorio.iscte-iul.pt/bitstream/10071/25567/1/article_88890.pdf


Commerce 


GoodRelations, and eClass Ontology



eClassOwl link

Aspirational Work

RichCanvas Commerce ontology builds upon work done by Daniele Santamaria and team link.  Over the past few years they have developed an ontology that focuses on Web3.0 commerce.  Their oasis ontology provides many of the foundational commerce class and relationship features.  They build upon an abstract behavioral pattern that supports both the planning and execution.  They have continually refine and enhanced their ontologies and give lots of real world examples.   

This OASIS and POC4COMMERCE has a significant thought leadership position in this very specialized area.  They have taken legacy ontology concepts and synthesized them into a very elegant solutions.



RichCanvas ontologies leverages many of their core principles from OASIS, but takes on a narrower scope of NFT Commerce.  RichCanvas also employs a more concrete vocabulary that is relevant to the narrower scope we have on NFT Commerce.

RichCanvas ontologies also draws from PROV-O ontology.  Our current narrower scope does not require the robust behavior pattern OASIS has developed.  

OASIS v2.0 more recent works significantly enhanced their commercial ontology (ec-oasis) and introduced Process/Procedure extensions to support more robust planning operations and discovery.  Some really good work.



A few documentation things we hope will make RichCanvas ontology simpler to understand.

Modeling Simplifications


OASIS Key Patterns and Abstractions

OASIS Commerce Analysis

ec-oasis and oc-commerce ontologies support commerce.  ec-oasis looks to be a more recent ontology.

ec-oasis model (our interpretation of oc-oasis focused on commerce, not official oasis diagram)

oc-commerce is earlier work (I believe) where offering is not split off from activity.  Here is my model of oc-commerce (based on diagram from oasis documents and ontology)

Similar Examples/Use-Cases that leverage NFT's and Ontology


Copyright Management associated with Metaverse

https://arxiv.org/pdf/2208.14174.pdf