1 Concept of Automatic Service Composition

1.1 Introduction

According to Singh and Huhns [1], service-oriented computing (SOC) can enhance the productivity of programming and administering applications in open distributed systems, and provide new flexible and scalable business applications. Web services, which offer useful APIs for open systems on the Internet, are evolving into an automatic development environment for agent-based applications thanks to the semantic web. The automatic service composition (ASC) is aimed at creating more capable and novel value-added services for users by composing existing services [2].

ASC typically involves four stages, as proposed by Agarwal et al. [3]: planning a workflow of individual service types, locating services from a service registry, selecting the best candidate services based on nonfunctional properties (NFPs), and executing the selected services. In case of exceptions during execution, services may need to be retried or the planning and selection stages may have to be redone. However, there is no fully integrated framework for ASC, and previous studies have mainly focused on individual stages or integrating them for more realistic composition. There is also confusion about the roles of composition stages across different studies.

To overcome these issues, Paik et al. [4] present a more comprehensive framework for ASC, which includes making functional goals scalable and the composition seamless. This framework addresses the problems of automated composition and provides a starting point for future research.

  1. 1.

    Scalable functional goals: Nested workflow management. Service compositions in existing literature commonly assume that the composition can be completed at one time. However, this is not always feasible due to the distributed and dynamic nature of compositions, which can occur across enterprise boundaries. To address this, ASC can include nested dynamic compositions at sublevels to achieve comprehensive functional goals. Additionally, ASC must consider dynamically changing workflows to fulfill new goals introduced at higher levels of abstraction. In a nested architecture, the workflow manager can control replanning and reselection in case of exceptions, as well as orchestrate nested composition flows.

  2. 2.

    Seamless composition: Identification of Composition Properties (NFPs). Services possess both functional and nonfunctional properties. Functional properties (FPs) generally refer to requirements within the domain of a service request, while nonfunctional properties (NFPs) encompass requirements on the services themselves. NFPs encompass quality-of-service (QoS) parameters by including preferences and similar “soft” constraints. FPs must be met, while NFPs do not necessarily need to be met. Although there is no clear distinction between FPs and NFPs, it is helpful to separate them when describing goals and services. A user or developer specifies a composition goal consisting of FPs or constraints that include their attributes (e.g., “Arrange a trip from Aizu to Los Angeles” and “Total Cost is less than 100,000”) and NFPs (e.g., “Cost for the composed services to arrange the trip is less than 5,000” and “Time to execute the composed services must be less than 30 s”). These are specified at the business (abstract) level to a service composer. Typically, during the discovery stage, service instances that match the functional operation signature are located, but composition properties, such as NFPs and some of the FP's attributes in the user's request, which are abstract as in the examples above, are not available as explicit operations with detailed parameters that can be considered during the selection process. However, identifying and considering the composition properties are necessary for seamless ASC.

  3. 3.

    Framework for ASC: Modified four-stage process. Previous studies on service composition have primarily focused on one or two of the four stages, often in abstract or comparative terms. However, to gain a complete understanding of ASC and its interactions, it is necessary to consider all functional blocks and the entire composition structure. This can be accomplished through hierarchical structural and behavioral object analysis, with top-level analysis focusing on more abstract concepts and lower level analysis delving into algorithm and method choices. By integrating the modified four-stage architecture with the two additional issues previously identified, our UML-based framework can shed light on the organic structure and behavior of ASC and provide direction for future development.

1.2 Preliminaries for Service Composition

1.2.1 The Four Stages of Composition

The four stages for automatic service composition are depicted in Fig. 1, which has been augmented with more information from that presented by Agarwal et al. [5]. Formally, we denote the following:

Fig. 1
A block diagram of service composition. The four stages are planning logical composition, discovery matching and filtering, selection of physical composition, and execution. The top box represents composition properties transformation and the bottom box represents nested workflow management.

Four stages of service composition

  • R: Set of user’s requests at the service level

  • W = {t1, t2, t3, … tl}: Set of l abstract tasks in an abstract workflow W

  • Planning Π: R → W

  • Ii = {ii1, ii2, ii3, …, iim}: Set of m service instances advertised in a service registry for an abstract task ti. I is the set of Ii, for 1 ≤ i ≤ l. If each task in a workflow has m instances, then the total number of service instances available for the workflow is l × m

  • Discovery Δ: W → I

  • Cj = {cj1, cj2, cj3, …, cjp}: Set of p selected service instances to be executed from the service instance set Ij. C is the set of Cj where 1 ≤ j ≤ l

  • Selection Σ: I → C

  • X = {x1, x2, x3, …, xq}: Set of q executed service traces

  • Execution Ε: C → X

There are differing viewpoints regarding the service composition process, but generally, it is divided into four stages: logical composition in the planning stage, and physical composition in the selection stage [5]. We chose this four-stage process as the basis of our approach because:

  1. 1.

    It is widely accepted and many existing approaches can be easily mapped or related to it.

  2. 2.

    Our approach builds upon it to enhance service composition's flexibility and improve its usability.

  3. 3.

    Our approach incorporates exception handling and backtracking to handle failures, avoiding the need to return to the planning stage when a failure occurs.

1.2.2 Motivating Scenario and Our Extended Framework for Seamless ASC

During the planning stage of automated service composition, a plan is generated to fulfill a functional goal. However, this plan may be a subprocedure of a higher level goal. For instance, consider a tour group traveling from Aizu to Los Angeles. To create the tour group package, a composition of three subprocesses is required: (1) scheduling the trip, (2) making group reservations, and (3) repeating the trip scheduling and reservations for each participant. In the first composite service for finding a trip schedule, the ASC tries to find the best workflow for the trip and candidate services for the workflow dynamically. After deciding on the trip schedule, the service must book all travel resources according to the schedule from the previous step. If the booking fails, the composition manager must return to the planning or selecting stages. The four-stage process characterizes composition from an abstract workflow to a concrete one but does not address seamless ASC. To address this, we have extended the process with the Nested Workflow Management and Composition Properties Transformation components, as shown in Fig. 1. The nested workflow management block orchestrates nested workflows for each stage of ASC to handle composite goals.

1.3 Workflow Orchestration in a Nested Composition for Scalability

1.3.1 Orchestration in Service Composition

Previous research on ASC has only focused on one-step composition, neglecting the need for additional processes to reach the final goal when one-step composition falls short. This type of procedure can be considered a multistep composition that involves the orchestration of nested workflows. In the given scenario, the trip scheduling service can be generated by an ASC, where the ASC planner develops an abstract workflow using staged composition and execution for traffic routes and hotels between Aizu and LA. Next, the ASC discovers and selects optimal service candidates using QoS and user constraints on the workflow. However, to achieve the final goal, the selected trip schedule must be passed to the reservation process, and the results of both processes must be orchestrated to create the group tour. As a result, an outer ASC is required to combine the results of the subprocesses to achieve the final goal.

1.3.2 Conceptual Model of Nested Composition

There are two approaches to managing workflow in service composition: centralized orchestration and distributed choreography [6]. In general, ASC employs the centralized management of services for a specific goal and adopts the orchestration paradigm.

At a higher level, workflow management mirrors orchestration and involves integrating three types of services: dynamic composite services, static composite services, and atomic services, as depicted in Fig. 2. A dynamic composite service is created on the fly by an ASC, while a static composite service is a predefined service that may have been produced manually or through extraction tools. An atomic service may be found in a service repository, and we consider such services to be static ones. These services are utilized by a nested ASC (NASC) to accomplish a goal at an outer level. Generally, a hierarchy of compositions can be established to attain the final goal, which can be located by matching their Input–Output–Precondition–Effects (IOPEs) during the composer's discovery function.

Fig. 2
A tree diagram of dynamic composite service. It is classified into dynamic and static composite services. Hexagons depict dynamic composite service, rectangles denote static composite service, and circles denote atomic service.

General composition model with nested composition

1.3.3 Workflow Orchestration in Nested Composition

1.3.3.1 Top-Down Approach

The conventional approach of ASC for services composition is the orchestration strategy, which follows a top-down approach. The top-down approach modifies the discovery stage and the execution stage to accommodate the characteristics of dynamic services, which potentially conform to more than one static service. In the planning stage, the ASC generates several sequences of service types and selects optimal service instances for each type based on the operators required. The ASC then combines the selected operators to output composite services. To fulfill a desired composition, Procedure 1 outlines the essential methods and parameters for nested composition using the top-down approach. The flow of the procedure starts with the ASC function taking the PlanningDomain variables and a set of UserConstraints. PlanningDomain has a problem space and a planning space that are used to invoke planning for one domain, while UserConstraints contain information about user constraints and functional goals. AbstractWorkflow stores the state of the results derived from the planning and discovery stages, while ConcreteWorkflow stores the state of the results derived from the selection and execution stages. The generateAbstractWorkflow method in line 7 receives the PlanningDomain variable and generates an AbstractWorkflow set, whose size depends on the number of generated sequences from ServiceTypes.

The top-down composition approach's discovery stage is illustrated between lines 9 and 20 in Procedure 1. This stage discovers the service instances for each service type. If a ServiceType cannot be discovered from the service repositories or is deemed a dynamic service, the internal ASC is recursively invoked to generate a ServiceInstance set for the ServiceType. Once the inner ASC is called, the generatePlanningDomain method generates a PlanningDomain variable, which provides the necessary information (required planning and problem spaces) for a planner to derive the desired workflows for the domain. Using the generated PlanningDomain, the inner ASC creates services that fulfill the functional goal in the domain. The setServiceInstances and setServiceTypes methods (lines 17 and 19) are then used to write the obtained parameters to the corresponding variables.

At line 22, the doCPSelection method is called, which generates a set of ConcreteWorkflows. This method selects the optimal ServiceInstance for each ServiceType from the discovered ServiceInstances by using the NFPs information and the user constraint satisfaction measures. Therefore, the generated ConcreteWorkflow set has optimal service instances for the service types. This process results in obtaining the results such as the selection stage in Fig. 2.

