In creating our Web3.0 Catalog Services we quickly found that we needed a way to provide a smart search capability.
Our smart search needed to incorporate natural language techniques as well as some of the cool Artificial Intelligence capabilities. To do this we needed to adopt an e-Commerce ontology that captured the richness of our Products, Assets, Providers, Offers within the overall e-Commerce flow.
We chose to leverage concepts being developed within the POC4Commerce initiative. This is an exciting project that is laser focused on providing ontology solutions for NFT Asset based e-commerce eco-systems.
POC4Commerce, represents commercial agents and activities, goods, products, offerings, and services related with business and commerce. link
Here is an overview of the key concepts we've digested from their work. We also discuss at the end how we were able to leverage these principles for our effort.
Six challenges facing the ecommerce ecosystem link :
existing product data are not suitable for automated processing
product data often lack interoperability
insufficient use of unique product identifiers
heterogeneity of product category taxonomies
incomplete, inconsistent, or outdated product descriptions
weakness of current product recommender systems
Shortcomings of NFT blockchain (Probing the blockchain for identifying the appropriate NFT or smart contract).
pre-existing knowledge of the the contract address
storing of data off-chain because of the cost of on-chain storage
e-Commerce workflow
registration with web service
product and service publishing
(OC-Commerce and OC-Ethereum ontologies)
product and service search and selection
(OC-CSE) - SPARQL searches
purchase
Based heavily on OASIS standard which is abstract to support many use-cases. Our Commerce use-case is very narrow to Ethereum smart contracts and specifically NFT's. The standard and derived work seams to be heading in this direction.
Is based on BLONDiE blockchain ontology and not on something more complete like EthOn Onlogology that provides more detail. Not sure why the chose BLONDiE. They reference EthOn in this document "Semantic Representation as a Key Enabler for Blockchain-Based Commerce". They say these have "poor semantic description of smart contracts". OASIS Agent Behavior Schema provides a framework to build upon
ONTOCHAIN project’s ambition is to advance and federate blockchain and semantic technologies to enable a more human-centered Internet and to foster new opportunities in the data market and in a new generation of decentralized applications.
Threats
Centralization of power
Unknown provenance of information
Anonymity and unreliable identities
No fair rewards for good quality contributions
Bias in AI software
Trustworthy blockchain service interoperability
ONTOCHAIN Architectural Layers
Solution domain;
Use cases;
Application protocols;
Core protocols;
Distributed ledgers.
This block seeks to define new ways for implementing ontologies with the use of Blockchain. Common components of ontologies include:
Individuals, such as instances, persons or objects (the basic or "ground level" objects, but they can be also abstract),
Classes, such as sets, collections, concepts, classes in programming, types of objects or kinds of things,
Attributes, such as aspects, properties, features, characteristics or parameters that objects (and classes) can have,
Relations, such as ways in which classes and individuals can be related to one another,
Function terms, such as complex structures formed from certain relations that can be used in place of an individual term in a statement,
Restrictions, such as formally stated descriptions of what must be true in order for some assertion to be accepted as input,
Rules, such as statements in the form of an if-then (antecedent-consequent) sentence that describe the logical inferences that can be drawn from an assertion in a particular form,
Axioms, such as assertions (including rules) in a 27 logical form that together comprise the overall theory that the ontology describes in its domain of application. This definition differs from that of "axioms" in generative grammar and formal logic. In those disciplines, axioms include only statements asserted as a priori knowledge. As used here, "axioms" also include the theory derived from axiomatic statements,
Events, such as the changing of attributes or relations, and at the pinnacle,
any reasoning approaches, tools and methods that can help deduce new knowledge arriving from a sensing IoT empowered environment.
Project ontology sources:
OASIS, commercial participants and smart contracts
GoodRelations is an OWL vocabulary to describe commercial offerings
BLONDiE and Ethon for knowledge of smart contracts
Project Python Modules
OCGEN Module: allows user to generate RDF graph for ontology
OC-Commerce Search engine to search ontology. SPARQL queries
eCommerce workflow covered by POC4Commerce
registration
product and service publishing
(OC-Commerce and OC-Ethereum ontologies)
product and service search and selection
(OC-CSE) - SPARQL searches
purchase
Local Project
C:\ontologies\POC4COMMERCE-main\python
Getting POC4Commerce to work in Windows environment. Issues we ran into are probably just newbies stuff and relating to Windows, but I wanted to capture them for future builds.
download github project https://github.com/dfsantamaria/POC4COMMERCE
PyCharm community development environment
Install Java JRE. Make sure and get 64bit version https://www.java.com/en/download/manual.jsp
Read the documentation. https://github.com/dfsantamaria/POC4COMMERCE/blob/main/documentation/ONTOCHAIN_D3.pdf
Project has referenced owl files that had links that did not resolve. I had to download all the oasis and other owl files and reference them directly.
load is no longer supported. changed to ontology.parse(file, format='xml') and added format type
subprocess.py has an error in windows. Needed to change shell=False to shell=True.
added this hack to triplelite.py to resolve resources. I'm not sure why there is this problem but this fixes it.
def _abbreviate(self, iri, create_if_missing = True):
...
if r == None:
checkIri = '%' + iri
r = self.execute("SELECT storid FROM resources WHERE iri like ? LIMIT 1", (checkIri,)).fetchone()
if r: return r[0]
ocget-test.owl
<rdf:Description rdf:about="local-ontologies/ocgen-test.owl#batch2563Offering">
<ns2:isOfferingAbout rdf:resource="local-ontologies/ocgen-test.owl#appleBatch2563"/>
<ns3:hasSupplyChainManagement rdf:resource="local-ontologies/ocgen-test.owl#appleSupplyChainMan"/>
<rdf:type rdf:resource="local-ontologies/oc-commerce.owl#AcceptedOffering"/>
<rdf:type rdf:resource="local-ontologies/oc-commerce.owl#Offering"/>
</rdf:Description>
<rdf:Description rdf:about="local-ontologies/ocgen-test.owl#Bob">
<oasis:performs rdf:resource="local-ontologies/ocgen-test.owl#valuateAppleOfferingTask"/>
<oasis:performs rdf:resource="local-ontologies/ocgen-test.owl#acceptOffTask"/>
<ns3:hasDigitalIdentity rdf:resource="local-ontologies/ocgen-test.owl#BobIdentity"/>
<oasis:hasBehavior rdf:resource="local-ontologies/ocgen-test.owl#BobValuerBehavior"/>
<rdf:type rdf:resource="OASIS-ontologies/oasis.owl#Agent"/>
<oasis:hasBehavior rdf:resource="local-ontologies/ocgen-test.owl#bobOfferingBehavior"/>
</rdf:Description>
<rdf:Description rdf:about="local-ontologies/ocgen-test.owl#appleProducerAgent">
<oasis:hasBehavior rdf:resource="local-ontologies/ocgen-test.owl#produceAppleBatchBehavior"/>
<rdf:type rdf:resource="OASIS-ontologies/oasis.owl#Agent"/>
<oasis:performs rdf:resource="local-ontologies/ocgen-test.owl#appleOfferingCreationTask"/>
<ns3:hasDigitalIdentity rdf:resource="local-ontologies/ocgen-test.owl#appleProducerAgentIdentity"/>
<oasis:hasBehavior rdf:resource="local-ontologies/ocgen-test.owl#AppleOfferingBehavior"/>
<oasis:performs rdf:resource="local-ontologies/ocgen-test.owl#appleBachTask"/>
</rdf:Description>
entity: 'local-ontologies/ocgen-test.owl#batch2563Offering'
agent
operation
operationOn
typeOf
[
"r3:",
"[['?agent', 'ocgen-test.appleProducerAgent'], ['?operation', 'oasis-abox.publish'], ['?operationOn', 'ocgen-test.batch2563Offering'], ['?typeOf', 'oc-commerce.AcceptedOffering']]"
],
[
"r4:",
"[['?agent', 'ocgen-test.appleProducerAgent'], ['?operation', 'oasis-abox.publish'], ['?operationOn', 'ocgen-test.batch2563Offering'], ['?typeOf', 'oc-commerce.Offering']]"
],
[
"r6:",
"[['?agent', 'ocgen-test.Bob'], ['?operation', 'oasis-abox.accept'], ['?operationOn', 'ocgen-test.batch2563Offering'], ['?typeOf', 'oc-commerce.AcceptedOffering']]"
],
[
"r7:",
"[['?agent', 'ocgen-test.Bob'], ['?operation', 'oasis-abox.accept'], ['?operationOn', 'ocgen-test.batch2563Offering'], ['?typeOf', 'oc-commerce.Offering']]"
]
Terms:
IRI (Internationalized Resource Identifier) within an RDF graph
An Oracle is a trusted off-chain program that can, at the request of a Smart Contract, examine real-world data and return it to the Smart Contract.
Activities coming up and links
https://ontochain.ngi.eu/content/poc4commerce-practical-ontochain-commerce
Hackathon #2: Developing trustworthy applications for commerce & other services
30 June – 01 July 2023 | Online
From Friday 30 June 09:00am CEST to Saturday 01 July 2023 16:00 CEST
Overview: https://www.youtube.com/watch?v=MuY3slZwN4A
https://github.com/dfsantamaria/POC4COMMERCE
http://docs.oasis-open.org/semantic-ex/ro-soa/v1.0/pr01/see-rosoa-v1.0-pr01.html
Ontology for Agents, Systems, and Integration of Services (in short, OASIS)
Web Ontology Language (OWL), Internet of Agents (IoA)
ontological smart contracts in OASIS
semantic web of things (SWoT)
Blockchain Ontology with Dynamic Extensibility (BLONDiE)
Good overview of POC4Commerce Ontology
https://github.com/dfsantamaria/POC4COMMERCE/blob/main/documentation/ONTOCHAIN_D1.pdf
Email: giamp@dmi.unict.it
Telephone: 095 7383072
Website: www.dmi.unict.it/giamp
GoodRelations
Ontology blockchain network
Latest code
OASIS last month
https://github.com/dfsantamaria/OASIS/tree/v2
Project
https://www.dmi.unict.it/santamaria/projects/oasis/oasis.php
Companies working in this area
iExec
The iExec Web3 Marketplace
NFTWatch
https://www.coexya.eu/en/references/what-is-nftwatch-project/
https://github.com/flyingrhinonz/nftwatch (not the same one)
https://ontochain.ngi.eu/content/nftwatch
ontologies included: namely FOAF, cidoc-crm, DBpedia, VIVO and Event
not sure if this is same project (ir ia nor
https://dorahacks.io/buidl/2411
OnToChain architecture overview
https://ontochain.ngi.eu/content/dkg
OnToChain
https://github.com/orgs/ONTOCHAIN/repositories
overview article
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9866539/
Offchain approach
https://ontochain.ngi.eu/content/desmo-ld
Related Project
GEONTOLOGY
POC4Commerce People
https://ontochain.ngi.eu/content/poc4commerce-practical-ontochain-commerce
At least 7 users who use the marketplace and therefore the token.
ADOS
https://airtrace.io/blog/solutions/airtrace-decentralized-oracle-system
https://ontochain.ngi.eu/content/ados
DESMO-LD
https://github.com/vaimee/desmo/blob/main/imgs/architecture.jpg
https://github.com/vaimee/desmo-dapp
https://ontochain.ngi.eu/content/desmo-ld
KNOWLEDGEX
https://www.knowledgex.eu/
https://ontochain.ngi.eu/content/kx-knowledgex
MFSSIA
https://www.dymaxion-mfssia.com/mfssia/
https://www.researchgate.net/publication/360621555_A_Blockchain_Implementation_for_Configurable_Multi-Factor_Challenge-Set_Self-Sovereign_Identity_Authentication
https://ontochain.ngi.eu/content/mfssia
DLMD
https://ontochain.ngi.eu/content/dlmd-decentralised-last-mile-delivery
GEONTOLOGY
https://ontochain.ngi.eu/content/geontology
POC4COMMERCE
https://ontochain.ngi.eu/content/poc4commerce-practical-ontochain-commerce
https://github.com/dfsantamaria/POC4COMMERCE/blob/main/documentation/ONTOCHAIN_D4.pdf
https://raw.githubusercontent.com/dfsantamaria/POC4COMMERCE/main/documentation/ONTOCHAIN_D4.pdf
https://www.linkedin.com/pulse/business-case-knowledge-graphs-composable-commerce-sana-remekie/
Open Knowledge Network (OKN)
Prototypes, Proto-OKN
University of Colorado, Boulder
Sponsor Application Deadline: 5:00pm MT June 20, 2023 link
Good overview of semantic search (coveo)
https://www.coveo.com/blog/decoding-shopper-intent-with-semantic-search/
academic articles
https://arxiv.org/pdf/2112.08589.pdf
CContology (Customer Complaint Ontology)
Wordlift
https://wordlift.io/blog/en/taxonomy-seo-and-knowledge-graph/
good overview that leverage Wordlift
https://ipullrank.com/e-commerce-seo-product-knowledge-graph
TypeDB
TypeDB knowledge graphs
lettria ontology management solutions
http://wiki.goodrelations-vocabulary.org/Documentation/
http://www.productontology.org/
Open graph protocol (facebook)
https://github.com/facebookarchive/open-graph-protocol
https://www.youtube.com/watch?v=xY7JRYD2AIs
https://github.com/OriginTrail
EthOn: an ethereum ontology (2016) https://ethon.consensys.net/index.html
BLONDiE: ...
OASIS for ERC721 (2019-02-01T07:24:44Z)
Ethereum Node: ethereum network
Deployment of smart contracts: BlockchainSmartContractCreation
account creating the contract BlockchainSmartContractAccount
user account: EOA-EthereumAccount which is a BlockchainAccount
Smart Contract that is created: BlockchainSmartContractAgent
erc20 contract: EthereumERC20SmartContractAgent
erc721 contract: EthereumERC721SmartContractAgent
Interactions with smart contracts (calling methods on contract): EthereumSmartContractInteraction
EthereumBlock, EthereumTransaction, Blockchain Transaction (EthereumSmartContract Interaction that initiated Transaction)
EthereumERC721SmartContractAgent
OASIS project that focuses in on smart contract data modeling
https://github.com/dfsantamaria/ProfOnto
This proposal extends EIP-721 and EIP-5192 by introducing a standard for adding RDF triples to Soulbound Tokens (‘SBTs’) metadata.
https://ethereum-magicians.org/t/eip-6239-semantic-soulbound-tokens/12334
Good overview of eip initiatives. (https://www.abcde.com/ nft think tank)