Introduction: The Semantic Gap in Service Composition
In modern software architectures, the ability to automatically compose Web services into complex workflows is a significant challenge. Ideally, a system should be able to take a high-level user request and "string together" existing microservices to fulfill it. For instance, a request to extract author names from a document might require a chain involving a Tokenizer, a Lexical Analyzer, and a Named Entity Recognizer.
However, traditional AI planners struggle with "semantic ambiguity." These planners typically rely on exact string matches for inputs and outputs. If one service outputs a parameter named lexemeAttr while the next service in the chain expects lemmaProp, a standard planner will fail to recognize them as compatible, even if they refer to the same conceptual data. This leads to poor recall, where valid compositions are missed due to simple naming inconsistencies.
The SEMAPLAN Framework
To address this, the authors propose SEMAPLAN, a framework that integrates semantic reasoning directly into the planning process. SEMAPLAN moves beyond binary matching by treating semantic similarity as a measurable "cost" within a metric planner.
1. Semantic Annotation and Indexing
Services are first described using WSDL-S and linked to domain ontologies (OWL). The system then constructs a Semantic Similarity Map using a hybrid matching strategy:
- Domain-Independent Cues: Employs linguistic techniques such as part-of-speech tagging, abbreviation expansion, and dictionary lookups (synonyms/hyponyms) to find relationships between terms.
- Domain-Specific Cues: Leverages structural relationships within ontologies, such as
subClassOforequivalenceClass, to determine conceptual proximity.
2. Metric Planning as Cost Optimization
The core innovation of SEMAPLAN is its use of a metric planner (specifically, the Java-based Planner4J). Instead of a simple "yes/no" match, the planner treats the semantic distance between parameters as a numeric cost. By searching for the "cheapest" path, the planner can discover compositions that are semantically plausible even when exact matches are absent. This allows the system to maintain the logical rigor of AI planning while gaining the flexibility of fuzzy matching.
Experimental Evaluation
The system was evaluated using a repository of over 100 Web services from a knowledge management domain. The experiments focused on scenarios where semantic reconciliation was necessary to find a valid solution.
Key Results
The performance of SEMAPLAN was compared against a baseline metric planner that lacked semantic inferencing capabilities. The results highlighted several critical insights:
- Superior Recall: The baseline planner failed to find solutions in most test cases because it could not bridge the naming gaps between services.
- The Threshold Effect: As shown in Figure 3, the number of services retrieved by the planner is highly sensitive to the semantic similarity threshold. There is a distinct "sweet spot" (typically between 0.5 and 0.7) where the planner identifies a significantly higher number of valid services compared to the exact-match baseline.
- Validation: The data confirms that combining planning with semantic matching produces more comprehensive results than either technique used in isolation.
Conclusion and Future Directions
SEMAPLAN demonstrates that treating semantic similarity as a planning cost is an effective way to automate Web service composition in heterogeneous environments. While the current model treats matches as deterministic costs, future work could explore probabilistic planning to better handle the inherent uncertainty of semantic relationships. Additionally, as service repositories scale, more advanced pre-filtering and indexing strategies will be required to maintain computational efficiency.
Summary updated