您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

什么是异常查找器?What is Anomaly Finder?

备注

异常情况检测程序 API (现在在公共预览版) 替换异常查找器实验室。The Anomaly Detector API (now in public preview) is replacing the Anomaly Finder lab. 现有异常查找器实验室将于 2019 年 4 月 30 日删除。Existing Anomaly Finder labs will be removed on April 30th, 2019. 我们鼓励您将在此时间之前迁移到异常情况检测程序。We encourage you to migrate to the Anomaly Detector before this time. 请参阅异常情况检测程序 API 文档有关详细信息。See the Anomaly Detector API documentation for more information.

通过异常查找器可随时间推移监视数据,并使用机器学习检测异常,机器学习会自动应用正确的统计模型来适应特定数据(不受行业、方案或数据量的影响)。Anomaly Finder enables you to monitor data over time and detect anomalies with machine learning that adapts to your unique data by automatically applying the right statistical model regardless of industry, scenario, or data volume. 异常查找器 API 将时间序列作为输入,返回指示数据点是否异常的结果,确定预期值以及可视化的上限和下限。Using a time series as input, the Anomaly Finder API returns whether or not a data point is an anomaly, determines the expected value, and upper and lower bounds for visualization. 异常查找器是预生成的 AI 服务,除需了解如何使用 RESTful API 外,无需任何机器学习专业知识。As a prebuilt AI service, Anomaly Finder doesn’t require any machine learning expertise beyond understanding how to use a RESTful API. 它可处理任何时序数据,还可构建到流数据系统中,让开发变得灵活便捷。This makes development simple and versatile since it works with any time series data and can also be built into streaming data systems. 异常查找器涵盖了各方面的用例,例如,用于管理欺诈、盗窃、市场变化和潜在商业事件的金融工具,或以匿名方式监视 IoT 设备流量。Anomaly Finder encompasses a broad span of use cases – for instance, financial tools for managing fraud, theft, changing markets, and potential business incidents, or monitoring IoT device traffic while preserving anonymity. 此解决方案还可货币化为某服务的一部分,便于最终客户了解数据、支出、投资回报或用户活动的变化。This solution can also be monetized as part of a service for end-customers to understand changes in data, spending, return on investment, or user activity. 试用异常查找器 AP,深入了解数据。Try out the Anomaly Finder API and gain deeper understanding of your data.

了解使用此 API 可构建的内容:See what you can build with this API:

  • 学习如何根据时间序列中的历史数据预测预期值Learn to predict the expected values based on historical data in the time series
  • 判断数据点是否异于历史模式Tell whether a data point is an anomaly out of historical pattern
  • 生成一个区段以显示“正常”值的范围Generate a band to visualize the range of "normal" value

异常查找器

图 1:检测销售收入中的异常Fig. 1: Detect anomalies in sales revenues

异常查找器

图 2:检测服务请求中的模式更改Fig. 2: Detect pattern changes in service requests

要求Requirements

  • 输入时序的最小数据:最少 13 个无明确周期的时序数据点,最少 4 轮周期已知的时序数据点。Minimum data for input time series: Minimum of 13 data points for time series without clear periodicity, minimum of 4 cycles of data points for the time series with known periodicity.
  • 数据完整性:时序数据点按相同时间间隔划分,且无数据点丢失。Data integrity: time series data points are separated in the same interval and no missing points.

识别异常Identify anomalies

异常情况检测 API 返回结果,指示给定数据点是否异常,并提供如下所示的其他信息Anomaly detection API returns result that whether any given data points are anomalies or not, and provides additional information as follows

  • Period - API 检测异常点时所采用的检测周期。Period - The periodicity that the API used to detect the anomaly points.
  • WarningText - 可能的警告信息。WarningText - The possible warning information.
  • ExpectedValue - 由基于学习的模型所预测的值ExpectedValue - The predicted value by the learning based model
  • IsAnomaly - 用于指示数据点是否异常的结果IsAnomaly - The result on whether the data points are anomalies or not
  • IsAnomaly_Neg - 用于指示负向(下降)数据点是否异常的结果IsAnomaly_Neg - The result on whether the data points are anomalies in negative direction (dips)
  • IsAnomaly_Pos - 用于指示正向(峰值)数据点是否异常的结果IsAnomaly_Pos - The result on whether the data points are anomalies in positive direction (spikes)
  • UpperMargin - ExpectedValue 和 UpperMargin 的总和用于确定数据点正常范围的上限UpperMargin - The sum of ExpectedValue and UpperMargin determines the upper bound that data point is still thought as normal
  • LowerMargin - (ExpectedValue - LowerMargin) 用于确定数据点正常范围的下限LowerMargin - (ExpectedValue - LowerMargin) determines the lower bound that data point is still thought as normal

备注

UpperMargin 和 LowerMargin 可用于生成包含实际时间序列的区段,用于直观显示正常值的范围。UpperMargin and LowerMargin can be used to generate a band around actual time series to visualize the range of normal values.

调整响应后处理中的下限和上限Adjusting lower and upper bounds in post processing on the response

