Modeling the Process of Event Sequence Data Generated for Working Condition Diagnosis

Condition monitoring systems are widely used to monitor the working condition of equipment, generating a vast amount and variety of telemetry data in the process. The main task of surveillance focuses on analyzing these routinely collected telemetry data to help analyze the working condition in the equipment. However, with the rapid increase in the volume of telemetry data, it is a nontrivial task to analyze all the telemetry data to understand the working condition of the equipment without any a priori knowledge. In this paper, we proposed a probabilistic generative model called working condition model (WCM), which is capable of simulating the process of event sequence data generated and depicting the working condition of equipment at runtime.With the help of WCM, we are able to analyze how the event sequence data behave in different working modes and meanwhile to detect the workingmode of an event sequence (working condition diagnosis). Furthermore, we have appliedWCM to illustrative applications like automated detection of an anomalous event sequence for the runtime of equipment. Our experimental results on the real data sets demonstrate the effectiveness of the model.


Introduction
Currently, with the rapid development of technology for the Internet of Things [1,2], condition monitoring systems (CMSs) [3,4] are widely used to monitor the working condition of equipment.KOMTRAX (KOMTRAX: http:// www.komatsuamerica.com/komtrax)from Komatsu and IEM (IEM: http://www.sanygroup.com/group/en-us/)from SANY are well-known CMSs that generate a large amount of telemetry data while monitoring the working condition of equipment at runtime.Event sequence data especially are one main type of telemetry data, which record a sequence of the operations on the equipment.If we can analyze the working mode of equipment according to these event sequence data, it will help us better understand the working condition of equipment at runtime.
Diagnosis of working condition of equipment mainly depends on analyzing the telemetry data collected at the runtime of the equipment.In most CMSs, data analysis is the only way for engineers to diagnose the working condition of equipment.Telemetry data mainly contain operation events, performance counters, alert events, and others in the real CMSs.Most telemetry data can be classified into two categories: continuous time series data and temporal event data.Time series data is a sequence of real-valued data points, captured and sampled typically at successive time points equally spaced with a uniform time interval.For example, the engine temperature of equipment is a typical example of time series in the CMSs.An event sequence in CMSs is used to record the occurrences of a specific message indicating that something such as an operation has happened in the equipment.For example, an event sequence of "pumping concrete" in a concrete pump truck contains an event pumping concrete, which represents the idea that the concrete pump truck starts pumping the concrete.
As illustrated in Figure 1, an event sequence records all the specific operations on the equipment at runtime, which usually provides enough information to engineers for working condition diagnosis of equipment.The previous studies on analysis of event sequence data for working Figure 1: Actual example of telemetry data of a concrete pump truck at one runtime.Oil temperature is a typical continuous time series, which records the variation of oil temperature at one runtime of a concrete pump truck.Operation event sequence is a typical event sequence, which records the occurrences of six operation events (warm-up, landing leg unfolding, cantilever unfolding, concrete pumping, landing leg folding, and cantilever folding) on the concrete pump truck at one runtime.condition diagnosis are mainly grouped into two categories: the correlation analysis between distinct event sequences [6][7][8] and events based process mining algorithms [9,10].The correlation analysis between distinct event sequences usually provides useful hints for causality analysis.Although correlated metrics may not exactly be the root causes of events, they could also provide intermediate useful information that pinpoints the root causes of events.The process mining algorithms focus on the occurrence order of distinct events with the help of process models [11,12], which mainly indicate the working process of equipment.
However, the occurrence frequency of events also provides us with important information for working condition diagnosis, which is ignored by the previous studies.We take a concrete pump truck as an example.As illustrated in Figure 1, at a normal runtime of concrete pump truck, a concrete pump truck needs five concrete pumping events to finish pumping a hopper of the concrete.With the wear and tear of concrete pump truck, the concrete pump truck needs seven or more concrete pumping events to finish pumping a hopper of the concrete.Although the occurrence order of the six events (warm-up → landing leg unfolding → cantilever unfolding → concrete pumping → landing leg folding → cantilever folding) is the same, yet the working condition of the concrete pump truck has changed a lot.If the occurrence frequencies of events are taken into consideration for working condition diagnosis, it will enhance the ability of working condition diagnosis for engineers, which will help us better understand the working condition of equipment.
In this paper, we proposed a probabilistic generative model called working condition model (WCM), which is capable of depicting the working condition of equipment at runtime.According to event sequence data in different working condition of equipment, we simulated the process of event sequence data generated in order to get the WCM of equipment.Furthermore, with the help of WCM, we extended the application of event sequence data to more domains such as anomaly detection and the variation trend analysis of working condition.Motivated by the real requirement of working condition diagnosis, our working condition model tries to answer the following three questions: (a) How many types of working modes (details in Section 3) does the equipment have at runtime?(b) In each type of working mode, how does an event sequence behave?
(c) For a new event sequence at runtime, which type of working mode does it belong to?
Our evaluation consists of multiple phases.First, we model the WCM of the real event sequence data sets collected from 279 concrete pump trucks over a period of 6 months.We analyze the performance of the WCM of the concrete pump truck.Then, we apply the WCM of the concrete pump truck for more applications including anomaly detection and the variation trend analysis of working condition.
Our work presents a probabilistic generative model named WCM to simulate the process of event sequence data generated and to depict the working condition of equipment at runtime.The contributions of this paper are as follows: (i) Motivated by real applications, we propose the WCM to depict the working condition of equipment.To the best of our knowledge, this is the first attempt to simulate the process of event sequence data generated for working condition diagnosis.
(ii) We illustrate two useful applications based on WCM: automated detection for a new work cycle and automated detection for anomalous work cycles.
(iii) The experiments on real data from a well-known Chinese construction machinery manufacturer show the effectiveness of our model.
The rest of the paper is organized as follows: In Section 2, we introduce some related works.The problem statement and formulation are introduced in Section 3. We introduce our approach in Sections 4 and 5.The empirical evaluation is shown in Section 6.Finally, we conclude our work in Section 7.

Analysis of Event Sequence
Data.An event is a happening of interest [13,14].In the surveillance of equipment, the interest in events comes mostly from the state of equipment changes that are produced by equipment manipulation operations [15].Example events in the actual surveillance of the concrete pump truck include warm-up, landing leg unfolding, cantilever unfolding, concrete pumping, landing leg folding, and cantilever folding as shown in Figure 1.When a sequence of events takes place, we refer to these occurrences to get the event sequence data.The main idea of analysis of event sequence data is to process events to gather meaningful or valuable information and then to derive actions from them.
Events in an event sequence are often interrelated and form complex relationships.The correlation analysis of event sequence data [7,8,16,17] focuses on detecting these relationships and is extended to other related applications such as anomaly detection [18][19][20].A temporal, spatial, or causal relationship of events can determine the partial order between events [16].Hence, event sequence data based process mining algorithms focus on the causal relationship of events by analyzing the occurrence order of distinct events [21,22].There have been many existing process mining algorithms [23,24] and tools [25,26] to mine the causal relationship of events, which is capable of instructing engineers to better understand the operation procedure of equipment [27].

Working Condition Diagnosis.
Working condition of equipment [28] is the condition in which the equipment works, including but not limited to such things as amenities, physical environment, stress and noise levels, degree of safety or danger, and the like.The working condition diagnosis usually uses specific models or variables for different applications.In the correlation analysis of event sequence data for working condition diagnosis, the correlation coefficients of event sequence data, for example, the Pearson correlation [6,7,29,30] and the Rank correlation [31], are used to depict the working conditions of equipment.In the process mining algorithms of event sequence data, varieties of process models, for example, Petri net [32] and business process modeling notation [33,34], are specific to depicting the working condition of equipment for different process mining algorithms.In this paper, we take the occurrences frequencies of events into consideration and simulate the process of event sequences generated in different working modes of equipment.Hence, we use the occurrence probability of events in the event sequence to depict the working condition of equipment at runtime.

Probabilistic Generative Model.
In probability and statistics, a generative model [35] is a model for randomly generating observable data, typically given some hidden parameters.It specifies a joint probability distribution over observable data.Generative models are used in machine learning [36] either for modeling data directly (i.e., modeling observations drawn from a probability density function), or as an intermediate model to forming a conditional probability density function.A conditional distribution can be formed from a generative model through the Bayesian rule [36].For example, latent Dirichlet allocation (LDA) [5,37,38] is a typical generative model, which is widely used in many domains.In natural language processing, LDA is capable of simulating the process of documents generated well, where observations are words collected into documents, and it posits that each document is a mixture of a small number of topics and that each word's creation is attributable to one of the document's topics.Figure 2 illustrates the graphic model [39] of LDA [5].With plate notation, the dependencies among variables can be captured concisely.

Terminology and Notation
As the working condition of equipment is always corresponding to a period, for example, one day or one week, we first determine the basic unit of observation for working condition diagnosis, intended to ease the working condition diagnosis according to the event sequence data.

Definition 1 (work cycle).
A work cycle of a piece of equipment, denoted by , is a complete work period, that is, a complete usage period of the equipment from the time the equipment starts working until it shuts down.
We define the idea that  consists of elements that are integers from 1, . . ., , where  is the number of work cycles.There is one important advantage in adopting the work cycle as the basic unit of observation in terms of event sequence data analysis for working condition diagnosis.In our opinion, no matter in what kind of circumstances (e.g., different places and different climates) the equipment works, the working condition of equipment in one work cycle mainly behaves similarly.For example, in a work cycle of the concrete pump truck illustrated in Figure 1, different concrete pump trucks usually have a similar working process: warm-up → landing leg unfolding → cantilever unfolding → concrete pumping → landing leg folding → cantilever folding, even though the concrete pump truck works in different working circumstances.
Definition 2 (event).An event of the equipment, denoted by , is to record an occurrence of a specific message indicating that something such as an operation has happened in the equipment.
For example, in Figure 1, there are six events (warm-up, landing leg unfolding, cantilever unfolding, concrete pumping, landing leg folding, and cantilever folding), which reflect the working condition of some component in the concrete pump truck, respectively.We will use integers to denote the entries in the event set, with each event  taking a value from 1, . . ., , where  is the number of unique events in the event set denoted by E.

Definition 3 (event sequence
).An event sequence, denoted by e  , of the equipment consists of a sequence of events that occur in work cycle .
An event sequence is represented as a vector of events, e  , with   entries.For example, in Figure 1, the event set of the concrete pump truck contains six ( = 6) events, denoted by E pump = (1, . . ., 6), where the integers represent the entry of the events warm-up, landing leg unfolding, cantilever unfolding, concrete pumping, landing leg folding, and cantilever folding, respectively.Hence, the event sequence is equal to a vector with the length   = 10, denoted by e  = (1,2,3,4,4,4,4,4,5,6).
Suppose that the data set has  work cycles of the equipment, corresponding to  event sequences.The data set with  event sequences is represented as a concatenation of the event sequence vectors, which we will denote by e, having  = ∑  =1   .In a work cycle, an event sequence provides us a main working process of the equipment.However, an occurrence of the event is also related with the working place and working date of the equipment.For example, the concrete pump truck will add an operation event concrete mixing in order to prevent the concrete setting if the working temperature is low.The working temperature is directly related with the working place (e.g., north or south of China) and working date (e.g., winter or summer).
In addition to these events, we have the information about the characteristics of each event sequence (work cycle): working place, working date, and equipment pieces number of the work cycle.We define p  to be the set of working places of work cycle .p  consists of elements that are integers from 1, . . ., , where  is the number of working places which generated the event sequences in the data set.  will be used to denote the number of working places of work cycle .We define  to be the set of working dates of work cycle .  consists of elements that are integers from 1, . . ., , where  is the number of working dates.(In order to ease the notation, in the working date, we just record the working month of the work cycle, which means  = 12.)   will be used to denote the number of working dates of work cycle .We define   to be the set of equipment number of work cycle .  consists of elements that are integers from 1, . . ., Ω, where Ω is the number of the equipment pieces.

Definition 4 (work cycle characteristic). A work cycle characteristic (WCC
) is five-tuple set, denoted by W  = {E, e  , p  ,   ,   }, which record all the information about the work cycle .
A WCC is corresponding to a work cycle, so the original data set is redefined as a group of WCCs, denoted by D = {W 1 , . . ., W  }.The WCCs of two work cycles are likely to be different, though they have the same working place and working date.The main differences between the work cycles center on the occurrence of the events.However, the occurrence disciplines of the events are akin to each other for the work cycles in the same working mode.For example, the concrete pump truck has two main working modes: pumping mode and traveling model.For the work cycle in the pumping mode of the concrete pump truck, the occurrence of the event concrete pumping is frequent, as shown in Figure 1.However, for the work cycle in the traveling mode, the occurrence of the event concrete pumping is none, since the concrete pump truck can not pump concrete in the traveling mode.
Definition 5 (working mode).A working mode, denoted by , is on behalf of a kind of work cycles that is about a specific subject, has an identifiable purpose, and can stand alone.
For event set E, we define working mode vector (WMV) G() = {(1,  1 ), . . ., (,   )} to be the set of events  associated with its occurrence frequency   , where ∑  =1   = 1.The WMV G() is able to depict the occurrence disciplines of events according to the occurrence frequency of events.Therefore, if we can get a group of WMVs for a group of work cycles, it will help us better understand the occurrence disciplines of events.Definition 6 (working mode space (WMS)).A working mode space (WMS), denoted by G = {G(1), . . ., G(Π)}, is a set of WMVs for a group of given work cycles of equipment.
Actually, the WMS is akin to a group of cluster centers, each of which depicts the working condition of equipment in different working modes.

The Inference of WMS
In this section, we develop effective algorithms for the inference of the WMS for a group of given work cycles of equipment.Before proceeding, we formulate our problem as follows.
WMS Inference Problem.Given a group of work cycles associated with the corresponding WCCs D = {W 1 , . . ., W  }, the inference problem is to infer the WMS model G = {G(1), . . ., G(Π)}, where Π represents the number of working modes.
With the help of WMS, we can find that, in different working places and different working dates, the work cycles of equipment have different working modes.Meanwhile, there are several working modes in the same working place and the same working date.The WMV of working mode reflects the working condition of its corresponding work cycle, especially the occurrence disciplines of events.
In the remainder of this section, we first introduce the WCM for learning the WMS for a group of given work cycles, and then introduce the inference framework of the WCM.

The WCM.
The WCM is a hierarchical generative model in which each event  in a work cycle is associated with three latent variables: a working place, x, a working date, y, and a working mode, z.These latent variables augment the dimensional vector e (indicating the values of all events in the event set E) with three additional -dimensional vectors, x, y, and z, indicating working place, working date, and working mode assignments for the  events.
As we observed, the sets of working places and the sets of working dates for each work cycle are observed.This leaves the unresolved issue of having unobserved working places and working dates and avoids the need to define a prior on working places and working dates, which is outside of the scope of our model.Each working place is associated with a multinomial distribution over working mode, and each working date is also associated with a multinomial distribution over working mode.Conditioned on the set of working places and the set of working dates, associated with their distributions over working modes, the process by which the corresponding event sequence for a work cycle is simulated can be summarized as follows: first, a working place and a working date are, respectively, chosen uniformly at random for each event that will appear in the work cycle; next, a working mode is sampled for each event both from the distribution over working mode associated with the working place of that event and from the distribution over working mode associated with the working date of that event; finally, the events themselves are sampled from the distribution over events associated with each working mode.
This simulating process can be expressed more formally by defining some of the other variables in the WCM.Assume we have Π working modes.We can parameterize the multinomial distribution over working modes for each working place using matrix Θ of size Π × , with elements   that stand for the probability of assigning working mode  to an event occurring in working place .Thus ∑ Π =1   = 1, and for simplicity of notation we will drop the index  when convenient and use   to stand for the th column of the matrix Θ.Similarly, we use matrix Δ of size Π ×  to parameterize the multinomial distribution over working modes for each working date, where elements   stand for the probability of assigning working mode  to an event occurring in the working date .Thus, ∑  =1   = 1, and we will also drop the index  when convenient and use   to stand for the th column of the matrix Δ, intended to simplify the notation.The multinomial distributions over events associated with each working mode are parameterized by matrix Φ of size  × Π, with elements   that stand for the probability of simulating to make event  occur in the working mode .Again, ∑  =1   = 1, and   stands for the th column of the matrix Φ.These three multinomial distributions are assumed to be generated from symmetric Dirichlet priors with hyperparameters , , and , respectively.In the results of this paper, we assume that these hyperparameters are fixed.This notation is summarized in Notations.
The sequential simulating procedure of first picking a working place and a working date, respectively, followed by picking a working mode, and then simulating an event to occur in this working mode according to the probability distributions, leads to the following generative process: (1) For each working place  = 1, . . .,  choose   ∼ Dirichlet(); for each working date  = 1, . . .,  choose   ∼ Dirichlet(); for each working mode  = 1, . . ., Π choose   ∼ Dirichlet().
( The graphical model corresponding to this process is shown in Figure 3.Under this simulating process, the working mode is drawn independently when conditioned on Φ, and each working mode is drawn independently when conditioned on Θ, Δ, and Π.The probability of the event sequence e, conditioned on Θ, Δ, and Φ (and implicitly on a fixed number of working modes Π), is (e  | Φ, Δ, Θ, P, T) = (e | , , , In ( 3), the factorization makes use of the conditional independence assumptions of model.Meanwhile, the variables x and y are mutually stochastically independent.Equation (3) represents the probability of the events e in terms of the entries of the parameter matrices Θ, Φ, and Δ as introduced above.The probability distribution over working place assignments, (  =  | p  ), is assumed to be uniform over the elements of p  and deterministic if   = 1.Similarly, the probability distribution over working date assignments, (  =  |   ), is assumed to be uniform over the elements of   and deterministic if   = 1.The probability distribution over working mode assignments, both (  =  |   = ,Θ) and (  =  |   = ,Δ), is the multinomial distributions   and   in Θ and Δ, respectively, that corresponds to working place  and working date , respectively.The probability of an event given a working mode assignment, (  |   = , Φ), is the multinomial distribution   in Φ that corresponds to working mode .

Inference of WCM from Data
The WCM contains three continuous random variables: Θ, Δ, and Φ. Various approximate inference approaches have recently been proposed for estimating the posterior distribution for continuous random variables in hierarchical Bayesian models.In this paper our inference method is Gibbs sampling [40], which is a special form of Markov chain Monte Carlo.
Our target of estimation is to compute the posterior distribution (Θ, Δ, Φ | , , ).In order to sample the values of the distribution, we have to use the latent variables x, y, and z to estimate the posterior distribution: The estimation process mainly involves two steps: first, we use Gibbs sampling to get approximate posterior (x, y, z | , , ); second, (Θ, Δ, Φ | x, y, z, , , ) can be computed directly for each sample, by exploiting the fact that the Dirichlet distribution is conjugate to the multinomial.

Gibbs
According to (1)∼( 5), we can derive a basic equation needed for the Gibbs sampler as shown in (7).In (7),  Π means working mode assigned to working place count matrix, where  Π ,− means the number of events assigned to working mode  in the working place  excluding the working mode assignment to event   .Similarly  Π means working mode assigned to working date count matrix, where  Π ,− means the number of events assigned to working mode  in the working date  excluding the working mode assignment to event   .Similarly,  Π represents event assigned to working mode count matrix, where  Π ,− represents the number of events from the th entry in the event set assigned to working mode  excluding the topic assignment to event   .Meanwhile, x − , y − , z − , e − represents the vector of working place assignment, vector of working date assignment, vector of working mode assignments, and vector of event observations in the data set except for the th event in the th work cycle, respectively.
The main sampling steps are as follows: we first initialize the working place, working date, and working mode assignments, x, y, and z, randomly.In each Gibbs sampling iteration, we sequentially draw the working mode, working place, and working date assignment of the th event from the joint conditional distribution in (7).With the increasing of iterations, the Gibbs sampler will approach its stationary distribution-the posterior distribution (z, y, z |  train , , ).

The Posterior
where  Π .represents the vector of counts of the number of times each event has been assigned to working mode . Π .and  Π .are similar to  Π . .Then we can evaluate the posterior probability of each element of Θ, Δ, and Φ as follows: where ( Π )  is the matrix of working mode assigned to event counts exhibited in (z)  and  refers to sample  from the Gibbs sampler.These posterior probabilities also provide point estimates for Φ, Θ, and Δ and correspond to the posterior predictive distribution for the next event from a working mode, the next event from a working date, and the next working mode in a work cycle, respectively.The concrete pump truck is a type of construction machinery, which is a truck associated with a concrete pump.It alternates between two working statuses: traveling and pumping.In the pumping status, it will push the concrete to the specified location.In the traveling status, it is just a truck.In the experiment, we mainly focus on events in the pumping status. Figure 4 shows the stream of the concrete in the concrete pump truck at runtime and operation sequence of different systems in the concrete pump truck.The concrete pump truck first switches to pumping status and then unfolds and fixes the landing leg.Next, it unfolds cantilever to the specified location.Afterwards, the concrete is poured to the hopper, and meanwhile the stirring system initiates stirring the concrete.Finally, the pumping system initiates pumping the concrete in the hopper to the specified location.When the pumping ends, the concrete pump truck stops the pumping system and then folds the cantilever and landing leg

Experimental Evaluation
The number of working modes Π = 200 by averaging over multiple samples according to (9), calculated as follows: Experimental results, using different values for , indicated that  = 10 samples is a reasonable choice to get a good approximation of the perplexity.Because of the exchangeability of the working modes, it is possible that quite different solutions of working modes are detected across different samples.In practice, however, we have also found that the solutions of working modes are relatively stable across samples, with only a small subset of unique working modes appearing in any sample.Hence, we use the average perplexity values across samples in the experiment.Figure 5 illustrates the perplexity as a function of iterations of the Gibbs sampler, for a Π = 200 model to fit the data set, respectively.It appears from Figure 5 that performance of models (for different settings of parameter ) trained using the Gibbs sampler appears to stabilize rather quickly (after about 100 iterations), at least in terms of perplexity on the data set.This indicates that the perplexity values flatten out after a 100 or so iterations of the Gibbs sampler.

The Number of Working Modes Π.
Although the perplexity computation is able to be averaged over different Gibbs sampler runs, other applications of the model rely on the analysis of each working mode and are based on the analysis of each sample.Meanwhile, the setting of the parameter Π is also determined according to the perplexity.The parameter Π represents the number of working modes.Figure 6 illustrates the perplexity as a function of the parameter Π in  = 10 Gibbs samples.Empirical settings of the parameter Π show that the average perplexity over the data set decreases with the increase of the parameter Π. Experimental results confirm that the average perplexity indeed decreases as we made analysis.In particular, the perplexity values flatten out after the parameter Π is set to 200.This indicates that the parameter Π = 200 fits the data set in the model.

Analysis of the WCM Results
. About the analysis of the WCM results, we can use the point estimate of the WCM parameters to look at specific Θ, Δ, and Φ distributions and related quantities that can be derived from these parameters (such as the probability of a working place and a working date given a randomly selected event from a working mode).In the following results, we take a specific sample, x  , y  , and z  , after 100 iterations from a single arbitrarily selected Gibbs run and then generate point estimates of Θ, Δ, and Φ using (9).
There are totally 200 working modes (parameter Π = 200).Each working mode, using a WMV, helps us to better understand the occurrences of events.For the sake of analysis, we list the highest probability working modes for each working place and each working date from the WCM in Table 2.In each working mode, we list the top 10 events most likely to be generated in the most likely working mode conditioned on both the working place and working date.For example, in the working place of Northern China, for the most likely working mode (numbered 101 in the 200 working modes), the top 10 events (OPI, SPM, EAI, HOS, BVI, MCI, AOM, APTS, CPD, and TCI) are most likely to occur in the working date of June.
Experimental results show that different working places have different working modes in spite of the same working date, and the same working place also has different working modes for different working dates.It indicates that the working mode is indeed related with the working place and working date.Events related with the pumping system, such as OPI, MCI, and CPI, are most likely to occur in most working modes, which indicates that the working modes of the concrete pump truck are consistent with the actual situations.Meanwhile events related with the cantilever system and landing leg system, such as LLF and CFI, have less occurrences as compared with events of the pumping system.Moreover, in the working date of summer (working date = June, July, and August), the alert event SPM is more likely to occur, which indicates that the concrete pump truck more likely fails in the hot climate.The operation event AOM is more likely to occur, which indicates that the operators prefer to operate the concrete pump truck in the remote manner.
Because the probability of working mode reflects the probability of its occurrence, we can analyze the work loads of different working places in different working dates.
According to the probability of the working mode in Table 2, we can find that the working modes in the working place of Eastern China are more likely to occur than the working modes in the working place of Western China.It indicates that the concrete pump trucks in the working place of Eastern China have more work loads than that in the working place of Western China.Meanwhile, the concrete pump trucks in the working date of June have more work loads than that in the working date of November.Generally, we can analyze different working modes according to the probability.

Illustrative Applications for the WCM.
In this section we provide some illustrative examples of how the WCM can be used to answer different types of questions and prediction problems concerning working modes of the equipment.

Automated Detection for a New Work Cycle.
In real cases, we would like to quickly assess working mode assignments for new work cycles not contained in the training data set, especially for the real-time event sequence flow.
Our automated detection strategy is to apply the Gibbs sampling algorithm that runs only on the event tokens in the new work cycle, instead of rerunning the algorithm for every new work cycle again.Afterwards, the event tokens in the new work cycles are quickly assigned to the most likely working places, working dates, and working modes.The main procedure is as follows: first, we start by assigning events randomly to working places, working dates, and working modes; second, we then sample new assignments of events by applying the Gibbs sampler only to the event tokens in the new work cycle, each time temporarily updating the count matrices  Π ,  Π , and  Π shown in (7).
Table 3 shows the occurrences of events for a new work cycle.After the sampling, the WCM has assigned each event to its most likely working mode.Table 3 illustrates the top 3 most likely working modes assigned to each event for the new work cycle.Note that each event is assigned to different working modes according to its occurrence count.According to (7), although events of this new work cycle are assigned to different working modes, they are assigned to the number 107 working mode with the probability 0.0003.The top 10 most likely events in the number 107 working mode are shown as follows:

RTM, CM, OPI, BVI, SPM, CPI, MCI, SCI, ISC, and SoE
The automated detection result for the new work cycle is indeed consistent with the actual situations, in comparison with the real occurrences of events.

Automated Detection of Anomalous Work
Cycles.We illustrate in this section how our model could be useful for detecting anomalous work cycles.A work cycle assigned to a working mode with low probability is considered as an anomalous work cycle.
We also take the work cycle as an example for the automated detection of an anomalous work cycle, shown in Table 3.The work cycle is assigned to the number 107 working mode with the probability 0.0003.As compared with most of other working modes, number 107 working mode has lower probability, so this work cycle is detected as an anomalous work cycle.The alert events SPM and SoE have frequent occurrences both in the work cycle and in number 107 working mode, which indicates that this work cycle is an anomalous work cycle.Meanwhile, we analyzed the real failure records and confirmed that the engine indeed failed frequently during this work cycle.Generally, these anomalous work cycles can be automatically detected efficiently, with the help of the WCM.

Conclusions and Future Work
The working condition model proposed in this paper provides a relatively simple probabilistic model for exploring the relationships between working place, working place, working mode, and events in a work cycle.This model provides significantly improved predictive power in terms of the analysis of working condition according to the event sequence data.Our future works mainly include the optimization of the model, the model training, and the conduction experiments on different data sets.Furthermore, the further analysis of the anomalous work cycles detected by our model is also an interesting question.

P:
Working places of all the work cycles (set) T: Working dates of all the work cycles (set) p  : Working Working place assignments (-dimensional vector)   : Working place assignment for event   (th component of vector x  ) y: W orkingdateassignments (-dimensional vector)   : Working date assignment for event   (th component of vector y  ) z: Working mode assignments (-dimensional vector)   : Working mode assignment for event   (th component of vector z  ) , , : Dirichlet prior (Scalar) Φ: Probabilities of events given working modes ( × Π matrix)   : Probabilities of events given working mode  (-dimensional vector) Θ: Probabilities of working modes given working places (Π ×  matrix)   : Probabilities of working modes given working place  (Π-dimensional vector) Δ: Probabilities of working modes given working dates (Π ×  matrix)   : Probabilities of working modes given working dates  (Π-dimensional vector).

Figure 2 :
Figure 2: Graphic model of a typical generative model LDA.The boxes are plates representing replicates.The outer plate represents documents, while the inner plate represents the repeated choice of topics and words within a document. denotes the number of documents and  the number of words in a document., , , ,  are hidden parameters and  is observations.Details about LDA refer to [5].

Figure 3 :
Figure 3: The graphic representation of WCM.

Figure 4 :
Figure 4: The stream of the concrete in the concrete pump truck and the operation sequence of the concrete pump truck at runtime.

Figure 5 :
Figure 5: Perplexity as a function of iterations of the Gibbs sampler for a Π = 200 model, respectively.Each curve shows the perplexity from averaging for different settings of Π, but now over a larger range of sampling iterations.

Figure 6 :
Figure 6: Perplexity as a function of the parameter Π of the Gibbs sampler for  = 10 samples.
choose working place   ∼ Uniform(p  ), conditioned on   choose working date   ∼ Uniform(  ), conditioned on   and   choose working mode   ∼ Discrete(   ,    ), conditioned on   choose event   ∼ Discrete(   ).
For each work cycle  = 1, . . ., , given the vector of working places p  , given the vector of working dates   , for each event  = 1, . . .,   , conditioned on p

Table 2 :
The highest probability working mode for each working place and each working date from the WCM.

Table 3 :
Actual example of automated detection for a new work cycle.Each event is assigned to its most likely working mode according to its corresponding occurrence count.In the table, we list the top 3 most likely working modes for each event for the new work cycle.
places of the th work cycle (  -dimensional vector) Number of events in the event set (Scalar) e  :Event sequence vector for the th work cycle (  -dimensional vector)   :th event in the th work cycle (th component of vector e  ) x: