In the Semantic-based service composition architecture, constraints are used to repre-sent the respective conditions of requirements and advertisements. For example, we use constraints to restrict some requirements’ and advertisements’ attributes, such as time and cost. Constraints are also applied to Web Services selection in the QoS architec-ture and can be divided into two types: global constraints and local constraints [6]. In [62], the Semantic and dynamic service selection framework contains a Constraint Ana-lyzer to analyze the characteristics of the constraints and handle them via appropriate approaches.
Checking constraints ensures the consistency of the knowledge base including the common ontologies and the domain-specific ontologies. Different types of constraints are checked by different approaches. In addition, specifying a number constraint in a specific range is a frequent task. We adopt value partition approach to subsumption checking for the comparison between two numbers. For instance, we want a certain number in ontology lower than a threshold. Our system adopts this kind of range constraint to restrict common ontologies like time and value partition.
Sometimes, those constraints with subsumption cannot be a effective restriction be-cause of concept hierarchies design. In this case, we have to implement additional
val-idation in programs. However, using programs is not a good solution because it is lack of flexibility. That means those constraints will be bundled with a specific domain, of a specific system.
Next, we summarize the classification of constraints and the solutions for handling them. The common ontologies of time and value partition are detailed in subsequent sections.
4.5.1 Constraints
According to the framework in [62], constraints are basically divided into two types:
quantitative constraints and non-quantitative constraints. Quantitative constraints are constraints that can manipulate the four fundamental arithmetic operations. For ex-ample, the total price of an trip order must be the sum of all trip prices. We can say total price has quantitative constraints that it must be equivalent to sum of all trips. In contrast, non-quantitative constraints use to restrict those features which do not support arithmetic operations. For example, if a trip consists of three-day itineraries, one of the feature of the trip, the first day of the trip must be the same as the start date of first itinerary.
Exception for the categories of quantitative or non-quantitative, constraints can be particularly divided into binary relationships and global relationships. A binary relation-ship means that the constraint relationrelation-ship only involves two different features, such as checking if start date of a trip is before the end date of a trip. Constraints of binary rela-tion compares two features to decide whether the concepts are consistent in the ontology.
We often adopts subsumption approach in binary relation comparison. That’s why we need to dynamically construct the concept hierarchy for time and value. Different from binary relationship, global relationships involve more than two features, such as checking whether the total budgets of a trip is equivalent to the total sum of all itineraries. As far as we know, it is impossible to express the subsumption relationship between more than three concepts in OWL ontology modeling. Therefore, we must find another ap-proach rather than subsumption apap-proach. When handling global constraints, we define SWRL rules to solve non-quantitative constraints or use a program to solve quantitative constraints.
Figure 4.8: The Classification of Constraints
Based on the quantitative types and the constraint relationships, we classify con-straints and propose a solution about constraint handling beyond the approaches in [62, 39, 6]. Figure 4.8 shows the classification of constraints.
4.5.2 Time Constraint
It is controversial to judge that Time belongs to a quantitative constraint or a non-quantitative constraint According to the time temporal concepts defined in [1], the Time duration has quantitative attributes that can be taken as quantitative constraints. For example, if it takes one hour and fifteen minutes from Taipei City to Hsinchu City by train, the value of the time unit, hour, can accumulate with another time duration, minute.
In the Semantic Web Services architecture, we simplify the unit of the Time constraint and we only consider one kind of time unit, date. A date consists of months, days, and years. We adopt the approach proposed by [39] to handle time and value partition that dynamically construct value concept in the value concept hierarchy for subsumption reasoning. There are before and after relationships between the dates of Time concepts in the Time ontology. Through checking the subsumption relationships between different Time concepts we can decide the sequence of the time and apply that in our domain
application.
During dynamical concepts constructing, the needed time concepts and also the nec-essary relationships are added to the knowledge base. However, this approach [39] for handling time wastes space in the knowledge base and reduces the inference efficiency as time goes on.
4.5.3 Value Partition
In Figure 4.8, if we want to handle the binary relationship between two quantitative fea-tures, we define the concept hierarchy of the quantitative constraints. To make subsump-tion checking, those quantitative concepts are constructed dynamically as object-type concepts. In the Semantic-based service composition architecture, we apply the Value Partition ontology proposed in [39]. The Value Partition approach uses subsumption re-lationship to express the comparison of amounts. By checking subsumption, system can inference which quantitative value is greater or less than the other.
Figure 4.9 shows the Value Partition Ontology.
Figure 4.9: The ValuePartition Ontology