In the top-down composition approach, the execution stage corresponds to lines 25 and 32 in Procedure 1. At line 24, the generateExecutableServices method receives the PlanningDomain and ConcreteWorkflow sets, generating a set of ExecutableWorkflows. Once the ExecutableWorkflow set is generated, it is temporarily published as services that can be accessed by a client application. If the process is in the inner ASC, the generated ExecutableWorkflow set denoted in line 29 is returned. In this process, the parent ASC can obtain the ServiceInstance set from the Inner ASC shown in line 15. Also, in line 15, the ExecutableWorkflow set is converted to a ServiceInstance set. This implies that ExecutableWorkflow is substantially similar to ServiceInstance. At line 31, the invocation results of the executable workflow are returned. This process is invoked when the highest services located on the nested structure are generated. Thus, by using Procedure 1, the inner ASC can be called recursively, and the nested dynamic composition structure can be generated.

1.3.3.2 Bottom-Up Approach

When it comes to managing nested dynamic service composition, a bottom-up approach can involve human inputs for service selection. In practice, clients’ manual selections are essential as automated selections by ASC may not always meet their requirements. To implement the bottom-up approach, the selection stage of the top-down orchestration can be modified, replacing the selection based on composition properties such as QoS information and user constraints with human selections. Several dialogue forms can be used to obtain the human selections, such as asking for preferred service type sequences or preferred service instances. For further details on this approach, refer to Lécué [7].

1.3.4 Lower Level Architecture for Example Scenario

While the high-level architecture outlines the conceptual framework of the scalable ASC, the lower level architecture focuses on implementation details. Our research does not encompass a complete transformation of the design specification, such as in a model-driven architecture. Instead, we illustrate in detail how our upper level architecture can be designed and implemented by adopting a divide-and-conquer approach based on domain details. This approach enables us to focus on the two core composition parts, namely the planning stage and the selection stage, as well as the two new parts of transformation and orchestration.

1.3.4.1 User Request for the Group Tour Scenario

We use the scenario introduced in Sect. 2.3 to provide details of the request and composition. In this scenario, a user contacts an agent to plan a tour for a group to travel to Los Angeles. The user specifies their goal as a functional requirement, along with non-functional requirements such as the departure and arrival dates and locations. The user may also provide additional constraints and preferences.

1.3.4.1.1 User Request (Input)

Users can describe their requests in various forms, such as natural language, logic languages, a graphical user interface (GUI), or dedicated goal modeling languages. Inferencing is necessary to automatically derive real services from abstract goals or requests for composition. In our scenario, the functionality and non-functionality requirements are expressed in first-order logic. However, the terms used may not be terminal, requiring transformation.

1.3.5 Investigation of Functional Scalability

The proposed nested multilevel composition provides functional scalability as a composition parameter. Two approaches to scalability are possible: bottom-up and top-down. A bottom-up approach is suitable for user-driven composition, while a top-down approach is more appropriate for machine-planned composition without user intervention. In this paper, we only introduce the top-down approach, and for the sake of clarity, we limit scalability to a single independent domain to simplify the complex composition problem. An example that demonstrates functional scalable composition in the travel domain can be found on our demonstration site [8].

1.4 Architecture for Scalable ASC

In this section, we will present the complete architecture for workflow orchestration, nested composition, and NFP transformations in ASC using UML. Figure 3 displays the composition architecture as a whole [4].

Fig. 3
A top-level U M L class diagram comprises data in 3 different shades. Shade 1 includes functional property, service registry, and generation method. Shade 2 includes a workflow generator, service discoverer, and workflow manager. Shade 3 includes a temporary service registry and execution engine.

Top-Level UML class diagram of scalable ASC

1.4.1 Top-Level Architecture

While the existing four-stage architecture seeks to identify services that fulfill a specific goal, two additional parts deal with nested workflow orchestration for more general goals. This contributes to functional scalability and links NFPs from the abstract to the concrete level. As describing the entire structure and behavior of the ASC architecture is complex, we will use top-level class and sequence diagrams in this subsection to illustrate the abstract concepts of the architecture. A more detailed design using middle-level diagrams, with an instance of our motivating scenario, will be provided in the following subsection. Figure 3 contains top-level class diagrams for the ASC’s structure. The following sections mainly explain the classes’ functionalities. The first four classes cover the functions found in the existing four stages.

The WorkflowGenerator creates an abstract workflow to meet the user's request's FunctionalProperty. The methods may include planning algorithms, FSM, workflow generation, or a dedicated application. The ServiceDiscoverer provides discovery services, with the primary objective of providing candidate services (service instances) to fulfill the tasks’ functionalities from the WorkflowGenerator. The ServiceSelector selects service instances to meet the NFPs from the user or the WorkflowGenerator. All abstract NFPs must be transformed into concrete NFPs with binding information before selection. The ServiceSelector can use any selection method, such as planning, integer linear programming, or CSP-constraint optimizing. The ServiceExecutor executes the selected service instances from the ServiceSelector. It has the ExecutionMonitor class, which tracks the services’ execution in the ExecutionEngine to maintain performance quality.

The next two classes enable scalable composition with seamless processing of ASC. The Transformer converts abstract NFPs into concrete NFPs with binding information, so the NFPs can be understood by the ServiceSelector. The Transformer captures the meaning of the terms in the abstract NFPs to link them to intermediate NFP terms composed of terminal terms. It then transforms the intermediate NFPs into concrete NFPs. As described in Sect. 4, ontology matching between terminal terms of the intermediate NFPs and the service domain ontology processes the transformation.

The OrchestrationManager orchestrates the entire service composition. It refines the user's generic goals into concrete goals found in the registry and analyzes the goals to identify services that meet the goals as required. The manager orchestrates all the composition steps in the ASC's nested structure to achieve the final goal. It allows the ASC to create new composite services for ones not found in the service registry, as described in the previous section. The nested workflow orchestration management gives our system multi-level functionally scalable composition with dynamically derived goal parameters.

1.4.1.1 Planning with HTN

In the planning stage, we can use the composition of predefined processes in OWL-S, BPEL, or WSMO to describe the workflow for reaching a goal statically. However, to deal with more general goals, we have adopted a Hierarchical Task Network (HTN) planner [9] to develop the workflow dynamically. It provides a strong foundation for planning an abstract workflow at this stage. We can encode an OWL-S process model or any formation of the user's requests in the HTN planner. The HTN planner then develops a plan that describes a workflow to reach the goal state. Definition 6 formally describes HTN, which has been drawn in UML to combine it with the upper level ASC architecture.

Definition 1

HTN planning problem and plan. A planning problem is a tuple Plan =  < State, Task, Domain > , and Domain =  < Axiom, Operator, Method > where: A plan, Π = (π1, π2, …, πn), is a sequence of instantiated operators that will achieve Task from State in Domain, which will be the abstract workflow in our composition scheme.

In the composition system, a πi is to be mapped to a task of the abstract workflow directly. For example, in the scenario, the planner generates an abstract workflow, (moveByVehicle(Aizu,Koriyama), moveByVehicle(Koriyama, Tokyo), moveByVehicle(Tokyo, LA)…, stayAtHotel(LA)).

1.4.1.2 Property Transformation

A user's original nonfunctional property may contain complex terms that need to be transformed, and the domain ontology for the transformation is expected to have clear meanings for real services. However, finding concrete terms from abstract constraints requires human intelligence. Our transformation design focuses on an algorithm that transforms intermediate constraints into concrete constraints, which are described in Sect. 4.2 along with their relations and context. The algorithm should also consider the attributes of real services, which have variable domains related to the domain ontology and references.

To include all service classes and variables in the transformation, the proposed algorithm uses ontologies that can be updated if new services and conditions are added. The ontology is divided into unchangeable and variable concepts, and we construct the former using existing knowledge and ontologies. The latter is added by searching for existing websites and services, and synonymous terms are merged when adding new classes to the ontology. This process continues until no new classes are found in the websites selected for our target.

1.4.1.3 Service Selection for Execution Using CSP

To find a concrete sequence of service instances for execution that matches those discovered for the abstract service sequence, service selection (also known as physical composition) must identify services that best satisfy nonfunctional properties. Our implementation employs a Constraint Satisfaction Problem (CSP) to identify such service instances.

Definition 2

NFP-Based Service Discovery and Service Selection Using CSP.

In our approach, we distinguish between nonfunctional properties (NFP) and other nonfunctional properties related to system characteristics. NFPs are considered in the discovery stage, while user preferences and constraints are taken into account during the selection stage after NFPs have been identified.

The function of extracting candidate services from abstract workflow by NFP is:

  • GenerateCandidates: Π × NFP → X, where:

  • Π is a series of abstract tasks generated by the planning stage, and NFP represents attributes for NFP.

  • X is a series of candidate services generated by “GenerateCandidates” that were filtered by NFP attributes.

We describe the service selection based on CSP, CSP =  < X, D, C >, where:

  • X is the same as in Definition 7;

  • D is a set of instances of the ontology of input or output for the real process, e.g., the ontology of <IOPE> in OWL-S; and

  • C is a set of constraints, which can be user’s constraints or preferences in the form of relations and terms.

Constraints can be dynamically altered due to system effects or user actions. In our scenario, a sequence of service instances that best satisfy nonfunctional properties can be selected and passed to the next stage for a combination of service operators. It's important to note that other service instance sequences can also be chosen.

1.4.1.4 Orchestration for Scalable Composition

The primary goal of our scenario, “MakeATourGroup,” involves developing a plan for achieving the goal by creating a sequence of subtasks like “TripSchedule,” “Reservation,” and “MakeTourGroup.“ The inner ASC recursively generates another plan for the “TripSchedule” task, as explained in this section. In some situations, there may be a need for more compositions upwards or downwards. For instance, when a flight departs early in the morning in the “TripSchedule,” the passenger may need to stay in a hotel near Narita, requiring another plan at a lower level of composition. The orchestration manager controls multiple compositions to provide functional scalability as a composition parameter.

