| Today,cloud APIs are the best vehicle for intelligent interaction,open capabilities,and data transfer.However,the proliferation of cloud APIs have made it increasingly difficult for users to choose high-quality,personalized cloud APIs for service-oriented software development from a crowd of multi-function homogenous candidate cloud APIs.As a standard to describe the non-functional attributes of cloud API,quality of service can represent the quality information of cloud API on a certain side.However,the quality of service of cloud API will change with the changes of network environment,server load and other factors.Therefore,accurate prediction of quality of service is of great significance for users to select cloud API that meets their software development requirements.Aiming at the problems of low accuracy and poor interpretability of cloud API quality of service prediction,this paper carried out a research on time series prediction of cloud API quality of service based on Shapelet.The main work is as follows.First,to solve the problem that Shapelet information is not significant when extracting Shapelet from cloud API quality of service time series data set,a Shapelet extraction method GASE based on genetic algorithm is proposed.First,the original multivariate time series data is converted into window subseries set,then classified using cloud API as index,and then extracted Shapelets set based on this category to capture key information about cloud API quality of service.Secondly,K-Means algorithm is used to optimize the population initialization process in genetic algorithm,and cluster the window subsequences to improve the initial fitness of the population and guide the optimization direction.Finally,using the inherent heuristic random search and parallel computing features of genetic algorithm,three kinds of genetic operators such as selection,crossover and variation are used to optimize the fitness of the candidate Shapelets set within a certain number of iterations,and an "elitist" strategy is applied to ensure that the Shapelets set with the highest fitness is extracted.Global optimality of the extracted Shapelets set is guaranteed,which enhances Shapelet information salience and further improves prediction accuracy.Secondly,aiming at the disadvantages of low prediction accuracy of existing cloud API quality of service time series prediction models,a Shapelet-based cloud API quality of service time series prediction method SQTF is proposed.First,the original quality of service time series is cleaned by missing value completion and outlier processing.Then,the quality of service time series indexed and classified by cloud API is transformed into supervised learning problems by using a step forward prediction method to provide supervised modeling sequence for the time series prediction model.Secondly,the Shapelets set extracted by genetic algorithm is transmitted to the Shapelet layer.By calculating the distance between Shapelet and the original window subsequence,the input sequence is traced and the corresponding label vector of Shapelets set is found.Finally,based on Shapelet,a variable weight calculation method combining distance and position is proposed,and MLR model is combined to predict the service quality of the next moment in the future,and Shapelet is used to fit the key trend of cloud API service quality.In the end,multiple sets of comparative experiments were conducted to prove that data cleaning can improve the accuracy of time series prediction of cloud API quality of service,the superiority of SQTF method in time series prediction of cloud API quality of service,and the effectiveness of K-Means algorithm in improving the initial fitness of Shapelet in GASE method.The interpretability of the predicted results is analyzed based on Shapelet. |