Bearings are some of the most critical industrial parts and are widely used in various types of mechanical equipment. Bearing health status can have a significant impact on the overall equipment performance, and bearing failures often cause serious economic losses and even casualties. Thus, estimating the remaining useful life (RUL) of bearings in real time is of utmost importance. This paper proposes a data-driven RUL prediction method for bearings based on Bayesian theory. First, time-domain features are extracted from the bearing vibration signal and data are fused to build a health indicator (HI) and a state model of bearing degradation. Then, according to Bayesian theory, a Bayesian model of state parameters and bearing life is established. The parameters of the Bayesian model are updated and bearing RUL is predicted by the Metropolis–Hastings algorithm. The method was validated by the XJTU-SY bearing open datasets and the prediction results are compared with the existing methods. Accuracy of the proposed method was demonstrated. Bearings are some of the most basic yet critical components used in the manufacturing industry and the overall performance and reliability of mechanical equipment are closely related to bearing performance . AlthougCurrent methods for RUL prediction can be divided into two categories: model-based and data-driven methods. Model-based methods typically establish a degradation model according to the physical structure of the bearing, which is then used to predict the RUL of the bearing ,6. JiangData-driven methods can overcome difficulties associated with model construction and can achieve more accurate prediction results. However, uncertainties still exist in practical applications, such as uncertainties in material properties, measurement errors, processing technologies, and operating conditions, which are often ignored. Owing to the high costs of product testing, and limitations of existing data transmission and storage technologies, sufficient data on the typical life cycle of bearings are usually unavailable. Therefore, in practice, data are insufficient to support data-driven prediction methods. Realizing a more accurate bearing RUL real-time prediction with limited bearing vibration signal data and considering the random factors is of great difficulty in related research. Bayesian theory is an effective method for data analysis with uncertain factors, which are regarded as random parameters. Expert knowledge, theoretical analyses, and historical data are used to obtain probability distributions of certain parameters . Then, updating methods are used to transform real-time data into more accurate distribution information . Thus, the quantitative method of uncertainty based on the Bayesian theory has great research value in the field of RUL prediction. Mosallam  proposedThis paper proposes a new data-driven bearing RUL prediction method based on Bayesian theory. A flowchart of the prediction process is illustrated in Time-domain indicators are commonly used in equipment fault detection and fault trend prediction, and can fully reflect the overall health degradation process of the system . Common ith dimensional feature index composed of n data, i-dimensional time series data, and ith dimensional time series data, respectively.Due to differences in the dimension and magnitude of each feature index, the multidimensional feature index data must be normalized. The Z-score standardization method is applied :(1)Xi*:xAlthough the multidimensional eigenvalue index contains sufficient information about the bearing degradation process, invalid information can be introduced resulting in increased computational complexity and reduced prediction efficiency. To overcome this, the multidimensional feature index data can be fused to construct a single bearing HI associated with the degradation process. Principal component analysis (PCA), which is one of the most widely used methods in data fusion, is applied ,27. The n groups of evaluation samples are set and each sample is evaluated by m indicators. The sample data can be expressed in the following form:Calculate the correlation coefficient matrix of standardized data ith principal component ith principal component data , jth dimensional original time series data  after standardization, and ith principal component and jth dimensional original time series data.Calculate the eigenvalues and eigenvectors of the correlation coefficient matrix. Eigenvalue Calculate the variance contribution rate and cumulative contribution rate. The variance contribution rate reflects the role of index variables in the evaluation; the larger the value, the more effective the principal components are at retaining information. Generally, a principal component with an 85% cumulative contribution rate will meet calculation requirements.pth principal component The variance contribution rate of the The cumulative contribution rate of principal components n is the number of training bearings, In this paper, the state model is established in the negative time scale based on two considerations: First, many studies assume the degree of degradation of the system is consistent at the initial time; however, due to complex working conditions and errors in manufacturing and assembly, the initial degradation of different systems will vary quite considerably. Second, many studies have only used system status monitoring data, whereas system life information is ignored. To improve the information utilization rate and facilitate prediction of the remaining life, bearing life in the negative time scale can be taken as one of the Bayesian model parameters. The negative time scale transformation formula isThe bearing degradation process will be affected by uncertain factors, such as material properties, manufacturing and assembly processes, complex working conditions, and so on. In this paper, uncertainty in the prediction problem can be effectively dealt with by adopting the Bayesian model and probability method. There is a certain deviation between the bearing HI ribution . TherefoT; T, which can be obtained from historical data on the bearing life cycle.Bayesian theory can be used to deduce the probability of unknown events based on the probability of known events . The basT at the predicted time k can be obtained asSince the vibration signal of the bearing is independently measured at each time point and the measured value k, parameters are updated according to the Bayesian model established in Equation (5) and measured HI values before time k. Then, the posterior distribution of model parameters k is obtained. In general, calculating the posterior distribution of Bayesian model parameters is difficult. To solve this problem, the Markov chain Monte Carlo (MCMC) method can be applied to solve the posterior distribution [To predict the RUL of the bearing at time ribution .Initialize starting point N − 1 iterations, complete the following four steps:x*, from the proposal distribution; the pdf value is i denotes the current iteration and the distribution mean is ix with a selected standard deviation.Draw a sample, u from a uniform distribution with a lower limit of zero and an upper limit of 1, U.Sample x*, and ix.Compute the acceptance ratio, u < A, set the new value of x, i.e., x remains unchanged, If For The MCMC method is a sampling technique that can be used to extract samples from a probability density function (pdf). Posterior distribution samples are generated through stationary distribution of the Markov Chain and a Monte Carlo simulation is conducted. Here, the M-H algorithm is applied to calculate the posterior distribution . The M-HIn theory, any proposal distribution chain will gradually converge to the target distribution. Therefore, the M-H algorithm has good sampling effects for any target distribution. The selection of the proposed distribution affects the acceptance probability of the sample and convergence rate of the chain. In this paper, the proposal distribution is chosen as a uniform distribution based on empirical considerations and expert information. In addition, if the number of iterations is large enough, the initial value of the chain has no effect on the final sampling result . SamplesDatasets containing the complete run-to-failure data of 15 rolling element bearings (XJTU-SY) under accelerated degradation experiments were provided by the Institute of Design Science and Basic Component at Xi’an Jiaotong University (XJTU) and the Changxing Sumyoung Technology Co., Ltd., Zhejiang, China, (SY) . For accAn HI and state model were established using signal data of the training bearings and prior information for the Bayesian model of state parameters and bearing life were obtained. Bearing 1_1 data were used as the test data to carry out the real-time RUL prediction. Finally, the prediction results were compared with the real RUL to verify the method.As listed in j selected feature indexes. The seven selected feature indexes were standardized using Equation (1), and then the PCA method was applied to effectively achieve dimension reduction. ith training bearing. According to Equation (3), the state model can be expressed in the positive time scale asSelection of a reasonable model is the foundation of high-precision prediction. To reflect changes in the value of HI  over time , an expoa, b, and c and bearing life T provide a suitable reference for the Bayesian model. In addition, the mean and variance of noise were obtained using statistics. Since noise is assumed to follow a normal distribution, the mean value of noise was zero and the three prior samples of noise variance were obtained.Measured values of health indicators (HIs) and the bearing life of the training bearings were introduced into Equation (12) and the parameter estimation values of each training bearing state model were obtained using the least squares method. a, b, c, and T cannot be solved directly, the M-H algorithm was applied to perform independent sampling. For the test bearing, the prior distribution of parameters a, b, and c was set as a uniform distribution. According to three prior samples obtained from the historical data, the range of uniform distribution was determined to be z is a known constant used to describe differences among bearing degeneration. The prior distribution of b and c is determined in the same way. When the M-H algorithm was applied, the prior distribution of parameters a, b, and c were taken as the proposal distribution. The prior distribution of parameter T was set as a normal distribution. The mean value depends on the current value of the Monte Carlo chain and the standard deviation is 0.2. For example, the current value of the Monte Carlo chain is ith iteration. A candidate sample A is greater than random variable u, sample T was selected as the normal random walk distribution and the prior distribution was taken as the proposal distribution of parameter T sampling.The feature indexes screened in T was obtained, and the RUL posterior distribution was then obtained by subtracting the cut-off time of the test data. The expectation of the distribution sample was taken as the final prediction result. Considering the bearing is in the normal working state and runs smoothly in the early sampling stage, it is necessary to determine the starting point of bearing failure as the initial point of the RUL prediction, which better reflects the degradation trend of the bearing. The HI of the test data increases suddenly when the time series reaches 60 in the positive time scale; therefore, this point was taken as the starting point of bearing failure. Using the measured value of the test HI and the Bayesian model, the MCMC algorithm was applied to update the model parameters. A total of 10,000 iterations were used for each prediction. The first 5000 were used for the training process and the final 5000 update samples were taken as the posterior distribution samples of the model parameters. The posterior distribution of the predicted bearing life After the prediction update, the posterior distribution of bearing RUL is composed of 5000 samples. The probability distribution of the posterior sample is shown in In order to quantitatively evaluate the prediction effect, three RUL prediction evaluation methods were adopted in this paper: root mean square error (RMSE), mean relative error (MARE) and error function based on asymmetric exponential ,34.ix and iz, respectively, represent the predicted value and the real value of the ith prediction; N is the total number of real-time predictions. A smaller RMSE value means that RUL predicts better effectiveness.RMSE denotes the root mean square of the prediction errors, which can be expressed as:MARE is the mean value of relative error among all time point. The expression of MARE is as follows:Obviously, the approaches with smaller MARE would be better than others.S is the total evaluation error of N predictions; ith prediction; ith prediction. As the overall error evaluation value S decreases, the prediction accuracy increases.Error function based on asymmetric exponential can comprehensively evaluate the accuracy of the prediction method by constructing the exponential error between the predicted value and the true value and synthesizing the prediction accuracy of each prediction time series. According to RUL prediction results, the total evaluation error S can be calculated as follows:The support vector machine (SVM) method and Pairs-based particle filter (PF) method were selected to illustrate the accuracy of the proposed method. The SVM is a widely used machine learning algorithm for classification and prediction, and can predict the RUL of bearings under small sample conditions with good prediction accuracy . The ParThis paper proposed a method of bearing RUL prediction based on Bayesian theory. Feature indexes reflecting the degradation trend were extracted from bearing vibration signals. The corresponding HIs were obtained through PCA and a state model was established. Information was extracted from limited historical data of samples to construct the prior distribution of the model parameters. A Bayesian model of state parameters was established and the MCMC algorithm was applied to update the Bayesian model parameters to obtain the posterior distribution of the RUL and its predicted value. The accuracy and stability of the method were verified using actual bearing data. In addition, the prediction results were compared with those obtained using an existing prediction method and the advantages of proposed method in terms of prediction accuracy were demonstrated.Compared with other data-driven life prediction methods, the proposed method can be used to build a degradation model from limited existing data. Furthermore, the Bayesian approach effectively deals with parameter uncertainties in the degradation process. Therefore, prediction error is reduced and prediction accuracy and stability are greatly improved.


Reconstructing ancestral genomes is one of the central problems presented in genome rearrangement analysis since finding the most likely true ancestor is of significant importance in phylogenetic reconstruction. Large scale genome rearrangements can provide essential insights into evolutionary processes. However, when the genomes are large and distant, classical median solvers have failed to adequately address these challenges due to the exponential increase of the search space. Consequently, solving ancestral genome inference problems constitutes a task of paramount importance that continues to challenge the current methods used in this area, whose difficulty is further increased by the ongoing rapid accumulation of whole-genome data.In response to these challenges, we provide two contributions for ancestral genome inference. First, an improved discrete quantum-behaved particle swarm optimization algorithm (IDQPSO) by averaging two of the fitness values is proposed to address the discrete search space. Second, we incorporate DCJ sorting into the IDQPSO (IDQPSO-Median). In comparison with the other methods, when the genomes are large and distant, IDQPSO-Median has the lowest median score, the highest adjacency accuracy, and the closest distance to the true ancestor. In addition, we have integrated our IDQPSO-Median approach with the GRAPPA framework. Our experiments show that this new phylogenetic method is very accurate and effective by using IDQPSO-Median.Our experimental results demonstrate the advantages of IDQPSO-Median approach over the other methods when the genomes are large and distant. When our experimental results are evaluated in a comprehensive manner, it is clear that the IDQPSO-Median approach we propose achieves better scalability compared to existing algorithms. Moreover, our experimental results by using simulated and real datasets confirm that the IDQPSO-Median, when integrated with the GRAPPA framework, outperforms other heuristics in terms of accuracy, while also continuing to infer phylogenies that were equivalent or close to the true trees within 5 days of computation, which is far beyond the difficulty level that can be handled by GRAPPA. Advancements in the reconstruction of ancestral genomes constitute significant developments in Bioinformatics. Inferred ancestral genomes can be used to reconstruct deep evolutionary histories, which in turn, have been successfully applied to a wide range of problems facing contemporary society, including in controlling hereditary diseases, providing a better understanding of complex disease mechanisms for which effective detection and diagnostic pharmaceuticals drugs have then been developed, and inferring epidemic contact structure, among others –5. With As the smallest unrooted phylogenetic tree is defined by three leaves, one of the most significant problems in genome rearrangement analysis is termed as the Median Problem, which is defined as follows: given three input leaf genomes, find the genome (median) that minimizes the sum of evolutionary distances between the median and the three input genomes. Despite that the Median Problem is NP-hard for most criteria , 7, findTo date, many studies which include the exact and heuristics methods have been developed to solve the median problem. Xu et al. proposed a branch-and-bound method using adequate subgraphs to decompose the median problem (ASMedian) , 9. ThenIn addition to these types of heuristic-based models, metaheuristic algorithms are other effective methods for tackling complex optimization problems that has also been successfully incorporated into phylogenetics in order to solve various NP-hard problems. In 2005, Hill  developeExisting methods utilized in reconstructing ancestral genomes also confront difficulties as a consequence of the failure of traditional optimization methods to address the complexities encountered in the practical applications in which they are deployed. In this vein, in the context of large and distant genomes, the problem of inferring ancestral genomes by reconstructing their ancestral sequences presents a highly-complex, multidimensional problem, whereby the domain constituting the inference search space although discrete, is also extremely large and is composed of high dimensional data. As a result, the process of inferring ancestral genomes continues to challenge the current optimization methods used in this area, which are further compounded by the continuing rapid accumulation of whole-genome data. Accordingly, achieving ancestral genomes with greater accuracy and increased computational feasibility in the context of limited memory space is vital to the ability to reconstruct ancestral genomes and more generally, for the continued advancement of the phylogenetic reconstruction discipline.New algorithms of significance continue to be proposed, including algorithms using novel metaheuristic methods. Indeed, one of the most important metaheuristic algorithms, the quantum-behaved particle swarm optimization algorithm (QPSO) , was intGiven a genome with one or more chromosomes, each chromosome can be labeled by a gene order to represent the direction and the relative positions of genes, represented as integers such as Genome rearrangement events include the inversion , transposition, fusion, fission, and translocation operations. Assuming a genome is a signed gene order, denoted by If A pair of adjacencies An adjacency A pair of telomeres An adjacency The DCJ operation as proposed by Yancopoulos , not onln is the length of the genome, C is the number of cycles, and I is the number of odd edge paths. In the adjacency graph, a DCJ operation is optimal when it increases the number of cycles by one or the number of odd paths by two, such an optimal path reflected by the application of the DCJ operations can increase the sum of C and I/2 by one and still make An adjacency graph Fig.  is reconGiven two genomes cy graph , and thecy graph .d, the sum of all the DCJ distances is defined as The DCJ Median Problem is to find a median genome that minimizes the sum of DCJ Distances from the median genome to the three-leaf genomes. As illustrated in Fig. Quantum-behaved particle swarm optimization is a stochastic searching algorithm that was inspired by the movement of particles in quantum space and was first proposed by Sun et al. . QPSO isCompared with other previously introduced evolutionary algorithms, the performance of QPSO achieves better results insofar as the performance indicator of global search capabilities are concerned. Because QPSO’s search covers the entire search space for each generation, it also increases the diversity of the population and thus, overcomes the problem of premature convergence currently existing in continuous optimization problems in this space. Furthermore, QPSO has been demonstrated to successfully solve a wide range of continuous optimization problems, including problems in multilevel thresholding image segmentation , networky is set as X represents the current position, and L represents the characteristic length of the Delta potential well and hence, is the most important variable, because it determines the scope of the search being conducted. It is computed by mbest. The mbest is then incorporated throughout the entire search process since it serves to balance the position diversity of all the particles and thus enhances the global search ability of QPSO. Then the value of L is computed by u is a random number uniformly distributed on the  range.Based on the quantum physics theory, the quantum state of a particle represents its momentum and energy. Accordingly, the dynamic behavior of each particle is described by the wave function d parameters, we can represent a possible solution as a ith particle is denoted by i is the best previous position , which is denoted by Pbest). The global best position is defined as the best position among all the particles in the population, called gbest and is denoted by gbest can be derived from the following equation: It is important to emphasize that the evolution of all the particles is determined by considering each particle’s current position, i.e., the local best position and the global best position. For a discreate optimization problem with mbest is defined as the mean personal best positions of the whole population and is given byM is the population size, and d is the dimension, respectively. The u is a random number uniformly distributed on , respectivley. Furthermore, t is the current generation, and Maxiter is the maximum generation, respectively. In addition, only one parameter, which is denoted by During the evolution process, the position of each particle is iteratively updated generation by generation. The fundamental steps of QPSO for updating the current position of the evolution process of all particles are conducted as follows: first, the diversity of particles representing the mean best position is calculated; second, the local attractor of each particle as represented by the range of the search space is given; and finally, an update of the current position of each particle representing the candidate solution is completed. As described, The QPSO is a metaheuristic algorithm that solves a problem by generating a population of candidate solutions (particles), which can further be optimized using iterative search. The QPSO algorithm with comparatively improved global search performance capabilities could overcome the problem of premature convergence that currently exists in the continuous optimization problems space. However, a problem that confounds the breadth of the performance potential of QPSO, is that it cannot be directly applied to discrete optimization problems. To overcome this shortcoming, Sun et al. proposed a binary QPSO algorithm (BQPSO) , which iAlthough a wide range of applications have the characteristic of a discrete search space, the current literature we surveyed reflects less studies and analysis have been conducted on discrete optimization problems. Hence, this gap propelled us to discover a novel strategy to deal with such optimization problems. To overcome the problem that the data structure is not composed of sequences during the evolution process, an improved discrete QPSO algorithm (IDQPSO) is proposed in this paper. The proposed algorithm combines a novel strategy for updating the particles’ positions, thereby addressing the issue of the absence of a discrete sequence, which to-date, has hampered the effective deployment of QPSO.mbest, is defined as the center of the personal best positions among the whole population. In IDQPSO, mbest is obtained by averaging two of the computed fitness values and is inspired by the center of gravity in geometry. Here, the particle selected by applying two average operations of the fitness values, can be utilized to reflect the distribution of the whole population as well, since the first step of the IDQPSO algorithm comprehensively considers all of the particles, and thus, the second step can then improve upon the evolution process of the entire population. A concrete example of the procedure of updating mbest as redesigned in the IDQPSO algorithm, is illustrated in the Fig. cbest. Figure mbest. The procedure is detailed in the following portion of this paper.As described in QPSO, the mean best position, denoted by f. First, to attain the initial selection of the candidate mean best position, a strategy of averaging the fitness values that represent the objective function value of the given personal best positions is proposed. Next, a particle with the closest distance to the average fitness value is selected as the candidate mean best position denoted by cbest. The cbest, as utilized by IDQPSO, is given by the following:f(cbest) is the first candidate mean fitness value, and To estimate the distance between two particles’ positions by their fitness values, we define that cbest representing the mean best position is obtained. However, we note that the final mean best position, denoted by mbest, can be further optimized by making another selection according to the averaging of fitness values. Although this objective function for producing an optimized selection process is similar to the first averaging strategy, it goes further and also computes the averages between the first selection of the candidate mean best position and the particles with better fitness values than f(cbest)  may be invalid, thus we need a new strategy to conduct the evolution through generations. In this paper, we go further and take advantage of the whole-genome background in designing an efficient swap operation which is based on genomic sorting for use by the IDQPSO algorithm. Given two genomes (positions) n, there are For complex problems and problems presenting high dimensional data, the global best position cannot be easily found. When the genomes are large and distant, the DCJ Median Problem is compounded by the additional obstacle presented by a challenge that has an ever increasing search space: assuming the length of genome is utations . As a coSince the search space is so large that IDQPSO cannot converge to an optimum in a limited time without incorporating the sorting strategy proposed below. Consequently, in those circumstances, we propose that DCJ sorting be employed based on the established observation that the median genome is likely to be found on the path found during the evolution process in transforming one genome to another. Based on our combined previous experience, DCJ sorting is an effective evolution strategy for ancestral genome inference by reducing the search space. The detailed evolution process applied by the IDQPSO algorithm in finding the IDQPSO-Median is described as follows.M genomes (M is the population size). We also maintain three best medians, i.e., mbest represents the mean best median from gbest is the generation best of The IDQPSO-median maintains and updates three set of genomes, namely the current best median genomes M genomes in Update mbest by averaging all median scores from mbest is the genome with its closest to the mean of the top Find the mean best gbest as the best (with the lowest median score) from Find the generation best gbest if the later has better score;Update mbest if the later is better;Generate a new set Create the next generation of candidate genomes Repeat the first step as the new generation until stop.We first initialize the eps Fig. : Update Previous experience in this area foretells that the initialized candidate solution has a deep influence on both the computation cost and convergence speed. However, the search space within which the IDQPSO-Median must be located is too large, and thus any randomly selected genome is likely to generate candidates that deviate too much from the optimum. For this reason, if the IDQPSO algorithm used random selection to generate the initial candidates, the search process for finding the IDQPSO-Median could not converge to the optimum.In order to expedite the evolution process of the particles without decreasing the performance of the IDQPSO algorithm, an initialization strategy of adopting DCJ sorting to reduce the search space has been integrated into the IDQPSO algorithm. First, DCJ sorting is applied to generate different candidate median genome sets along the evolutionary path from genome M, there are six combinations for each set of two of the given genomes because of the direction of each genome in these two genome sets. After applying DCJ sorting, the total number of candidate median genomes is M candidate median genomes in the initial pool. After applying DCJ sorting, one is then randomly selected as the initial median genome from the first pool of candidate median genomes.Assuming the population size is As a performance criterion to measure efficiency, the fitness value of a particle influences whether it is saved or not for the next generation. The fitness function is designed with the purpose of directing the evolutionary process for the entire population to continually improve the process of evolution until its cessation. For the DCJ Median Problem, setting the function of the median score as the fitness function is an efficient way to achieve the purpose encapsulated by the design of the fitness function. Since the median score represents how many DCJ operations have been conducted on the given genomes, setting it as the fitness function can result in the whole population evolving towards a better fit. The fitness function is given as follows:The fitness function indicates that the particle with a lower median score can have a better fitness value. Therefore, when compared to those with lower fitness values, those particles with better fitness values indicate an increased chance of surviving the evolution process.Pbest), can be obtained through an iterative comparison of the values of the previous best median genome to the current personal best median genome. For the complete set of particles in the inference solution search space, the median score between the given three genomes and the initialized median genome is calculated based on the fitness function. Then according to Eq (f(cbest) is acquired. Next, by comparing the distance using f(cbest) is selected as the first candidate median genome denoted by cbest.For ancestral genome inference, the initial position of each particle represents the initialized median genome. After the current median genome of all particles are set, the local best median genome, also called the personal best median genome  Xeon (R) CPU E7-4820 v4*2 @ 2.10 GHz r represents the average number of rearrangement events along an edge and where n is the number of genes. Each dataset was comprised by three leaf nodes containing 1000 genes; the average number of reversal events per edge ranged from 100 to 1000. Consequently, the values that d took on ranged from 0.1 to 1. Twenty datasets were generated for each average number of reversal events.The primary parameter used as a performance benchmark was the number of genome rearrangement events per each edge represented on the generated adjacency graphs. Each genome has a different evolutionary rate, which evolutionary rates are given by IDQPSO-Median: the maximum generation and population size were set to be 2150 and 20, respectively, while every other parameter in IDQPSO-Median was set to one.SAMedian: the maximum generation was set to 10, 000, and the initial temperature and cooling rates were set to 10 and 0.9, respectively.GAMedian: the maximum generation was set to 100, and 50 genomes were generated for each step of sampling process.ASMedian: the parameters were set to the default values provided in the software package.Given three genomes medianLB, or the number of iterations has exceeded either 2150 or SAMedian, GAMedian, and ASMedian were selected to test the effectiveness of the performance of the IDQPSO algorithm. The number of fitness function values (median scores) evaluated is considered representative of a fair time measurement in light of the deep insight into the convergence of the algorithms that the population size, the inner loops, and the number of generations provide. Therefore, every instance was executed with a set maximum number of function evaluations. The maximum number of sufficient generations of each median solver can provide that result in convergence was an important parameter at issue and was examined in the experiments we conducted. The parameters of all the median solvers were set to fall within the following bounds:median score is defined as the sum of DCJ distances between each leaf genome and the inferred median. The distance to true ancestor is defined as the DCJ distance between the inferred median and the true ancestor genome. Given two sets of adjacencies, the median score value represents all of the adjacencies contained in the inferred median genomes, while the distance to true ancestor value represents the adjacencies from the true ancestor. In contrast, the adjacency accuracy is defined as the ratio of the intersection  were used to demonstrate the effectiveness of the IDQPSO-Median obtained by the approach implemented by the IDQPSO algorithm. The To highlight the performance of IDQPSO-Median, three groups of experiments were performed: wherein the population size was set as 20, 40, and 60, respectively. The results for the different population sizes examined in our experiments are set forth in Table From the view of the population size, it can be seen that the values obtained by the IDQPSO algorithm for values of the median score, true distance, and adjacency accuracy became increasingly improved as the population size increased from 20 to 60. Although the improvements are relatively small, it does demonstrate that population size has some effect on the performance of our median solver. Furthermore, these results show that the performance of the IDQPSO algorithm in obtaining the IDQPSO-Median requires additional time to converge in the context of larger populations comprising the search space, and thus, incurs the attendant additional time cost as the population increases in size. For this reason, the larger the population size, the more expensive the time cost the IDQPSO algorithm will incur in finding the IDQPSO-Median. Moreover, our experimental results depict that the running time did not increase dramatically as the number of the rearrangement events grew. Taking the analysis above into account, the population size was finally set as 60 for comparative purposes since the IDQPSO algorithm can achieve a relatively competitive performance with less computation cost when compared to the other median solvers.Lower median scores are desired and sought to be returned, and thus, the lower the values for the median score obtained by one of the tested models, the better the performance it demonstrated in our experiments. The comparison of IDQPSO-Median, SAMedian, GAMedian, and ASMedian are provided in Table One indicator of the quality of the inferred median genome is the distance between the inferred median genome and the true ancestor. The observed distances to true ancestors attained by the four median solvers in the context of differing rearrangement events are displayed in Table Adjacency accuracy is defined as the proportion between the inferred median genome and the true ancestor of the intersection of their adjacencies to the union of their adjacencies. The accuracy of the adjacency values obtained by the selected median solvers are depicted in Table Computational cost is an important performance criterion. The running time of IDQPSO-Median is largely determined by the time spent on generations during evolution and only an effective CPU time is considered in our experiments. As shown in Table In this experiment, IDQPSO-Median is the fastest except for the simplest datasets, where ASMedian needs about a second to finish. Compared to other two heuristics, IDQPSO-Median is not only much faster, it also has a better performance than SAMedian on the median score, true distance, and adjacency accuracy when the genomes are large and distant.w is defined as summing all the edge lengths. However, since the internal genomes are unknown at first, the task of scoring a tree is to find the best assignment of gene orders on the internal nodes that gives the lowest tree score.We integrated the new median solver with the GRAPPA framework which utilizes an iterative approach to score a tree. To find the best tree with its associated internal  genomes, enumerates and scores all possible tree topologies using an iterative approach. For a tree T for which both the leaf genomes and internal genomes are known, we can easily compute the weight of each edge and the tree score The GRAPPA scoring procedure has two stages: initialization and iteratively update. For two nodes in a tree, we define the path length as the number of edges in the shortest path from one to another. For each internal genome, we define a median problem using three leaf (known) genomes that have the shortest path length to it. GRAPPA can then solve this median problem and use the resulting median as the initial gene order for this internal node. GRAPPA then iteratively solves the median problem on each internal node using a depth-first approach and updates if a better genome is found until no change occurs. The tree score is finally computed by summing all edge lengths based on the final genomes assigned on the internal nodes.n genomes, let i and j. Given a tree T and its score w(T), if It is obvious that such iterative procedure is expensive as it needs to solve numerous median problems. To overcome this problem, GRAPPA uses the circular ordering lower bound to eliminate most trees that are not worthy of being scored. The lower bound is based on the following observation. Given r, the actual edge length is uniformly sampled between 0.1r and 1.9r. We use two combinations of types of events: one with only inversion, and one with 90% inversion and 10% transposition. We then assign the identity genome to the root, and populate each node with respect to the number of events along the path.We conducted experiments using both simulated and real datasets. To generate simulated datasets, we randomly create tree topologies with 12 leaves and each genome has 1000 genes. We set the expected number of events along each edge to be We compare our new method with both GRAPPA 2.0 (using an exact median solver) and SA-GRAPPA using SAMedian as the solver. In our experiments, GRAPPA 2.0 cannot finish scoring even the neighbor joining tree for n leaves, the Robinson–Foulds (RF) error rate is defined as An edge in the inferred tree is false positive (FP) if it is missing in the true tree. Similarly, an edge in the true tree is false negative (FN) if it is missing in the inferred tree. For Table Table We also conduct experiments on some biological datasets including the genomes of 10 drosophila species, each with 7332 genes. Fig. Based on the experimental results set forth above, a conclusion can be reached that all of the compared median solvers can have their own different advantages and disadvantages. The search space of the median problem is extremely large when the genomes are distant and large, which presents a crucial task that continues to challenge the available techniques in this area. However, GAMedian is quite limited by its lower speed and its low potential for scalability arising from the necessity of it maintaining a large candidate pool in order to obtain the optimal solution. In comparison, SAMedian achieves the second best performance on performance indicator of running time; however, these performance results come at significant disadvantages insofar as it returns lower performance scores on three of the most significant criteria–namely, the median score, true distance, and adjacency accuracy scores–which presents a palpable limitation on its practical applications. Moreover, ASMedian further requires a considerable amount of storage space and comprises a heavy burden for RAM since most of these partial solutions are saved onto the hard disk.In comparison with the other median solvers, when the genomes are large and distant, IDQPSO-Median can achieve the relatively best scores for the performance indicators of the median score, the true distance score, and the score for measuring the adjacency accuracy. Because QPSO has fewer parameters to control, it requires the capacity to iteratively search to find the global optimal and local optimum. In contrast, IDQPSO-Median strategically preserves a piece of useful heuristic information from the current generation to the next and thus, consequently shortens the number of generations to reach convergence. Furthermore, the number of rearrangement events has no effect on the computation cost, which means the IDQPSO-Median approach can overcome the premature convergence problem even while the number of rearrangement events continues to increase. In conclusion, the IDQPSO-Median approach we propose has a superior performance when considering each of the significant criteria used in measuring the performance of median solvers for ancestral genome inference, including the performance metric of its running time.In the experiments, it can be found that IDQPSO-Median, SAMedian, and GAMedian can sustain their performance levels at a consistent speed even when the rearrangement events become larger, which means metaheuristic algorithms can solve the complexity problem presented by genome rearrangement problems notwithstanding that these problem arise in the context of large and distant genomes. When compared to the other criteria we have used to evaluate the approaches we tested, an additional consequential factor, as compared to the other criteria, is whether it can converge with fewer generations or can converge even if it does not incorporate the use of computational algorithms. GAMedian is far too expensive to face this set of challenges, for this reason, the generation maximum for GAMedian was set as 100.In contrast, the performance of the IDQPSO-Median demonstrates that IDQPSO-Median has better scalability when compared with the existing parsimony-based methods. Therefore, the approach proposed in our IDQPSO-Median is significant in light of the performance metrics achieved by the other state-of-the-art methods since it can currently provide better scalability for phylogenetic reconstruction when the genomes are large and distant. Based on the results of our experiments and the analysis set forth above, the advantages obtained by the IDQPSO-Median approach we propose not only rivals the advantages derived from the methods implemented by the other median solvers we compared but also sets a new competitive paradigm for use in ancestral genome inference.This paper has proposed an IDQPSO-Median for ancestral genome inference. We first propose the IDQPSO algorithm that adopts a process of obtaining two averages of the fitness values in order to find the mean best position and then utilizes the sorting operation to realize the evolution of IDQPSO. Next, we introduced an IDQPSO-Median, which incorporates DCJ sorting into the IDQPSO algorithm, for undertaking ancestral genome inference. We also conducted experimental studies that have served to demonstrate the effectiveness of the IDQPSO-Median approach over comparable median solver methods—ASMedian, SAMedian, and GAMedian. When the genomes are large and distant, the IDQPSO-Median obtains the lowest median score, the highest adjacency accuracy, and the closest distance to the true ancestors. In conclusion, our IDQPSO-Median achieves exceptional prowess in its flexibility, which results in its better scalability, and does so, even when faced with increasing whole-genome data. Thus, the IDQPSO algorithm and its incorporation of the IDQPSO-Median approach can effectively be applied to address the critical median problem that continues to challenge the current state-of-the-art techniques used in ancestral genome inference.Although IDQPSO-Median has a desirable performance, especially when the genomes are large and distant, a few issues exist that warrant our further attention and study. In this vein, we would like to extend our work within larger genome rearrangement events, such as deletion, insertion, and duplication. In addition, we could finish all of the experiments we conduct on the quantum computer in order to increase the computation speed by way of using the characteristics of the quantum algorithm: because the quantum computer is times faster than any classical computer. Moreover, we would like the opportunity to take advantage of distributed computation capacity using Spark, which is a distributed framework that is designed to expedite computation. Finally, this research shows us that we have the potential to find deep evolutionary histories using deep learning algorithms if more datasets with unequal gene length are supplied.


Software services communicate with different requisite services over the computer network to accomplish their tasks. The requisite services may not be readily available to test a specific service. Thus, service virtualisation has been proposed as an industry solution to ensure availability of the interactive behaviour of the requisite services. However, the existing techniques of virtualisation cannot satisfy the required accuracy or time constraints to keep up with the competitive business world. These constraints sacrifices quality and testing coverage, thereby delaying the delivery of software. We proposed a novel technique to improve the accuracy of the existing service virtualisation solutions without sacrificing time. This method generates the service response and predicts categorical fields in virtualised responses, extending existing research with lower complexity and higher accuracy. The proposed service virtualisation approach uses conditional entropy to identify the fields that can be used to drive the value of each categorical field based on the historical messages. Then, it uses joint probability distribution to find the best values for the categorical fields. The experimental evaluation illustrates that the proposed approach can generate responses with the required fields and accurate values for categorical fields over four data sets with stateful nature. Currently, enterprise software systems lean towards dividing the software’s task into several subtasks, which are then completed by communication between distributed components named services. Each individual enterprise service, to fulfil its task, may also need to communicate with other outside requisite services from several other vendors . Timely Continuous delivery is an industry routine to refine the quality of the software while speeding up the software delivery . These rMultiple methods have been proposed to ensure the availability of the requisite services and the environment to test each service. To imitate the server-side systems’ interactive behaviour, mock objects and stubs ,4 are coProviding a platform in a system to hold several server systems to interact with the component under development, hardware virtualisation or virtual machines tools, such as VirtualBox and VMWare]  is propoAnother solution to set up a much lighter testing environment involves container technologies, such as Docker , which pSlightly new service emulation approaches ,8 focus Service virtualisation (SV)  addresseThe responses are generated in these SV techniques; they work only in some simple stateless protocols, where a response of a service may only depend on the current request but not on any previous interactions. In addition, they do not work on stateful protocols, where the response values depend on not only the current request but also on the previous interactions. To accommodate the SV for stateful protocols, Enişer and Sen  proposedExpanding the record-and-replay method  to caterImproving the accuracy of the generated categorical fields .Considering the long-term dependencies compared with the previous method that cannot accommodate the long-term dependencies .Significantly less computational power required to generate the accuracy of each categorical fields than state of the art .Significantly less training time required than the latest method .This paper presents cognitive service virtualisation (CSV), a novel software virtualisation method to generate more accurate categorical fields in service response messages. To generate each categorical response field, the technique proposes a new methodical approach, by using mathematical techniques to identify some fields as predictors and use them as clues to find the information in the recorded messages with the highest co-occurrence with the predictor values. The major advantages of the proposed CSV method are highlighted as follows:The remainder of this paper is organised as follows: Extracting service interaction behaviour has been an area of focus in several software engineering fields. Therefore, several studies attempted to propose the techniques to mine service behaviour. Amongst those techniques, some SV solutions were proposed to focus on mining the service data and control dependencies from their network interactions.Cameron  proposedSeveral service virtualisation tools, such as IBM , HP 16]16] and CDu proposed opaque SV  to decreTo accommodate stateful protocols, Enişer and Sen ,19 suggeThe sequence-to-sequence based structure is their second technique, which uses a recurrent neural network (RNN) structure, comprising two LSTM networks. LSTMs are considered useful in sequence-based data sets in several cases, such as language translations . Their RIn the third technique, to generate each categorical response field, they applied a model inference technique (MINT) tool . MINT isKTail-based method is proposed by Hossain  to work The current service emulation and virtualisation techniques suffer from significant shortcomings. Firstly, Kaluta and commercial SV solutions require considerable developer effort and complex configuration and maintenance. In addition, they require service specifications, which may not be readily available for all services. Secondly, opaque SV works for simple stateless protocols by responding to each request with similar responses in history and some simple substitutions. Thirdly, although the latest published work  is desigSoftware services communicate with the requisite services by sending and receiving request and responses in a particular amount of time. These exchanged structure of the messages follows the rules of the protocol. The protocol defines that the structure of the information is encoded and transmitted over the network as well as order of the exchanged messages, which are also known as temporal dependencies. Different protocols use different methods to encode the information into messages. Some protocols, such as LDAP, use textual encoding, and others may use binary encoding to transmit the information over a computer network.Each request received from SUT is assumed to have followed a single response. In situations where the protocol does not follow this assumption, we use the proposed technique by Du et al.  to transAn appropriate encoder/decoder is assumed to be capable of reading the messages and transforming them into a nonempty sequence of key/value pairs, with each pair containing distinct keys. If repeated keys in a message is allowed in a protocol, then we apply a strategy to convert the repeated keys into distinct keys, such as appending a number to each repeated key.In addition, we assume that a key exists in all request messages of each protocol that specifies the request type and that we can identify it. This key can be identified by an expert or by using the suggested method by Hossain et al. .k and v and m, which is a nonempty sequence of key/value pairs. Each key m. m and Here, we define some of the notations that we use in the rest of the work. In this work, the set of keys are denoted by Each key and its corresponding value <I, T.In addition, a response message and its corresponding request are also called an interaction. A field’s value can be considered categorical or noncategorical numeric. We assume that a human expert can manually tag each field’s values as categorical or noncategorical numeric. A categorical field can be given one of a confined number of possible values. These values can be numeric or non-numeric such as textual. These numeric values that are provided to those categorical fields are labels and do not follow the same concept and logic as numeric variables. Instead, valid operations for categorical variables are set membership, equivalence and some distribution operations, namely, joint probability distribution. Therefore, we separate categorical fields from the remaining fields. In addition, we presume that the only fields that affect the categorical fields are other categorical fields. Therefore, we only include the categorical fields in the prediction.We also assume that the initial state in the recorded history transactions can be arbitrary. However, the recorded interactions should be sufficient for the system to determine the state of the requisite service at the end of the final state. Importantly, we assume that the initial state in the test mode is the same as the final state observed in the recorded transactions (training mode). Therefore, the first live request follows the last interaction in the recorded history transactions.…, Given the above assumptions and definitions, we represent the service virtualisation problem formally. Given the recorder traces as the sequence of interactions What keys does a virtual service response require?What values of the categorical keys does the virtual service response need to generate?Then, we divide the problem into two subproblems, as follows:In the following sections, we aim to detail solutions to these subproblems.To demonstrate the shortcomings of the recent SV solution, such as opaque SV, the requests and their responses in getAccount type for accountID 584-599-25 as follows:With the intention of the following discussion in generating categorical response field, we assume that, in the offline mode, we receive only two requests and their responses as shown in <?xml version="1.0" encoding="UTF-8"?> <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><ns2:getAccount xmlns:ns2="http://bank/"><accountId>584-599-25</accountId></ns2:getAccount> </S:Body></S:Envelope>Clusters all recorded interactions on the basis of the request message type; in our example, ns2 is the request type field;Organises the same type of interactions into the same cluster and derives a cluster prototype for each cluster;accountID 244-652-34 and fName Jean-Guy and lName Schneider;Selects a cluster centre for each cluster; in our example, the interaction includes accountID 244-652-34 and fName Jean-Guy and lName Schneider is found as the closest match;Finds the closest cluster centre message of all recorded interactions to the incoming request; in the example, the interaction with symmetric, indicating the field value repeated in the “closest match” cluster centre request and its response messages; in the example, no symmetric fields exist;Identifies fields, which are getAccountResponsefName and lName as Jean-Guy and Schneider remain the same because no symmetric fields exist.Substitutes the symmetric fields’ value in the recorded response by the corresponding symmetric value in the incoming request; in the example, we have the recorded Opaque SV ,18:ClustgetAccountResponse message in getAccount request is a getAccountResponse type, which follows the underlying protocol, and the response has an accurate structure; the returned fName and lName values are inaccurate . In other words, the generated response contains inaccurate contents.The generated response message is sent as the response to the incoming request. In this example, the This examples demonstrate the shortcomings of opaque SV in stateful protocols. In the sections that follow, we present a new technique to deal with such shortcomings.At a high level, as shown in The CSV for each live request message generates a response template (RT) (the anticipated response’s set of keys) on the basis of the relevant messages in the recorded traces and generates the values of the keys identified as categorical. Some key values may contain constants; other values may follow a pattern that depends on the request message type and its contents as well as the relevant recorded messages. If the values of RT depend only on its request message, then the protocol is characterised as stateless. If the values of the RT depends on its request as well as the pertinent prior request and/or response messages, then the protocol is called stateful. The CSV can generate responses for stateless and stateful protocols. It finds the relevant messages from a history of traces and generates the categorical content accordingly.The CSV in the preprocessing module learns how to generate the expected template for a response as well as the constant and symmetric field values.This module works in the offline mode and consists of several components. Thus, the messages are ready for the categorical module . Figure In the next component, it separates unknown categorical fields from the rest to evoke the categorical modules to generate their values. The categorical and noncategorical fields need different methods to be generated. Therefore, the categorical fields are separated to follow the categorical module. Categorical fields (whether numeric or non-numeric) do not require usual mathematical calculations as noncategorical numeric fields to be created. Therefore, we identify and separate the categorical fields. Identifying the categorical fields is done by a user. Categorical fields are assumed to be influenced only by categorical fields. Therefore, other fields  are not incorporated and removed from further processes. In the end of the preprocessing module, each unknown categorical field evokes one instance of the categorical module to generate its value.Each unknown categorical response field evokes one instance of categorical module separately. As shown in To find the best predictor/s for each categorical response field, this component finds dependencies amongst different fields in request–response message pairs in the corresponding message type cluster. These dependencies are used to generate the best possible value for categorical fields in each response message. Determining functional dependency between request fields and the categorical response field is possible by finding the best set of fields that can be used to identify the best value. We translate the functional dependencies to a mathematical formula by using the following approach.A, B always has the same value [A always determines the unique value of B, which is translated to: B given the value of A is zero for all unique values of A. Therefore, based on the concept of the functional dependency, we found that the conditional entropy concept is similar, and we use it to determine the functional dependencies. Noncategorical fields remarkably vary and cause considerable unnecessary conditional entropy calculations. Therefore, to reduce the unnecessary calculations, we remove noncategorical fields from the set of fields.A functional dependency me value . Thus, eThen, by finding the correlation between each request and corresponding response fields using conditional entropy, we identify the best field or combination of fields that can be used as the predictor to generate an accurate value for the unknown categorical response field. We consider all request fields in the request–response pair as candidate predictors and calculate unknown target field’s conditional entropy with other fields. Then, the minimum set of candidate predictors based on conditional entropy is selected as the predictor set of the unknown field. Some of the unknown categorical response fields may not have a predictor to determine their values with 100% accuracy. However, the goal is to find the predictors for each unknown response field from each of their corresponding request fields that generate values more accurately than random assignment of the previously obtained values of the field.The equation for calculating conditional entropy X conditioned by field Y, considering values As shown in Equation , the entEquation . P(yj) iSelection of fields as determinants is based on their co-occurrence in an interaction. Thus, correlations of their values are unchecked, except for those that have been already mentioned. The fields are selected as the predictor, where the conditional entropy of the target field conditioned by the predictor is the minimum value among all possible field combinations as candidate predictor, as shown in Equation .(3)PredIn the request type cluster, given that noncategorical fields remarkably vary and cause excessive unnecessary conditional entropy calculations, we remove noncategorical fields from the set of interaction fields, and the categorical fields are referred to as the candidate predictor set.In the request type cluster, where the target field belongs, one of the fields of the candidate predictor set is selected as the candidate predictor, and the conditional entropy of the unknown target response field conditioned by that selected candidate predictor is calculated using Equation . This prThen, the candidate predictors of the target response field are sorted on the basis of the value of the calculated conditional entropy in ascending order. Thus, the candidate predictor, which has the lowest conditional entropy amongst other candidate predictors, is considered the best predictor at this stage. In the case of multiple candidate predictors with the same conditional entropy value, they are sorted on the basis of their order of appearance of the field in the request message. Thus, the fields that appear closer to the start of the request message are set as the better single predictors amongst the alternative predictors and stored earlier in the sorted list of predictors in the case of equal conditional entropy values.Y. If the value of the recently calculated conditional entropy results in a lower conditional entropy value than the previously calculated conditional entropy, then the new possible compound predictors are assigned as the current predictors. This process of adding another predictor to the set of compound predictor from the sorted list continues until the calculated conditional entropy of the new potential compound predictor set is equal or greater than the conditional entropy of the previous predictor.The first candidate predictor of the sorted list with minimum conditional entropy is considered the predictor. Then, CSV adds the second candidate predictor from the sorted list to the current predictor and considers them as the possible compound predictor. Then, it calculates the conditional entropy of the unknown target response field conditioned by the new possible compound predictors using Equation , conditiAs shown in Equation , findingmessageID, is selected because the message with a higher message messageID is more recent.Field prediction component is conducted in playback mode. Playback mode is when the live request comes and the virtual service is expected to respond as the representative of the actual service. On the basis of the generated RT, the categorical fields and their predictors, the system finds the values of the categorical fields using the field prediction component, combines the predicted values in its RT, and sends it as the live response. This component utilises the predictors from the offline mode to generate the value of the categorical field for the incoming live request messages. As shown in In addition, the predictor value may not have appeared in the training set; therefore, using predictor’s value cannot create a value for the response field. In that case, one of the values of the response field in the corresponding training cluster type is chosen for the field that has the highest probability of appearing in that corresponding training set cluster.At playback mode, when the virtualised service receives live requests, its message type field is used to select the corresponding RT, constant and some of the symmetric fields, where their symmetric pairs are known. Then, the categorical fields of the selected RT are generated on the basis of the availability of the identified predictors’ values.Four data sets are used to evaluate the CSV namely, first banking, second banking, calculator and LDAP data sets. In actual service virtualisation scenarios, limited training data are provided by the clients to the companies to generate virtual services. This limitation from the companies is totally understandable due to the privacy purposes of their service users. Therefore, in case of simulating data sets, we simulate them as close as possible to the actual scenarios and test the CSV to show its effectiveness in a “real-world” problem and situation. Starting with two banking data sets with different scenarios, which contain the network interactions between an automated teller machine (ATM) and its banking server. Obtaining the actual transactions between an ATM and the banking server is infeasible due to the security consideration. Therefore, we generated them to be as close as possible to the actual transactions. Then, the calculator and the third generated data set are explained, thereby emulating the interactions between a client and calculator API. The forth and the last data set is the recorded transaction between the LDAP client and its server which was provided by the industry partner for our evaluations. The data sets used in our evaluation are explained in detail in the following sections.The banking data set comprises network interactions between an ATM and the banking server using SOAP protocol. To test the ATM service, the banking server needs to be virtualised in such a way that it mimics the real logic and behaviour of the banking server without any knowledge of the protocol or the servers’ behaviour. In an actual scenario, ATM needs to communicate with the server, deposit to, withdraw from and obtain the balance values and account information of the specific bank account by using different message types.We created two data sets, each with different scenarios and sets of transactions, to be similar to the real-world scenario. The first one consists of small number of interactions to evaluate CSV in the face of small data sets, which relatively reflects the actual situation where the solution is required, to work in scenarios, where data available are insufficient. The second data set contains higher number of interactions and follows slightly different scenario to evaluate the effect of changes in the scenario on the CSV, as explained in the subsequent section.getNewToken, depositMoney, withdrawMoney, getAccount, getTransactions, deleteToken and their corresponding responses as getNewTokenResponse, depositMoneyResponse, withdrawMoneyResponse, getAccountResponse, getTransactionsResponse, deleteTokenResponse, respectively. The getNewToken request message requests the new trace, which is responded with the specific token value related to one specific account ID, and deleteToken marks the end of that specific trace with the specific token. The depositMoney deposits money to the specified account ID in the request message, and withdrawMoney withdraws money to the specified account ID. The getAccount requests the first name and the last name of the account owner for the specified account ID mentioned in its request. The getTransactions returns the exchanged transactions, where each account ID contains the same values in the response.The generated banking data set comprises simple noninterleaving traces, where each trace only includes the transactions related to one account ID. The banking data set includes six types of request messages including The first banking data set contains 300 traces; each trace may contain the interactions related to one out of 10 account IDs. Each trace length varies between three and eight messages. The data set has 1141 pairs of request and corresponding response messages. This data set includes six types of request messages. Each trace is started with getNewToken, depositMoney, withdrawMoney, getBalance, getTransaction, getAccount, deleteToken, followed by their corresponding response types of getNewTokenResponse, depositMoneyResponse, withdrawMoneyResponse, getBalanceResponse, getTransactionResponse, getAccountResponse, deleteTokenResponse, respectively. The second data set has one more request message type as The second data set contains 3000 traces and 29,715 sets of interactions, including seven different types of request messages, such as In an actual scenario, the ATM users have greater tendencies to check the balance of their account after deposit and withdrawal transactions. However, user transactions are not only limited to deposits and withdrawals. Therefore, to generate a data set similar to traces of an actual ATM, the The calculator data set emulates the network transactions between a client and the calculator API. It contains 5000 interactions equivalent to 10,000 messages with eight request message types, as LDAP Bind Request, LDAP Bind Response, LDAP Add Request, LDAP Add Response, LDAP Compare Request, LDAP Compare Response, LDAP Delete Request, LDAP Delete Response, LDAP Modify DN Request, LDAP Modify DN Response, LDAP Modify Request and LDAP Modify Response, LDAP Search Request, LDAP Search Result Done, LDAP Search Result Entry and LDAP Unbind Request.The Lightweight Directory Access Protocol (LDAP), is a versatile and standards-based protocol for communicating with directory servers . It is aEach session starts with one LDAP Bind Request and its response as LDAP Bind Response and ends with an LDAP Unbind Request. Meanwhile, any of the other requests and their corresponding response types can appear. Here, some sample messages from the LDAP data set are shown in We start the evaluation process by comparing our approach with several methods on the basis of different benchmarks in In this section, the state-of-the-art SV solutions are compared with the proposed CSV method on nine different benchmarks, namely, accuracy, reliability, required data set size, computational cost, training time, automation, complexity, robustness and dependency coverage. Accuracy is the degree that the generated response message from the virtual service resembles the response from the actual service. In addition, reliability is the degree to which the results perform consistently well in several protocols with different structures and properties. Robustness is the ability to withstand adverse conditions or rigorous testing throughout different protocols. The LSTM-based method, commercial SV and CSV, gain high accuracy, contrary to opaque SV and KTail-based methods. All four methods are relatively reliable; however, the commercial SV is highly reliable because it is generated using protocol and service specifications. The required data set size of all five methods to gain accuracies are shown. Opaque SV does not require a large data set to generate the virtual service with the mentioned accuracy. Commercial SV solutions mostly use the service and protocol specifications and data sets to find some alternative options for the fields; therefore, they only require a small data set. The proposed CSV requires low- to medium-size data set. On the contrary, KTail-based method requires a large data set to generate the reliable FSM. LSTM-based method also requires a large data set to learn to replicate the response messages.The computational cost for opaque SV, which uses sequence alignment techniques and works on the byte level information of the messages, is medium. The computational cost of CSV and KTail-based methods is also medium as well. LSTM networks are designed to address the vanishing gradient problem of RNN, which helps to remember previous data in memory . CommercFrom the automation point of view, opaque SV and KTail-based methods could be considered semiautomatic with a level of user interference. LSTM-based and the proposed CSV require very little user interference and are considered mostly automatic. On the contrary, commercial SVs require an expert to manually code the service and protocol characteristics, viewed mostly as manual. The complexity of the methods could be crucial when the method requires any level of human intervention. The proposed CSV, opaque SV and KTail-based methods are not complex. However, LSTM-based and commercial SVs could be complex.Moreover, due to the variety of protocols and security requirements, they may require a different level of decryption methods prior to virtualisation. Therefore, no automatic systems can deal with decrypted protocols; thus, low robustness is obtained. However, because the commercial SV solutions use the service specifications, they can handle all the necessary decryption levels and have high robustness. The proposed CSV and the commercial SV can incorporate long-term dependencies, whereas the other methods only cover short-term dependencies. We compared CSV with four different recent works on the basis of several benchmarks. Amongst them, only opaque SV provides a viable and practical solution, which is used to address the actual problem in the industry, due to some limitations of the other SV solutions. Therefore, in this section, we select opaque SV to compare with the proposed solution quantitatively. In a more detailed analysis of the generated categorical fields on each data set per message type, we start with the first and second banking data sets. We compare the result of CSV and opaque SV on different message types in As shown in The results of CSV and opaque SV on generating categorical values of the calculator data set are shown in LDAP Search Result Done and LDAP Add Response only contain keys with constant values; therefore, both methods accurately generate their values. All other message types contain both constant and variable response messages. This data set contains categorical response fields with either constant values or variable. messageID is a symmetric field which appears across all the request and response types. Both CSV and opaque SV generate the values of all response messageIDs accurately. Other than messageID s, opaque SV could only generate the accurate values of fields with constant values which are shown with 100% accuracy in the last column of The system’s state can be identified using the reflected information in the recorded transactions. Therefore, for the CSV to work accurately, a complete set of relevant messages needs to be available for the system. The training as well as test data set for the CSV have some constraints. The CSV learns models per each categorical response field in each request type cluster. Therefore, to train the data set, it should contain all the message types, which are provided at playback mode as the test set. The current version of CSV cannot generate a response to the request types that do not exist in the recorded traces. In addition, in scenarios with stateful nature, the messages provided to the virtual system at playback mode should have related interactions in the recorded training data to infer their states. In addition, the current version of CSV cannot address the situations, where categorical information in one message type is altered by other types. Therefore, expanding the CSV to incorporate different message types in generating the categorical response fields can be addressed in the future work.This paper presents CSV as a novel approach for generating the values of categorical response fields. This approach is proposed to improve the state-of-the-art SV solutions in terms of accuracy. The CSV works in two modes of offline and playback. In offline mode, the categorical module finds the best set of fields in each request type that can be used to predict the value of the unknown categorical response field. Thus, it finds the minimum number of fields that have minimum conditional entropy with the target fields as predictors. Using conditional entropy for that purpose can measure the variation of the categorical target response field by obtaining the value of other candidate predictors. By using conditional entropy to measure the target field’s variation, the method finds a set of fields. Thus, identifying their values could obtain the lowest variation of values in the specific categorical response field and call them predictors. In the playback mode, the value of the predictor fields from the live request is used to search the interactions in all the type training set, and the value for the unknown categorical field with the highest co-occurrence with the predictor field values is identified. CSV has been compared with opaque SV, and a promising result on the test data sets is achieved.This study provides an automated and more accurate virtual services, which consequently could be used in several different test scenarios. The implication of this research could assist continuous testing and accordingly facilitate the continuous delivery of software services. Despite the promising result illustrated at obtaining categorical values for the response messages, a number of other issues remained. In the future, we plan to work on two prime issues, as follows: (i) extending the proposed technique to a framework to work with most protocols effectively, and (ii) expanding existing work to incorporate different message types’ influence in generating categorical fields. In addition, the technique needs to be verified on more data sets with different dependencies and service behaviour beyond the current examined data sets.