2 Better Service Composition Using Service Graph

2.1 Introduction

This section presents a new method for improving the quality of service composition by utilizing a global social service network. Service composition is the process of creating new services from existing ones, which has been studied by both academia and enterprises. Various approaches to service composition have been proposed, such as template-based, Petri-net-based, AI-planning-based, graph-theory-based, and logic-based approaches. However, these approaches have not adequately addressed the issue of optimizing end-to-end quality requirements. Semantic-based and QoS-based approaches have been proposed to improve quality, but they still suffer from scalability issues. The ontology reasoning and QoS optimization among isolated service islands are the primary reasons for this. To address this, functional clustering-based approaches have been proposed to preprocess time-consuming operations among isolated services. However, these approaches have ignored local optimization of QoS attributes within a cluster, which is an NP-hard problem. Heuristic and genetic approaches have been proposed, but they have limitations in terms of scalability and practicality. Instead, a “good enough” composition satisfying global constraints is a more practical approach to large search spaces. However, current approaches do not consider service sociability, which is crucial for interdependent web services. To address this, the proposed methodology utilizes a global social service network to enhance the service's social activities and improve the quality of service composition. The approach preprocesses time-consuming operations and reduces the search space for QoS optimization by mapping the GSSN into a service cluster network with local optimization of aggregated QoS attributes.

2.2 Background and Related Work

In this section, we appraise the existing service composition approaches in terms of scalability and sociability; then we argue that services’ sociability provides the missing ingredients that will evolve isolated services into a GSSN to improve the quality of service composition.

2.2.1 Scalability Issue

First, semantics have been proposed as a key to increasing automation in applying web services and managing web processes within and across enterprises. Currently, many semantic service composition approaches have been proposed and many semantic composition projects such as IRS [10], and SHOP2 have been developed. However, these existing methods and semantic tools are registry-based, such as UDDI, which has several drawbacks. For instance, services are treated as isolated service islands, knowing only about themselves, but not about the peers that they would like to work with in compositions or that they would compete against in service selection. As a consequence, they still either stay in a semiautomated state, which means that composition requires a high level of user interaction, or risk low efficiency of producing a composition plan because a direct reasoning style is required. In overall terms, performance issues resulting from extensive ontology reasoning and other intensive manual operations are still the main problems in current semantic service composition approaches. Second, the QoS-based approach selects the best composition solution and component services that satisfy the end-to-end quality requirements. Yu and Lin [11] define the problem as a multidimensional multichoice 0–1 knapsack problem, as well as a multiconstraint optimal path problem. Zeng et al. [8] presented a global planning approach to select an optimal execution plan by means of a linear programming model. Ardagna and Pernici [12] modeled the service composition as a mixed integer–linear problem in which both local and global constraints are taken into account. Linear programming methods are very effective when the problem is small. However, these methods suffer from poor scalability because of the exponential time complexity of the applied search algorithms. Lécué and Mehandjiev [13] proposed heuristic algorithms that can be used to find a near-optimal solution more efficiently than exact solutions. Lécué [7] presented a method for semantic web service composition based on genetic algorithms and using both semantic links between I/O parameters and QoS attributes. Despite the significant improvement of these algorithms compared with exact solutions, neither algorithm scales with respect to the number of candidate web services, and hence they are not suitable for real-time service composition.

2.2.2 Sociability Issue

Nowadays, services consider only their own functional and nonfunctional detail through the life cycle of the service and ignore services’ social activities. As a consequence, service composition approaches do not record services’ past social interactions and cannot promise the quality of service composition. To address these issues, the sociability issue is introduced to improve the quality of service discovery and composition. A service’s sociability is the skill, tendency, or property of being sociable or social, of interacting well with related services, which is supported by network models we refer to here as service social networks. A service’s sociability issue is to capture how web services interact via service social networks, to know with whom they have worked in the past and with whom they would potentially like to work in the future. A service social network is constructed to reflect services’ social reality, describing the mutual consciousness of mutual agreement about a social situation and supporting future services’ social activities [14]. Therefore, by connecting distributed services into one single service social network, we can capitalize on users’ willingness to interact, share, collaborate, and make recommendations for improving the quality of service composition.

Some approaches have been proposed to use service social networks to enable GPS-like support service discovery and service composition. Tan et al. [15] proposed a service map to enable recommending relevant services for service consumers and to find an operation chain to connect two operations based on others’ past usage. Zhang et al. [16] proposed a novel approach of proactively recommending services in a workflow composition to help domain scientists find relevant services and to reuse successful processes based on social networks. Maamar et al. [17] proposed an approach to use social networks for web services discovery. However, all these approaches struggle to construct a single service social network dynamically, as they do when constructing the WWW, which hampers the services’ sociability. These approaches do not consider interlinking web services on the open web into one single service social network to enhance services’ sociability, as two persons are interlinked when they are friends in a social network or two actors are linked in an actor collaboration graph when they have acted in the same movie. In this paper, we propose a methodology to interlink distributed services into a GSSN with social links using the quality of the social link to consider a service’s social activities and its popularity to provide a network model on a global scale for supporting services’ social activities.

2.3 Motivating Example

Conventional methods for service composition (such as semantic-based and QoS-based approaches) have typically viewed services as disconnected islands, as depicted in Fig. 1a. This perspective gives rise to several difficulties, including poor scalability, an exponentially increasing search time in large search spaces, and a lack of service sociability resulting from the segregation of services. Please note that the web services {Si} demonstrated in Fig. 1 can be found in Chen and Paik [18].

The goal of this study was to enhance the quality of service composition by establishing connections between isolated services and creating a Global Social Service Network (GSSN), as depicted in Fig. 1b. By doing so, a quality-driven service composition approach could be developed, as shown in Fig. 4c, where a group of red services (S1, S2, S5, S10, S11, S7, S8) were composed to form a workflow service for users. However, this presented several challenges, including the quantitative measurement of relationships between services, constructing the GSSN with generic aspects, and exploiting the GSSN to improve service composition. To address these issues, the study proposed the “quality of social links” approach to quantify the strength of relationships between services, considering not only the functional and non-functional details but also past social interactions and popularity. A novel platform was also developed to construct the GSSN, considering four generic aspects of the network. Finally, a quality-driven service composition approach was introduced, with key features including the GSSN as a network model for improved sociability, preprocessing ontology reasoning, and semantic-related computing to reduce search time and improve scalability, mapping the GSSN into service cluster networks to reduce search space, and the development of a novel quality-driven workflow search algorithm based on the GSSN and quality of social links.

Fig. 4
Three node diagrams. A, isolated service islands have nodes without connections. B, global social service networks have partially connected nodes. C, workflow as a service has fully connected nodes.

Example of quality-driven service composition based on the GSSN

2.4 Connecting Isolated Services into GSSN

In this section, we present our novel framework for constructing a GSSN to address the issue of isolated service islands and improve the sociability of services, resulting in better quality web service compositions. The GSSN is designed to connect distributed services across domains through social links, similar to how RDF links connect distributed data into a single global data space in the web of data. This interlinking of services into a GSSN enhances their sociability and collaboration, thereby facilitating service compositions. Additionally, the GSSN includes descriptions of service society features, enabling higher level functions for composition components, such as inferring, planning, and coordinating social activities in the space.

Definition 3

(GSSN). A GSSN is a global space for a service social network to describe a service’s social properties; its structure is a directed graph G =  < V, E > on the web, where:

  • V represents a set of nodes, with each node being a linked social service; and

  • E represents a set of directed edges, with each edge corresponding to social link.

2.4.1 Pattern of Social Link

We interconnect isolated services on a GSSN by creating social links between them. These social links are patterned to make typed statements that can link any services. The patterns of social links indicate the functional relationships between the resource service and the target services based on service data correlations, which are data mappings between the input/output (I/O) attributes of services. The target service is an object in an RDF triple, which is published on the open web and usually linked to resource services. In contrast, the resource service is a subject that is linked to target services. We introduce the concept of Peer social link to make typed statements that connect peer services that can work together to provide a more complex service. Peer social link can be illustrated by the following rules, including sequential (L() and L()), parallel (L(<\(\oplus\)) and L(\(\oplus\) > )), and conditional (L(<||) and L(||>)) routing. Further, to make typed statements that link services that perform a specific common function, Cluster social link L(=) is proposed to connect services offering similar functionalities. For more details about the definition of pattern of social link, please refer to our previous work.

2.4.2 Quality of Social Link

Four generic quality criteria for social links have been considered, which are denoted as L(R, T): (1) functionality homophily QFH(R, T); (2) QoS preference QQoS(R, T); (3) sociability preference QSP(R, T); and (4) preferential service connectivity QPSC(R, T). The four generic quality criteria can be combined to evaluate the quality of a social link using quality aggregation rules. For more details about these generic aspects, you can refer to our previous work [19]. The quality vector of social link is defined by the quality of social link Q(R, T).

Definition 4

(Quality of Social Link). Given resource service R and a set of target services Tn, the quality of social link Q(R, Tn) provides a measure for the quality of the links between R and Tn for social link, and can be described as follows:

$$ \begin{gathered} {\text{Q(R, Tn) }} = \hfill \\ \left\langle {{\text{QDSR(R,Tn)}},{\text{QQoS(R,Tn)}},{\text{QSP(R,Tn)}},{\text{QPSC(R,Tn)}}} \right\rangle \hfill \\ \end{gathered} $$
(1)

Equation (1) means that the social link quality between R and Tn relies on the four quality criteria. Higher values indicate better quality of social link. Given a resource service R and a set of target services Tn, one can select the link with the best functional quality QDSR(R, Tn), best nonfunctional quality values QQoS(R, Tn) (such as the cheapest and fastest services), sociability preference QSP(R, Tn), preferential service connectivity QPSC(R, Tn), or the selection can be a compromise (according to the user preferences) among the four criteria. First, selecting links with the best functional quality QDSR(R, Tn)) will make sure easy end-to-end integration between services by minimizing semantic and syntactic mediators, and by providing seamless deployment and execution of compositions.

To reduce the cost of data mediation, the selection of appropriate criteria is crucial. Choosing links that include services with superior nonfunctional quality values, such as price and response time, will ensure quality of social links that are easily understood by most users. This approach is particularly effective when shared data among services is relatively homogeneous, such as when services align their data during the description phase and most of their exchanged data matches perfectly, or when all data mediators are known during the design phase.

Furthermore, selecting links that include services with a high sociability preference will enhance the quality of social links by considering past and future collaborative partners. This approach reflects the service social reality, where services that have interacted frequently in the past are likely to be linked with social links.

Lastly, selecting links that include services with the best preferential service connectivity will improve the quality of social links by linking with well-known and popular services that have high connectivity, increasing the probability that they will be recruited by other well-known services.

2.4.3 Construction of GSSN

When constructing a GSSN for improved service composition, there are four generic aspects that must be taken into consideration. Firstly, the growth aspect, which highlights that a GSSN is constantly evolving and expanding as new services are added. This means that the number of vertices, N, will continue to increase over time, much like the exponential growth of the www and the research literature. Secondly, the preferential service connectivity aspect, which emphasizes that connections between vertices in a GSSN are not random or uniform, but rather exhibit preferential service connectivity. This means that vertices with a larger number of connections are more likely to link to other vertices. Thirdly, the competitive aspect, which underscores that each node in a GSSN has an inherent ability to compete for edges at the expense of other nodes. For instance, a higher dependency satisfaction rate between a resource service and a target service can make the target service more competitive. Lastly, the adaptation aspect, which highlights that social links in a GSSN are regularly updated to reflect service social reality based on the quality of the social link. This means that “old” links may be replaced by “new” social links with higher quality of social link.

To account for the growing nature of the network, we begin with a small number (m0) of vertices and add a new vertex at every time step with m ≤ m0 edges, linking the new vertex to m different vertices already present in the network. To incorporate preferential attachment, we assume that the probability of a new vertex being connected to vertex i (represented as Πi) is dependent on the connectivity (ki) of that vertex, such that Πi = ki / Σjkj. It should be noted that in this study, Tn is treated as a vertex i because it is a primary functional component of the service network. Therefore, the connectivity ki of vertex i can be calculated as \({k}_{i}= \sum_{j=1}^{n}{k}_{j}/n\). To incorporate the competitive aspect, we assign a fitness parameter ηi to each vertex so that when a new service W is added to the GSSN at every time step, it has a fitness value ηi that depends on QDSR, QQoS, and QSp. In order to reflect the service's social reality, we rewrite “old” social links with low quality of social link and add new social links with high quality of social link throughout the lifetime of the network. Based on the previous analysis, we also quantify the quality of social link as

$$ {\text{Q(R, Tn)}} = \frac{{\eta {\text{i}}ki}}{{\sum_j {\eta jkj} }} $$
(2)

where ki is the degree of node i and ηi is a fitness parameter that represents the internal superiority of the ith node, as each node has the intrinsic ability to compete for edges at the expense of other nodes. ηi can be calculated as

$$\eta i=\left(wDSR{Q}^{l}{\text{DSR}}\left(\text{R,T}n\right)+wQos{Q}^{l}{\text{QoS}}\left(\text{R,T}n\right)+wSP{Q}^{l}{\text{SP}}\left(\text{R,T}n\right)\right)\text{.}$$
(3)

where WDSR + WQoS + WSP = 1 and l is a constant in positive integer number, which is used to set the weight of ηi. Higher value indicates that node i is better at competition.

Taking into account the aforementioned concerns, we adopt an algorithm for constructing our network, which relies on four parameters: m0 (the initial number of nodes), m (the number of links added or rewired at each step of the algorithm), p (the probability of adding links), and q (the probability of rewiring edges).

The algorithm for building the network takes into account four parameters: m0 (initial number of nodes), m (number of links added or rewired per step), p (probability of adding links), and q (probability of edge rewiring). The procedure starts with m0 nodes and performs one of three actions at each step.

  1. 1.

    With probability p and m <  = m0, new links are added by selecting the endpoint based on the quality of social link given by Eq. (2) (shown in Fig. 5a). This process is repeated m times.

    Fig. 5
    Three node diagrams. New links are added in a, new nodes are added in b, and lines are rewired in c. These are connected using arrows.

    GSSN construction process

  2. 2.

    With probability q, m edges are rewired by selecting a random node I and its link Lij with the lowest quality of social link. The link Lij is removed, and another node z is selected based on the quality of social link (shown in Fig. 5b), and a new link Liz is added.

  3. 3.

    with probability 1–p–q, a new node with m links is added, and the new links connect to m other nodes selected based on the quality of social link (shown in Fig. 5c).

The algorithm stops once the desired number of nodes (N) is reached. Actions 1 and 2 satisfy the adaptation aspect of the network, while action 3 achieves the growth aspect. The quality of social link with fitness parameter ηi satisfies the competitive and preferential attachment aspects.

2.4.3.1 Properties of GSSN

The probability Πi that a new node in GSSN will connect to an already present node i depends on two factors, namely, the connectivity ki and the fitness parameter ηi of that node, as given by Eq. (2):

$$ \prod i = Q{\text{(R,Tn)}} = \frac{{n_{i} k_{i} }}{{\sum\nolimits_{j} {k_{j} n_{j} } }} $$
(4)

The simplest possible way to incorporate the joint influence of fitness and connectivity on the rate of adding new links to a node is through the generalized preferential attachment. Therefore, at each time step, a new node i is added to the service network with fitness parameter i selected from the distribution ρ(η). To analyze the scaling properties of this model, we use a continuum theory to predict the connectivity distribution, which is the probability that a node has k social links. The connectivity of a node i, denoted as ki, increases at a rate proportional to the probability (4) that a new node will attach to it, resulting in the following expression:

$$ \frac{{\partial k_{i} }}{\partial t} = m\frac{{n_{i} k_{i} }}{{\sum\nolimits_{j} {k_{j} n_{j} } }} $$
(5)

The variable m considers that each new node contributes m social links to the network. To solve Eq. (5), we make an assumption that, similar to the scale-free model, the time evolution of ki follows a power law with a fitness-dependent function represented by β(n). However, the network exhibits multiscaling, meaning that the dynamic exponent depends on the fitness parameter of each node, denoted by ηi.

$$ k_{{n_{i} }} (t,t_{i} ) = m\left( {\frac{t}{{t_{i} }}} \right)^{{\beta (n_{i} )}} $$
(6)

where the dynamic exponent satisfies

$$ \beta \left( n \right) = \frac{n}{C}\;with\;C = \int {\rho \left( n \right)\frac{n}{1 - \beta (n)}dn} $$
(7)

Hence, the function β is characterized by a range of values determined by the distribution of fitness. Consequently, the connectivity distribution P(k), indicating the likelihood of a node having k social links, can be determined by summing up different power laws with varying weights. Specifically, we need to compute the cumulative probability that a node's connectivity kη(t) exceeds k, in order to find P(k).

$$ P(k_{n} (t) > k) = P\left( {t_{i} < t\left( \frac{m}{k} \right)^{{{\raise0.7ex\hbox{$C$} \!\mathord{\left/ {\vphantom {C n}}\right.\kern-0pt} \!\lower0.7ex\hbox{$n$}}}} } \right) = t\left( \frac{m}{k} \right)^{\frac{C}{n}} $$
(8)

Thus, the connectivity distribution is given by the integral:

$$ P(k) = \int_{0}^{{n_{\max } }} {dn\frac{{\partial P(k_{n} (t) > k)}}{\partial t}} \propto \int {dn\rho (n)\frac{C}{n}\left( \frac{m}{k} \right)^{{\frac{C}{n} + 1}} } $$
(9)

2.5 Workflow as a Service

In the previous sections, a GSSN was created to connect distributed services and provide a network model for their social activities. In this section, we introduce a new approach for exploring a GSSN that offers workflow as a service. As business processes and scientific problems become increasingly complex, service composition plans can grow to involve hundreds of thousands of services. Unfortunately, traditional service composition approaches struggle with creating large service compositions or guaranteeing their quality. To address this, we preprocess the time-consuming ontology reasoning and other semantic-related computing during GSSN construction, and we reduce the search dimension by mapping the GSSN into a service cluster network based on social links. Our novel quality-driven workflow search algorithm improves the success rate of service composition by considering four generic quality criteria: QDSR(R, Tn), QQoS(R, Tn), QSP(R, Tn), and QPSC(R, Tn). This algorithm is based on the quality of social link and differs from traditional service network-based workflow-search algorithms.

Definition 5

(Workflow as a service). Given some existing services \({S}_{n}\) (1 < n < N), including the original service \({S}_{O}\) and the service for destination \({S}_{d}\), e.g., an uncompleted workflow, Workflow as a service aims to find a subnetwork that starts with \({S}_{O}\) and ends with \({S}_{d}\) based on the GSSN containing a finite set of services, S1, S2, … Si, … Sj, … Sm, such that:

1) L(\({{\text{S}}}_{i}\), \({{\text{S}}}_{j}\)) is a peer social link;

\({2) }for each Si, Si.I \in \bigcup\limits_{j = 1}^{m} {Sj} .O;\)

\({3) }\sum\limits_{{i,j \in \left\{ {adjacent{\kern 1pt} node} \right\}}}^{m} {(1 - Q({\text{S}}i,Sj))} shall{\kern 1pt} be \min imal.\)

2.5.1 Method for Workflow as a Service

In this subsection, we present a new method for representing service social activities and finding service chains for service composition on the GSSN, analogous to exploring social networks for friends. Our approach involves translating the GSSN into a service cluster network by following social links, which reduces the search space. We then calculate the adjacency matrix and reachability matrix based on the service cluster network and propose an algorithm for providing workflow as a service with a cost assignment scheme based on the quality of social link.

Step 1: Constructing a Service Cluster Network Following Social Links.

