General Adaptation Framework IOG Contents Adaptation in brief
General Adaptation Framework IOG
Contents • • • Adaptation in brief GAF overview Data Representation Standards Semantic Adaptation Adapter Software Design
Adaptation in brief
Adaptation as a general concept • There is a diversity of heterogeneous systems, applications, data formats and ways of interaction; • All those systems were tailored for particular tasks, purposes and goals; • The world is heterogeneous and we face the challenge trying to integrate heterogeneous systems into a unified environment; • The “Smart Resource” project has encountered exactly such kind of a problem.
General Adaptation • “General adaptation” assumes a design of a sufficient framework for an integration of different (by structure and nature) resources into Global Understanding e. Nvironment (GUN). • This environment will provide a mutual interaction between heterogeneous resources. • Adaptation assumes elaboration of a common mechanism for a new resource integration, and its provision with a unified way of interaction.
Adapter concept • The main idea of adaptation is based on a concept of “adapter”, which plays role of a bridge between an internal representation of resource and a unified environment. • Adapter is a software component, which provides a bidirectional link between a resource interface and an interface of the environment.
Adaptation of Smart. Resource • GUN assumes interoperability of Smart. Resources; • By Smart Resource we mean a conjunction of Real World Resource (RWR), Adapter and Agent; • By extending RWR within Adapter and Agent we make it GUN compatible; • General Adaptation includes development of Adapter for RWR.
GAF overview
GAF goals • • We intend to design a common framework for adaptation of heterogeneous resources. We assume dividing a design of the framework into two layers: Structured software design for modules, classes, behavior and protocols; q Semantic adaptation of different formalizations of the industrial maintenance domain edges. q
GAF components MODEL Submodels: Adapter Functionality Data representation standards Software interfaces Semantic Adaptation (data mapping model) Adapter Configuration Properties PROCESS Subprocesses: Adapter Development Adapter Composition Adapter Deployment Adapter Operation TOOL SET Tools, which provide an UI for specification of problem domain features according to the GAF model; support of activity within GAF process and corresponding users SCENARIOS Roles of participants in Adaptation Processes and their interaction with Tools and submodels
Processes in detail • Process Description Template: q Preconditions for process start q Process execution q Result
Adapter Operation Process Preconditions Deployed Adapter Process description Automated on-line interoperability and data mapping between Agent and RWResource Result GUN-compatible Resource
Adapter Deployment Process Preconditions Composed Adapter Process • Specification of Adapter runtime property values according to a description submodel of Adapter Configuration Properties; • Adapter Installation. Result Deployed Adapter, ready to operate
Adapter Composition Process Preconditions 1) 2) Process 1) description § § § 2) • • Result New combination of interoperating modules (e. g. another Network connection standard) or/and New data schema for already supported data model occurrence Software Modules Composition: Modules selection; Modules assembling; Adapter Functionality Semantic Specification. Semantic adaptation: New class definition (resource declaration in the ontology) Creation of new properties for a new class (if needed) Device’s interface properties definition (connection type, data types, etc. Taken from ontology) Mapping of resource’s data representation to Rsc. DF data representation • Composed (Deployable) Adapter • Specified Adapter Functionality • Adapter Configuration Properties template (allowed values, etc. )
Adapter Development Process Preconditions • RWResource with a specified interface and a data format • Access to Semantic Adaptation, Data representation standards, Software interface models • Ontology mapping/editing tool (mapping to already existent standards of communication and data representation) Process • Software development process description • Semantic annotation of the Developed Modules Result Software modules for data access or transformation Documented and registered in ontology
Data Representation Standards
Family of Standards Arbitrary number of standards exist, which define each other on different levels of abstraction and thus form a hierarchy: Standard n … define Standard 2 define Standard 1 define Formal data representation
XML data representation Problems domain Problem domain XML Schema Specifications XML Schema XML Specifications XML document
Database Data Representation Problems domain Problem domain Relational Model SQL DDL Specification DB Schema DML Specification Content of DB
Semantic Data Representation Problems domain Problem domain OWL/RDFS Specifications RDF Schema/Ontology RDF Specifications RDF document
Arbitrary Data Representation Abstract Model Specification Data Representation Syntax Specification Problem domain Concrete Problem domain Domain specific model Domain specific data
Nested Models More abstract models define more specific ones. In different cases arbitrary number of models can be found in chains and layers Domain … Abstract Model Specification Domain Concrete … Model Specification Domain specific model
Model 2 Model Adaptation Model 1 Encoded Data adaptation Semantic Adaptation results in a mapping of data encoded according to one model to another model of data representation Model 2 Encoded Data
Possible Formalization of Domain Problem domain DB Schema Content of DB Relational model RDF Schema/Ontology XML Schema RDF document XML document OWL/RDFS/RDF XML
OWL Specification as a language for Rsc. DF Schema RDFS Specification as a language for Rsc. DF Schema of the maintenance domain RDF Specification as a language for data representation in Rsc. DF document XML as a language of Rsc. DF Schema and document serialization Rsc. DF document with encoded data
Semantic Adaptation
Semantic Adaptation • During the data transformation process, Data Transformer involves format’s metadata (schemas) and transformation rules. • Schemas, rules and underlying ontologies constitute the semantic adaptation.
Semantic Adaptation tasks q Semantic Adaptation defines a functionality to work with semantics of: – Adapter Functionality (Services provided by the adapter) – Data representation standards and models of the adapted systems – Software interfaces standards of the adapted systems – Configuration properties of the adapter runtime environment q Semantic Adaptation uses an Ontology-based approach to define the semantics mentioned above: – This involves associating commonly understood meaning to the definition of adapter properties, functionality, configuration, and associated meta-data standards
Semantic Adaptation Stages 1. 2. 3. 4. 5. 6. 7. Analysis of problem domain and elaboration of a conceptual model; Analysis of data representation formats; Analysis of corresponding metadata (particular Database schema, for instance); Analysis of a standard’s specification (e. g. XML Schema Specification standard); Elaboration of the model for transformations of particular standards of data representation; Specification of data mapping rules; Choosing and/or Development of the mechanism or tool of transformation (appropriate patterns, APIs etc).
Semantic Adaptation Stages (Example) Conceptual model elaboration • Domain description: Paper machine produces paper, uses cellulose … • Domain decomposition Entities, classes, properties, relations, Description behavior … • Domain formalization ER diagrams, UML, Ontology Decomposition Formalization
Semantic Adaptation Stages (Example) Analysis of data representation format • What data format is: XML, text file, Excel table, Oracle data base… • What API could be used to process: SQL queries, Java DOM API, XQquery… • Data’s access methods: XML format c Pro y db W 3 C family e ess by Standard Acce ss Java API JDBC, OLE … XQuery • What standards are used to represent a format: ASCII, W 3 C family standards …
Semantic Adaptation Stages (Example) Metadata analysis • What structure a schema has: Elements, relationship, types… • Possible variations: XML tags or values… • Hierarchy of elements and restrictions: Nesting of classes, range… Analysis - Smart. Resource is subclass of Class - It has Smart. Message as ancestor - Range: enumeral types - <message title=“simple”></message> or <message> <title>simple</title> </message>
Semantic Adaptation Stages (Example) Analysis of standard • What standard specification is: Syntax, vendors, schema… • What formal theory exist: Relational algebra, frame model… • What methods of transformation exist: XSLT, productions rules… Analysis - Relational theory - SQL 97 standard - Relational algebra (selection, projection, join) - transformable to object model, XML model • Capabilities and restrictions: Possibilities of formalization, querying …
Semantic Adaptation Stages (Example) Model of transformation • What approaches of a transformation exist: B A C XSLT, piping… • What are the source/target resources: XHTML to XML, Oracle DBMS to XML, XML to RDF… • Possibility for further extension: - A can be transformed to C with XSLT - A is the XML file, C is an RDF file - A’s schema is dynamic - Schemas are interoperable Costs of extension during evolution… • Role of metadata: Schema integration, compatibility …
Semantic Adaptation Stages (Example) Data mapping rules • What is the protocol of transformation: Elements and types matching… • What is rule’s format representation: Ontology, XSLT… Rules engine • Manual or semiautomatic matching 1. Entity “Person ” correspond to tag <person> 2. Entity “Salary” corresponds to property “Income”
Semantic Adaptation Stages (Example) Mechanism of transformation • What possible approaches are there: Tolls, APIs, Services… • What is the cost of particular approach: Time for development, price of product… • Interoperability and extensibility of chosen approach: Supported platforms, extensible API … - Shall we use ready tools or develop from scratch? - What API could be used in transformation? (XSLT, SAX, DOM)? - What functionality must be implemented (XML to RDF or more)?
How it could work One of the approach of adaptation is serializing RSCDF format into intermediate well standardized and elaborated format. As the basis, it’s intended to use XML format for this approach. Database RSCDF format in GUN RSCDF transformation into particular standard XML IDE (Electronic Data Interchange) HTML Possible solution: Design and development of unified mechanism of transformation RSCDF into XML format and vice versa
How it could work Design and development of transformation mechanism from RSCDF to XML format, which will allow to map schemas and data from RSCDF to XML. There are some projects which have elaborated pilot methods of transformation RDF to XML (http: //w 3 future. com/xr/). Since RSCDF is enhanced subset of RDF it’s possible to adopt these methods. RDF model and XPath expressions RDF context XML context Set of XSLT style sheets The transformation is carried out by either replacements of XPATH expressions or by the set of XSLT style sheets
How it could work XML to other formats transformation Once the mechanism of transformation from RSCDF to XML and XML to RSCDF has been designed it’s possible to use standard approaches for future transformation Other formats XML RDBMS XHTML Choosing the XML format as the start point will allow to unify process of adaptation
How it could work Mapping XML to XML transformation based upon two XML schemas. It’s also might be necessary to perform some processing functions to pipe data from source to target.
How it could work Mapping XML to relational model The process of mapping starts from the loading of database scheme and XML scheme. Then engineer manually fulfils matching between XML elements and database entities. While mapping it might be necessary to use processing functions.
Ontology 2 Ontology transformation • Ideal case: transformation Corresponds to world ontology World Ontology O 1 t O 2 t t O 3 t On
Ontology 2 Ontology transformation • When all domain descriptions refer to common vocabulary (World ontology), mapping can be done explicitly • However incompleteness of one ontology may cause inability to transform in both directions
P 2 P ontology mapping • One ontology is mapped to other manually or in semiautomatic way O 1 O 2 • Mapping rules construction may meet following problems: Different expert vision of problem domain q Models may be inconsistent conceptually q Paradigms the models are based on may cause hardly convertible schemas q
Adapter to particular standard Formats and structures of data review: • Flat files (ASCII text files) • Tables (Excel) • Trees and taxonomies (xml, ontologyfiles) • Marked up structures (HTML) • Relational model (RDBMS) • Object model (Classes and objects) • Compound structure (any mixed specific structures)
Generic model mapping schema Model mapping tool (schema mapping) Data transformation (reusable part) Target model Model A Data … Model mapping tool (schema mapping) Data transformation (reusable part) Model N Model mapping tool (schema mapping) Data transformation (reusable part) Model B …
Model mapping scheme Model mapping tool (schema mapping) Document transformation (reusable part) Rsc. DFschema Rsc. DF document XML Schema XML document … Model mapping tool (schema mapping) Data transformation (reusable part) … Model mapping tool (schema mapping) Document/ content transformation (reusable part) DB model DB content …
Document transformation Rsc. DF 2 XML Schema mapping tool Document transformation (reusable part) Rsc. DFdocument XML document … Model mapping tool (schema mapping) Document transformation (reusable part) … XML Schema 2 DB model mapping tool Document transformation (reusable part) DB …
Existent Mapping tools • Existent tools: q RDBMS 2 XML Schema q XML 2 XML (XSLT) q RDF 2 XML q etc
Automation Problem Statement • It is evident that fully automated semantic adaptation cannot be implemented • The question is what level of automation is possible and how achieve it
Automation of Semantic Adaptation • With given unambiguous semantic description resources become machine processable, hence automated adapter composition is possible • However unambiguous semantic description requires human to map the meaning of concepts and relations unless there is already existent common ontology • The tools will be needed to simplify the process of mapping for human • Tools will use faceted classification, adapted for each particular domain in order to make easily accessible the most relevant concepts
Automated Semantic Adaptation • case 1: Explicit mapping (human assisted) • case 2: Shared ontology (both resources use same ontology or at least are mapped to it) • case 3: Shared ontology lookup & composition (may be wrapped as a service or implemented as an embedded functionality)
Adapter as Software Design
Adapter Design Adapter Transformator Parser Resource API Network Connection Parser Adapter Concrete Implementation using integration patterns Agent API Transformator Network Connection Parser Resource API Adapter Backbone Abstract Design using structural and behavioral patterns Network Connection Parser Agent API Network Connection Adapter
Adapter Complexity Simplification q Use model based software development techniques • Pre-defined software abstractions based on integration and design patterns provide a robust framework for developing adapters q Partitioning logic of adaptation to multiple adapters even for one resource • Integration function (Connection, Parsing, Transformation, etc. ) • Support function (System Logging, Error handling, Audit Trail, etc. ) q Reuse all external transformers instead of developing transformer functionality in each adapter
Design Issues • This part of design includes techniques and methods for software development of components and modules • Different approaches exist for reusable and well structured software design - such as structural patterns, design patterns, etc • Pattern approach allows to elaborate wellthought abstract adapter design with further reuse of it for concrete adapter implementation
Example Structural Pattern Data Piping Pattern Data Source Data Extractor Data Transformer Data Loader Data Target For application to application adaptation “Data piping” pattern could be used Each component of this pattern is responsible for particular function
Structural Pattern Data Piping Pattern Data Source Data Extractor Data Transformer Data Loader Data Target Data extractor is responsible for getting/extracting data from source resource. Since we have heterogeneous resources with diversity of access methods (RS 232, Bluetooth, WLAN, etc), formats of data and APIs, each Data Extractor module must be developed for particular source of data.
Structural Pattern Data Piping Pattern Data Source Data Extractor Data Transformer Data Loader Data Target After data extraction they are piped to the Data Transformer module. Data Transformer performs transformation evolving metadata of formats (schemas) and data transformations rules. Format’s metadata (schema) with data transformation rules (mapping) together constitute semantic adaptation.
Structural Pattern Data Piping Pattern Data Source Data Extractor Data Transformer Data Loader Data Target After transformation process, data are ready to be stored in appropriate place. Data Loader performs this function.
CONCLUSIONS
Stage of project progress According to the first stage of the project we have distinguished tasks for general adaptation framework implementation such as: elaborating software design for generic adapter and possible solutions of semantic adaptation. It was designed general class structure of adapter and considered different approaches of data and software adaptation.
Further work • Design the architecture of adapter components • Design the mechanism of assembling of adapter components • Analyzing the roles of participants in adaptation processes and their interaction • Development the tools which provide UI for data semantic adaptation • Implementation of Device Adapter for Metso case
- Slides: 63