异常情况检测 API 返回指示数据点是否异常的默认结果,且可通过 ExpectedValue 和 UpperMargin/LowerMargin 计算出上限和下限。Anomaly detection API returns default result on whether a data point is anomaly or not, and the upper and lower bound can be calculated from ExpectedValue and UpperMargin/LowerMargin. 在大多情况下,这些默认值足以满足需要。Those default values should work just fine for most cases. 然而,某些应用情景所需限值与默认限值不同。However, some scenarios require different bounds than the default ones. 建议对 UpperMargin 或 LowerMargin 应用系数来调整动态界限。The recommend practice is applying a coefficiency on the UpperMargin or LowerMargin to adjust the dynamic bounds.

系数分别为 1/1.5/2 时的相应示例Examples with 1/1.5/2 as coefficiency

默认敏感度

敏感度 1.5

敏感度 2

包含示例数据的请求Request with sample data

{
  "Period": 7,
  "Points": [
    {
      "Timestamp": "2018-03-01T00:00:00Z",
      "Value": 32858923
    },
    {
      "Timestamp": "2018-03-02T00:00:00Z",
      "Value": 29615278
    },
    {
      "Timestamp": "2018-03-03T00:00:00Z",
      "Value": 22839355
    },
    {
      "Timestamp": "2018-03-04T00:00:00Z",
      "Value": 25948736
    },
    {
      "Timestamp": "2018-03-05T00:00:00Z",
      "Value": 34139159
    },
    {
      "Timestamp": "2018-03-06T00:00:00Z",
      "Value": 33843985
    },
    {
      "Timestamp": "2018-03-07T00:00:00Z",
      "Value": 33637661
    },
    {
      "Timestamp": "2018-03-08T00:00:00Z",
      "Value": 32627350
    },
    {
      "Timestamp": "2018-03-09T00:00:00Z",
      "Value": 29881076
    },
    {
      "Timestamp": "2018-03-10T00:00:00Z",
      "Value": 22681575
    },
    {
      "Timestamp": "2018-03-11T00:00:00Z",
      "Value": 24629393
    },
    {
      "Timestamp": "2018-03-12T00:00:00Z",
      "Value": 34010679
    },
    {
      "Timestamp": "2018-03-13T00:00:00Z",
      "Value": 33893888
    },
    {
      "Timestamp": "2018-03-14T00:00:00Z",
      "Value": 33760076
    },
    {
      "Timestamp": "2018-03-15T00:00:00Z",
      "Value": 33093515
    },
    {
      "Timestamp": "2018-03-16T00:00:00Z",
      "Value": 29945555
    },
    {
      "Timestamp": "2018-03-17T00:00:00Z",
      "Value": 22676212
    },
    {
      "Timestamp": "2018-03-18T00:00:00Z",
      "Value": 25262514
    },
    {
      "Timestamp": "2018-03-19T00:00:00Z",
      "Value": 33631649
    },
    {
      "Timestamp": "2018-03-20T00:00:00Z",
      "Value": 34468310
    },
    {
      "Timestamp": "2018-03-21T00:00:00Z",
      "Value": 34212281
    },
    {
      "Timestamp": "2018-03-22T00:00:00Z",
      "Value": 38144434
    },
    {
      "Timestamp": "2018-03-23T00:00:00Z",
      "Value": 34662949
    },
    {
      "Timestamp": "2018-03-24T00:00:00Z",
      "Value": 24623684
    },
    {
      "Timestamp": "2018-03-25T00:00:00Z",
      "Value": 26530491
    },
    {
      "Timestamp": "2018-03-26T00:00:00Z",
      "Value": 35445003
    },
    {
      "Timestamp": "2018-03-27T00:00:00Z",
      "Value": 34250789
    },
    {
      "Timestamp": "2018-03-28T00:00:00Z",
      "Value": 33423012
    },
    {
      "Timestamp": "2018-03-29T00:00:00Z",
      "Value": 30744783
    },
    {
      "Timestamp": "2018-03-30T00:00:00Z",
      "Value": 25825128
    },
    {
      "Timestamp": "2018-03-31T00:00:00Z",
      "Value": 21244209
    },
    {
      "Timestamp": "2018-04-01T00:00:00Z",
      "Value": 22576956
    },
    {
      "Timestamp": "2018-04-02T00:00:00Z",
      "Value": 31957221
    },
    {
      "Timestamp": "2018-04-03T00:00:00Z",
      "Value": 33841228
    },
    {
      "Timestamp": "2018-04-04T00:00:00Z",
      "Value": 33554483
    },
    {
      "Timestamp": "2018-04-05T00:00:00Z",
      "Value": 32383350
    },
    {
      "Timestamp": "2018-04-06T00:00:00Z",
      "Value": 29494850
    },
    {
      "Timestamp": "2018-04-07T00:00:00Z",
      "Value": 22815534
    },
    {
      "Timestamp": "2018-04-08T00:00:00Z",
      "Value": 25557267
    },
    {
      "Timestamp": "2018-04-09T00:00:00Z",
      "Value": 34858252
    },
    {
      "Timestamp": "2018-04-10T00:00:00Z",
      "Value": 34750597
    },
    {
      "Timestamp": "2018-04-11T00:00:00Z",
      "Value": 34717956
    },
    {
      "Timestamp": "2018-04-12T00:00:00Z",
      "Value": 34132534
    },
    {
      "Timestamp": "2018-04-13T00:00:00Z",
      "Value": 30762236
    },
    {
      "Timestamp": "2018-04-14T00:00:00Z",
      "Value": 22504059
    },
    {
      "Timestamp": "2018-04-15T00:00:00Z",
      "Value": 26149060
    },
    {
      "Timestamp": "2018-04-16T00:00:00Z",
      "Value": 35250105
    }
  ]
}