As defined in Sect. 4.1, services that are grouped by cluster social links perform a common function and can be clustered into a Service Cluster (SC). An SC is a group of services that have similar functionality, and is denoted as follows:

$$ {\text{SC}}\, = \,\{ S_{1} ,S_{2} , \ldots ,S_{n} \} , $$

where \({{\text{S}}}_{1}\), …, \({{\text{S}}}_{{\text{n}}}\) represent n services that all implement the same specific function of the service cluster. SCs linked by peer social links are interdependent in terms of functionality and QoS, which creates a network model called a service cluster network, as shown in Fig. 6.

Fig. 6
A network diagram. Each node denotes a service cluster and is connected by cluster social links. Each edge denotes a peer social link between service clusters.

Service cluster network

Definition 6

(Service Cluster Network). A service cluster network is a directed graph G′ =  < V′, E′ > , V′ = {\({SC}_{1}\), \({SC}_{2}\), …, \({SC}_{m}\)} and m is the number of service clusters, where:

  • V’ denotes a collection of nodes where each node represents a service cluster that has services connected by cluster social links;

  • E′ denotes a collection of directed edges, where each edge corresponds to a peer social link between service clusters.

To categorize the GSSN into a service cluster network by following social links, we propose Algorithm 1, which involves two sub-steps.

First, we explore the cluster social links to identify all related services that belong to the same service cluster. Starting from an unexplored node, we locate all social services linked by cluster social links (lines 3–10). Then, we add the social services to the service cluster and explore their social services, following their cluster social links. This process continues until all social services belonging to the service cluster are explored (lines 11–21). In the second sub-step, we establish social links between service clusters by following peer social links (lines 22–27), with social links between service clusters inheriting social links between services.

Step 2: Calculate the Adjacency Matrix and Reachability Matrix based on the Service Cluster Network.

To begin, we calculate an adjacency matrix A(G′) for the service cluster network with m vertices, which shows the relationships between service clusters according to peer social links. The adjacency matrix A(G) for G =  < V,E > with m vertices \({{\text{SC}}}_{{\text{m}}}\) can be denoted as

$$ {\text{A}}({\text{G}}^{\prime} ){ } = (a_{ij} )_{m \times m} $$
(10)

where \({a}_{ij}\) represents the social link status between \({{\text{SC}}}_{{\text{i}}}\) and \({{\text{SC}}}_{{\text{j}}}\); it is defined by

