A portion of the disclosure of this patent document contains material which is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent document or the patent disclosure, as it appears in the Patent and Trademark Office patent file or records, but otherwise reserves all copyright rights whatsoever.
The subject matter discussed in the background section should not be assumed to be prior art merely as a result of its mention in the background section. Similarly, a problem mentioned in the background section or associated with the subject matter of the background section should not be assumed to have been previously recognized in the prior art. The subject matter in the background section merely represents different approaches, which in and of themselves may also be inventions.
Creating and maintaining cloud-based computing platforms may be exceedingly complex, as thousands of computer servers and other resources in geographically disparate locations may serve billions of customer-initiated requests daily on a global scale. Millions of applications may run on these servers on behalf of customers, either directly or indirectly. These customers want all their requests and applications to execute correctly, quickly, and efficiently. An application slow-down, or even worse, a computer resource unavailability, can cause a customer to lose money, which may cause the platform provider to lose the customer. Customers typically expect computer resource availability to be 99.99+percent. Beyond computer resource availability, customer satisfaction is adversely impacted if computer services run slower than customer expectations.
In view of the complexity of these challenges, combined with the stringency of these requirements, a new specialty field developed, which may be referred to as application performance monitoring or computer performance monitoring. Computer performance can be the functioning of an electronic device for storing and processing data, typically in binary form, according to instructions given to it in a variable program. Application performance monitoring helps cloud-based computing vendors to detect and diagnose disruptions in the performance of their services and applications. Some application performance monitoring solutions can continuously monitor hundreds of millions of metrics, in the form of time series, for potential issues.
A time series can be a sequence of data points that may be indexed, listed, and/or graphed in a chronological time order. Most commonly, a time series is a sequence of discrete values recorded at successive equally spaced points in time. Many domains of applied science and engineering which involve temporal measurements use time series. Time series analysis includes methods for analyzing time series in order to extract meaningful statistics and other characteristics from the values.
Time series forecasting is the use of models to predict future time series values based on previously observed values. The implementation of a computerized database system that can correctly, reliably, and efficiently implement such methods and forecasts must be specialized for processing time series values. Proactive analyses of metrics can forecast potential problems before the problems actually occur. For example, the response time of a particular service may start degrading significantly before subsequently being followed by the disruption of the service.
In the following drawings like reference numbers are used to refer to like elements. Although the following figures depict various examples, the one or more implementations are not limited to the examples depicted in the figures.
In accordance with embodiments described herein, there are provided systems and methods for a multi-scale exponential-smoothing forecaster for time series data. A system determines, for a first value associated with a first time and a time series, a first estimate based on both a value and an estimated velocity associated with the time series, a first lag, and the first time. The system determines, for the first value, a second estimate based on both a value and an estimated velocity associated with the time series, a second lag, and the first time. The system determines a first weight based on a difference between a second value, associated with a second time and the time series, and the first estimate and a second weight based on a difference between the second value and the second estimate. The system determines, for the second value, a first forecast based on both a value and an estimated velocity associated with the time series, the first lag, and the second time. The system determines, for the second value, a second forecast based on both a value and an estimated velocity associated with the time series, the second lag, and the second time. The system determines, for the second value, a combined forecast based on the first weight applied to the first forecast and on the second weight applied to the second forecast. If the combined forecast satisfies a threshold, a time series database system outputs an alert associated with the combined forecast.
For examples,
At 9:05 A.M., a time series database system uses the first timescale model with the 0-lag time to determine the first timescale model's estimate of the value of the cloud memory utilization time series at 9:06 A.M. by adding the value of 0.62 at 9:05 A.M., the velocity 1 (for 0-lag) of 0.09 at 9:05 A.M., and the acceleration 1 (for 0-lag) of 0.05 at 9:05 A.M., which equals 0.76. The time series database system also uses the second timescale model with the 1-lag time to determine the second timescale model's estimate of the value of the cloud memory utilization time series at 9:06 A.M. by adding the value of 0.53 at 9:04 A.M. (which is 1-lag time behind the value of 0.62 at 9:05 A.M.), the velocity 2 (for 1-lag) of 0.13 at 9:05 A.M., and the acceleration 2 (for 1-lag) of 0.14 at 9:05 A.M., which equals 0.80. The time series database system receives the new value of 0.78 for the cloud memory utilization time series at the time 9:06 A.M. The time series database system determines the first timescale model's estimate error of 0.02 between the new value of 0.78 and the first timescale model's estimate of 0.76, and the second timescale model's estimate error of −0.02 between the new value of 0.78 and the second timescale model's estimate of 0.80. Then the time series database system determines the weight of 0.50 for the first timescale model's estimate and the weight of 0.50 for the second timescale model's estimate based on their relative estimate errors of 0.02 and −0.02, respectively.
Next, the time series database system uses the first timescale model with the 0-lag time to determine the first timescale model's forecast of the next value of the cloud memory utilization time series at 9:07 A.M. by adding the most recent value of 0.78 at 9:06 A.M. the most recent velocity 1 (for 0-lag) of 0.16 at 9:06 A.M., and the most recent acceleration 1 (for 0-lag) of 0.07 at 9:06 A.M., which equals 1.01. The time series database system also uses the second timescale model with the 1-lag time to determine the second timescale model's forecast of the next value of the cloud memory utilization time series at 9:07 A.M. by adding the value of 0.62 at 9:05 A.M (which is 1-lag time behind the most recent value of 0.78 at 9:06 A.M.), the most recent velocity 2 (for 1-lag) of 0.25 at 9:06 A.M., and the most recent acceleration 2 (for 1-lag) of 0.22 at 9:06 A.M., which equals 1.09. Then the time series database system applies the first timescale model's weight of 0.50 for the first timescale model's estimate to the first timescale model's forecast of 1.01 and the second timescale model's weight of 0.50 for the second timescale model's estimate to the second timescale model's forecast of 1.09 to determine the multi-scale forecast of 1.05 for the cloud memory utilization time series at 9:07 A.M. Since the multi-scale forecast of 1.05 for the cloud memory utilization time series at 9:07 A.M. is above its capacity alert threshold of 0.90, the time series database system outputs a forecast alert that enables immediate allocation of additional cloud memory.
Systems and methods are provided for a multiscale exponential-smoothing forecaster for time series data. As used herein, the term multi-tenant database system refers to those systems in which various elements of hardware and software of the database system may be shared by one or more customers. For example, a given application server may simultaneously process requests for a great number of customers, and a given database table may store rows for a potentially much greater number of customers. As used herein, the term query plan refers to a set of steps used to access information in a database system. The following detailed description will first describe a multiscale exponential-smoothing forecaster for time series data. Next, methods for a multiscale exponential-smoothing forecaster for time series data will be described with reference to example embodiments.
While one or more implementations and techniques are described with reference to an embodiment in which a multi-scale exponential-smoothing forecaster for time series data is implemented in a system having an application server providing a front end for an on-demand database service capable of supporting multiple tenants, the one or more implementations and techniques are not limited to multi-tenant databases nor deployment on application servers. Embodiments may be practiced using other database architectures, i.e., ORACLE®, DB2® by IBM and the like without departing from the scope of the embodiments claimed.
Any of the embodiments described herein may be used alone or together with one another in any combination. The one or more implementations encompassed within this specification may also include embodiments that are only partially mentioned or alluded to or are not mentioned or alluded to at all in this brief summary or in the abstract. Although various embodiments may have been motivated by various deficiencies with the prior art, which may be discussed or alluded to in one or more places in the specification, the embodiments do not necessarily address any of these deficiencies. In other words, different embodiments may address different deficiencies that may be discussed in the specification. Some embodiments may only partially address some deficiencies or just one deficiency that may be discussed in the specification, and some embodiments may not address any of these deficiencies.
A time series database system can forecast future values of a time series' data based on the time series' historical values that are stored in a time series database, possibly augmented by historic values of additional relevant time series' data. A forecast can be a prediction of a future value. Such a time series database system may be a machine-learning system that operates in a streaming mode, learning continuously and autonomously as new values of time series data arrive. The machine-learning system can rapidly adjust to new norms. such as when there are level, trend, or seasonality shifts in the time series data. The machine-learning system can train incrementally by updating its forecasting timescale models to learn from the new values and forecast future values at any point in time. The machine-learning system can forecast values for any time series, without any human training, and therefore may be autonomous. This capability of functioning autonomously is important in a time series database system which can monitor millions of time series, such that human training of the time series database system on each individual time series is not feasible.
A time series database can be a structured set of information which includes sequences of data points that may be indexed, listed, and/or graphed in chronological time orders. A time series database system can be the computer hardware and/or software that stores and enables access to sequences of data points that may be indexed, listed, and/or graphed in chronological time orders. A machine learning system can be an artificial intelligence tool that has the ability to automatically learn and improve from experience without being explicitly programmed.
The time series database system builds forecasting timescale models for multiple timescales, with each timescale equated to a corresponding lag of time. A lag can be a period of time between recording one value and recording another value. For example, a timescale model with a 0-lag may use the values of the time series that are recorded every minute with a lag of 0 minutes to forecast the future values of the time series, such that the timescale model forecasts the value of the time t+1 minutes based on the value at the time t minutes with a lag of 0 minutes, which is the value at the time t minutes. In another example, a timescale model with a 1-lag may use the values of the time series that are recorded every minute with a lag of 1 minutes to forecast the future values of the time series, such that the timescale model forecasts the value of the time t+1 minutes based on the value at the time t minutes with a lag of 1 minute, which is the value at the time t−1 minutes. For another example, a timescale model with 2-lags may use the values of the time series that are recorded every minute with a lag of 2 minutes to forecast the future values of the time series, such that the timescale model forecasts the value of the time t+1 minutes based on the value at the time t minutes with a lag of 2 minutes, which is the value at the time t−2 minutes. Operating at multiple timescales simultaneously, the time series database system can detect any existing trends at varying timescales, such as milli-secondly, secondly, minutely, hourly, daily, weekly, seasonally, and/or annually. This approach empowers multiple use cases of time series forecasting in the performance monitoring setting. The time series database system's equations are formally described below.
(t+h)=x(t−k)+{circumflex over (v)}k+h+âk+h (Equation 1)
Equation 1 forecasts x(t+h) by a timescale model indexed by k≥0. This timescale model forecasts at the timescale k+h. {circumflex over (v)}k+h and âk+h are estimates of the velocity and the acceleration at the timescale k+h at forecast time. An estimated velocity can be an approximate determination of the rate at which a value changes. An estimated acceleration can be an approximate determination of the change in the rate at which a value changes. These estimates are maintained as exponentially-smoothed versions of the velocity time series and the acceleration time series at the timescale k+h. Exponential-smoothing favors recency while also smoothing out noise.
v
l(t)=x(t)−x(t−l),al(t)=vl(t)−vl(t−l) (Equation 2)
Each forecasting timescale model operates at a different timescale and has an automatically-computed strength. When generating a combined forecast for a x value in a time series by combining different timescale models' forecasts for the x value for the same forecast time, the time series database system determines how much weight to apply to each timescale model's forecast by determining the accuracy of each timescale model's recent forecasts made at the various timescales. A combined forecast can be prediction of a future value based on multiple predictions of the future value. A weight can be a factor associated with one of a set of numerical quantities, used to represent its importance relative to the other members of the set. The time series database system applies more weight to a timescale model's forecast if the timescale model's previous forecast was more accurate and applies less weight to a timescale model's forecast if the timescale model's previous forecast was less accurate. The multi-scale forecast is:
(t+h)=Σkp(k|h)(t+h) (Equation 3)
p(k|h) is a distribution over the various timescale models k based on the accuracies of their recent forecasts. More formally, it is as follows. Let denote the estimate of the forecast error of the timescale model indexed by k on forecasting x(t+h) and (h)=mink
q
k,h= (Equation 4)
p(k|h)=qk,h/Σk·qk′,h (Equation 5)
The estimates of the forecast error are also exponentially smoothed, specifically from ek,h(t)=|x(t+h)−(t+h)|. In Equation 4, a timescale model's probability decreases exponentially as the timescale model's forecast error increases relative to the forecast error of the timescale model with the smallest forecast error. A sensible variant of Equation 4 is to replace “exponential” by “polynomial.” This variant is embodied in:
q
k,h=1/−(h))p (Equation 4′)
Here p is the polynomial's degree, where p=1 is a linear decay, and p>1 is a super-linear decay. The time series database system may either bypass using Equation 4′ to determine weights based on comparative forecast errors when the smallest error equals zero or use a placeholder score, such as none or null, when the smallest error equals zero.
After determining a multi-scale forecast of a x value in a time series, the time series database system can store the multi-scale forecast in a time series database as a forecast x value in the x value's time series or in the forecast x value's own dedicated time series. A forecast value can be a predicted numerical amount denoted by an algebraic term, a magnitude, quantity, or number.
The time series database system can leverage historical values in multiple time series. For example, when forecasting the response time of a service based on its recent historical values, the time series database system can also take into account recent historical values of other upstream metrics that potentially impact this response time, such as the request rate, lengths of various internal queues, and utilization levels of various internal resources such as Central Processing Units (CPUs) and memory. Such a multivariate version of the time series database system can forecast future values of a particular time series from historical values of several time series, including the particular time series.
The time series database system can generalize the univariate forecaster to use additional time series as predictors. First, the time series database system formulates the multivariate forecasting problem. Consider an n-dimensional vector time series X(t) and a scalar time series y(t)≡Xn(t). The problem that the time series database system addresses here is to forecast y(t+h) from X(t), X(t−1) . . . X(0). The time series database system is forecasting future values of the last time series from the historical values of all the time series, including the last time series. The generalized version operates as follows.
(t+h)=Xi(t−k)+{circumflex over (D)}k+h,i(t)+k+h,i(t) (Equation 6)
Equation 6 forecasts y(t+h) by a timescale model indexed by (k,i). This timescale model forecasts at the timescale k+h. Here {circumflex over (D)}k+h,i(t) is an estimate of y(t+h)−Xi(t−k) at time t, and k+n,i(t) is an estimate of D(t+h)−D(t+h−k). These are estimates because the time series database system has yet to identify X at any time after time t, let alone at time t+h. These estimates are maintained as exponentially-smoothed versions of the first cross-difference and the second cross-difference time series at scale l≡k+h.
D
l,i(t)=y(t)−Xi(t−l),D2l,i(t)=Dl,i(t)−Dl,i(t−l) (Equation 7)
The multivariate, multi-scale forecast is:
(t+h)=Σk,ip(k,i|h)(t+h) (Equation 8)
p(k,i) is obtained from the forecast errors of the various timescale models indexed by (k,i), exactly as before.
The time series database system can provide the multi-scale forecasts to proactive, forecast-based, alerting. such as by generating an alert if disk usage is expected to continue rising and reach a specific remaining capacity level within a particular number of time units, such as minutes, hours, days, or weeks. Proactive alerts are especially helpful for addressing concerns about a diminishing computer resource capacity. By the time a computer resource has no more capacity, taking remedial action is too late. When users want to set forecast alerts on the time series of forecast values, the users can select any combination of individualized and grouped thresholds, such as a threshold of 0.90 for cloud memory utilization values, and a threshold of 0.75 for cloud CPU utilization values. The time series database system can trigger forecast alerts when forecast values reach certain thresholds. For example, the time series database system triggers a forecast alert because the increase of 16% cloud memory utilization from 9:05 A.M. to 9:06 A.M. resulted in a forecast value of 1.00 which exceeds the threshold of 0.90 for cloud memory utilization. An alert can be an announcement that warns about a value. A threshold can be the magnitude that must be satisfied for a certain result or condition to occur.
The time series database system can provide the multi-scale forecasts to dashboards and visualizations. Traditionally, dashboards and visualizations have displayed historical values of time series data. Powered by forecasting, the time series database system can also depict likely future trajectories of time series data. Such visuals can help a time series database system user to quickly get a sense for where a time series data point is likely headed.
The time series database system builds forecasting timescale models for multiple timescales with each timescale equated to a corresponding lag of time.
The machine-learning system also uses the second timescale model with the 1-lag time to determine the second timescale model's estimate of the x value of the cloud memory utilization time series at 9:04 A.M. by adding the x value of 0.50 at 9:02 A.M. (which is 1-lag time behind the x value of 0.49 at 9:03 A.M.) and the velocity 2 (for 1-lag) of −0.01 at 9:03 A.M., which equals 0.49.
The first timescale model with the 0-lag and the second timescale model with the 1-lag do not use the acceleration 1 (for 0-lag) or the acceleration 2 (for 1-lag) at 9:03 A.M. because the acceleration 2 (for 1-lag) does not exist at 9:03 A.M. Although some examples describe a forecast timescale model that determines estimates or forecasts of time series values based on estimated accelerations, in some embodiments a forecast timescale model does not require the use of estimated acceleration to determine such an estimate or forecast. The machine-learning system does not use the third timescale model with the 2-lag times to determine the third timescale model's estimate of the x value of the cloud memory utilization time series at 9:04 A.M. because neither the velocity 3 (for 2-lags) nor the acceleration 3 (for 2-lags) exist at 9:03 A.M.
The machine-learning system receives the new x value of 0.53 for the cloud memory utilization time series at the time 9:04 A.M. Then the machine-learning system determines the first timescale model's estimate error of 0.05 between the new x value of 0.53 and the first timescale model's estimate of 0.48, and the second timescale model's estimate error of 0.04 between the new x value of 0.53 and the second timescale model's estimate of 0.49. Next, the machine-learning system uses Equation 4 above to determine the weight of 0.497 for the first timescale model's estimate and the weight of 0.503 for the second timescale model's estimate based on the timescale models' relative estimate errors of 0.05 and 0.04, respectively.
Then the machine-learning system uses the first timescale model with the 0-lag time to determine the first timescale model's forecast of the next x value of the cloud memory utilization time series at 9:05 A.M. by adding the most recent x value of 0.53 at 9:04 A.M. and the most recent velocity 1 (for 0-lag) of 0.04 at 9:04 A.M., which equals 0.57.
Then the machine-learning system applies the first timescale model's weight of 0.497 for the first timescale model's estimate to the first timescale model's forecast of 0.57 and the second timescale model's weight of 0.503 for the second timescale model's estimate to the second timescale model's forecast of 0.52 to determine the multi-scale forecast of 0.55 for the cloud memory utilization time series at 9:05 A.M. Since the multi-scale forecast of 0.55 for the cloud memory utilization time series at 9:05 A.M. is below its capacity alert threshold of 0.90, the machine-learning system does not output a forecast alert that enables immediate allocation of additional cloud memory. After comparing the multi-scale forecast of 0.55 for the cloud memory utilization time series at 9:05 A.M. against the actual x value of 0.62 at 9:05 A.M., the machine-learning system determines a forecast error of 0.07, and then concludes that training is sufficient to forecast values using production data because the forecast error of 0.07 is within the training threshold of 0.10.
After optionally training a machine-learning system, a first value associated with a first time and a time series is optionally received, wherein values of the time series may identify a computer performance, block 204. The system receives a time series data value for forecasting. By way of example and without limitation, this can include a time series database system receiving a time series x value of 62% cloud memory utilization at 9:05 A.M.
Following receipt of the first value associated with the first time and the time series, a first estimate is determined for the first value associated with the first time and the time series, the first estimate being based on both a value and an estimated velocity associated with the time series, a first lag, and the first time, wherein the first estimate may be further based on an estimated acceleration associated with the time series, the first lag, and the first time, block 206. The system uses a forecast timescale model to determine an estimate that will be used to weight the timescale model's future forecasts. In embodiments, this can include the time series database system using the first timescale model with the 0-lag time to determine the first timescale model's estimate of the x value of the cloud memory utilization time series at 9:06 A.M. by adding the x value of 0.62 of the cloud memory utilization time series at 9:05 A.M., the velocity 1 (for 0-lag) of 0.09 at 9:05 A.M., and the acceleration 1 (for 0-lag) of 0.05 at 9:05 A.M., which equals 0.76.
An estimate can be an approximate determination of a value. Using a timescale model to estimate a value in a time series is substantially similar to using the timescale model to forecast the value in the time series. However, using a timescale model to determine an expected amount of a value in a time series is referred to as an estimate of the value, instead of a forecast of the value, when the time series database system may have already received the value for which the expected amount is being determined. Next, the time series database system can compare the timescale model's estimate of the value against the received value to determine the estimate error and then determine the corresponding weight to be applied to the timescale model's subsequent forecast. In contrast, using a timescale model to determine an expected amount of a value in a time series is referred to as a forecast of the value, instead of an estimate of the value, when the time series database system has not already received the value for which the expected amount is being determined. The time series database system can apply the weight determined from the timescale model's estimate to the timescale model's forecast to determine the multi-scale forecast. Consequently, the time series database system uses a timescale model to estimate a value in a time series to determine the timescale model's estimate error, which is the basis for determining the timescale model's weight, and then uses the timescale model to forecast the value which is used with the timescale model's weight to determine a multi-scale forecast.
Having determined the first estimate, a second estimate is determined for the first value, the second estimate being based on both a value and an estimated velocity associated with the time series, a second lag, and the first time, wherein the second estimate may be further based on an estimated acceleration associated with the time series, the second lag, and the first time, block 208. The system uses another forecast timescale model to determine another estimate that will be used to weight the other timescale model's future forecasts. For example, and without limitation, this can include the time series database system using the second timescale model with the 1-lag time to determine the second timescale model's estimate of the x value of the cloud memory utilization time series at 9:06 A.M. by adding the x value of 0.53 of the cloud memory utilization time series at 9:04 A.M. (which is 1-lag time behind the x value of 0.62 at 9:05 A.M.), the velocity 2 (for 1-lag) of 0.13 at 9:05 A.M., and the acceleration 2 (for 1-lag) of 0.14 at 9:05 A.M., which equals 0.80.
In addition to determining the first and second estimates, a third estimate is optionally determined, for the first value, the third estimate being based on each of a value, an estimated velocity, and an estimated acceleration associated with the time series, a third lag, and the first time, block 210. The system can use an additional forecast timescale model to determine an additional estimate that will be used to weight the additional timescale model's future forecasts. By way of example and without limitation, this can include the time series database system using a third timescale model with 2-lag times to determine the third timescale model's estimate of the x value of the cloud memory utilization time series at 9:06 A.M. by adding the x value of 0.49 of the cloud memory utilization time series at 9:03 A.M. (which is 2-lag times behind the x value of 0.62 at 9:05 A.M.), the velocity 3 (for 2-lags) of 0.12 at 9:05 A.M., and the acceleration 3 (for 2-lags) of 0.14 at 9:05 A.M., which equals 0.75.
In addition to determining the estimates, a second value associated with a second time and the time series is optionally received, block 212. The system receives a time series value for forecasting. In embodiments, this can include the time series database system receiving the production data's time series x value of 78% cloud memory utilization at 9:06 A.M.
After determining the estimates, a first weight is determined based on the difference between the second value and the first estimate and a second weight is determined based on the difference between the second value and the second estimate, block 214. The system determines the weights for each timescale model's subsequent forecast based on the error for each timescale model's previous forecast. For example, and without limitation, this can include the time series database system determining the first timescale model's estimate error of 0.02 between the new x value of 0.78 and the first timescale model's estimate of 0.76, and the second timescale model's estimate error of −0.02 between the new x value of 0.78 and the second timescale model's estimate of 0.80. Then the time series database system uses Equation 4 above to determine the weight of 0.50 for the first timescale model's estimate and the weight of 0.50 for the second timescale model's estimate based on the timescale models' relative estimate errors of 0.02 and −0.02, respectively. A difference can be the remainder left after subtraction of one value from another value.
Following the determination of the first and second weights, a third weight is optionally determined based on a difference between the second value and the third estimate, block 216. The system can determine the weight for another timescale model's subsequent forecast based on the error for the other timescale model's previous forecast. By way of example and without limitation, this can include the time series database system determining the third timescale model's estimate error of 0.03 between the new x value of 0.78 and the third timescale model's estimate of 0.75. Then the time series database system uses Equation 4 above to determine the weight of 0.34 for the first timescale model's estimate, the weight of 0.34 for the second timescale model's estimate, and the weight of 0.32 for the third timescale model's estimate based on the timescale models' relative estimate errors of 0.02, −0.02, and 0.03, respectively.
Having determined the weights, a first forecast is determined for the second value, the first forecast being based on both a value and an estimated velocity associated with the time series, the first lag, and the second time, wherein the first forecast may be further based on an estimated acceleration associated with the time series, the first lag, and the second time, block 218. The system uses a forecast timescale model to forecast a value in a time series. In embodiments, this can include the time series database system using the first timescale model with the 0-lag time to determine the first timescale model's forecast of the next x value of the cloud memory utilization time series at 9:07 A.M. by adding the most recent x value of 0.78 at 9:06 A.M. the most recent velocity 1 (for 0-lag) of 0.16 at 9:06 A.M., and the most recent acceleration 1 (for 0-lag) of 0.07 at 9:06 A.M., which equals 1.01.
In addition to determining the first forecast, a second forecast is determined, for the second value, the second forecast being based on both a value and an estimated velocity associated with the time series, the second lag, and the second time, wherein the second forecast may be further based on an estimated acceleration associated with the time series, the second lag, and the second time, block 220. The system uses another forecast timescale model to forecast a value in a time series. For example, and without limitation, this can include the time series database system using the second timescale model with the 1-lag time to determine the second timescale model's forecast of the next x value of the cloud memory utilization time series at 9:07 A.M. by adding the x value of 0.62 of the cloud memory utilization time series at 9:05 A.M (which is 1-lag time behind the most recent x value of 0.78 at 9:06 A.M.), the most recent velocity 2 (for 1-lag) of 0.25 at 9:06 A.M., and the most recent acceleration 2 (for 1-lag) of 0.22 at 9:06 A.M., which equals 1.09.
After determining the first and second forecasts, a third forecast is optionally determined for the second value, the third forecast being based on each of a value, an estimated velocity, and an estimated acceleration associated with the time series, a third lag, and the second time, block 222. The system can use an additional forecast timescale model to forecast a value in a time series. By way of example, and without limitation, this can include the time series database system using the third timescale model with the 2-lag times to determine the third timescale model's forecast of the next x value of the cloud memory utilization time series at 9:07 A.M. by adding the x value of 0.53 of the cloud memory utilization time series at 9:04 A.M (which is 2-lag times behind the most recent x value of 0.78 at 9:06 A.M.), the most recent velocity 3 (for 2-lags) of 0.29 at 9:06 A.M., and the most recent acceleration 3 (for 2-lags) of 0.31 at 9:06 A.M., which equals 1.13.
The examples above describe the time series database system using the most recent values, most recent estimated velocities, and the most recent accelerations to estimate values of time series and forecast values of time series. Although using the most recent data may generally result in determining the most accurate estimates and the most accurate forecasts, the time series database system does not require the most recent data to determine accurate estimates and accurate forecasts. For example, a timescale model that operates on a large timescale, such as seasonal or annual, may estimate and then forecast the most accurate seasonal or annual values for a time series without using the 5 most recent minutes of the time series' data.
Following the determination of the forecasts, a combined forecast is determined, for the time series, the combined forecast being based on the first weight applied to the first forecast and the second weight applied to the second forecast, wherein the combined forecast may be further based on the third weight applied to the third forecast, block 224. The system determines a multi-timescale model forecast of a value in a time series by weighing each timescale model's forecast by the accuracy of each timescale model's previous forecast. In embodiments, this can include the time series database system applying the first timescale model's weight of 0.50 for the first timescale model's estimate to the first timescale model's forecast of 1.01 and the second timescale model's weight of 0.50 for the second timescale model's estimate to the second timescale model's forecast of 1.09 to determine the multi-scale forecast of 1.05 for the cloud memory utilization time series at 9:07 A.M. In an alternative example, the time series database system applies the first timescale model's weight of 0.34 for the first timescale model's estimate to the first timescale model's forecast of 1.01, the second timescale model's weight of 0.34 for the second timescale model's estimate to the second timescale model's forecast of 1.09, and the third timescale model's weight of 0.32 for the third timescale model's estimate to the third timescale model's forecast of 1.13 to determine the multi-scale forecast of 1.08 for the cloud memory utilization time series at 9:07 A.M.
The combined forecast may be further based on another weight applied to another forecast for another time series. For example, the time series database system determines the cloud memory utilization timescale model's estimate error of 0.02 between the new cloud memory utilization value of 0.78 and the cloud memory utilization timescale model's estimate of 0.76, and the CPU utilization timescale model's estimate error of 0.14 between the new cloud memory utilization value of 0.78 and the CPU utilization timescale model's estimate of 0.64. Then the time series database system uses Equation 4 above to determine the weight of 0.53 for the cloud memory utilization timescale model's estimate and the weight of 0.47 for the CPU utilization timescale model's estimate based on their relative estimate errors of 0.02 and 0.14, respectively. Next, the time series database system applies the cloud memory utilization timescale model's weight of 0.53 for the cloud memory utilization timescale model's estimate to the cloud memory utilization timescale model's forecast of 1.08 and the CPU utilization timescale model's weight of 0.47 for the CPU utilization timescale model's estimate to the CPU utilization timescale model's forecast of 0.88 to determine the multivariate multi-scale forecast of 0.986 for the cloud memory utilization time series at 9:07 A.M.
In addition to determining the combined forecast, a time series database system optionally stores the combined forecast in the time series and/or a time series dedicated to the combined forecast, in a time series database, block 226. The system stores multi-scale forecasts for a value in the value's time series and/or the combined forecast's own time series. For example, and without limitation, this can include the time series database system storing the multivariate multi-scale forecast of 0.986 for the cloud memory utilization time series at 9:07 A.M. in the cloud memory utilization time series and in a dedicated forecast cloud memory utilization's time series, which are in the same time series database.
After determining the combined forecast, a determination is made whether the combined forecast satisfies a threshold, block 228. The system determines whether to output an alert for the multi-scale forecast of a value in the time series. By way of example, and without limitation, this can include the time series database system determining whether the multivariate multi-scale forecast of 0.986 for the cloud memory utilization time series at 9:07 A.M. satisfies the cloud memory capacity alert threshold of 0.90, If the combined forecast satisfies the threshold, the method 200 continues to block 230 to output an alert for the combined forecast. If the combined forecast does not satisfy the threshold, the method 200 terminates for the new value, which enables the processing of another value in the same or a different time series
In response to a determination that the combined forecast satisfies a threshold, an alert is output by a time series database system, block 230. The system outputs an alert for a multi-scale forecast that satisfies its threshold. In embodiments, this can include the time series database system outputting a forecast alert that enables immediate allocation of additional cloud memory because the multivariate multi-scale forecast of 0.986 for the cloud memory utilization time series at 9:07 A.M. is above its capacity alert threshold of 0.90.
The method 200 may be repeated as desired. Although this disclosure describes the blocks 202-230 executing in a particular order, the blocks 202-230 may be executed in a different order. In other implementations, each of the blocks 202-230 may also be executed in combination with other blocks and/or some blocks may be divided into a different set of blocks.
The environment 310 is an environment in which an on-demand database service exists. A user system 312 may be any machine or system that is used by a user to access a database user system. For example, any of the user systems 312 may be a handheld computing device, a mobile phone, a laptop computer, a workstation, and/or a network of computing devices. As illustrated in
An on-demand database service, such as the system 316, is a database system that is made available to outside users that do not need to necessarily be concerned with building and/or maintaining the database system, but instead may be available for their use when the users need the database system (e.g., on the demand of the users). Some on-demand database services may store information from one or more tenants stored into tables of a common database image to form a multi-tenant database system (MTS). Accordingly, the “on-demand database service 316” and the “system 316” will be used interchangeably herein. A database image may include one or more database objects. A relational database management system (RDMS) or the equivalent may execute storage and retrieval of information against the database object(s). The application platform 318 may be a framework that allows the applications of the system 316 to run, such as the hardware and/or software, e.g., the operating system. In an embodiment, the on-demand database service 316 may include the application platform 318 which enables creation, managing and executing one or more applications developed by the provider of the on-demand database service, users accessing the on-demand database service via user systems 312, or third-party application developers accessing the on-demand database service via the user systems 312.
The users of the user systems 312 may differ in their respective capacities, and the capacity of a particular user system 312 might be entirely determined by permissions (permission levels) for the current user. For example, where a salesperson is using a particular user system 312 to interact with the system 316, that user system 312 has the capacities allotted to that salesperson. However, while an administrator is using that user system 312 to interact with the system 316, that user system 312 has the capacities allotted to that administrator. In systems with a hierarchical role model, users at one permission level may have access to applications, data, and database information accessible by a lower permission level user, but may not have access to certain applications, database information, and data accessible by a user at a higher permission level. Thus, different users will have different capabilities with regard to accessing and modifying application and database information, depending on a user's security or permission level.
The network 314 is any network or combination of networks of devices that communicate with one another. For example, the network 314 may be any one or any combination of a LAN (local area network), WAN (wide area network), telephone network, wireless network, point-to-point network, star network, token ring network, hub network, or other appropriate configuration. As the most common type of computer network in current use is a TCP/IP (Transfer Control Protocol and Internet Protocol) network, such as the global internetwork of networks often referred to as the “Internet” with a capital “I,” that network will be used in many of the examples herein. However, it should be understood that the networks that the one or more implementations might use are not so limited, although TCP/IP is a frequently implemented protocol.
The user systems 312 might communicate with the system 316 using TCP/IP and, at a higher network level, use other common Internet protocols to communicate, such as HTTP, FTP, AFS, WAP, etc. In an example where HTTP is used, the user systems 312 might include an HTTP client commonly referred to as a “browser” for sending and receiving HTTP messages to and from an HTTP server at the system 316. Such an HTTP server might be implemented as the sole network interface between the system 316 and the network 314, but other techniques might be used as well or instead. In some implementations, the interface between the system 316 and the network 314 includes load sharing functionality, such as round-robin HTTP request distributors to balance loads and distribute incoming HTTP requests evenly over a plurality of servers. At least as for the users that are accessing that server, each of the plurality of servers has access to the MTS' data; however, other alternative configurations may be used instead.
In one embodiment, the system 316, shown in
One arrangement for elements of the system 316 is shown in
Several elements in the system shown in
According to one embodiment, each of the user systems 312 and all of its components are operator configurable using applications, such as a browser, including computer code run using a central processing unit such as an Intel Pentium® processor or the like. Similarly, the system 316 (and additional instances of an MTS, where more than one is present) and all of their components might be operator configurable using application(s) including computer code to run using a central processing unit such as the processor system 317, which may include an Intel Pentium® processor or the like, and/or multiple processor units. A computer program product embodiment includes a machine-readable storage medium (media) having instructions stored thereon/in which may be used to program a computer to perform any of the processes of the embodiments described herein. Computer code for operating and configuring the system 316 to intercommunicate and to process webpages, applications and other data and media content as described herein are preferably downloaded and stored on a hard disk, but the entire program code, or portions thereof, may also be stored in any other volatile or non-volatile memory medium or device as is well known, such as a ROM or RAM, or provided on any media capable of storing program code, such as any type of rotating media including floppy disks, optical discs, digital versatile disk (DVD), compact disk (CD), micro-drive, and magneto-optical disks, and magnetic or optical cards, nano-systems (including molecular memory ICs), or any type of media or device suitable for storing instructions and/or data. Additionally, the entire program code, or portions thereof, may be transmitted and downloaded from a software source over a transmission medium, e.g., over the Internet, or from another server, as is well known, or transmitted over any other conventional network connection as is well known (e.g., extranet, VPN, LAN, etc.) using any communication medium and protocols (e.g., TCP/IP, HTTP, HTTPS, Ethernet, etc.) as are well known. It will also be appreciated that computer code for implementing embodiments may be implemented in any programming language that may be executed on a client system and/or server or server system such as, for example, C, C++, HTML, any other markup language, Java™, JavaScript, ActiveX, any other scripting language, such as VBScript, and many other programming languages as are well known may be used. (Java™ is a trademark of Sun Microsystems, Inc.).
According to one embodiment, the system 316 is configured to provide webpages, forms, applications, data and media content to the user (client) systems 312 to support the access by the user systems 312 as tenants of the system 316. As such, the system 316 provides security mechanisms to keep each tenant's data separate unless the data is shared. If more than one MTS is used, they may be located in close proximity to one another (e.g., in a server farm located in a single building or campus), or they may be distributed at locations remote from one another (e.g., one or more servers located in city A and one or more servers located in city B). As used herein, each MTS could include one or more logically and/or physically connected servers distributed locally or across one or more geographic locations. Additionally, the term “server” is meant to include a computer system, including processing hardware and process space(s), and an associated storage system and database application (e.g., OODBMS or RDBMS) as is well known in the art. It should also be understood that “server system” and “server” are often used interchangeably herein. Similarly, the database object described herein may be implemented as single databases, a distributed database, a collection of distributed databases, a database with redundant online or offline backups or other redundancies, etc., and might include a distributed database or storage network and associated processing intelligence.
The user systems 312, the network 314, the system 316, the tenant data storage 322, and the system data storage 324 were discussed above in
The UI 430 provides a user interface, and the API 432 provides an application programmer interface to the system 316 resident processes to users and/or developers at the user systems 312. The tenant data and the system data may be stored in various databases, such as one or more Oracle™ databases.
The application platform 318 includes the application setup mechanism 438 that supports application developers' creation and management of applications, which may be saved as metadata into the tenant data storage 322 by the save routines 436 for execution by subscribers as one or more tenant process spaces 404 managed by the tenant management process 410 for example. Invocations to such applications may be coded using the PL/SOQL 434 that provides a programming language style interface extension to the API 432. A detailed description of some PL/SOQL language embodiments is discussed in commonly owned U.S. Pat. No. 7,730,478 entitled, METHOD AND SYSTEM FOR ALLOWING ACCESS TO DEVELOPED APPLICATIONS VIA A MULTI-TENANT ON-DEMAND DATABASE SERVICE, by Craig Weissman, filed Sep. 21, 2007, which is incorporated in its entirety herein for all purposes. Invocations to applications may be detected by one or more system processes, which manages retrieving the application metadata 416 for the subscriber making the invocation and executing the metadata as an application in a virtual machine.
Each application server 400 may be communicably coupled to database systems, e.g., having access to the system data 325 and the tenant data 323, via a different network connection. For example, one application server 4001 might be coupled via the network 314 (e.g., the Internet), another application server 400N−1 might be coupled via a direct network link, and another application server 400N might be coupled by yet a different network connection. Transfer Control Protocol and Internet Protocol (TCP/IP) are typical protocols for communicating between application servers 400 and the database system. However, it will be apparent to one skilled in the art that other transport protocols may be used to optimize the system depending on the network interconnect used.
In certain embodiments, each application server 400 is configured to handle requests for any user associated with any organization that is a tenant. Because it is desirable to be able to add and remove application servers from the server pool at any time for any reason, there is preferably no server affinity for a user and/or organization to a specific application server 400. In one embodiment, therefore, an interface system implementing a load balancing function (e.g., an F5 Big-IP load balancer) is communicably coupled between the application servers 400 and the user systems 312 to distribute requests to the application servers 400. In one embodiment, the load balancer uses a least connections algorithm to route user requests to the application servers 400. Other examples of load balancing algorithms, such as round robin and observed response time, also may be used. For example, in certain embodiments, three consecutive requests from the same user could hit three different application servers 400, and three requests from different users could hit the same application server 400. In this manner, the system 316 is multi-tenant, wherein the system 316 handles storage of, and access to, different objects, data and applications across disparate users and organizations.
As an example of storage, one tenant might be a company that employs a sales force where each salesperson uses the system 316 to manage their sales process. Thus, a user might maintain contact data, leads data, customer follow-up data, performance data, goals and progress data, etc., all applicable to that user's personal sales process (e.g., in the tenant data storage 322). In an example of a MTS arrangement, since all of the data and the applications to access, view, modify, report, transmit, calculate, etc., may be maintained and accessed by a user system having nothing more than network access, the user can manage his or her sales efforts and cycles from any of many different user systems. For example, if a salesperson is visiting a customer and the customer has Internet access in their lobby, the salesperson can obtain critical updates as to that customer while waiting for the customer to arrive in the lobby.
While each user's data might be separate from other users' data regardless of the employers of each user, some data might be organization-wide data shared or accessible by a plurality of users or all of the users for a given organization that is a tenant. Thus, there might be some data structures managed by the system 316 that are allocated at the tenant level while other data structures might be managed at the user level. Because an MTS might support multiple tenants including possible competitors, the MTS should have security protocols that keep data, applications, and application use separate. Also, because many tenants may opt for access to an MTS rather than maintain their own system, redundancy, up-time, and backup are additional functions that may be implemented in the MTS. In addition to user-specific data and tenant specific data, the system 316 might also maintain system level data usable by multiple tenants or other data. Such system level data might include industry reports, news, postings, and the like that are sharable among tenants.
In certain embodiments, the user systems 312 (which may be client systems) communicate with the application servers 400 to request and update system-level and tenant-level data from the system 316 that may require sending one or more queries to the tenant data storage 322 and/or the system data storage 324. The system 316 (e.g., an application server 400 in the system 316) automatically generates one or more SQL statements (e.g., one or more SQL queries) that are designed to access the desired information. The system data storage 324 may generate query plans to access the requested data from the database.
Each database can generally be viewed as a collection of objects, such as a set of logical tables, containing data fitted into predefined categories. A “table” is one representation of a data object and may be used herein to simplify the conceptual description of objects and custom objects. It should be understood that “table” and “object” may be used interchangeably herein. Each table generally contains one or more data categories logically arranged as columns or fields in a viewable schema. Each row or record of a table contains an instance of data for each category defined by the fields. For example, a CRM database may include a table that describes a customer with fields for basic contact information such as name, address, phone number, fax number, etc. Another table might describe a purchase order, including fields for information such as customer, product, sale price, date, etc. In some multi-tenant database systems, standard entity tables might be provided for use by all tenants. For CRM database applications, such standard entities might include tables for Account, Contact, Lead, and Opportunity data, each containing pre-defined fields. It should be understood that the word “entity” may also be used interchangeably herein with “object” and “table”.
In some multi-tenant database systems, tenants may be allowed to create and store custom objects, or they may be allowed to customize standard entities or objects, for example by creating custom fields for standard objects, including custom index fields. U.S. Pat. No. 7,779,039, filed Apr. 2, 2004, entitled “Custom Entities and Fields in a Multi-Tenant Database System”, which is hereby incorporated herein by reference, teaches systems and methods for creating custom objects as well as customizing standard objects in a multi-tenant database system. In certain embodiments, for example, all custom entity data rows are stored in a single multi-tenant physical table, which may contain multiple logical tables per organization. It is transparent to customers that their multiple “tables” are in fact stored in one large table or that their data may be stored in the same table as the data of other customers.
While one or more implementations have been described by way of example and in terms of the specific embodiments, it is to be understood that one or more implementations are not limited to the disclosed embodiments. To the contrary, it is intended to cover various modifications and similar arrangements as would be apparent to those skilled in the art. Therefore, the scope of the appended claims should be accorded the broadest interpretation so as to encompass all such modifications and similar arrangements.