示例 JSON 响应Sample JSON response

{  
    "Period":7,
    "ExpectedValue":[  
        32894418.9615615,
        29707932.24471988,
        22651867.032410353,
        24943247.98913801,
        34098022.11082705,
        33893733.15343374,
        33668289.17375017,
        32807561.144138098,
        29618567.705954053,
        22584659.813523095,
        24896916.283606086,
        34092130.34860708,
        33930369.33544473,
        33771835.54784974,
        32979718.237272907,
        29873907.686442,
        22898518.640143186,
        25266675.592631694,
        34498225.710081585,
        34392110.769727185,
        34264840.807082534,
        33364403.57465193,
        30135700.933649357,
        23027724.20007864,
        25265911.829021864,
        34436837.95171797,
        34250788.99625075,
        33423011.962283727,
        31961651.40533486,
        29172725.64651445,
        22514221.39222613,
        24890134.85738833,
        34129441.48751191,
        33864058.08414464,
        33577519.658487104,
        32851940.511712912,
        29798095.95636674,
        22918033.675673913,
        25384135.75749503,
        34746812.760001436,
        34752514.68434451,
        34634850.418293975,
        33883602.629261605,
        30764952.72634012,
        23776724.327950727,
        26128787.792423487,
        35344244.421857625
    ],
    "IsAnomaly":[  
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        true,
        true,
        true,
        true,
        false,
        false,
        false,
        false,
        true,
        true,
        true,
        true,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false
    ],
    "IsAnomaly_Neg":[  
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        true,
        true,
        true,
        true,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false
    ],
    "IsAnomaly_Pos":[  
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        true,
        true,
        true,
        true,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false
    ],
    "UpperMargin":[  
        1644720.9480780752,
        1485396.612235994,
        1132593.3516205177,
        1247162.3994569005,
        1704901.1055413526,
        1694686.6576716872,
        1683414.4586875085,
        1640378.057206905,
        1480928.3852977026,
        1129232.9906761548,
        1244845.8141803043,
        1704606.517430354,
        1696518.4667722369,
        1688591.777392487,
        1648985.9118636455,
        1493695.3843221,
        1144925.9320071593,
        1263333.7796315849,
        1724911.2855040794,
        1719605.5384863594,
        1713242.0403541268,
        1668220.1787325966,
        1506785.046682468,
        1151386.210003932,
        1263295.5914510933,
        1721841.8975858986,
        1712539.4498125375,
        1671150.5981141864,
        1598082.5702667432,
        1458636.2823257225,
        1125711.0696113065,
        1244506.7428694165,
        1706472.0743755957,
        1693202.904207232,
        1678875.9829243552,
        1642597.0255856458,
        1489904.797818337,
        1145901.6837836958,
        1269206.7878747517,
        1737340.638000072,
        1737625.7342172256,
        1731742.520914699,
        1694180.1314630804,
        1538247.636317006,
        1188836.2163975365,
        1306439.3896211744,
        1767212.2210928814
    ],
    "LowerMargin":[  
        1644720.9480780752,
        1485396.612235994,
        1132593.3516205177,
        1247162.3994569005,
        1704901.1055413526,
        1694686.6576716872,
        1683414.4586875085,
        1640378.057206905,
        1480928.3852977026,
        1129232.9906761548,
        1244845.8141803043,
        1704606.517430354,
        1696518.4667722369,
        1688591.777392487,
        1648985.9118636455,
        1493695.3843221,
        1144925.9320071593,
        1263333.7796315849,
        1724911.2855040794,
        1719605.5384863594,
        1713242.0403541268,
        1668220.1787325966,
        1506785.046682468,
        1151386.210003932,
        1263295.5914510933,
        1721841.8975858986,
        1712539.4498125375,
        1671150.5981141864,
        1598082.5702667432,
        1458636.2823257225,
        1125711.0696113065,
        1244506.7428694165,
        1706472.0743755957,
        1693202.904207232,
        1678875.9829243552,
        1642597.0255856458,
        1489904.797818337,
        1145901.6837836958,
        1269206.7878747517,
        1737340.638000072,
        1737625.7342172256,
        1731742.520914699,
        1694180.1314630804,
        1538247.636317006,
        3523071.2279507257,
        1306439.3896211744,
        1767212.2210928814
    ],
   "WarningText":""
}