$$ {\text{aij = }}\left\{ {\begin{array}{*{20}l} 1 \hfill & {{\text{with}}\,{\text{L}}\left( {{\text{SCi,}}\,{\text{SCj}}} \right)} \hfill \\ 0 \hfill & {{\text{with}}\,{\text{out}}\,{\text{L}}\left( {{\text{SCi,}}\,{\text{SCj}}} \right)} \hfill \\ \end{array} } \right. $$
(11)

After mapping service clusters into the adjacency matrix, we can extract the reachability matrix for pairs of service clusters based on the adjacency matrix. The reachability matrix R(G) for G =  < V,E > with m vertices \({SC}_{m}\) can be denoted as

$$ {\text{R}}\left( {{\text{G}}^{\prime} } \right) = { }(r_{ij} )_{m \times m} $$
(12)

where \({r}_{ij}\) describes the reachability relation between \({{\text{SC}}}_{{\text{i}}}\) and \({{\text{SC}}}_{{\text{j}}}\). We first calculate the Lth power of A(G) as

$$ ({\text{A}}({\text{G}}^{\prime} ))^{L} = A^{L} = (a_{ij}^{\left( L \right)} )_{m \times m} ({\text{L}} \ge 2) $$
(13)

where \({a}_{ij}^{\left(L\right)}\) represents the number of L-step connections (or paths of length L) from \({{\text{SC}}}_{{\text{i}}}\) to \({{\text{SC}}}_{{\text{j}}}\), and can be defined by

$$ a_{ij}^{\left( L \right)} = \mathop \sum \limits_{k = 1}^{m} a_{ik}^{{\left( {L - 1} \right)}} \cdot a_{kj}^{\left( 1 \right)} ,{ }A^{1} = A = (a_{ij} )_{m \times m} $$
(14)

Therefore, \({r}_{ij}\) in Eq. (12) can be defined by

$${r}_{ij}= \left\{\begin{array}{c}1 if {a}_{ij}^{\left(1\right)}+ {a}_{ij}^{\left(2\right)}+ \cdot \cdot +{a}_{ij}^{m-1} >0\\ 0\, otherwise\end{array}\right.$$
(15)

Step 3: Quality-Driven Algorithm for Workflow-Search and Service Composition Quality.

In order to enhance the quality of service composition in terms of scalability, we preprocess semantic-related computing during the network construction stage and construct the service cluster network based on the GSSN to reduce the search space. Additionally, to increase the success rate of service composition in terms of quality, we propose an algorithm in this section to find the path chaining services with the best quality, based on the quality of social links.

To compare the costs of potential solutions and identify the optimal quality of composition solution, we introduce a cost assignment scheme. We use weight functions to represent the cost of a solution graph of node R in a service cluster network, when node R is explored. The cost is denoted by Cost(R). We define the cost of node R recursively as follows:

$$ {\text{Cost}}({\text{R}}) = \, < {\text{ E}}({\text{R}});{\text{Cost}}({\text{T}}_{{1}} ),{\text{Cost}}({\text{T}}_{{2}} ),...{\text{Cost}}({\text{T}}_{{\text{m}}} ) > , $$
(16)

where T1, T2,…, Tm are super node R, Cost(Tm) is the cost of the solution graph of node Tm, and E(R) is the cost or weight affected by node R.

On the other hand, to achieve the quality of service composition, we assign E(R) based on the quality of social link, which was defined in Eq. (2) as

$$ {\text{E}}\left( {\text{R}} \right) \, = { 1 }{-}{\text{ Min}}\left\{ {{\text{Q}}\left( {{\text{R}},{\text{T}}_{{\text{n}}} } \right)} \right\}. $$
(17)

Higher values of Q(R, Tn), show lower costs. Therefore, based on Eqs. (16) and (17), Cost(R) can be set to two different values in the process of search, depending on the social links pattern:

$${\rm{Cost}}(R)=\left\{\begin{array}{c}Min\{E(R)+Cost(Ti)\},L(R\leftarrow Ti) \, \, {\rm{o}}{\rm{r}} \, {\rm{L}}({\rm{R}}\rm{<}||Ti) \, \, \\ {\sum }_{1}^{n}Cost(Ti)+ E(R),L({\rm{R}}\rm{<}\oplus Ti) \end{array}\right..$$
(18)

In the first part, we have a recursive definition of the Cost(R) function used to evaluate the quality of a composition solution. If R is an (L(SCi ← SCj) or L(SCi < ||SCj) node, the cost is assigned the minimal value of the sum of the immediate parent of R plus the cost of R itself. If R is an L(SCi < \(\oplus\) SCj) node, the cost is the sum of the costs of the solution graphs of all the immediate parents of R plus the cost of R itself. The lower the Cost(R) value, the better the quality of the composition solution.

In the third step, we propose a quality-driven workflow search algorithm based on the service cluster network to provide users with workflow as a service. The algorithm uses the Cost(R) function from the previous step to evaluate the quality of possible solutions. First, we find the service clusters SCo and SCd, and add SCd to queue SQ (lines 1–3). Then, we find the node SCi in SQ with the smallest cost and check if it is the final solution (lines 5–8). Next, we find the nodes related to SCi in G by following peer social links and check their reachability from related nodes to So (lines 9–12). We select the node with the next smallest cost to keep track of the minimal cost. If the selected node L(SCi < \(\oplus\) SCj) || L(SCj \(\oplus\) >SCi), we calculate the cost of its solution graph by taking the sum of the costs of its parents and the cost of the parallel node itself (lines 13–23). Otherwise, we calculate the cost of its solution graph by taking the cost of its parents and the cost of the node itself (lines 24–32). Finally, we select the workflow with the minimal cost and the highest quality of social link.

3 Better Service Discovery Using Attention of Service Invocation

Web services enable different software applications to communicate with each other over a network, relying on standard technologies such as XML, WSDL, SOAP, and UDDI. They are extensively used in e-business and have gained popularity among application developers. However, the growing number of services has made it challenging for consumers to find the most suitable services, impeding the development of web services. To tackle this issue, web service discovery plays a crucial role in matching customers’ requests with appropriate services.

Service clustering, which involves grouping related services based on their domains or features, is an effective way to boost service discovery or composition. The process typically includes three main steps: Requirement Analysis, Feature Extraction, and Matcher, as illustrated in Fig. 7. Requirement Analysis helps understand consumers’ needs, and Feature Extraction formats data in a way that computers can understand. Matcher then identifies the target services based on the request expression. If a single service cannot meet the consumer's requirements, service composition is introduced.

Fig. 7
A flow diagram of service clustering. Consumers request messages and analyze requirements for matching. Traditional clustering includes service repository and feature extraction using keywords, word embedding, and L D A. Service embedding includes service sequences and neural language models.

Service clustering with service embedding in web service discovery

To extract features from WSDL documents, WSDL-based approaches such as keywords, word embedding, LDA, and ontology are commonly used in traditional service clustering. These approaches often involve service signatures, such as IOPEs, which include the names of operations, inputs, outputs, preconditions, and effects.

To achieve more realistic service clustering, considering the invocation association between services reflecting the actual invocation situation during service execution is another approach. This study proposes a novel service embedding method based on successful word embedding techniques in various contexts to facilitate this.

The increasing trend of microservices due to the rapid development of IoT, edge, and fog computing has led to better quality service compositions and more efficient mashup development. Service composition is frequently implemented in cloud and edge computing environments, which lack sufficient resources to support large-scale deep learning models. Therefore, more efficient lightweight approaches for service clustering are necessary.

This paper proposes a lightweight deep learning-based approach for service clustering that uses a BERT-based service embedding model with a novel transformer's encoder to perform semantic clustering of service composition. First, service embedding builds an informative cyclic framework in web service composition, with neural language networks learning service composition sequences and understanding the invocation relationship between services. Second, the pre-trained model generates representation vectors of all sequences, which are then clustered to obtain different semantic clusters.

The approach addresses the main issues of proposing service embedding for informative cyclic framework construction in service composition and suggesting the use of neural language models for service embedding. To deal with the complexity of existing models, a lightweight deep neural language model is developed, which has similar performance to the base model but is faster. Comprehensive experiments with a real-world dataset show that the approach effectively performs clustering.

3.1 Related Work

This study presents the first fully deep learning-based approach to service clustering. Related works are categorized based on different aspects.

3.1.1 Web Service Discover and Clustering

Traditional web service clustering methods use features extracted from WSDL documents to compute similarities between services. For example, Elgazzar et al. [20] used WSDL documents to capture features and compute similarity, while [21] used both WSDL documents and tags. Kumara et al. [22] utilized ontology learning to calculate similarity, while [23] presented a word embedding augmented LDA model. Zou et al. integrated service composability into deep semantic features for clustering. In contrast, we propose to use neural language models to represent services as representation vectors and perform clustering based on these vectors.

WSDL documents are difficult for machine algorithms to understand from a semantic perspective, so semantic web service discovery has been proposed. Ontology is a promising approach to enriching web services with machine-processable semantics. Martin et al. [24] used the Web Ontology Language for web services, while [25] explored ontology for service discovery. Instead of extracting semantic knowledge from WSDL documents or constructing ontology based on them, we attempt to reveal semantic information from service composition sequences, as the invocation relationship between services contains semantic information.

3.1.2 Social Relationship for Web Service Discovery

Social relationship-based service discovery is a promising approach that connects related services based on functionality, quality of service, or sociability. Maamar et al. [17] developed social networks for service discovery, while [18] presented the Global Social Service Network. Cor-bellini et al. mined social web service repositories for social relationships to aid discovery. In contrast, we adopt neural networks to learn service composition sequences and extract the invocation relationship for clustering services.

3.1.3 Deep Learning for Application Programming Interface (API) Learning

In order to ease the workload of developers, deep learning techniques have been applied to API learning. Gu et al. [26] utilized a neural LM to project natural language queries into API usage sequences, while [27] proposed a novel neural synthesis algorithm for learning programs with APIs. Wu et al. [28] suggested an approach for automatically binding answers for natural language questions related to APIs from tutorials and stack overflow. These studies demonstrate the capability of neural language networks to understand both natural language and API usage sequences.

Inspired by these works, we aim to leverage neural LMs to learn service composition sequences and extract important information for service clustering. Firstly, this section reviews various traditional service clustering approaches that typically rely on WSDL documents. Then, existing studies that perform service discovery based on social relationships between services are reviewed, although they do not consider the invocation relationship. Finally, Fig. 8 illustrates some cases of deep learning models used for API learning, which indicate their ability to comprehend API invocation sequences. These studies motivate us to propose a new approach for service clustering using service embedding with invocation sequences.

Fig. 8
A flow diagram of service embedding. The steps are service requests, composition generator, evaluation engine, service sequences, service sequence learning model, service repository, and service matcher. Two arrows denote vectors and extracted information and knowledge.

Service embedding in web service composition

3.2 Service Embedding

In this section, we introduce the concept of service embedding in web service composition. Web service discovery aims to provide suitable services for consumers, but when a single service cannot meet the complex requirements of consumers, the discovery task changes to service composition by combining several services to provide value-added services. As shown in Fig. 8, the web service composition framework consists of three main components: Service Matcher, Composition Generator, and Evaluation Engine. When Composition Generator receives service requests from customers, it processes the requests and obtains relevant services from Service Matcher to create candidate service compositions. These compositions are then sent to Evaluation Engine for testing, and the final tested service composition provides value-added services that can satisfy the complex functionality required by consumers.

Composition Generator generates service compositions based on rules or knowledge, and these service sequences contain the invocation relationship. Determining precise information or knowledge can be helpful in service clustering, which can be performed based on the invocation relationship. To this end, we propose service embedding in the framework to learn service composition sequences using appropriate models. The sequences can then be projected into representative vectors by the pretrained models, and related services can be determined by computing these representative vectors. The significance of service embedding can be summarized as follows: the representative vectors generated by the pretrained model can be used to find relevant services, the extracted information and knowledge can contribute to the service composition procedure, and the model is independent and open in the cyclic framework because the input and output are service composition sequences and representative vectors, respectively, making it easy to share and exploit such data.

3.3 Service Embedding with Deep Neural Language Networks

The use of Transformer as a state-of-the-art model in neural machine translation has been well established. BERT, which is composed of stacked layers of Transformer's encoder, has been used for service embedding in this paper. However, the base model is heavy and still under development. Therefore, a lightweight BERT-based model has also been developed for service embedding. This section provides a detailed description of both models.

3.3.1 Transformer and BERT

In natural language processing (NLP), language models (LMs) are essential for tasks such as machine translation, question answering, and sentiment analysis. LMs are responsible for representing word sequences in a form understandable by machines and estimating the probability distribution of words, phrases, and sentences.

Recently, neural networks have been used to learn the probability of LMs, resulting in significant improvements. Transformer and its stacked layers, known as BERT, have demonstrated exceptional language sequence learning capabilities [29, 30]. As shown in Fig. 3, Transformer relies solely on a self-attention mechanism and is composed of the Encoder and Decoder. The main components of Transformer are Multi-head Attention, Feed Forward, and Add & Norm. Feed Forward consists of two linear transformations with a Rectified Linear Unit activation function in between. Add & Norm is a residual connection [31] and layer normalization. Multi-head Attention is a crucial part that implements a self-attention mechanism and is shown in Fig. 4. It comprises several attention layers running in parallel, with h representing the number of heads or parallel layers. The input vectors, query (Q), keys (K), and values (V), are transformed to Scaled Dot-Product Attention through linear projections. In a self-attention layer, all queries, keys, and values come from the same place. The Scaled Dot-Product Attention can be formulated as follows:

$$ Attention(Q,K,V) = soft\max \left( {\frac{{QK^{T} }}{{\sqrt {d_{k} } }}} \right)V $$

In the Decoder component, the mask operation restricts the current position from observing anything beyond its prior positions. All attention weights are concatenated and then transformed via linear projection. BERT is composed of stacked transformer encoder layers, and its proposal splits the NLP process into two stages: upstream representation and downstream tasks, with BERT being employed in the former. To pretrain BERT, two unsupervised tasks are used: masked language modeling and next sentence prediction (NSP). The input is a concatenation of two masked sentences, with the first position being [CLS]. NSP necessitates the model to predict whether the second sentence is the following sentence of the first sentence, and the outcome position is probability. [SEP] is a unique separator token for separating two sentences, like questions and answers. Masked language models predict the masked token in the input sentences. Pretrained BERT can be utilized in a variety of downstream tasks, such as machine translation, Q&A systems, and others. The self-attention mechanism can learn an exceptional representation of input sequences through unsupervised learning. In our study, we propose using BERT to learn service composition sequences and capture invocation relationships via its self-attention mechanism. In our situation, some adjustments were made to the model. The NSP task and segment embedding are eliminated, as depicted in Fig. 9. The input is a single masked service sequence, and the embedding layer is comprised of two procedures: token embeddings and position embeddings. The model performs masked language modeling. In masked language modeling, 15% of the masked token positions are randomly chosen for prediction. Suppose the last API invocation sequence is “getText toLowerCase replace split” and the selected position is the last one. In that case, the input and label are as follows:

$$ \begin{gathered} {\text{Input}}:{\text{ getText toLowerCase replace }}\left[ {{\text{MASK}}} \right] \hfill \\ {\text{Label}}: \, \left[ {{\text{MASK}}} \right] \, = {\text{ split}} \hfill \\ \end{gathered} $$
Fig. 9
An illustration of the B E R T-based service embedding model. The input is a single masked service sequence with interconnected nodes. The embedding layer is split into token embeddings and position embeddings. The masked service sequence is S 1 to S n.

BERT-based service embedding model

The model's prediction is the label “split.” The masked token positions can be predicted by performing mask operation on all input service sequences, and the model can be trained on the samples to learn these service sequences. The model predicts the label “split” for the given input sequence, where the masked position is replaced with the [MASK] token 80% of the time, a random API method 10% of the time, or remains unchanged 10% of the time. The mask operation is performed on all input service sequences, and the labels of the masked positions are obtained. The model is trained with these samples to learn the service sequences by predicting the masked positions.

3.4 Semantic Service Clustering Based on Service Embedding

Contextual knowledge plays a vital role in semantic segmentation in NLP. With the help of BERT, the semantics of words can be comprehended by considering the context, thereby resolving lexical ambiguity. Additionally, a single service can result in different service compositions, each having unique functions. By pretraining a BERT-based service embedding model with these composition sequences, the model can effectively capture the semantics of services and generate corresponding representation vectors. As a result, we can discover similar semantic services and retrieve matching semantic compositions. The entire process is depicted in Fig. 10. The semantic clustering of service composition can be divided into two stages:

Fig. 10
A semantic clustering architecture diagram. Service embedding includes service sequences, models, pre-trained models, and representative vectors involving unsupervised learning and embedding. Semantic clustering of service composition includes target service, clustering model, and clusters 1 to 3.

Semantic clustering of service composition with service embedding

The first stage involves service embedding, which entails pretraining a neural LM with service sequences to generate representation vectors through the model. In this study, we opted for BERT-based service embedding models as they leverage the self-attention mechanism to capture the invocation relationship between services. This knowledge encapsulates semantic information about the services and is already conveyed via the embedding process. The second stage revolves around clustering. Specifically, we utilized the unsupervised K-means clustering technique to cluster the representation vectors. Consequently, a semantic clustering model was developed, which can return various semantic clusters when a target service is entered into the model.

3.5 Data Preparation

For our experimental dataset, we opted for the invocation sequences of web APIs. We acquired Java source codes from GitHub, which were designed for implementing the Twitter APIs. Figure 11 illustrates the data preparation process. Initially, we parsed the source code into abstract syntax trees to identify the methods in each calling method or class. As our research focus was on Twitter APIs, we had to distinguish the relevant Twitter API methods and filter out irrelevant methods. Ultimately, we obtained Twitter API invocation sequences within a specific definition scope. During the experiments, we utilized approximately 3000 API invocation sequences as training data, with the number of methods totaling around 800. Compared to other NLP datasets, our dataset is relatively small. This is primarily due to two reasons: First, the model's complexity is low, with our models containing only 1:6 M and 2:5 M parameters, in contrast to base BERT in NLP, which has 110 M parameters. As a result, a large dataset is not required. Additionally, our model is not a full BERT model, as it doesn't learn sentence pairs, but rather just predicts the masked position to embed the sequences, simplifying the task. Second, our dataset type is different, as it consists of API invocation sequences that aren't as complex or creative as natural language. Moreover, nearly all Twitter APIs are already included.

Fig. 11
A flow diagram has 4 steps. Five Java programs are parsed into the A S T classification tree. The next steps are annotating Twitter A P I and filtering. Classes of Twitter methods are Public void A and Public String B.

Processing of the dataset

3.6 Experiment and Discussion

This section addresses two key issues: service embedding using the lightweight BERT architecture and semantic service clustering. Regarding the former, we evaluate the computational complexity and reduction in model size. Furthermore, we present the experimental outcomes of service embedding. With respect to the latter, we delve into the discussion of semantic service clustering using lightweight BERT-based service embedding through invocation sequences, analyzing the clustering performance.

3.6.1 Service Embedding with Lightweight BERT-Based Models

3.6.1.1 Calculation of Computational Complexity

The aim of this experiment is to compare the performance of the base BERT model with the proposed lightweight architecture. The hyperparameters for both models are set in Table 1, with a batch size of 12, maximum sequence length of 128, vocabulary size of 800, and other configurations following the original literature [17]. As discussed in Sect. 5, the computational complexity of both models can be calculated with the increase of the embedding dimension dm leading to a dramatic increase in time complexity and number of parameters for both models. However, the lightweight model shows a reduction in both time complexity and number of parameters when compared to the base model.

Table 1 Hyperparameters of models

When dm is set to 384, the time complexity of the base model is approximately 322 M, with 2.5 M parameters. For the lightweight model, the time complexity is about 221 M, with 1.6 M parameters. This represents a reduction of 19–56% in time complexity and 22–46% in the number of parameters for the lightweight model when compared to the base model, making it theoretically faster and more lightweight. This is especially important in deep learning-based applications where response time is crucial, with inference time being the dominant factor. When performing the same inference task on edge computing, the inference time of the lightweight model can be reduced by 19–56% compared to the base model.

Both models were trained on a GTX 1080 Ti, with the base model taking about 10 h and the lightweight model taking about 6 h. The results show that the loss of the base model becomes stable at around 300 K steps, while the lightweight model completes training at about 150 k steps. This further confirms that the lightweight model can be trained faster than the base model, consistent with the previous comparison of computational complexity.

3.6.1.2 Visualizing Service Embedding

After pretraining, we obtain representation vectors of all sequences using the pretrained models. To visualize these vectors, we use principal component analysis for dimension reduction, and the results are presented in Fig. 12. The distribution of points is quite similar, and the points are divided into several large groups, but this does not have clear significance. However, there are several small clusters, indicating promising capability of the model in service embedding. To compare the results, we compute the nearest points of some target method. For instance, if we choose “(185)setMedia” as a target, “185” represents the number of sequences in the dataset, and “setMedia” is the name of the API method. By computing the cosine distance, we can determine the nearest points in space, as shown in Fig. 13. Although there are a few differences in the order, the points are the same. We use several target API methods to compare the difference between the nearest points, and the results are consistent. Thus, by measuring the visualization result, the performances of the two models are comparable.

Fig. 12
Two model diagrams visualize the representation vectors. The distribution of points in both the base model and lightweight model are almost similar to a couple of small clusters.

Visualization of the representation vectors

Fig. 13
Two charts of the nearest points in the original space. Both the base model and lightweight model list 2 columns of data for set media. The base model ranges between 0.002 and 0.004. The lightweight model ranges between 0.005 and 0.013.

Nearest points of (185) setMedia

3.6.2 Semantic Service Clustering

Our approach aims to achieve semantic service clustering, where consumers input a target service, and the clustering model returns different semantic clusters that contain the target service, as shown in Fig. 14. In this experiment, we use the K-means clustering algorithm to construct a clustering model. K-means clustering is an unsupervised learning algorithm widely used in clustering tasks. The number of clusters K needs to be determined in advance, so we use several values to compare the performance of clustering models in different k values. To evaluate cluster quality, we use purity and entropy, and we adjust entropy accordingly in our case. Detailed experimental results can be found in the literature [32].

Fig. 14
An illustration of semantic clustering. It comprises 3 clusters, 1 to 3. The target service is the input from consumers. The clustering model returns different semantic clusters that contain the target service.

Example of Semantic Clustering for “setMedia”

4 Intelligent Big Data Analysis with ASC for Virtual World

This section presents an example of an intelligent big data analysis architecture based on Automatic Service Composition (ASC) for virtual world applications. Big Data is generated by both human and machine sources, resulting in massive amounts of data pouring in from every direction. According to the [33], the amount of information created and replicated is nearly as many as the number of stars in the physical universe, indicating the exponential growth of digital data due to various factors such as volume, velocity, variety, value, veracity, etc. The importance and challenge of manipulating Big Data are increasing exponentially, making it difficult to synchronize all factors to achieve a final solid solution.

Currently, Big Data Analytics (BDA) is performed by manually accumulated tasks, which hinders faster decision-making on real-time applications for efficient data analytics. Moreover, the diversified analytical requirements and multidisciplinary datasets in BDA make the data mining process complex, requiring a comprehensive data mining methodology to efficiently fulfill the requirements. While CRoss Industry Standard Platform for Data Mining (CRISP-DM) is a useful standard for BDA, its manual process and rigorous steps make it time-consuming and not suitable for real-time applications.

To address these issues, we propose a novel architecture that automates the BDA process with CRISP-DM using Nested Automatic Service Computing (NASC) as a key technology to automate the multi-step process while maintaining scalability. The proposed architecture integrates intelligent and innovative technologies to create a scalable, intelligent, and real-time BDA solution.

4.1 Related Work

The existing literature on scalable intelligent architectures for BDA is limited. Geerdink [34] proposed a reference architecture for BDA and presented indicative evidence of its effectiveness. [35] provided an intelligent multi-agent solution for a specific domain. Zhong et al. [36] introduced a memory-centric real-time BDA solution, while [37] discussed a real-time BDA solution for monitoring health. Ayhan et al. [38] presented a predictive BDA solution for the aviation industry by considering various factors. Oracle [39] introduced a method for making informed predictions and gaining business insights from the constant flow of information within different business domains. Additionally, wu et al. [40] proposed the HACE theorem characterizing the features of the Big Data revolution and presented a Big Data processing model. However, most of these solutions are domain-specific and only some of them provide real-time support to the analytical process. In contrast, our proposed solution offers a domain-independent scalable approach to the BDA process.

4.2 Preliminaries for Big Data Analytics

4.2.1 Big Data Analytics Process

Big Data Analytics (BDA) involves gathering, structuring, and examining large data sets to uncover patterns and insights that can aid organizations in comprehending the data and identifying essential information for business decisions. The data will be processed through data science technology and mined using data mining techniques in a data warehouse. A data science process will be utilized for data manipulation, with the CRoss Industry Standard Platform for Data Mining (CRISP-DM) shown in Fig. 15 as our methodology of choice.

Fig. 15
An architecture diagram of B D A. New technologies point maps to Big Data infrastructure or technologies, data science processes, data mining techniques, and data-driven decision making. Technologies point rightward to C R I S P-D M.

Standard process of BDA

4.2.2 CRISP-DM Process

The process of BDA involves the collection, organization, and analysis of large datasets to uncover patterns and useful information. This helps organizations better understand the data and identify the most important information for future business decisions. The CRISP-DM model has six stages that effectively address data science requirements in the Big Data domain. Figure 16 provides a graphical view of the model. The Business Understanding stage focuses on understanding objectives and requirements from a domain perspective, and a preliminary plan is designed to achieve those objectives. The Data Understanding stage begins with the given dataset and continues with tasks until the first insights into the data are discovered. In the Preparation stage, the final purified and rectified dataset is prepared for the next stage. The Modeling stage applies various modeling techniques, usually data mining techniques, based on the requirements. In the Evaluation stage, a thorough insight into the model is gained using matured data, and a decision is made whether to use the mining process results. In the Deployment stage, the result is organized for customer readability and the project is deployed. Business understanding and data understanding have already been confirmed manually by this project, and we will now automate the remaining four stages using NASC technology.

Fig. 16
A cycle diagram of the C R I S P-D M process. The steps are business understanding, data understanding, data preparation, modeling, evaluation, deployment, and data for analytics.

CRISP-DM process

4.2.3 Nested Automatic Service Composition

NASC, which is based on the service-oriented architectural design pattern, is used in this study to automate BDA. To achieve intelligent automation of the BDA process, we must first define service concepts for each step of the CRISP-DM process, and then logically match each step to a composition step. The development of an intelligent BDA process involves the following steps:

  1. 1.

    Development of service types and instances for BDA;

  2. 2.

    Definition of a workflow for BDA;

  3. 3.

    Development of a service discovery algorithm for BDA;

  4. 4.

    Development of a service selection algorithm for BDA; and

  5. 5.

    Development of a service algorithm for BDA results.

4.3 Architecture for Intelligent BDA

Our focus is to develop a comprehensive architectural solution that translates real-world problems into technical language. Due to the size and complexity of Big Data solutions and the need for quick time-to-market, new software engineering approaches are required to design software architectures [3]. One such approach is a software Reference Architecture (RA) that allows for the systematic reuse of knowledge and components when developing a concrete System Architecture (SA). As a result, we were able to easily generate an implementation-level UML class diagram.

4.3.1 Reference Architecture

RA is an architectural solution that provides a template solution for a complex problem domain. The RA for the BDA process is shown in Fig. 17 and provides a solid foundation for extracting the SA from it. SA is a conceptual model that defines the structure, behavior, and other views of a system. The RA is a layered solution that gives a high-level view of how each component and technology of the product behaves and how it maintains interactions between each of them. This layered pattern is closely connected to an architectural principle of “loose coupling.” From the RA perspective, we have identified three main building block layers: the top-level layer is called the Analytical Layer, the middle layer is called the Technology Layer, and the bottom layer is called the Infrastructure Layer. Let us now summarize the identification of each layer.

Fig. 17
An architecture diagram of the B D S solution. It comprises an analytical layer, service layer, infrastructure layer, and data source layer.

Reference architecture of the BDS solution

  • Infrastructure layer: It mainly includes the data warehouse and data mart layer, consisting of the Hadoop ecosystem for managing Big Data infrastructure, web service pools, and two relational database management systems (RDBMS) for data manipulation and maintaining analytical clusters. These components can exist on both Intranet and Internet platforms. For instance, a Hadoop cluster can be distributed geographically across data centers, requiring dealing with Hadoop beyond the intranet level. Web services can also be distributed over the internet and local networks. One of the RDBMSs is used to import data from Hadoop and facilitate data processing, while the other RDBMS is responsible for managing the analytical cluster and related activities of the analytical process.

  • Technology layer: It is mainly dominated by NASC, which supports technologies such as the quality of service agent and intelligent planning agent to provide intelligent workflow automation. It identifies the requirements and utilizes respective resources distributed along the system to fulfill both functional and non-functional requirements of the project.

  • Analytical layer: This layer is dominated by CRISP-DM, providing the data mining process of the project. The first two out of six stages of CRISP-DM have already been decided manually, so the NASC will only deal with the remaining four stages.

4.3.2 System Architecture

In scenario 1, the ABC Air Port Company needs to analyze flight delay data to identify factors causing the delay and make necessary decisions to reduce/avoid it. We used the RA to derive the SA and applied it to our scenario. The behavior of each layer during execution time and the resulting output from the NASC execution stage are clearly shown in Fig. 18. The SA shows the existing technologies and their responsibilities, as well as the communication between layers across the entire solution.

Fig. 18
An architecture diagram of N A S C illustrates the execution time and the resulting output. The four stages are execution, selection, discovery, and planning.

NASC versus CRISP-DM and classification results

4.3.3 Top-Level UML Class Diagram

Using the RA, we successfully integrated the main technologies to achieve intelligent real-time analytics for BDA and derived the SA for our scenario. Finally, we designed a detailed top-level UML class diagram of a scalable BDA based on the RA and the SA. We identified two packages, one for ASC and the other for CRISP-DM-related services. Additionally, there are two utility packages providing services to the system: Planning Agent and Quality of Service (QoS) Agent. Figure 19 displays a high-level view of the UML class diagram.

Fig. 19
A top-level U M L class diagram. It comprises data in various shades. The four stages of N A S C are planning, discovery, selection, and execution. The four stages of C R I S P-D M are data preparation, modeling, model evaluation, and deployment.

Top-level UML class diagram of Intelligent BDA process

The NASC Package is the base package of the solution, allowing for the identification of functional and non-functional requirements for analytics (see Fig. 20). The CRISP-DM Package is responsible for dealing with web services related to the complex, dynamic, and diversified tasks of the BDA process that are requested by the NASC. Note that we manually accomplished the first two stages of CRISP-DM according to the scenario, and the NASC will automate the remaining four stages.

Fig. 20
A screenshot of N A S C stage definitions. It comprises a set of R and W, planning, discovery, selection, and execution.

NASC stage definitions

The two utility packages are Planning Agent and QoS Agent. The Planning Agent can be selected by the developer to fulfill the planning requirement, such as HTN. We chose the Planning Agent by Ontology reasoning for the planning process. The QoS Agent uses Constraint Satisfaction Problem-Solving Agent.

4.4 Evaluation

The following are the main advantages observed and studied: NASC technology can create a scalable solution for real-time analytics. The ASC approach is useful for automating the CRISP-DM process, as it separates workflow management from functional modules, which is expected to be a more technically effective solution than the conventional manual path. The technologies used in RA can be customized based on user preferences, and the solution is a layered architecture, making it loosely coupled and interoperable from an architectural perspective.

We have successfully designed an intelligent BDA using RA, derived the SA based on that RA, and simulated the SA with our scenario. We have also designed a UML class diagram for the software development process of BDA. As we believe that this scalable architectural solution will work effectively for our scenario, we are confident in the success of this approach [41].

5 A Scenario of Smart City Simulation on Virtual Space and Conclusion

5.1 Motivation Scenario

5.1.1 For Batch Processing

An institute in Japan, specializing in advanced industries, has launched several projects in the renewable energy sector. One of these projects involves a weather-data analysis program in Fukushima Prefecture, aimed at identifying effective renewable energy sources. The institute’s objective is to encourage the use of renewable energy, find the most efficient energy sources, and reduce dependency on existing nuclear power plants in northern Japan. The project includes collaborations with Fukushima University and the University of Aizu, with one of the contributions being in the areas of smart grid and energy IoT as shown in Fig. 20 [42].

5.1.2 For Real-Time Processing

The Japan Meteorological Department is currently researching the development of a real-time earthquake detection model to send life-saving alerts to relevant authorities for earthquakes that exceed a magnitude of 6. The proposed solution aims to improve accuracy and speed with the incorporation of machine learning technology for near real-time computation results. It should be capable of handling multiple sources of data and designed for easy use, enabling bulk transmission of alerts within 60 s of the foreshock. Additionally, the system should be able to collect real-time data, perform analytics, and send alerts to earthquake-prone areas within a limited time frame as shown in Fig. 21 [42].

Fig. 21
A map of batch processing scenario. The University of Aizu, Fukushima University, Koriyama, Minami Soma, and Iwaki are marked as A to E. Wind turbines, solar panels, and weather information are indicated.

Batch processing scenario for the sustainable power solution

Fig. 22
A flow diagram of real-time processing scenario for earthquake detection. Real-time foreshock information plus previous earthquake information filter out high-risk areas using earthquake R O C graph and inform all living in high-risk areas by sending bulk S M S.

Real-time processing scenario for the earthquake detection

5.1.3 CRISP-DM Process

This section introduces the CRISP-DM process and a motivating scenario for BDA, which aims to use large sets of data to discover patterns and other useful information to support decision making The CRISP-DM process involves various data mining techniques applied to data stored on specific infrastructure displaying the six phases of operating CRISP-DM over big data. The first phase is business understanding, which focuses on understanding project objectives and requirements from the business domain. In the data understanding phase, data scientists familiarize themselves with the data and identify quality problems. The data preparation step involves all activities that prepare raw data to yield the final dataset for the modeling tool. In the modeling step, various modeling techniques are applied to analyze the dataset, followed by an evaluation phase to ensure it meets business requirements. The section then describes how the CRISP-DM process is used in a batch processing scenario for BDA in the renewable energy field. The main objective is to find optimal renewable energy sources that can reduce or halt the use of nuclear power plants in northern Japan, specifically Fukushima Prefecture. Researchers created two profiles for renewable energy sources across Fukushima Prefecture: the first profile involves weather data collected from five locations, and the second profile involves energy data collected from one location. The weather profile contains six types of data, including irradiance, temperature, wind direction, wind speed, humidity, and pressure, while the power profile contains three types of data, including voltage, current, and temperature of the panel’s photovoltaic surface, and wind turbine data. Researchers identified the core influential factors from the weather and power data generated for the two profiles and treated them as variables upon which cluster analysis was performed. The preprocessed dataset was fed into a big-data file system such as the HDFS, and sophisticated models were built using clustering and classification algorithms. Various analytic techniques were used to verify the reality of the resulting cluster or classification results. The model was then deployed by respective authorities to generate required reports to the Japanese government. Based on the results, the advance industry institution proposed the most sustainably optimal power solution to the power crisis in Fukushima Prefecture.

5.1.4 Application Examples to ASC for Smart City Simulation on Virtual Space

All the processes of CRISP-DM can be efficiently implemented by ASC to automate a diverse range of applications. The ASC handles the highly dynamic and constraint-oriented BDA problem domain in a sophisticated manner. The analysis workflow will be automated by 5 ASC stages: planning, discovery, selection, verification, and execution stages. This automation enables efficient analysis of any complex task. Scenarios related to sustainable power solutions or earthquake detection can be implemented as digital twins in a virtual space. Several traffic congestion simulations for smart city can be supported by the ASC concept too. Considering the technological stages of a digital twin, ranging from physical mirroring level to global data analysis or interoperable environment as autonomous agents [43], several scenarios can be considered. ASC is capable of efficiently handling various dynamic situations on multiple digital twins. If you are looking for detailed and up-to-date information on ASC and its automatic analysis capabilities, you can refer to the following literature: Siriweera [42] and Siriweera et al. [44].

5.2 Conclusion

Automatic service composition closely simulates human intelligence, and the current deep learning systems have gone beyond data learning with respect to high-level inferences. The currently available AI systems, such as ChatGPT, simply learn the probability of relationships between words. However, ASC can enable the construction of intelligent systems to create value-added complex services based on human intelligence.

In this chapter, some core techniques for ASC, such as general ASC architecture, heuristic method, and service discovery, were introduced and applied in ASC to analyze big data using AI. ASC can be applied to automatic data analytics and deep learning generation systems, which can be used in virtual environment systems, such as digital twins, or in creating value-added services to supplement existing AI services (e.g., ChatGPT services). Finally, I expect this ASC technique can be used effectively to compose digital twins or AI services in Society 5.0.