TWI848481B - Predicting and alerting system and method, modeling and training systems and methods of information system operation and computer program products thereof - Google Patents
Predicting and alerting system and method, modeling and training systems and methods of information system operation and computer program products thereof Download PDFInfo
- Publication number
- TWI848481B TWI848481B TW111149645A TW111149645A TWI848481B TW I848481 B TWI848481 B TW I848481B TW 111149645 A TW111149645 A TW 111149645A TW 111149645 A TW111149645 A TW 111149645A TW I848481 B TWI848481 B TW I848481B
- Authority
- TW
- Taiwan
- Prior art keywords
- data
- prediction
- historical
- vector
- matrix
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 77
- 238000012549 training Methods 0.000 title claims abstract description 60
- 238000004590 computer program Methods 0.000 title claims description 7
- 230000002159 abnormal effect Effects 0.000 claims abstract description 16
- 239000013598 vector Substances 0.000 claims description 268
- 239000011159 matrix material Substances 0.000 claims description 255
- 238000012795 verification Methods 0.000 claims description 22
- 230000005856 abnormality Effects 0.000 abstract description 13
- 238000004364 calculation method Methods 0.000 description 42
- 238000010586 diagram Methods 0.000 description 26
- 238000009499 grossing Methods 0.000 description 5
- 101000827703 Homo sapiens Polyphosphoinositide phosphatase Proteins 0.000 description 2
- 102100023591 Polyphosphoinositide phosphatase Human genes 0.000 description 2
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 2
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 230000003247 decreasing effect Effects 0.000 description 2
- 238000013136 deep learning model Methods 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 239000000284 extract Substances 0.000 description 2
- 230000000737 periodic effect Effects 0.000 description 2
- 230000003044 adaptive effect Effects 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 230000035945 sensitivity Effects 0.000 description 1
- 230000007306 turnover Effects 0.000 description 1
- 238000010200 validation analysis Methods 0.000 description 1
Landscapes
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
- Alarm Systems (AREA)
Abstract
本發明提供一種資訊系統運作之預測與告警系統及方法,針對一系統數據的歷史資料,透過一建模訓練模組來決定一預測告警模組的最佳參數,使該預測告警模組基於該參數計算該系統數據的運作資料的一預測序列,並據以比對該預測序列與對應實際的運作資料,進而決定該系統數據對應實際的運作資料是否發生異常,而輸出一異常通知。 The present invention provides a prediction and alarm system and method for information system operation. For historical data of a system data, a modeling training module is used to determine the optimal parameters of a prediction alarm module, so that the prediction alarm module calculates a prediction sequence of the operation data of the system data based on the parameters, and compares the prediction sequence with the corresponding actual operation data, thereby determining whether the system data corresponding to the actual operation data is abnormal, and outputting an abnormality notification.
Description
本發明係有關一種預測與告警系統及方法,特別是一種對於資訊系統運作所產生的系統數據之預測與告警系統及方法,及其建模與訓練系統及方法。 The present invention relates to a prediction and alarm system and method, in particular, a prediction and alarm system and method for system data generated by the operation of an information system, and a modeling and training system and method thereof.
隨著軟體技術突飛猛進與資通訊網路蓬勃發展的長足進步,企業營運的資訊系統也不斷地擴張,無論是伺服器、主機設備與網路通訊基礎建設等的正常運作,還是會計、工廠維運、客服通話服務等相關日常業務都是屬資訊系統的範疇。 With the rapid development of software technology and the rapid growth of information and communication networks, the information systems of corporate operations are also expanding. Whether it is the normal operation of servers, host equipment, and network communication infrastructure, or related daily operations such as accounting, factory maintenance, and customer service calls, they all fall within the scope of information systems.
對於資訊系統運作所產生的系統數據,習知預測與告警系統及方法多利用移動平均線與統計中的標準差方式來偵測系統數據中的異常狀況。由於該些方法沒有辦法考慮到週期性的因素,例如半夜關機,週末使用量變小等,若因上述等影響週期上的因素容易導致資訊系統運作時判斷錯誤,而誤將正常判斷為異常,會造成需耗費大量的工時進行修正或者排 除異常的發生。在多數資訊系統中一旦判斷錯誤而發出錯誤的異常警訊,會導致要系統重啟或是人工排除異常,這將使企業營運蒙受損失與效率降低,此等問題來自於無法對資訊系統運作建立有效的預測與告警模型。 For the system data generated by the operation of the information system, the learning prediction and alarm systems and methods mostly use the moving average and the standard deviation method in statistics to detect abnormal conditions in the system data. Since these methods cannot take into account cyclical factors, such as shutdown in the middle of the night, reduced usage on weekends, etc., if the above factors affect the cycle, it is easy to cause misjudgment during the operation of the information system, and misjudge the normal as abnormal, it will cost a lot of man-hours to correct or eliminate the occurrence of abnormalities. In most information systems, once an error is made in judgment and an erroneous abnormality alarm is issued, the system will need to be restarted or the abnormality will be manually eliminated, which will cause losses to the business operation and reduce efficiency. These problems come from the inability to establish an effective prediction and alarm model for the operation of the information system.
要建立有效的預測與告警模型,需要針對企業自身的營運數據與內部系統數據進行建模與訓練。因此,如何建立出能夠準確預測系統數據之預測與告警模型,為目前資訊產業亟待解決的重要問題。 To establish an effective prediction and alarm model, it is necessary to model and train the enterprise's own operating data and internal system data. Therefore, how to establish a prediction and alarm model that can accurately predict system data is an important issue that the current information industry needs to solve.
有鑒於此,本發明的目的之一在於提供一種預測與告警系統及方法,能夠在資訊系統運作的系統數據中,透過深度學習之模型找出不符合預期模式的觀測值,並據以判斷為異常。 In view of this, one of the purposes of the present invention is to provide a prediction and alarm system and method, which can find observations that do not conform to the expected pattern in the system data of the information system operation through a deep learning model and judge them as abnormal.
本發明的另一目的在於提供一種建模與訓練系統及方法,能夠針對企業自身的營運數據與內部系統數據進行建模與訓練,透過深度學習之模型找出一預測告警模組的最佳參數。 Another purpose of the present invention is to provide a modeling and training system and method that can model and train the enterprise's own operating data and internal system data, and find the optimal parameters of a prediction alarm module through a deep learning model.
為達到上述發明目的,本發明提供一種資訊系統運作的預測與告警方法,包括以下步驟:由一輸出入模組從一資訊系統持續接收一系統數據儲存於一資料庫,該系統數據包含一具有時間序列的運作資料;以及由一預測告警模組執行以下程序:根據一數據數量n、一週期數量m以及一標準差倍數k的值,讀取該資料庫儲存的該運作資料,並根據一時點從該運作資料依據該時間序列擷取多個m個週期的數據向量[n×1],每一數據向量[n×1]具有n個數據量元素,其中n、m為正整數,k的值為實數;依序將該多個m個週期的數據向量[n×1]進行:指派至一數據矩陣[n×m],根據該數據矩陣[n×m],生成一平均向量[n×1]與一標準 差向量[n×1],再根據該平均向量[n×1]、該標準差向量[n×1]與該標準差倍數k的值以生成一預測向量[n×1];比對該多個預測向量[n×1]的數據元素與該運作資料在該時間序列的該多個對應週期的數據向量[n×1]的數據元素,以獲得一比對結果;以及,根據該比對結果,以決定是否通知該輸出入模組輸出一異常通知。 To achieve the above-mentioned purpose of the invention, the present invention provides a prediction and alarm method for information system operation, comprising the following steps: an input/output module continuously receives a system data from an information system and stores it in a database, wherein the system data includes an operation data with a time series; and a prediction and alarm module executes the following procedure: according to a data quantity n, a cycle quantity m and a value of a standard deviation multiple k, the operation data stored in the database is read, and according to a time point, a plurality of data vectors [n×1] of m cycles are extracted from the operation data according to the time series, wherein each data vector [n×1] has n data quantity elements, wherein n and m are positive integers, and the value of k is a real number. ; sequentially assign the data vectors [n×1] of the multiple m cycles to a data matrix [n×m], generate an average vector [n×1] and a standard deviation vector [n×1] according to the data matrix [n×m], and then generate a prediction vector [n×1] according to the average vector [n×1], the standard deviation vector [n×1] and the value of the standard deviation multiple k; compare the data elements of the multiple prediction vectors [n×1] with the data elements of the data vectors [n×1] of the multiple corresponding cycles of the operation data in the time series to obtain a comparison result; and, according to the comparison result, determine whether to notify the input/output module to output an abnormal notification.
為達到上述發明目的,本發明復提供一種資訊系統運作之建模與訓練方法,包括以下步驟:由一輸出入模組從一資訊系統接收一系統數據儲存於一資料庫,該系統數據包含一具有時間序列的歷史資料;以及由一建模訓練模組執行以下程序:讀取該資料庫儲存的該歷史資料,並根據一歷史時點從該歷史資料依據該時間序列擷取多個m個週期的歷史數據向量[n×1],每一歷史數據向量[n×1]具有n個數據元素,其中n、m為正整數;依序將該多個m個週期的歷史數據向量[n×1]進行:指派至一歷史數據矩陣[n×m],根據該歷史數據矩陣[n×m],生成一歷史平均向量[n×1]與一歷史標準差向量[n×1],再根據該歷史平均向量[n×1]、該歷史標準差向量[n×1]與一歷史標準差倍數k生成一歷史預測向量[n×1],其中k的值為實數;比對該歷史預測向量[n×1]的數據元素與該歷史資料在該時間序列的該多個對應週期的歷史數據向量[n×1]的數據元素,以獲得一驗證結果;以及,根據該驗證結果,以決定該n、m以及k的值是否用於該系統數據的一運作資料之預測與告警。 To achieve the above-mentioned purpose, the present invention further provides a modeling and training method for information system operation, comprising the following steps: receiving a system data from an information system and storing it in a database by an input/output module, wherein the system data includes historical data with a time series; and executing the following procedure by a modeling training module: reading the historical data stored in the database, and extracting a plurality of m-period historical data vectors [n×1] from the historical data according to the time series at a historical point in time, wherein each historical data vector [n×1] has n data elements, wherein n and m are positive integers; sequentially assigning the plurality of m-period historical data vectors [n×1] to a historical data Matrix [n×m], generate a historical average vector [n×1] and a historical standard deviation vector [n×1] according to the historical data matrix [n×m], and then generate a historical prediction vector [n×1] according to the historical average vector [n×1], the historical standard deviation vector [n×1] and a historical standard deviation multiple k, wherein the value of k is a real number; compare the data elements of the historical prediction vector [n×1] with the data elements of the historical data vector [n×1] of the multiple corresponding cycles of the historical data in the time series to obtain a verification result; and, according to the verification result, determine whether the values of n, m and k are used for the prediction and alarm of an operation data of the system data.
為達到上述發明目的,本發明再提供一種電腦程式產品,用於一資訊系統的運作之預測與告警,經由一電腦系統載入該程式執行:使一處理器讀取一資料庫儲存的一系統數據,該系統數據包含該資訊系統的一具有時間序列的運作資料;使該處理器根據一時點從該運作資料依據該時 間序列擷取多個m個週期的數據向量[n×1],每一數據向量[n×1]具有n個數據元素,其中n、m為正整數;使該處理器依序將該多個m個週期的數據向量[n×1]進行:指派至一數據矩陣[n×m],根據該數據矩陣[n×m],生成一平均向量[n×1]與一標準差向量[n×1],再根據該平均向量[n×1]、該標準差向量[n×1]與一標準差倍數k的值以生成一預測向量[n×1],其中k的值為實數;使該處理器比對該運作資料在該時間序列的該多個對應週期的數據向量[n×1]的數據元素與該預測向量[n×1]的數據元素,以獲得一比對結果;以及,使該處理器根據該比對結果,決定是否通知一輸出入模組輸出一異常通知。 To achieve the above-mentioned invention object, the present invention further provides a computer program product for prediction and alarm of operation of an information system. The program is loaded into a computer system for execution: a processor is caused to read a system data stored in a database, the system data including operation data of the information system with a time series; the processor is caused to extract a plurality of data vectors [n×1] of m periods from the operation data according to the time series at a time point, each data vector [n×1] having n data elements, wherein n and m are positive integers; the processor is caused to sequentially assign the plurality of data vectors [n×1] of m periods to a data According to the matrix [n×m], according to the data matrix [n×m], a mean vector [n×1] and a standard deviation vector [n×1] are generated, and then a prediction vector [n×1] is generated according to the mean vector [n×1], the standard deviation vector [n×1] and a value of a standard deviation multiple k, wherein the value of k is a real number; the processor is made to compare the data elements of the data vector [n×1] of the operation data in the multiple corresponding cycles of the time series with the data elements of the prediction vector [n×1] to obtain a comparison result; and the processor is made to determine whether to notify an input/output module to output an abnormal notification according to the comparison result.
為達到上述發明目的,本發明更提供一種電腦程式產品,用於一資訊系統的運作之建模與訓練,經由一電腦系統載入該程式執行:使一處理器讀取一資料庫儲存的一系統數據,該系統數據包含該資訊系統的一具有時間序列的歷史資料;使該處理器根據一歷史時點從該歷史資料依據該時間序列擷取多個m個週期的歷史數據向量[n×1],每一歷史數據向量[n×1]具有n個數據元素,其中n、m為正整數;使該處理器依序將該多個m個週期的歷史數據向量[n×1]進行:指派至一歷史數據矩陣[n×m],根據該歷史數據矩陣[n×m],生成一歷史平均向量[n×1]與一歷史標準差向量[n×1],再根據該歷史平均向量[n×1]、該歷史標準差向量[n×1]與一歷史標準差倍數k以生成一歷史預測向量[n×1],其中k的值為實數;比對該歷史預測向量[n×1]的數據元素與該歷史資料在該時間序列的該對應週期的歷史數據向量[n×1]的數據元素,以獲得一驗證結果;以及,使該處理器根據該 驗證結果,以決定該n、m以及k的值是否用於該系統數據的一運作資料之預測與告警。 To achieve the above-mentioned purpose of the invention, the present invention further provides a computer program product for modeling and training the operation of an information system. The program is loaded into a computer system and executed to: enable a processor to read a system data stored in a database, wherein the system data includes a historical data of the information system having a time series; enable the processor to extract a plurality of m-period historical data vectors [n×1] from the historical data according to the time series at a historical time point, wherein each historical data vector [n×1] has n data elements, wherein n and m are positive integers; enable the processor to sequentially assign the plurality of m-period historical data vectors [n×1] to a historical data matrix [n×m ], generate a historical average vector [n×1] and a historical standard deviation vector [n×1] according to the historical data matrix [n×m], and then generate a historical prediction vector [n×1] according to the historical average vector [n×1], the historical standard deviation vector [n×1] and a historical standard deviation multiple k, wherein the value of k is a real number; compare the data elements of the historical prediction vector [n×1] with the data elements of the historical data vector [n×1] of the corresponding period of the historical data in the time series to obtain a verification result; and, enable the processor to determine whether the values of n, m and k are used for the prediction and alarm of an operation data of the system data according to the verification result.
為達到上述發明目的,本發明又提供一種資訊系統運作之預測與告警系統,包含:一資料庫,儲存一資訊系統的一系統數據,該系統數據包含一具有時間序列的運作資料;一輸出入模組,連接該資訊系統與該資料庫,並從該資訊系統接收該系統數據;以及一預測告警模組,連接該輸出入模組與該資料庫,並執行:根據一數據週期n、一週期數量m以及一標準差倍數k的值,讀取該資料庫儲存的該運作資料,並根據一時點從該運作資料依據該時間序列擷取多個m個週期的數據向量[n×1],每一數據向量[n×1]具有n個數據元素,其中n、m為正整數,k的值為實數;依序將該多個m個週期的數據向量[n×1]進行:指派至為一數據矩陣[n×m],根據該數據矩陣[n×m],生成一平均向量[n×1]與一標準差向量[n×1],再根據該平均向量[n×1]、該標準差向量[n×1]與該標準差倍數k的值以生成一預測向量[n×1];比對該預測向量[n×1]的數據元素與該運作資料在該時間序列的該對應週期的數據向量[n×1]的數據元素,以獲得一比對結果;以及,根據該比對結果,以決定是否通知該輸出入模組輸出一異常通知。 In order to achieve the above-mentioned invention object, the present invention also provides a prediction and alarm system for information system operation, comprising: a database, storing a system data of an information system, the system data comprising an operation data with a time series; an input/output module, connecting the information system and the database, and receiving the system data from the information system; and a prediction alarm module, connecting the input/output module and the database, and executing: according to a data cycle n, a cycle number m and a standard deviation multiple k, reading the operation data stored in the database, and extracting a plurality of data vectors [n×1] of m cycles from the operation data according to the time series at a time point, each data vector [n×1] having n data elements elements, wherein n and m are positive integers, and the value of k is a real number; sequentially assigning the data vectors [n×1] of the multiple m periods to a data matrix [n×m], generating a mean vector [n×1] and a standard deviation vector [n×1] according to the data matrix [n×m], and then generating a prediction vector [n×1] according to the mean vector [n×1], the standard deviation vector [n×1] and the value of the standard deviation multiple k; comparing the data elements of the prediction vector [n×1] with the data elements of the data vector [n×1] of the corresponding period of the operation data in the time series to obtain a comparison result; and, according to the comparison result, determining whether to notify the input/output module to output an abnormal notification.
為達到上述發明目的,本發明又提供一種資訊系統運作之建模與訓練系統,包含:一資料庫,儲存一資訊系統的一系統數據,該系統數據包含一具有時間序列的歷史資料;以及一建模訓練模組,連接該資料庫,並執行:讀取該資料庫儲存的該歷史資料,並根據一歷史時點從該歷史資料依據該時間序列擷取多個m個週期的歷史數據向量[n×1],每一歷史數據向量[n×1]具有n個數據元素,其中n、m為正整數;依序將該多個m個週期 的歷史數據向量[n×1]進行:指派至一歷史數據矩陣[n×m],根據該歷史數據矩陣[n×m],生成一歷史平均向量[n×1]與一歷史標準差向量[n×1],再根據該歷史平均向量[n×1]、該歷史標準差向量[n×1]與一歷史標準差倍數k以生成一歷史預測向量[n×1],其中k的值為實數;比對該歷史預測向量[n×1]的數據元素與該歷史資料在該時間序列的該對應週期的歷史數據向量[n×1]的數據元素,以獲得一驗證結果;以及根據該驗證結果,以決定該n、m以及k的值是否用於該系統數據的一運作資料之預測與告警。 To achieve the above-mentioned invention purpose, the present invention also provides a modeling and training system for information system operation, comprising: a database storing system data of an information system, the system data comprising historical data with a time series; and a modeling training module connected to the database and executing: reading the historical data stored in the database, and extracting a plurality of m-period historical data vectors [n×1] from the historical data according to the time series at a historical point in time, each historical data vector [n×1] having n data elements, wherein n and m are positive integers; sequentially assigning the plurality of m-period historical data vectors [n×1] to a historical data matrix [ n×m], generate a historical average vector [n×1] and a historical standard deviation vector [n×1] according to the historical data matrix [n×m], and then generate a historical prediction vector [n×1] according to the historical average vector [n×1], the historical standard deviation vector [n×1] and a historical standard deviation multiple k, wherein the value of k is a real number; compare the data elements of the historical prediction vector [n×1] with the data elements of the historical data vector [n×1] of the corresponding period of the historical data in the time series to obtain a verification result; and determine whether the values of n, m and k are used for the prediction and alarm of an operation data of the system data according to the verification result.
綜上所述,根據本發明所實施的預測與告警系統及方法,及其建模與訓練系統及方法,利用一建模訓練模組透過系統數據的歷史資料來計算一歷史預測向量,據以驗證出適用於一預測告警模組的最佳參數,達到更準確的預測與告警率;而該最佳參數供該預測告警模組透過系統數據的運作資料來計算一預測向量,據以比對實際的運作資料判斷是否發生異常,而決定是否輸出一異常通知。此外,本發明利用卷積運算與適配之遮罩矩陣設計而獲得一平滑預測序列,可降低預測異常的敏感度以增加系統運作穩定度。 In summary, according to the prediction and alarm system and method implemented by the present invention, and the modeling and training system and method thereof, a modeling training module is used to calculate a historical prediction vector through the historical data of the system data, and the optimal parameters applicable to a prediction alarm module are verified to achieve a more accurate prediction and alarm rate; and the optimal parameters are used by the prediction alarm module to calculate a prediction vector through the operation data of the system data, and the actual operation data is compared to determine whether an abnormality occurs, and whether to output an abnormality notification. In addition, the present invention uses convolution operations and adaptive mask matrix design to obtain a smooth prediction sequence, which can reduce the sensitivity of prediction abnormalities to increase the stability of system operation.
此外,本發明係可針對資訊系統的運作產生之大量系統數據進行處理,例如:營運數據包含有即時訂單數GMV(Gross Merchandise Volume)、營業額、消費金額、上線人數、PV(Page View)、RV(Repeat Visitors)、UV(Unique Visitor)、IP數、流量來源、地區、使用裝置、使用者瀏覽事件、服務網站或應用程式操作行為、客服通話記錄…等;內部系統數據包含有系統LOG、基礎設施運行資料、系統指標如:CPU、記憶體用量、I/O數(Read/Write PS)、網路流出/入量、封包流出/入量、彈 性開啟的機器/叢集數量、Swap數、QPS(Queries Per Second)、RPS、DB連線數、機器回應時間…等。 In addition, the present invention can process a large amount of system data generated by the operation of the information system, for example: operation data includes real-time order number GMV (Gross Merchandise Volume), turnover, consumption amount, number of online users, PV (Page View), RV (Repeat Visitors), UV (Unique Visitor), IP number, traffic source, region, device used, user browsing event, service website or application operation behavior, customer service call record, etc.; internal system data includes system LOG, infrastructure operation data, system indicators such as: CPU, memory usage, I/O number (Read/Write PS), network outflow/inflow, packet outflow/inflow, number of flexible open machines/clusters, Swap number, QPS (Queries Per Second), etc. Second), RPS, number of DB connections, machine response time, etc.
1:資訊系統 1: Information system
2:系統數據資料庫 2: System data database
3:輸出入模組 3: Input and output module
4:預測告警資料庫 4: Prediction and alarm database
5:預測告警模組 5: Prediction and alarm module
6:建模訓練模組 6: Modeling training module
7:對準位置 7: Alignment position
8:計算範圍 8: Calculation range
10:預測與告警系統 10: Prediction and warning system
X:數據矩陣/歷史數據矩陣 X : Data matrix/historical data matrix
Y:預測矩陣/歷史預測矩陣 Y : Forecast matrix/historical forecast matrix
M:遮罩矩陣 M: mask matrix
S:平滑預測序列/平滑歷史預測序 列 S : Smoothed forecast series/smoothed historical forecast series
L:批次歷史資料量/批次運作資料量 L: Batch history data volume/batch operation data volume
:平均向量/歷史平均向量 :Average vector/historical average vector
:標準差向量/歷史標準差向量 :Standard deviation vector/historical standard deviation vector
:預測向量/歷史預測向量 :Prediction vector/historical prediction vector
S101~S111:步驟 S101~S111: Steps
S201~S212:步驟 S201~S212: Steps
圖1為本發明資訊系統運作之預測與告警系統的架構圖。 Figure 1 is a diagram of the architecture of the prediction and alarm system of the information system operation of the present invention.
圖2為本發明資訊系統運作之預測與告警方法的流程圖。 Figure 2 is a flow chart of the prediction and alarm method of the information system operation of the present invention.
圖3為本發明資訊系統運作之預測與告警方法依時間序列依序指派至數據矩陣以求出平滑預測矩陣,據以進行比對之示意圖。 Figure 3 is a schematic diagram showing the prediction and alarm method of the information system of the present invention, which assigns the data matrix in sequence according to the time series to obtain the smooth prediction matrix for comparison.
圖4為本發明資訊系統運作之預測與告警方法依時間序列自p週期起的運作資料與預測序列進行比對的示意圖。 Figure 4 is a schematic diagram of the prediction and alarm method for the operation of the information system of the present invention, which compares the operation data from the pth cycle with the prediction sequence according to the time series.
圖5為本發明資訊系統運作之建模與訓練方法的流程圖。 Figure 5 is a flow chart of the modeling and training method for the operation of the information system of the present invention.
圖6為本發明資訊系統運作之建模與訓練方法依時間序列多次指派至該歷史數據矩陣以求出之平滑歷史預測矩陣,據以進行基於該組n、m、k值的驗證結果之示意圖。 FIG6 is a schematic diagram showing the validation results based on the set of n, m, and k values by assigning the modeling and training method of the information system operation of the present invention to the historical data matrix multiple times according to the time series to obtain the smoothed historical prediction matrix.
圖7A為本發明資訊系統運作之建模與訓練方法自p週期起基於歷史資料與該組n、m、k值所計算的歷史預測序列之密合度進行驗證的示意圖。 FIG7A is a schematic diagram of the modeling and training method of the information system operation of the present invention for verifying the fit of the historical prediction sequence calculated based on historical data and the set of n, m, and k values since period p.
圖7B為本發明資訊系統運作之建模與訓練方法自p週期起以歷史資料之歷史異常來驗證該組n、m、k值所計算的歷史預測序列的示意圖。 FIG7B is a schematic diagram of the modeling and training method of the information system operation of the present invention, which verifies the historical prediction sequence calculated by the set of n, m, and k values using historical anomalies of historical data since period p.
圖8A為本發明資訊系統運作之建模與訓練方法依時間序列自一對應週期起基於批次歷史資料量L與該組n、m、k值所計算的歷史預測序列之密合度進行驗證的示意圖。 FIG8A is a schematic diagram of the modeling and training method of the information system operation of the present invention, which verifies the consistency of the historical prediction sequence calculated based on the batch historical data volume L and the set of n, m, k values from a corresponding period in the time series.
圖8B為本發明資訊系統運作之預測與告警方法依時間序列自一批次運作資料量的一對應週期起的運作資料與預測序列進行比對的示意圖。 FIG8B is a schematic diagram of the prediction and alarm method for the operation of the information system of the present invention, which compares the operation data from a corresponding cycle of a batch of operation data with the prediction sequence according to the time series.
圖9A為本發明方法根據一遮罩矩陣,對預測矩陣的元素進行卷積運算之示意圖,其中該遮罩矩陣與預測矩陣的疊合未超過週期範圍。 FIG. 9A shows a method of the present invention for predicting elements of a matrix based on a mask matrix. Schematic diagram of performing a convolution operation, where the overlap of the mask matrix and the prediction matrix does not exceed the cycle range.
圖9B為圖9A所示預測矩陣依時間序列展開之預測序列,在元素的卷積運算的計算範圍內各關聯週期的數據與遮罩矩陣的各元素對應之示意圖,其中該對應關係均在一個週期內。 FIG9B is a prediction sequence of the prediction matrix shown in FIG9A expanded according to the time series, in which the element A schematic diagram showing the correspondence between the data of each associated cycle within the calculation range of the convolution operation and the elements of the mask matrix, wherein the correspondence is within one cycle.
圖10為當該遮罩矩陣與預測矩陣的疊合超過週期範圍,以元素與的卷積運算為例,並考量預測向量關聯前、後接續週期的接續數據,其計算範圍包含遮罩矩陣的元素與接續數據對應之示意圖。 Figure 10 shows the overlap of the mask matrix and the prediction matrix when it exceeds the period range. and The convolution operation of is taken as an example, and the subsequent data of the previous and subsequent cycles associated with the prediction vector are considered, and the calculation scope includes a schematic diagram of the correspondence between the elements of the mask matrix and the subsequent data.
圖11為當該遮罩矩陣與預測矩陣的疊合超過週期範圍,以元素與的卷積運算為例,但不考量預測向量關聯前、後接續週期的接續數據,其計算範圍不包含遮罩矩陣的元素與接續數據對應之示意圖。 Figure 11 shows the mask matrix and the prediction matrix when the overlap exceeds the period range. and The convolution operation of is taken as an example, but the subsequent data of the consecutive cycles before and after the prediction vector is associated are not considered, and the calculation range does not include the schematic diagram of the correspondence between the elements of the mask matrix and the subsequent data.
圖12為若第7週期對應預測矩陣的第一個預測向量,該遮罩矩陣對第一個預測向量進行卷積運算,以元素與的卷積運算為例,並考量預測向量關聯前、後接續週期的接續數據,其計算範圍包含遮罩矩陣的元素與接續數據對應之示意圖。 FIG12 shows the first prediction vector of the prediction matrix corresponding to the 7th cycle. The mask matrix performs convolution operation on the first prediction vector, with element and The convolution operation of is taken as an example, and the subsequent data of the previous and subsequent cycles associated with the prediction vector are considered, and the calculation scope includes a schematic diagram of the correspondence between the elements of the mask matrix and the subsequent data.
圖13為若第7週期對應預測矩陣的第一個預測向量,該遮罩矩陣對第一個預測向量進行卷積運算,以元素與的卷積運算為例,但不考量預測向量關聯前、後接續週期的接續數據,其計算範圍不包含遮罩矩陣的元素與接續數據對應之示意圖。 FIG13 shows the first prediction vector of the prediction matrix corresponding to the 7th cycle. The mask matrix performs convolution operation on the first prediction vector, with element and The convolution operation of is taken as an example, but the subsequent data of the consecutive cycles before and after the prediction vector is associated are not considered, and the calculation range does not include the schematic diagram of the correspondence between the elements of the mask matrix and the subsequent data.
圖14為若將一週期性之預測矩陣Y透過遮罩矩陣進行卷積運算後,所形成之平滑預測矩陣展開之平滑預測序列S與進行卷積運算前之預測矩陣Y展開之一對應之示意圖。 FIG14 is a schematic diagram showing the correspondence between a smoothed prediction sequence S formed by expanding a smoothed prediction matrix formed by performing a convolution operation on a periodic prediction matrix Y through a mask matrix and the expansion of the prediction matrix Y before the convolution operation.
以下藉由特定的具體實施例加以說明本發明之實施方式。 The following is a specific example to illustrate the implementation of the present invention.
首先請參考圖1,係顯示本發明資訊系統運作之預測與告警系統10的架構圖。本發明預測與告警系統10與外部的資訊系統1通訊連線,以讀取該資訊系統1的系統數據資料庫2所儲存的系統數據。該系統數據包含該資訊系統1運作所產生的歷史資料與近期的運作資料。本發明預測與告警系統10與方法可以根據該系統數據的歷史資料進行建模與訓練,來決定預測與告警該運作資料是否發生異常狀況的最佳參數,例如:系統數據所具有的週期性與標準差倍數。 First, please refer to Figure 1, which shows the architecture of the prediction and alarm system 10 of the information system operation of the present invention. The prediction and alarm system 10 of the present invention communicates with the external information system 1 to read the system data stored in the system data database 2 of the information system 1. The system data includes historical data and recent operation data generated by the operation of the information system 1. The prediction and alarm system 10 and method of the present invention can be modeled and trained based on the historical data of the system data to determine the best parameters for predicting and alarming whether the operation data has abnormal conditions, such as: the periodicity and standard deviation multiples of the system data.
在本發明的一種實施例中,一種資訊系統運作之預測與告警系統10包含一輸出入模組3、一預測告警資料庫4、一預測告警模組5以及一建模訓練模組6,其中該輸出入模組3向連線資訊系統1以讀取系統數據資料庫2所儲存的系統數據,並將系統數據存入該預測告警資料庫4中。該建模訓練模組6從該預測告警資料庫4讀取系統數據的一具有時間序列的歷史資料。該建模訓練模組6執行如圖5所示本發明建模與訓練方法,基於該系統數據的歷史資料以驗證出適用於該預測告警模組5的最佳參數,使該預測告警模組5達到更準確的預測與告警效率。在較佳實施例中,該最佳參數包含一數據週期n值、一週期數量m值以及一標準差倍數k值。 In one embodiment of the present invention, a prediction and alarm system 10 for information system operation includes an input/output module 3, a prediction alarm database 4, a prediction alarm module 5, and a modeling training module 6, wherein the input/output module 3 reads system data stored in a system data database 2 connected to an information system 1, and stores the system data in the prediction alarm database 4. The modeling training module 6 reads a historical data with a time series of system data from the prediction alarm database 4. The modeling and training module 6 executes the modeling and training method of the present invention as shown in FIG5 , and verifies the optimal parameters applicable to the prediction and alarm module 5 based on the historical data of the system data, so that the prediction and alarm module 5 can achieve more accurate prediction and alarm efficiency. In a preferred embodiment, the optimal parameters include a data cycle n value, a cycle quantity m value, and a standard deviation multiple k value.
在本發明的實施例中,該預測告警模組5從該建模訓練模組6獲得該最佳參數的n值、m值以及k值,並據以從該預測告警資料庫4讀取系統數據的一具有時間序列的運作資料。該預測告警模組5執行如圖2所示本發明預測與告警方法,以計算出該運作資料的一預測序列,並據以比對該預測序列與對應實際的運作資料,進而決定該系統數據對應實際的運作資料是否發生異常,而輸出一異常通知,以告知相關人員進行即時處理。 In the embodiment of the present invention, the prediction alarm module 5 obtains the n value, m value and k value of the optimal parameter from the modeling training module 6, and reads an operation data with a time series of the system data from the prediction alarm database 4. The prediction alarm module 5 executes the prediction and alarm method of the present invention as shown in FIG2 to calculate a prediction sequence of the operation data, and compares the prediction sequence with the corresponding actual operation data, and then determines whether the system data corresponding to the actual operation data is abnormal, and outputs an abnormal notification to inform relevant personnel to handle it immediately.
請配合圖1參考圖2、圖3與圖4,該圖2顯示本發明系統運作之預測與告警方法的流程圖,該圖3顯示本發明資訊系統運作之預測與告警方法依時間序列依序指派至數據矩陣以求出平滑預測矩陣,據以進行比對之示意圖,而該圖4顯示本發明資訊系統運作之預測與告警方法依時間序列自p週期起的運作資料與預測序列進行比對的示意圖。在本發明的實施例中,圖2所示流程圖由該預測告警模組5所執行。本發明預測與告警方法包含:步驟S101,該輸出入模組3從一資訊系統之系統數據資料庫2讀取系統數據,該系統數據包含一具有時間序列的運作資料,如圖4所示。 Please refer to FIG. 2, FIG. 3 and FIG. 4 in conjunction with FIG. 1. FIG. 2 shows a flow chart of the prediction and alarm method of the system operation of the present invention. FIG. 3 shows a schematic diagram of the prediction and alarm method of the information system operation of the present invention assigning data to a data matrix in sequence according to a time series to obtain a smooth prediction matrix for comparison. FIG. 4 shows a schematic diagram of the prediction and alarm method of the information system operation of the present invention comparing the operation data from the p cycle with the prediction sequence according to the time series. In the embodiment of the present invention, the flow chart shown in FIG. 2 is executed by the prediction and alarm module 5. The prediction and alarm method of the present invention includes: step S101, the input/output module 3 reads system data from a system data database 2 of an information system, and the system data includes operation data with a time series, as shown in FIG4.
步驟S102,該預測告警模組5決定一數據週期n、一週期數量m與一標準差倍數k,其中n值、m值以及k值為建模訓練模組6所提供的最佳參數值,且n、m的值為正整數,k的值為實數。接著步驟S103,參考圖3,該預測告警模組5根據時間序列的一時點從該運作資料擷取n×m個數據元素的一數據量,並將該數據量分割為m個週期的數據向量[n×1],每一數據向量[n×1]具有n個數據元素,每一個m個週期的數據向量[n×1]之起始時點與前一個m個週期的數據向量[n×1]之起始時點差距一個週期的數據向量,並將該等m個
數據向量[n×1]依時間序列指派至一數據矩陣X[n×m],如圖4所示。該數據矩陣X[n×m]可由以下式子表示:
步驟S104,該預測告警模組5根據該數據矩陣X[n×m],計算獲得一平均向量[n×1]與一標準差向量[n×1]。該平均向量與該標準差向量可由以下式子計算獲得:,,i=1…n Step S104, the prediction alarm module 5 calculates an average vector according to the data matrix X [n×m] [n×1] and a standard deviation vector [n×1]. The average vector and the standard deviation vector It can be calculated by the following formula: , , i =1… n
,,i=1…n , , i =1… n
步驟S105,參考圖3,該預測告警模組5再根據該平均向量[n×1]、該標準差向量[n×1]與該標準差倍數k的值以計算獲得一預測向量[n×1]。該預測向量[n×1]可由以下式子計算獲得:
在本發明之另一實施例中,亦可藉由將該平均向量[n×1]加上或減去該標準差向量[n×1]與該標準差倍數k的值之積,並依照不同情境,能夠調整所取用的範圍,例如預測一上限值、或下限值、或一區間。 In another embodiment of the present invention, the average vector [n×1] plus or minus the standard deviation vector The product of [n×1] and the value of the standard deviation multiple k can be used to adjust the range used according to different situations, such as predicting an upper limit, a lower limit, or an interval.
步驟S106,請同時參考圖3與圖4,該預測告警模組5將該時點後第2週期至第m+1個週期起的m個週期的數據向量依序指派至該數據矩陣X[n×m]。每一次將回到步驟S104與步驟S105,根據新指派之該數據矩陣X[n×m]計算一平均向量[n×1]與一標準差向量[n×1],據此進一步依序生成多個預測向量[n×1]。 Step S106, please refer to Figures 3 and 4 at the same time, the prediction alarm module 5 sequentially assigns the data vectors of the m cycles from the second cycle to the m+1th cycle after the time point to the data matrix X [n×m]. Each time it returns to step S104 and step S105, and calculates an average vector based on the newly assigned data matrix X [n×m]. [n×1] and a standard deviation vector [n×1], and then further generate multiple prediction vectors in sequence [n×1].
詳細而言,該等預測向量[n×1]可用於監督該運作資料在該時間序列的一對應週期的運行狀況。在本發明中,該對應週期之起始時間點可依使用情況選擇,例如緊接著前述所取之該等運作資料之下一個週期、或下一年的相同時間點、或使用者使用期間的相應時點等,根據不同使用情境調整該對應關係,使該預測向量[n×1]用於監督該運作資料在該對應週期的運行狀況;換言之,參考圖4,該預測告警模組5以多個m個週期的數據量來預測其對應週期的預測值,每個週期以一個向量[n×1]表示。 Specifically, the prediction vectors [n×1] can be used to monitor the operation status of the operation data in a corresponding cycle of the time series. In the present invention, the starting time point of the corresponding cycle can be selected according to the usage situation, such as the next cycle immediately following the aforementioned operation data, or the same time point in the next year, or the corresponding time point during the user's use, etc. The corresponding relationship is adjusted according to different usage scenarios so that the prediction vector [n×1] is used to monitor the operating status of the operating data in the corresponding cycle; in other words, referring to FIG. 4 , the prediction alarm module 5 uses the data of multiple m cycles to predict the predicted value of the corresponding cycle, and each cycle is represented by a vector [n×1].
步驟S107,再次參考圖3,該預測告警模組5以多個預測向量[n×1]生成一預測矩陣Y。接著步驟S108,參考圖3,該預測告警模組5將該預測矩陣Y根據一遮罩矩陣M,對該預測矩陣Y進行卷積運算,透過卷積運算將該預測矩陣Y進行平滑化,以獲得一平滑預測矩陣。關於根據一遮罩矩陣M對該預測矩陣Y進行卷積運算與依時間序列展開之預測序列S之運算方式,其中預測矩陣Y與平滑化預測序列S的第一個週期係該運作資料在時間序列上的該對應週期,將在後面的圖9A與圖9B進一步詳細說明卷積運算。 Step S107, referring again to FIG. 3, the prediction alarm module 5 uses a plurality of prediction vectors [n×1] generates a prediction matrix Y. Then, in step S108, referring to FIG3, the prediction alarm module 5 performs a convolution operation on the prediction matrix Y according to a mask matrix M, and smoothes the prediction matrix Y through the convolution operation to obtain a smooth prediction matrix. Regarding the operation method of performing a convolution operation on the prediction matrix Y according to a mask matrix M and the prediction sequence S unfolded according to the time series, wherein the first cycle of the prediction matrix Y and the smoothed prediction sequence S is the corresponding cycle of the operation data on the time series, the convolution operation will be further described in detail in the following FIG9A and FIG9B.
因此,該多個數據矩陣X[n×m]便經步驟S104到步驟S108,以生成該預測矩陣Y與平滑預測序列S。該預測告警模組5將該第2週期至第m+1個週期的m個數據向量[n×1]依時間序列指派至該數據矩陣X[n×m],由 所取數據而言,可視為將第1個週期的數據向量[n×1]從該數據矩陣X[n×m]移除,依時間序列組合第2個週期至第m+1個週期的數據向量[n×1]成為該數據矩陣X[n×m],依此類推。所以,每次用於計算之數據矩陣X[n×m]都是維持相同尺寸[n×m]。如圖4所示,該數據矩陣X[n×m]是以m個週期為移動視窗,據以逐次計算出下一個週期的預測向量[n×1],再經平滑化預測矩陣Y而展開為平滑預測序列S,其中預測矩陣Y與平滑化預測序列S的第一個週期係該運作資料在時間序列上的該對應週期。在本發明的實施例中,步驟S106,係確認該預測矩陣Y可包含數個或足夠多的預測向量[n×1]後,才進行步驟S107、步驟S108以對該預測矩陣Y進行卷積運算,進而獲得一平滑預測矩陣,再依時間序列展開為預測序列S。 Therefore, the multiple data matrices X [n×m] are processed from step S104 to step S108 to generate the prediction matrix Y and the smoothed prediction sequence S. The prediction alarm module 5 assigns the m data vectors [n×1] of the second period to the m+1 period to the data matrix X [n×m] in a time series. From the data obtained, it can be regarded as removing the data vector [n×1] of the first period from the data matrix X [n×m], combining the data vectors [n×1] of the second period to the m+1 period in a time series to form the data matrix X [n×m], and so on. Therefore, the data matrix X [n×m] used for calculation each time maintains the same size [n×m]. As shown in Figure 4, the data matrix X [n×m] is a moving window of m cycles, based on which the prediction vector of the next cycle is calculated successively. [n×1], and then unfolded into a smoothed prediction sequence S through a smoothed prediction matrix Y , wherein the first cycle of the prediction matrix Y and the smoothed prediction sequence S is the corresponding cycle of the operation data in the time series. In the embodiment of the present invention, step S106 is to confirm that the prediction matrix Y can contain a plurality of or sufficient prediction vectors [n×1], steps S107 and S108 are performed to perform convolution operations on the prediction matrix Y , thereby obtaining a smoothed prediction matrix, which is then expanded into a prediction sequence S according to the time series.
步驟S109,該預測告警模組5依時間序列,比對該系統數據在該時間序列的該對應週期起的運作資料與該平滑預測序列S。平滑化該預測矩陣展開的預測序列S與該系統數據對應週期的運作資料的進行比對,以獲得一比對結果。 In step S109, the prediction alarm module 5 compares the operation data of the system data from the corresponding period of the time sequence with the smoothed prediction sequence S according to the time sequence. The prediction sequence S expanded by smoothing the prediction matrix is compared with the operation data of the corresponding period of the system data to obtain a comparison result.
步驟S110,該預測告警模組5監督該系統數據是否發生異常。若將平滑預測矩陣展開的預測序列與該匹配之運作資料進行比對,若判斷無異常,則回到S101,該輸出入模組3從資訊系統之系統數據資料庫2讀取下一筆系統數據。判斷為異常發生時,則執行步驟S111,參考圖4,例如第p+1個週期時運作資料出現高於預測序列S之值發生時,則判斷為異常發生。在步驟S111,該預測告警模組5透過該輸出入模組3發出一異常通知並將此異常通知記錄於該預測告警資料庫4。 In step S110, the prediction alarm module 5 monitors whether the system data has an abnormality. If the prediction sequence of the smooth prediction matrix is expanded and compared with the matched operation data, if it is judged that there is no abnormality, it returns to S101, and the input/output module 3 reads the next system data from the system data database 2 of the information system. When it is judged that an abnormality has occurred, step S111 is executed. Referring to Figure 4, for example, when the operation data appears to be higher than the value of the prediction sequence S in the p+1th cycle, it is judged that an abnormality has occurred. In step S111, the prediction alarm module 5 issues an abnormality notification through the input/output module 3 and records the abnormality notification in the prediction alarm database 4.
圖3為顯示本發明系統運作之預測與告警方法,關於步驟S104到S108依時間序列多次指派至數據矩陣以求出平滑預測矩陣,據以進行比對之示意圖。在本實施例中該預測告警模組會進一步執行以下程序:讀取該預測告警資料庫所儲存的該運作資料在該時點的第2週期至第m+1個週期的數據向量[n×1],將該第2週期至第m+1個週期的數據向量[n×1]依時間序列指派至該數據矩陣X[n×m];根據指派後的該數據矩陣X[n×m],計算該對應週期的下一個週期(即第p+1個週期)的預測向量[n×1]。依此類推,讀取該預測告警資料庫儲存的該運作資料,依時間序列將第3週期至第m+2個週期起的m個週期的數據向量[n×1]依序指派至該數據矩陣X[n×m]以計算獲得多個預測向量[n×1]。因此,依時間序列生成該對應週期起的多個預測向量[n×1]而獲得一預測矩陣Y,根據一遮罩矩陣M,對該預測矩陣Y進行卷積運算,以獲得一平滑預測矩陣,由該平滑預測矩陣展開的平滑預測序列S可對應該運作資料在該對應週期起的數據向量[n×1];以及比對該運作資料在該時間序列的該對應週期起的一或多個數據元素與該平滑預測序列S的一或多個數據元素,以獲得該比對結果。 FIG. 3 is a diagram showing the prediction and alarm method of the system operation of the present invention, in which steps S104 to S108 are assigned to the data matrix multiple times according to the time series to obtain a smooth prediction matrix for comparison. In this embodiment, the prediction alarm module further executes the following procedures: read the data vector [n×1] of the operation data from the 2nd cycle to the m+1th cycle at the time point stored in the prediction alarm database, assign the data vector [n×1] of the 2nd cycle to the m+1th cycle to the data matrix X [n×m] according to the time series; and calculate the prediction vector [n×1] of the next cycle (i.e., the p+1th cycle) of the corresponding cycle according to the assigned data matrix X [n×m]. Similarly, the operation data stored in the prediction alarm database is read, and the data vectors [n×1] of m cycles from the 3rd cycle to the m+2th cycle are sequentially assigned to the data matrix X [n×m] in time series to calculate a plurality of prediction vectors [n×1]. Therefore, a prediction matrix Y is obtained by generating a plurality of prediction vectors [n×1] from the corresponding period according to the time series, and a convolution operation is performed on the prediction matrix Y according to a mask matrix M to obtain a smooth prediction matrix, and a smooth prediction sequence S expanded from the smooth prediction matrix can correspond to the data vector [n×1] of the operation data from the corresponding period; and one or more data elements of the operation data from the corresponding period of the time series are compared with one or more data elements of the smooth prediction sequence S to obtain the comparison result.
圖4為顯示本發明系統運作之預測與告警方法依時間序列自p週期起的運作資料與平滑預測矩陣展開的預測序列S進行比對之一示意圖。在本實施例中該預測告警模組根據該數據矩陣X[n×m],計算獲得一平均向量[n×1]與一標準差向量[n×1],再根據該平均向量[n×1]、該標準差向量[n×1]與該標準差倍數k的值以計算獲得一預測向量[n×1],該預測向量[n×1]用於監督該運作資料在該時間序列的一對應週期p的狀況;比對該運作資料在該時間序列的該對應週期的數據向量[n×1]的數據元素與該預測向量[n×1]的數據元素,以獲得一比對結果,計算之該平滑預測矩陣展開的預測序列S的數據元素與該運作資料對應 的數據元素進行比對,根據該比對結果,以決定是否通知該輸出入模組輸出一異常通知。 FIG4 is a schematic diagram showing the prediction and alarm method of the system operation of the present invention, which compares the operation data of the time series from the pth period with the prediction sequence S expanded by the smooth prediction matrix. In this embodiment, the prediction alarm module calculates an average vector according to the data matrix X [n×m]. [n×1] and a standard deviation vector [n×1], and then based on the average vector [n×1], the standard deviation vector [n×1] and the value of the standard deviation multiple k to calculate a prediction vector [n×1], the prediction vector [n×1] is used to monitor the status of the operation data in a corresponding cycle p of the time series; compare the data elements of the data vector [n×1] of the operation data in the corresponding cycle of the time series with the prediction vector [n×1] data elements are used to obtain a comparison result, and the data elements of the prediction sequence S calculated by expanding the smooth prediction matrix are compared with the data elements corresponding to the operation data. According to the comparison result, it is determined whether to notify the input/output module to output an abnormal notification.
請配合圖1並參考圖5、圖6與圖7A,該圖5顯示本發明系統運作之建模與訓練方法的流程圖,該圖6顯示本發明資訊系統運作之建模與訓練方法依時間序列多次指派至歷史數據矩陣以求出平滑歷史預測矩陣,據以進行比對之示意圖,而該圖7A顯示本發明資訊系統運作之建模與訓練方法的一種實施例,依時間序列自p週期起的歷史資料與歷史預測序列進行比對的示意圖。在本發明的實施例中,圖5所示流程圖由該建模訓練模組6所執行。本發明建模與訓練方法包含:步驟S201,該輸出入模組3從一資訊系統之系統數據資料庫2讀取系統數據,該系統數據包含一具有時間序列的歷史資料,如圖7A所示。 Please refer to FIG. 5, FIG. 6 and FIG. 7A in conjunction with FIG. 1. FIG. 5 shows a flow chart of the modeling and training method of the system operation of the present invention. FIG. 6 shows a schematic diagram of the modeling and training method of the information system operation of the present invention, which assigns to the historical data matrix multiple times according to the time series to obtain the smoothed historical prediction matrix, and compares them accordingly. FIG. 7A shows an embodiment of the modeling and training method of the information system operation of the present invention, which shows a schematic diagram of comparing the historical data from the p period of the time series with the historical prediction sequence. In the embodiment of the present invention, the flow chart shown in FIG. 5 is executed by the modeling training module 6. The modeling and training method of the present invention includes: step S201, the input/output module 3 reads system data from a system data database 2 of an information system, and the system data includes historical data with a time series, as shown in FIG7A.
在預測告警資料庫4中存有事先選定的參數,該參數包含一數據週期n、一週期數量m以及一標準差倍數k,且事先決定各參數的值域,其中n、m的值為正整數,k的值為實數,該建模訓練模組6將基於所有參數的值域進行建模與訓練。 Pre-selected parameters are stored in the prediction alarm database 4, which include a data cycle n, a cycle quantity m, and a standard deviation multiple k, and the value range of each parameter is determined in advance, where the values of n and m are positive integers, and the value of k is a real number. The modeling training module 6 will perform modeling and training based on the value range of all parameters.
步驟S202,該建模訓練模組6從各自的值域選擇n、m及k值的組合。接著步驟S203,參考圖6,該建模訓練模組6根據步驟S202選擇n、m及k值的組合,而根據時間序列的一歷史時點從該歷史資料擷取n×m個歷史數據元素的一數據量,並將該數據量分割為m個週期的歷史數據向量[n×1],每一歷史數據向量[n×1]具有n個歷史數據元素,並將該等m個歷史數據向量[n×1]依時間序列指派至一歷史數據矩陣X[n×m],如圖7A所示。該歷史數據矩陣X[n×m]可由以下式子(1)表示:
步驟S204,該建模訓練模組6根據該歷史數據矩陣X[n×m],計算獲得一歷史平均向量[n×1]與一歷史標準差向量[n×1]。該歷史平均向量與該歷史標準差向量可由以下式子計算獲得:,,i=1…n Step S204, the modeling training module 6 calculates a historical average vector according to the historical data matrix X [n×m] [n×1] and a historical standard deviation vector [n×1]. The historical average vector and the historical standard deviation vector It can be calculated by the following formula: , , i =1… n
,,i=1…n , , i =1… n
步驟S205,參考圖6,該建模訓練模組6再根據該歷史平均向量[n×1]、該歷史標準差向量[n×1]與該標準差倍數k的值以計算獲得一歷史預測向量[n×1]。該歷史預測向量[n×1]可由以下式子計算獲得:
在本發明之另一實施例中,亦可藉由將該歷史平均向量[n×1]加上或減去該歷史標準差向量[n×1]與該標準差倍數k的值之積,並依照不同情境,能夠調整所取用的範圍,例如預測一上限值、或下限值、或一區間。 In another embodiment of the present invention, the historical average vector [n×1] plus or minus the historical standard deviation vector The product of [n×1] and the value of the standard deviation multiple k can be used to adjust the range used according to different situations, such as predicting an upper limit, a lower limit, or an interval.
步驟S206,請同時參考圖6、與圖7A,該建模訓練模組6將該時點後第2週期至第m+1個週期起的m個週期的數據向量依序指派至該歷史數據矩 陣X[n×m]。每一次將回到步驟S204與步驟S205,根據新指派之該歷史數據矩陣X[n×m]計算一歷史平均向量[n×1]與一歷史標準差向量[n×1],據此進一步依序生成多個歷史預測向量[n×1]。 Step S206, please refer to Figure 6 and Figure 7A at the same time, the modeling training module 6 sequentially assigns the data vectors of m cycles from the second cycle to the m+1th cycle after the time point to the historical data matrix X [n×m]. Each time it returns to step S204 and step S205, and calculates a historical average vector based on the newly assigned historical data matrix X [n×m]. [n×1] and a historical standard deviation vector [n×1], and then further generate multiple historical prediction vectors in sequence [n×1].
詳細而言,該等歷史預測向量[n×1]可分別用於判斷該歷史資料在該時間序列的一對應週期的歷史狀況。在本發明中,該等對應週期之起始時間點可依使用情況選擇,例如緊接著前述所取之該等歷史資料之下一個週期、或該歷史資料之時間序列上之下一年的相同時間點、或使用者使用期間的相應時點等,根據不同使用情境調整該對應關係,使該預測向量[n×1]用於判斷該歷史資料在該歷史時點的對應週期的狀況;換言之,參考圖7A,該建模訓練模組6以多個m個週期的數據量來訓練其歷史對應週期的歷史預測值,每個週期以一個向量[n×1]表示。 Specifically, the historical forecast vectors [n×1] can be used to judge the historical status of the historical data in a corresponding period of the time series. In the present invention, the starting time points of the corresponding periods can be selected according to the usage situation, such as the next period immediately following the historical data taken above, or the same time point of the next year on the time series of the historical data, or the corresponding time point during the user's use, etc. The corresponding relationship is adjusted according to different usage scenarios so that the prediction vector [n×1] is used to determine the status of the corresponding period of the historical data at the historical point in time; in other words, referring to FIG. 7A , the modeling training module 6 uses a data volume of multiple m periods to train the historical prediction values of its historical corresponding period, and each period is represented by a vector [n×1].
步驟S207,再次參考圖6,該建模訓練模組6以多個歷史預測向量[n×1]生成一歷史預測矩陣Y。接著步驟S208,參考圖6,該建模訓練模組6將該歷史預測矩陣Y根據一遮罩矩陣M,對該歷史預測矩陣Y進行卷積運算,透過卷積運算將該歷史預測矩陣Y進行平滑化,以獲得一平滑歷史預測矩陣。關於根據一遮罩矩陣M對該歷史預測矩陣Y進行卷積運算與依歷史預測矩陣展開之歷史預測序列S之運算方式,其中歷史預測矩陣Y與平滑化歷史預測序列S的第一個週期係該歷史資料在時間序列上的該對應週期,將在後面的圖9A與圖9B進一步詳細說明卷積運算。 Step S207, referring again to FIG. 6, the modeling training module 6 uses multiple historical prediction vectors [n×1] generates a historical prediction matrix Y. Then, in step S208, referring to FIG6, the modeling training module 6 performs a convolution operation on the historical prediction matrix Y according to a mask matrix M, and smoothes the historical prediction matrix Y through the convolution operation to obtain a smoothed historical prediction matrix. Regarding the convolution operation of the historical prediction matrix Y according to a mask matrix M and the operation method of the historical prediction sequence S expanded according to the historical prediction matrix, wherein the first period of the historical prediction matrix Y and the smoothed historical prediction sequence S is the corresponding period of the historical data in the time series, the convolution operation will be further explained in detail in the following Figures 9A and 9B.
因此,該多個歷史數據矩陣X[n×m]經步驟S204到步驟S208的計算,以更新該歷史預測矩陣Y與平滑歷史預測矩陣。該建模訓練模組6將該第2週期至第m+1個週期的歷史數據向量[n×1]依時間序列指派至該歷史 數據矩陣X[n×m],由所取數據而言,可視為將第1個週期的歷史數據向量[n×1]從該歷史數據矩陣X[n×m]移除,依時間序列組合第2個週期至第m+1個週期的歷史數據向量[n×1]成為該歷史數據矩陣X[n×m],依此類推。所以,每次用於計算之歷史數據矩陣X[n×m]都是維持相同尺寸[n×m]。如圖7A所示,該歷史數據矩陣X[n×m]是以m個週期為移動視窗,據以逐次計算出下一個週期的歷史預測向量[n×1],再經平滑化歷史預測矩陣Y而展開為平滑歷史預測序列S。在本發明的實施例中,步驟S206,係確認該預測矩陣Y包含數個或足夠多的歷史預測向量[n×1]後,才進行步驟S207、步驟S208以對該歷史預測矩陣Y進行卷積運算,進而獲得一平滑歷史預測矩陣,再依時間序列展開為歷史預測序列S。 Therefore, the multiple historical data matrices X [n×m] are calculated from step S204 to step S208 to update the historical prediction matrix Y and the smoothed historical prediction matrix. The modeling training module 6 assigns the historical data vectors [n×1] from the second period to the m+1 period to the historical data matrix X [n×m] according to the time series. From the data obtained, it can be regarded as removing the historical data vectors [n×1] of the first period from the historical data matrix X [n×m], and combining the historical data vectors [n×1] from the second period to the m+1 period according to the time series to become the historical data matrix X [n×m], and so on. Therefore, the historical data matrix X [n×m] used for calculation each time maintains the same size [n×m]. As shown in FIG7A, the historical data matrix X [n×m] is a moving window with m periods, and the historical prediction vector of the next period is calculated successively. [n×1], and then the smoothed historical prediction matrix Y is unfolded into a smoothed historical prediction sequence S. In the embodiment of the present invention, step S206 is to confirm that the prediction matrix Y contains a plurality of or sufficient historical prediction vectors [n×1], steps S207 and S208 are performed to perform convolution operations on the historical prediction matrix Y , thereby obtaining a smoothed historical prediction matrix, which is then expanded into a historical prediction sequence S according to the time series.
步驟S209,該建模訓練模組6依時間序列,比對該系統數據在該時間序列的該對應週期起的歷史資料與該平滑歷史預測序列S。平滑化該歷史預測矩陣展開的歷史預測序列S與該系統數據對應週期的歷史資料進行比對,以獲得一驗證結果。接著步驟S210,該建模訓練模組6將其平滑化該歷史預測矩陣展開的歷史預測序列S與該系統數據對應週期的歷史資料進行比對後之該驗證結果之該數據週期n、該週期數量m與該標準差倍數k之值的組合紀錄於預測告警資料庫4中。 In step S209, the modeling training module 6 compares the historical data of the system data from the corresponding period of the time series with the smoothed historical prediction sequence S according to the time series. The historical prediction sequence S expanded by smoothing the historical prediction matrix is compared with the historical data of the corresponding period of the system data to obtain a verification result. Then in step S210, the modeling training module 6 records the combination of the data period n, the period quantity m and the standard deviation multiple k of the verification result after comparing the historical prediction sequence S expanded by smoothing the historical prediction matrix with the historical data of the corresponding period of the system data in the prediction alarm database 4.
進行步驟S211,該建模訓練模組6判斷各參數的既定值域內所有的n、m及k值的組合是否都已計算完成;若各參數的值域內n、m及k值還有未計算的組合,則再次執行步驟S202到S210;若各參數的值域內n、m及k值的所有組合都已計算完成,則執行步驟S212。各參數的值可以隨機選取或以迭代如網格搜索(grid search)選取;亦即可事先不對週期數量m做分析。步驟S212,該建模訓練模組 6將根據紀錄的驗證結果來決定數據週期n、該週期數量m與該標準差倍數k之最佳值,以提供給預測告警模組5,進一步執行如圖2之系統運作之預測與告警方法。稍後,將配合圖7A與圖7B說明不同實施例的驗證方式,來決定數據週期n、該週期數量m與該標準差倍數k等參數之最佳值。 In step S211, the modeling training module 6 determines whether all combinations of n, m and k values within the given range of each parameter have been calculated; if there are still uncalculated combinations of n, m and k values within the range of each parameter, steps S202 to S210 are executed again; if all combinations of n, m and k values within the range of each parameter have been calculated, step S212 is executed. The values of each parameter can be randomly selected or selected iteratively such as by grid search; that is, the number of cycles m can be analyzed in advance. In step S212, the modeling training module 6 will determine the optimal values of the data cycle n, the cycle number m and the standard deviation multiple k based on the recorded verification results, and provide them to the prediction and alarm module 5 to further execute the prediction and alarm method of the system operation as shown in Figure 2. Later, the verification methods of different embodiments will be explained in conjunction with Figures 7A and 7B to determine the optimal values of parameters such as the data cycle n, the cycle number m and the standard deviation multiple k.
圖6為顯示本發明系統運作之建模與訓練方法,關於步驟S202到S210的驗證結果,依時間序列多次指派至歷史數據矩陣以求出平滑歷史預測矩陣,據以進行比對之示意圖。在本實施例中,該建模訓練模組6會進一步執行以下程序:讀取該預測告警資料庫4所儲存的該歷史資料在該時點的第2週期至第m+1個週期的歷史數據向量[n×1],將該第2週期至第m+1個週期的歷史數據向量[n×1]依時間序列指派至該歷史數據矩陣X[n×m];根據指派後的該歷史數據矩陣X[n×m],計算該對應週期的下一個週期(即第p+1個週期)的歷史預測向量[n×1]。依此類推,讀取該預測告警資料庫4儲存的該歷史資料,依時間序列分別將第3週期至第m+2個週期起的m個週期的歷史數據向量[n×1]依序指派至該歷史數據矩陣X[n×m]以計算獲得多個歷史預測向量[n×1]。因此,依時間序列組合該對應週期起的多個歷史預測向量[n×1]而獲得一歷史預測矩陣Y,根據一遮罩矩陣M,對該歷史預測矩陣Y進行卷積運算,以獲得一平滑歷史預測矩陣,由該平滑預測矩陣展開的平滑預測序列S可對應該歷史資料在該對應週期起的數據向量[n×1];以及比對該歷史資料在該時間序列的該對應週期起的一或多個歷史數據元素與該平滑歷史預測矩陣的一或多個數據元素,以獲得該驗證結果。 FIG. 6 is a schematic diagram showing the modeling and training method of the system operation of the present invention, and the verification results of steps S202 to S210 are assigned to the historical data matrix multiple times according to the time series to obtain the smoothed historical prediction matrix for comparison. In this embodiment, the modeling training module 6 further executes the following procedures: reading the historical data vector [n×1] of the 2nd cycle to the m+1th cycle at the time point stored in the prediction alarm database 4, assigning the historical data vector [n×1] of the 2nd cycle to the m+1th cycle to the historical data matrix X [n×m] according to the time series; and calculating the historical prediction vector [ n×1] of the next cycle (i.e., the p+1th cycle) of the corresponding cycle according to the assigned historical data matrix X [n×m]. Similarly, the historical data stored in the prediction alarm database 4 is read, and the historical data vectors [n×1] of m periods from the 3rd period to the m+2th period are sequentially assigned to the historical data matrix X [n×m] in order to calculate a plurality of historical prediction vectors [n×1]. Therefore, a historical prediction matrix Y is obtained by combining multiple historical prediction vectors [n×1] from the corresponding period according to the time series, and a convolution operation is performed on the historical prediction matrix Y according to a mask matrix M to obtain a smoothed historical prediction matrix. The smoothed prediction sequence S expanded from the smoothed prediction matrix can correspond to the data vector [n×1] of the historical data from the corresponding period; and one or more historical data elements of the historical data from the corresponding period of the time series are compared with one or more data elements of the smoothed historical prediction matrix to obtain the verification result.
請參考圖7A與圖7B,分別顯示本發明不同實施例的驗證方式,來決定數據週期n、該週期數量m與該標準差倍數k等參數之最佳值。如圖7A所示本發 明一種實施例的系統運作之建模與訓練方法,該時間序列的一對應週期為該歷史時點的p週期,在步驟S209依歷史時點自p週期起的歷史資料與平滑歷史預測矩陣展開的平滑歷史預測序列S進行比對,其比對方式是以兩者對應數據元素之間的均方根誤差(Root Mean-Square Error,簡稱RMSE)為驗證結果,其值越小表示建模與訓練之n、m及k值越準確。因此,步驟S212將從步驟S210的記錄中獲得所有的驗證結果,選出自p週期起歷史資料與平滑歷史預測序列S之間差異最小者(即最小均方根誤差),即兩者的密合度最佳,便將據以計算出該平滑歷史預測序列S的n、m及k值的組合作為參數的最佳值。 Please refer to FIG. 7A and FIG. 7B , which respectively show the verification methods of different embodiments of the present invention to determine the optimal values of parameters such as the data cycle n, the number of cycles m, and the standard deviation multiple k. As shown in FIG. 7A , a modeling and training method for the system operation of an embodiment of the present invention, a corresponding cycle of the time series is the p cycle of the historical time point, and in step S209, the historical data from the p cycle at the historical time point is compared with the smoothed historical prediction matrix to form a smoothed historical prediction sequence S. The comparison method is to use the root mean square error (RMSE) between the corresponding data elements of the two as the verification result, and the smaller the value, the more accurate the n, m, and k values of the modeling and training are. Therefore, step S212 will obtain all the verification results from the records of step S210, and select the one with the smallest difference between the historical data and the smoothed historical prediction sequence S since period p (i.e., the minimum root mean square error), that is, the best fit between the two, and then calculate the combination of n, m and k values of the smoothed historical prediction sequence S as the optimal value of the parameters.
如圖7B所示本發明另一種實施例的系統運作之建模與訓練方法,在該時間序列的一對應週期為該歷史時點的p週期,則利用自p週期起以歷史資料之歷史異常來驗證該組n、m、k值所計算的歷史預測序列S進行比對。在步驟S204,根據該歷史時點自p週期起的該歷史資料具有一已知的歷史異常;在步驟S209依歷史時點自p週期起的歷史資料與平滑歷史預測矩陣展開的平滑歷史預測序列S進行比對,其比對方式是以歷史異常的數據元素超出平滑歷史預測序列S為驗證結果。因此,步驟S212將從步驟S210的記錄中獲得所有的驗證結果,選出自p週期起歷史資料的歷史異常能夠準確地被平滑歷史預測序列S所檢出者,便將據以計算出該平滑歷史預測序列S的n、m及k值的組合作為參數的最佳值。 As shown in FIG. 7B , the modeling and training method of the system operation of another embodiment of the present invention, when a corresponding period of the time series is the p period at the historical time point, the historical anomaly of the historical data from the p period is used to verify the historical prediction sequence S calculated by the set of n, m, and k values for comparison. In step S204, the historical data from the p period at the historical time point has a known historical anomaly; in step S209, the historical data from the p period at the historical time point is compared with the smoothed historical prediction sequence S expanded by the smoothed historical prediction matrix, and the comparison method is that the data element of the historical anomaly exceeds the smoothed historical prediction sequence S as the verification result. Therefore, step S212 will obtain all the verification results from the records of step S210, select the historical anomalies of the historical data since period p that can be accurately detected by the smoothed historical prediction sequence S , and then calculate the combination of n, m and k values of the smoothed historical prediction sequence S as the optimal value of the parameters.
請參考圖8A與圖8B,分別顯示本發明另一實施例之建模與訓練方法以及預測與告警方法的示意圖。在本發明另一實施例中,建模與訓練方法是基於批次歷史資料量L來建模與訓練,例如:以5月歷史資料量來組成歷史數據矩陣,據以計算獲得的一歷史預測向量,而該歷史預測向量用於判斷該歷史資料在 6月歷史資料量的一對應週期的歷史狀況,而獲得數據週期n、該週期數量m與該標準差倍數k等參數之最佳值。基於數據週期n、該週期數量m與該標準差倍數k等參數之最佳值,預測與告警方法是基於批次運作資料量L來預測與監督,例如:以5月運作資料量來組成數據矩陣,據以計算獲得的一預測向量,而該預測向量用於監督6月運作資料量的該對應週期的運行狀況,據以監督6月運作資料量是否發生異常。 Please refer to FIG. 8A and FIG. 8B, which respectively show schematic diagrams of a modeling and training method and a prediction and alarm method of another embodiment of the present invention. In another embodiment of the present invention, the modeling and training method is based on batch historical data volume L for modeling and training. For example, the historical data volume of May is used to form a historical data matrix, and a historical prediction vector is calculated based on it. The historical prediction vector is used to judge the historical status of the historical data in a corresponding period of the historical data volume of June, and the optimal values of parameters such as the data period n, the period quantity m, and the standard deviation multiple k are obtained. Based on the optimal values of parameters such as data cycle n, cycle quantity m and standard deviation multiple k, the prediction and alarm method is based on the batch operation data volume L for prediction and supervision. For example, the data matrix is composed of the operation data volume in May, and a prediction vector is calculated based on it. The prediction vector is used to monitor the operation status of the corresponding cycle of the operation data volume in June, so as to monitor whether the operation data volume in June is abnormal.
圖8A為本發明另一實施例之資訊系統運作之建模與訓練方法,依時間序列自一對應週期起基於批次歷史資料量L與該組n、m、k值所計算的歷史預測序列之密合度進行驗證的示意圖。以5月歷史資料量來組成歷史數據矩陣並以6月歷史資料量來驗證為例,可參考圖5,在步驟S202選擇n、m以及k的值後,步驟S203根據5月歷史資料量的第1個至第m個週期的數據向量,來組合成為一歷史數據矩陣。經步驟S204與步驟S205,計算獲得一歷史預測向量,並且在步驟S206自5月歷史資料量的第m+1個週期起依序將一數據向量逐次指派至該歷史數據矩陣,進而獲得一歷史預測矩陣。其中,該歷史預測矩陣用於判斷該歷史資料在6月歷史資料量的一對應週期起的歷史狀況,而該對應週期可為6月歷史資料量的第1個週期,或第1到第m之間的中間週期或第m個週期。因此,藉由該對應週期的不同實施例,可評估步驟S202選擇n、m以及k的值所獲得的平滑歷史預測序列S與6月歷史資料量的密合度進行驗證,以決定n、m以及k的最佳值。 FIG8A is a schematic diagram of a modeling and training method for information system operation according to another embodiment of the present invention, which verifies the fit of the historical prediction sequence calculated based on the batch historical data volume L and the set of n, m, and k values from a corresponding period in a time series. Taking the historical data volume of May as an example to form a historical data matrix and verifying it with the historical data volume of June, refer to FIG5. After selecting the values of n, m, and k in step S202, step S203 combines the data vectors of the first to mth periods of the historical data volume of May into a historical data matrix. After step S204 and step S205, a historical prediction vector is calculated, and in step S206, a data vector is sequentially assigned to the historical data matrix from the m+1th cycle of the historical data in May, thereby obtaining a historical prediction matrix. The historical prediction matrix is used to determine the historical status of the historical data from a corresponding cycle of the historical data in June, and the corresponding cycle can be the first cycle of the historical data in June, or an intermediate cycle between the first and the mth cycle, or the mth cycle. Therefore, through different implementations of the corresponding period, the smoothed historical forecast sequence S obtained by selecting the values of n, m and k in step S202 can be evaluated and verified for the closeness of the historical data in June to determine the optimal values of n, m and k.
圖8B為本發明另一實施例之資訊系統運作之預測與告警方法,依時間序列自一批次運作資料量L的一對應週期起的運作資料與預測序列進行比對的示意圖。以5月運作資料量來組成數據矩陣以監督6月運作資料量為例,可參考圖2,在步驟S102決定n、m以及k的值後,步驟S103根據5月運作資料量的第1個 至第m個週期的數據向量,來組合成為一數據矩陣。經步驟S104與步驟S105,計算獲得一預測向量,並且在步驟S107自5月運作資料量的第m+1個週期起依序將一數據向量逐次指派至該數據矩陣,進而獲得一預測矩陣。其中,該預測矩陣用於監督6月運作資料量的一對應週期起的運作狀況是否發生異常,而該對應週期可為6月運作資料量的第1個週期,或第1到第m之間的中間週期或第m個週期。換言之,在本發明另一實施例中,由5月運作資料量的第1個至第m個週期的數據向量,來預測6月運作資料量的第1個週期,或第1到第m之間的中間週期或第m個週期的數據向量。該對應週期可由建模訓練模組6評估n、m以及k的最佳值時所決定。 FIG8B is a schematic diagram of the prediction and alarm method of information system operation according to another embodiment of the present invention, which compares the operation data from a corresponding cycle of a batch of operation data L with the prediction sequence according to the time series. Taking the operation data of May as an example to monitor the operation data of June, refer to FIG2. After the values of n, m and k are determined in step S102, step S103 combines the data vectors of the first to mth cycles of the operation data of May into a data matrix. After step S104 and step S105, a prediction vector is calculated, and in step S107, a data vector is sequentially assigned to the data matrix from the m+1th cycle of the May operation data, thereby obtaining a prediction matrix. The prediction matrix is used to monitor whether the operation status from a corresponding cycle of the June operation data is abnormal, and the corresponding cycle can be the first cycle of the June operation data, or an intermediate cycle between the first and the mth cycle, or the mth cycle. In other words, in another embodiment of the present invention, the data vectors of the 1st to mth cycles of the May operation data are used to predict the data vectors of the 1st cycle of the June operation data, or the intermediate cycle between the 1st and mth cycles, or the mth cycle. The corresponding cycle can be determined by the modeling training module 6 when evaluating the optimal values of n, m, and k.
接下來參考圖9A與圖9B,將說明圖2所示流程之步驟S108與圖5所示流程之步驟S208,關於根據一遮罩矩陣M對該預測矩陣Y進行卷積運算與依時間序列展開之預測序列S。圖9A為顯示本發明方法根據一遮罩矩陣M,對預測矩陣的元素進行卷積運算之示意圖;圖9B為顯示圖9A所示預測矩陣依時間序列展開之預測序列,在元素的卷積運算的計算範圍內各關聯週期的數據與遮罩矩陣M的各元素對應之示意圖。該運算如圖9A所示,以n=6,預測矩陣Y的第7、8、9週期的預測向量為例,而該遮罩矩陣M如以下式子為例:
在本發明的此一實施例,遮罩矩陣M的設計為一上下三角對稱的矩陣,且左上三角與左下三角的權重值為0,其餘權重值為非零值。非 零數值的排列形狀為一三角形,以最後一行之中心為最大值,向左方及上下方遞減。由於卷積運算最後是取平均值,因此權重值之權重大小與範圍皆沒有限定;權重設越大,最後加權的總數也越大,除以的值也越大。 In this embodiment of the present invention, the mask matrix M is designed as a symmetrical matrix with upper and lower triangles, and the weight values of the upper left triangle and the lower left triangle are 0, and the remaining weight values are non-zero values. The arrangement shape of the non-zero values is a triangle, with the center of the last row as the maximum value, decreasing to the left and up and down. Since the convolution operation finally takes the average value, the weight size and range of the weight value are not limited; the larger the weight setting, the larger the final weighted total number, and the larger the value divided by.
詳細而言,遮罩矩陣M[a×b]係預先設計,其寬度b約為欲進行卷積運算之預測矩陣Y之寬度的1/2,其中之非零數值的排列形狀為:以矩陣第b行為底、且高為b之三角形狀,並以第b行之一元素作為卷積運算時與預測矩陣Y對準之對準位置,該對準位置最佳係於該行之中心,且其為該等非零數值中之最大值,可設為b/2,並不限定為整數,其他非零數值則自該對準位置向左方及上下方遞減,且遞減之差不限於1。此外,遮罩矩陣M[a×b]亦可利用機器學習來獲得較佳之尺寸。 In detail, the mask matrix M[a×b] is pre-designed, and its width b is approximately 1/2 of the width of the prediction matrix Y to be convolutionally calculated. The arrangement shape of the non-zero values is: a triangle with the bth row of the matrix as the base and the height b, and an element of the bth row is used as the alignment position aligned with the prediction matrix Y during the convolution operation. The alignment position is preferably at the center of the row, and it is the maximum value of the non-zero values, which can be set to b/2 and is not limited to an integer. The other non-zero values decrease from the alignment position to the left and up and down, and the decreasing difference is not limited to 1. In addition, the mask matrix M[a×b] can also use machine learning to obtain a better size.
圖9A所示該遮罩矩陣M具有一對準位置7。當該遮罩矩陣M對預測矩陣Y進行卷積運算,係以該遮罩矩陣M的對準位置7逐一對準預測矩陣Y的每一元素進行運算後即可得到一平滑預測矩陣。例如,該遮罩矩陣M對預測矩陣Y的元素進行卷積運算的計算範圍8,包含該遮罩矩陣M對預測矩陣Y的重疊元素。元素進行卷積運算如以下式子表示:
上述式子僅為圖9A一計算之實施例,遮罩矩陣M對預測矩陣Y的計算會根據重疊元素不同而有不同計算之重疊,係以該遮罩矩陣M的對準位置7逐一對準預測矩陣Y的每一元素進行運算後即可得到一平滑預測矩陣。此外,根據遮罩矩陣M的不同設計,其對準位置7也可以有不同位置,例如:圖9A所示對準位置7在;或者亦可在或代表考慮待測時間點及該點在其他週期之對應時間點之前、後的影響。遮罩矩陣M的尺寸亦可 嘗試不同大小。非零數值的權重值亦可僅有上半部三角形,代表不考慮待測時間點及該點在其他週期之對應時間點之後的影響。 The above formula is only an example of the calculation of FIG. 9A. The calculation of the mask matrix M on the prediction matrix Y will have different overlaps according to different overlapping elements. A smooth prediction matrix can be obtained by aligning the alignment position 7 of the mask matrix M with each element of the prediction matrix Y one by one. In addition, according to different designs of the mask matrix M, its alignment position 7 can also have different positions. For example, the alignment position 7 shown in FIG. 9A is Or you can or It means that the influence of the time point to be tested and the time point before and after the corresponding time point in other cycles is considered. The size of the mask matrix M can also be tried in different sizes. The non-zero weight value can also only have the upper triangle, which means that the influence of the time point to be tested and the time point after the corresponding time point in other cycles is not considered.
請參考圖9B,當預測矩陣Y依時間序列展開為預測序列時,第9週期之元素y 3即為預測矩陣Y的元素。當卷積運算的重疊元素都在預測矩陣Y的前接續週期的範圍內時,如圖9A所示計算範圍8,該遮罩矩陣M與該預測矩陣的卷積運算,是基於該預測矩陣中該預測向量[n×1]關聯前接續週期的預測向量的影響。如圖9B所示,以預測序列了解卷積運算的計算範圍,該遮罩矩陣M的對準位置7對準預測序列的第9週期之元素y3時,卷積運算是關聯前接續第7與第8週期,計算範圍包含前接續第7與第8週期的5個重疊元素。 Please refer to FIG. 9B , when the prediction matrix Y is expanded into a prediction sequence according to the time series, the element y 3 of the 9th period is the element of the prediction matrix Y . When the overlapping elements of the convolution operation are all within the range of the previous successive cycle of the prediction matrix Y , the calculation range is 8 as shown in FIG9A , and the convolution operation of the mask matrix M and the prediction matrix is based on the influence of the prediction vector [n×1] in the prediction matrix being associated with the prediction vector of the previous successive cycle. As shown in FIG9B , the calculation range of the convolution operation is understood by the prediction sequence, and when the alignment position 7 of the mask matrix M is aligned with the element y 3 of the 9th cycle of the prediction sequence, the convolution operation is associated with the 7th and 8th previous successive cycles, and the calculation range includes 5 overlapping elements of the 7th and 8th previous successive cycles.
因此,該些前接續週期的對應時點與對準位置7的時點之間的距離會依據預設的權重值進行遮罩矩陣M之處理。卷積計算的目的在於對預測序列作平滑化處理,避免導致系統偵測過於敏感而誤判,除了本身偵測到的數值(對準位置7所對應的元素)之外,另外參考縱軸前後時間單位的前後接續元素,以及前接續週期同時間點之對應元素依照不同的權重進行計算。 Therefore, the distance between the corresponding time points of the previous successive cycles and the time point of the alignment position 7 will be processed by the mask matrix M according to the preset weight value. The purpose of the convolution calculation is to smooth the predicted sequence to avoid causing the system to be overly sensitive and misjudged. In addition to the detected value itself (the element corresponding to the alignment position 7), the previous and subsequent elements of the previous and subsequent time units on the vertical axis and the corresponding elements of the same time point in the previous successive cycle are also referred to for calculation according to different weights.
當該遮罩矩陣M對預測矩陣Y的重疊元素超出預測矩陣Y的前接續週期的範圍時,在本發明的不同實施例將有不同的計算範圍。在本發明的一種實施例中,該遮罩矩陣M與該預測矩陣的卷積運算,是基於該預測矩陣中該預測向量[n×1]關聯前接續週期或後接續週期的預測向量依該時間序列之接續數據的影響,其卷積運算的計算範圍包含計算關聯的前接續週期或後接續週期的預測向量之接續數據與該遮罩矩陣M之對應權重值 之乘積,如圖10與圖12所示。在本發明的另一種實施例中,該遮罩矩陣M與該預測矩陣的卷積運算,是基於該預測矩陣中該預測向量不關聯前接續週期或後接續週期的預測向量依該時間序列之接續數據的影響,其卷積運算的計算範圍不包含計算關聯的前一個週期或後一個週期的預測向量之接續數據與該遮罩矩陣M之對應權重值之乘積,如圖11與圖13所示。 When the overlapping elements of the mask matrix M on the prediction matrix Y exceed the range of the previous successive cycle of the prediction matrix Y , different embodiments of the present invention will have different calculation ranges. In one embodiment of the present invention, the convolution operation of the mask matrix M and the prediction matrix is based on the influence of the prediction vector [n×1] in the prediction matrix on the continuous data of the previous successive cycle or the subsequent successive cycle according to the time series, and the calculation range of the convolution operation includes calculating the product of the continuous data of the prediction vector of the previous successive cycle or the subsequent successive cycle associated with the calculation and the corresponding weight value of the mask matrix M, as shown in Figures 10 and 12. In another embodiment of the present invention, the convolution operation of the mask matrix M and the prediction matrix is based on the influence of the prediction vector in the prediction matrix on the successive data of the time series that is not associated with the prediction vector of the previous successive cycle or the subsequent successive cycle, and the calculation range of the convolution operation does not include the product of the successive data of the prediction vector of the previous cycle or the subsequent cycle that is associated with the calculation and the corresponding weight value of the mask matrix M, as shown in Figures 11 and 13.
參考圖10,顯示當該遮罩矩陣M與預測矩陣的疊合超過週期範圍,以元素與的卷積運算為例,在本發明的一種實施例中,卷積運算關聯前接續週期或後接續週期的預測向量依該時間序列之接續數據的影響。當遮罩矩陣M對元素進行卷積運算時,計算範圍8將包含前接續第6、7、8週期的接續數據y 5與y 6;當遮罩矩陣M對元素進行卷積運算時,計算範圍8將包含後接續第8、9、10週期的接續數據y 1與y z。 Referring to FIG. 10 , it is shown that when the mask matrix M and the prediction matrix are superimposed over a period range, the element and As an example, in one embodiment of the present invention, the convolution operation is used to associate the prediction vector of the previous successive cycle or the next successive cycle with the influence of the successive data of the time series. When performing convolution operation, the calculation range 8 will include the continuous data y 5 and y 6 of the previous 6th, 7th and 8th cycles; when the mask matrix M is When performing convolution operations, calculation range 8 will include the subsequent data y 1 and y z of the 8th, 9th, and 10th cycles.
參考圖11,顯示當該遮罩矩陣M與預測矩陣的疊合超過週期範圍,以元素與的卷積運算為例,在本發明的另一種實施例中,卷積運算不關聯前接續週期或後接續週期的預測向量依該時間序列之接續數據的影響。當遮罩矩陣M對元素進行卷積運算時,計算範圍8將不包含前接續第6、7、8週期的接續數據y 5與y 6;當遮罩矩陣M對元素進行卷積運算時,計算範圍8將不包含後接續第8、9、10週期的接續數據y 1與y 2。 Referring to FIG. 11, it is shown that when the mask matrix M and the prediction matrix are superimposed over a period range, the element and As an example, in another embodiment of the present invention, the convolution operation is not associated with the influence of the prediction vector of the previous successive cycle or the subsequent successive cycle on the successive data of the time series. When performing convolution operation, the calculation range 8 will not include the continuous data y 5 and y 6 of the previous 6th, 7th, and 8th cycles; when the mask matrix M is When performing convolution operations, the calculation range 8 will not include the subsequent data y 1 and y 2 of the 8th, 9th, and 10th cycles.
其中如圖10之矩陣遮罩M計算方式以理論上對於平滑處理能夠得到較準確的結果,但是由於其遮罩矩陣M與預測矩陣的疊合超過週期範圍,會導致計算量較多;其中,元素進行卷積運算如以下式子表示:
上述式子僅為圖10一計算之實施例,遮罩矩陣M對預測矩陣Y的計算會根據重疊元素不同而有不同計算之重疊,係以該遮罩矩陣M的對準位置逐一對準預測矩陣Y的每一元素進行運算後即可得到一平滑預測矩陣。 The above formula is only an implementation example of the calculation of Figure 10. The calculation of the mask matrix M on the prediction matrix Y will have different overlaps according to the overlapping elements. A smooth prediction matrix can be obtained by aligning each element of the prediction matrix Y one by one with the alignment position of the mask matrix M and performing operations.
相對應地,另一種方式如圖11之矩陣遮罩M計算方式將遮罩超出矩陣邊界的部分,則不予考慮計算,或給予零權重使其不影響計算,將計算範圍限縮,可以使計算量變小,又不會對於平滑處理的準確性產生足以影響判斷之差別;其中,元素進行卷積運算如以下式子表示:
上述式子僅為圖11一計算之實施例,遮罩矩陣M對預測矩陣Y的計算會根據重疊元素不同而有不同計算之重疊,係以該遮罩矩陣M的對準位置逐一對準預測矩陣Y的每一元素進行運算後即可得到一平滑預測矩陣。 The above formula is only an implementation example of the calculation in Figure 11. The calculation of the mask matrix M on the prediction matrix Y will have different overlaps according to the overlapping elements. A smooth prediction matrix can be obtained by aligning each element of the prediction matrix Y one by one with the alignment position of the mask matrix M and performing operations.
參考圖12,顯示若第7週期對應預測矩陣的第一個預測向量,該遮罩矩陣M對第一個預測向量進行卷積運算,以元素與的卷積運算為例,則該遮罩矩陣M與預測矩陣的疊合超過週期範圍。在本發明的一種實施例中,卷積運算關聯前接續週期或後接續週期的預測向量依該時間序列之接續數據的影響。當遮罩矩陣M對元素進行卷積運算時,計算範圍8僅包含第7週期的疊合元素,並無前接續週期的接續數據;當遮罩矩陣M對元素進行卷積運算時,計算範圍8將包含後接續第8週期的接續數據y 1與y 2,並無前接續週期的接續數據。 Referring to FIG. 12 , it is shown that if the 7th cycle corresponds to the first prediction vector of the prediction matrix, the mask matrix M performs a convolution operation on the first prediction vector, with the element and For example, the convolution operation of the mask matrix M and the prediction matrix overlaps the cycle range. In one embodiment of the present invention, the convolution operation is associated with the influence of the prediction vector of the previous successive cycle or the subsequent successive cycle on the successive data of the time series. When performing convolution operations, the calculation range 8 only includes the superposition elements of the 7th cycle, and does not include the continuation data of the previous cycle; when the mask matrix M is When performing convolution operation, the calculation range 8 will include the subsequent data y 1 and y 2 of the 8th cycle, but not the subsequent data of the previous cycle.
參考圖13,顯示若第7週期對應預測矩陣的第一個預測向量,該遮罩矩陣M對第一個預測向量進行卷積運算,以元素與的卷積運算為例,則該遮罩矩陣M與預測矩陣的疊合超過週期範圍。在本發明的另一種實施例中,卷積運算不關聯前接續週期或後接續週期的預測向量依該時間序列之接續數據的影響。當遮罩矩陣M對元素進行卷積運算時,計算範圍8僅包含第7週期的疊合元素,並無前接續週期的接續數據;當遮罩矩陣M對元素進行卷積運算時,計算範圍8將包含後接續第8週期的接續數據y 1與y 2,並無前接續週期以及後接續週期的接續數據。 Referring to FIG. 13 , it is shown that if the 7th cycle corresponds to the first prediction vector of the prediction matrix, the mask matrix M performs a convolution operation on the first prediction vector, with the element and For example, the convolution operation of the mask matrix M and the prediction matrix exceeds the cycle range. In another embodiment of the present invention, the convolution operation is not associated with the influence of the prediction vector of the previous or subsequent cycle on the subsequent data of the time series. When performing convolution operations, the calculation range 8 only includes the superposition elements of the 7th cycle, and does not include the continuation data of the previous cycle; when the mask matrix M is When performing convolution operation, the calculation range 8 will include the subsequent data y 1 and y 2 of the 8th subsequent cycle, and will not include the subsequent data of the previous and subsequent cycles.
參考圖14,顯示若將一週期性之預測矩陣Y透過遮罩矩陣M進行卷積運算後,所形成之平滑預測矩陣展開之平滑預測序列S與進行卷積運算前之預測矩陣Y展開之一對應圖表,將預測矩陣Y展開後與經過平滑化卷積運算後展開之平滑化預測序列S,其縱軸變化幅度從而趨緩,其中預測矩陣Y與平滑化預測序列S的第一個週期係時間序列上的該對應週期。在本發明的另一種實施例中,平滑化預測序列S之縱軸值之變化幅度明顯低於預測矩陣Y之展開,以達成卷積計算之目的,即對預測序列作平滑化處理,避免導致系統偵測過於敏感而誤判。 Referring to FIG. 14 , a corresponding graph is shown of a smoothed prediction sequence S formed by expanding a smoothed prediction matrix formed by performing a convolution operation on a periodic prediction matrix Y through a mask matrix M and the prediction matrix Y before the convolution operation. The longitudinal variation amplitude of the smoothed prediction sequence S after the prediction matrix Y is expanded and after the smoothed convolution operation slows down, wherein the first period of the prediction matrix Y and the smoothed prediction sequence S is the corresponding period on the time series. In another embodiment of the present invention, the variation range of the vertical axis value of the smoothed prediction sequence S is significantly lower than the expansion of the prediction matrix Y , so as to achieve the purpose of convolution calculation, that is, to smooth the prediction sequence to avoid causing the system detection to be too sensitive and misjudgment.
S101~S111:步驟 S101~S111: Steps
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW111149645A TWI848481B (en) | 2022-12-23 | 2022-12-23 | Predicting and alerting system and method, modeling and training systems and methods of information system operation and computer program products thereof |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW111149645A TWI848481B (en) | 2022-12-23 | 2022-12-23 | Predicting and alerting system and method, modeling and training systems and methods of information system operation and computer program products thereof |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| TW202427232A TW202427232A (en) | 2024-07-01 |
| TWI848481B true TWI848481B (en) | 2024-07-11 |
Family
ID=92929043
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| TW111149645A TWI848481B (en) | 2022-12-23 | 2022-12-23 | Predicting and alerting system and method, modeling and training systems and methods of information system operation and computer program products thereof |
Country Status (1)
| Country | Link |
|---|---|
| TW (1) | TWI848481B (en) |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20180012132A1 (en) * | 2016-07-08 | 2018-01-11 | Curtis MEADOW | Method for performing automated analysis of sensor data time series |
| CN111897673A (en) * | 2020-07-31 | 2020-11-06 | 平安科技(深圳)有限公司 | Operation and maintenance fault root cause identification method and device, computer equipment and storage medium |
| TW202101337A (en) * | 2019-06-20 | 2021-01-01 | 南韓商韓領有限公司 | System and method for generatingalerts and non-transitory computer-readable medium |
| US20220092418A1 (en) * | 2020-12-22 | 2022-03-24 | Beijing Baidu Netcom Science Technology Co., Ltd. | Training method for air quality prediction model, prediction method and apparatus, device, program, and medium |
| CN114595448A (en) * | 2022-03-14 | 2022-06-07 | 山东省计算中心(国家超级计算济南中心) | Industrial control anomaly detection method, system and equipment based on correlation analysis and three-dimensional convolution and storage medium |
| TW202223769A (en) * | 2020-11-10 | 2022-06-16 | 環球晶圓股份有限公司 | Systems and methods for enhanced machine learning using hierarchical prediction and compound thresholds |
| CN115456075A (en) * | 2022-09-14 | 2022-12-09 | 中国电子科技集团公司第十研究所 | Processing system and method for target behavior abnormity early warning |
-
2022
- 2022-12-23 TW TW111149645A patent/TWI848481B/en active
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20180012132A1 (en) * | 2016-07-08 | 2018-01-11 | Curtis MEADOW | Method for performing automated analysis of sensor data time series |
| TW202101337A (en) * | 2019-06-20 | 2021-01-01 | 南韓商韓領有限公司 | System and method for generatingalerts and non-transitory computer-readable medium |
| CN111897673A (en) * | 2020-07-31 | 2020-11-06 | 平安科技(深圳)有限公司 | Operation and maintenance fault root cause identification method and device, computer equipment and storage medium |
| TW202223769A (en) * | 2020-11-10 | 2022-06-16 | 環球晶圓股份有限公司 | Systems and methods for enhanced machine learning using hierarchical prediction and compound thresholds |
| US20220092418A1 (en) * | 2020-12-22 | 2022-03-24 | Beijing Baidu Netcom Science Technology Co., Ltd. | Training method for air quality prediction model, prediction method and apparatus, device, program, and medium |
| CN114595448A (en) * | 2022-03-14 | 2022-06-07 | 山东省计算中心(国家超级计算济南中心) | Industrial control anomaly detection method, system and equipment based on correlation analysis and three-dimensional convolution and storage medium |
| CN115456075A (en) * | 2022-09-14 | 2022-12-09 | 中国电子科技集团公司第十研究所 | Processing system and method for target behavior abnormity early warning |
Also Published As
| Publication number | Publication date |
|---|---|
| TW202427232A (en) | 2024-07-01 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP7007243B2 (en) | Anomaly detection system | |
| TWI663510B (en) | Equipment maintenance forecasting system and operation method thereof | |
| US9858106B2 (en) | Virtual machine capacity planning | |
| JPWO2018104985A1 (en) | Anomaly analysis method, program and system | |
| JP7466197B2 (en) | Fault analysis device, manufacturing system, fault analysis method and program | |
| KR101960755B1 (en) | Method and apparatus of generating unacquired power data | |
| CN118211837A (en) | A performance evaluation method and device for smart electric meter | |
| CN112350878A (en) | Pressure test system | |
| JPWO2016147657A1 (en) | Information processing apparatus, information processing method, and program | |
| CN118331822A (en) | Abnormal information detection method and device, storage medium and electronic device | |
| CN119809618B (en) | AI-based floor wiper production equipment abnormality prediction system and method | |
| CN119806967B (en) | Equipment monitoring method and system based on deep learning | |
| US20250265591A1 (en) | System for identifying points of compromise | |
| US20240184284A1 (en) | Information processing device and information processing method | |
| US11762562B2 (en) | Performance analysis apparatus and performance analysis method | |
| CN118378155A (en) | A fault detection method and system for intelligent middleware | |
| CN118838748A (en) | Memory fault prediction method and device, storage medium and electronic equipment | |
| TWI848481B (en) | Predicting and alerting system and method, modeling and training systems and methods of information system operation and computer program products thereof | |
| CN118626808B (en) | Nozzle clogging detection method, apparatus, storage medium, and computer device | |
| CN111258863A (en) | Data anomaly detection method, device, server and computer-readable storage medium | |
| CN119598422A (en) | Flexible direct-current power distribution network fault prediction method, device, equipment and medium | |
| CN120030486A (en) | A method, device and storage medium for monitoring abnormal power data | |
| KR20230013818A (en) | System and Method for early warning using cumulative weigh of correlation | |
| CN115077906B (en) | Method, device, electronic equipment and medium for determining the cause of frequent engine failures | |
| JP2007164346A (en) | Decision tree changing method, abnormality determination method and program |