TWI754446B - System and method for maintaining model inference quality - Google Patents

System and method for maintaining model inference quality Download PDF

Info

Publication number
TWI754446B
TWI754446B TW109138630A TW109138630A TWI754446B TW I754446 B TWI754446 B TW I754446B TW 109138630 A TW109138630 A TW 109138630A TW 109138630 A TW109138630 A TW 109138630A TW I754446 B TWI754446 B TW I754446B
Authority
TW
Taiwan
Prior art keywords
inference
model
data set
data
processing unit
Prior art date
Application number
TW109138630A
Other languages
Chinese (zh)
Other versions
TW202219845A (en
Inventor
林信宏
Original Assignee
中華電信股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中華電信股份有限公司 filed Critical 中華電信股份有限公司
Priority to TW109138630A priority Critical patent/TWI754446B/en
Application granted granted Critical
Publication of TWI754446B publication Critical patent/TWI754446B/en
Publication of TW202219845A publication Critical patent/TW202219845A/en

Links

Images

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a system and method for maintaining model inference quality. A comparison processing unit extracts an inference data set from an inference information database, compares corresponding feature fields of a training data set of an inference model and the inference data set to perform data distribution consistency verification, and determines whether the data distribution of the corresponding feature fields of the training data set of the inference model and the inference data set are consistent according to result of data distribution consistency verification. When the data distribution is inconsistent, the comparison processing unit finds a training data set with similar distribution to the inference data set from a historical training data set, deploys a trained historical model according the training data set with similar distribution to a model server unit to update or replace the inference model to provide inference services, thereby maintaining model inference quality.

Description

維持模型推論品質之系統及其方法 System and method for maintaining model inference quality

本發明係關於一種模型推論品質之技術,特別是指一種維持模型推論品質之系統及其方法。 The present invention relates to a technology for model inference quality, and more particularly to a system and method for maintaining model inference quality.

機器學習模型的各式應用已隨著資料收容完備與商業需求增進而日漸廣泛,資料分析師除了具有各種行業領域的知識外,亦必須熟悉各種演算法以訓練出適合產業應用的推論模型,進而將推論模型部署至伺服主機以提供資訊系統的推論服務。而且,在冗長的模型供應鏈上,使用者要面對的是模型訓練演算法的選擇、模型訓練參數的記錄管理、以及模型上線服務後的比較和更新。 Various applications of machine learning models have become more and more extensive with the improvement of data storage and commercial demand. In addition to knowledge in various industry fields, data analysts must also be familiar with various algorithms to train inference models suitable for industrial applications, and then Deploy the inference model to the server to provide inference services for the information system. Moreover, in the lengthy model supply chain, users have to face the selection of model training algorithms, the record management of model training parameters, and the comparison and update of models after they go online.

惟,習知技術中模型的訓練產生大多由使用者選擇演算法、手動調整參數、反覆訓練,再以評估指標選擇最佳的機器學習模型,但模型訓練參數與評估指標並無記錄於系統中。同時,推論模型於部署上線後,提供資訊系統呼叫使用時,可能會因資料隨時間變化而影響模型推論的效能,故除了提早預警模型推論效能不足外,必須有方法置換或更新推論模型以維持對於真實情境的預測能力。 However, the training of the model in the conventional technology is mostly performed by the user selecting the algorithm, manually adjusting the parameters, repeating the training, and then selecting the best machine learning model based on the evaluation indicators, but the model training parameters and evaluation indicators are not recorded in the system. . At the same time, after the inference model is deployed and launched, when the information system is called for use, the performance of the model inference may be affected by the change of the data over time. Therefore, in addition to early warning of the insufficient inference performance of the model, there must be a method to replace or update the inference model to maintain Predictive ability for real situations.

又,習知技術中大多以推論模型的準確率指標判斷推論模型的效能是否符合需求,而推論模型的準確率的計算皆需要等待實際值產生後才能與推論模型的預測值作比較,如果推論模型的準確率下降則利用新進資料重新訓練推論模型,再將推論模型部署上線以提供應用,故習知技術對於模型推論品質屬於事後被動處理且無法及時維持。 In addition, most of the conventional techniques use the accuracy index of the inference model to determine whether the performance of the inference model meets the requirements, and the calculation of the accuracy of the inference model needs to wait for the actual value to be generated before it can be compared with the predicted value of the inference model. When the accuracy of the model decreases, the inference model is retrained with new data, and then the inference model is deployed online to provide applications. Therefore, the conventional technology is a passive process for the quality of model inference and cannot be maintained in time.

另外,習知技術以模型績效指標或模型健康度等檢驗推論模型的效能,當推論模型的效能低於設定預期時,僅能以新進資料重新訓練推論模型,再將推論模型重新上線以提供推論服務。 In addition, conventional technologies use model performance indicators or model health to test the performance of the inference model. When the performance of the inference model is lower than the set expectations, the inference model can only be retrained with new data, and then the inference model can be re-launched to provide inferences Serve.

因此,如何提供一種創新之模型推論品質之技術,以解決例如上述習知技術的一或多個問題,已成為本領域技術人員之一大研究課題。 Therefore, how to provide an innovative technology of model inference quality to solve one or more problems of the above-mentioned conventional technology has become a major research topic for those skilled in the art.

本發明提供一種創新之維持模型推論品質之系統及其方法,利用推論模型的訓練資料集與推論資料集進行分佈一致的比較,或比較推論資料集與歷史資料集的特徵欄位,或者提升對於模型品質判斷的時效性,抑或者節省重新訓練推論模型的時間。 The present invention provides an innovative system and method for maintaining model inference quality, using the training data set of the inference model and the inference data set to perform consistent distribution comparison, or to compare the feature fields of the inference data set and the historical data set, or to improve the The timeliness of model quality judgment, or save the time of retraining the inference model.

本發明中維持模型推論品質之系統包括:推論資訊庫與模型版本資訊庫,係分別儲存有推論資料集與訓練資料集;模型伺服單元,係用以部署推論模型;以及比較處理單元,係設定比較週期,以於推論資料集的資料累積時間達到所設定的比較週期時,由比較處理單元從推論資訊庫中擷取推論資料集,以供比較處理單元比較模型伺服單元中所部署的推論模型的訓練資料集與從推論資訊庫中所擷取的推論資料集兩者的對應特 徵欄位以進行兩者的資料分佈一致性檢定,再由比較處理單元依據資料分佈一致性檢定的結果判斷推論模型的訓練資料集與推論資料集兩者的對應特徵欄位的資料分佈是否一致,當該資料分佈不一致時,由比較處理單元從模型版本資訊庫所儲存的歷史的訓練資料集中找出與推論資料集相似分佈的訓練資料集,以依據相似分佈的訓練資料集將已訓練完成的歷史模型從模型版本資訊庫中部署至模型伺服單元,進而將已訓練完成的歷史模型更新或取代模型伺服單元中的推論模型來提供推論服務,俾維持模型推論品質。 The system for maintaining model inference quality in the present invention includes: an inference information base and a model version information base, which store an inference data set and a training data set respectively; a model server unit for deploying the inference model; and a comparison processing unit for setting A comparison period, so that when the data accumulation time of the inference data set reaches the set comparison period, the comparison processing unit retrieves the inference data set from the inference information database, so that the comparison processing unit can compare the inference model deployed in the model server unit The corresponding characteristics of the training data set and the inference data set extracted from the inference database Then, the comparison processing unit judges whether the data distribution of the corresponding feature fields of the training data set of the inference model and the inference data set are consistent according to the results of the data distribution consistency test. , when the data distribution is inconsistent, the comparison processing unit finds a training data set with a similar distribution to the inference data set from the historical training data set stored in the model version information database, and completes the training according to the similar distribution of the training data set The historical model of the model is deployed to the model server unit from the model version information database, and then the trained historical model is updated or replaced with the inference model in the model server unit to provide inference services, so as to maintain the model inference quality.

本發明中維持模型推論品質之方法包括:令比較處理單元設定比較週期,以於推論資料集的資料累積時間達到所設定的比較週期時,由比較處理單元從推論資訊庫中擷取推論資料集;令比較處理單元比較模型伺服單元中所部署的推論模型的訓練資料集與從推論資訊庫中所擷取的推論資料集兩者的對應特徵欄位以進行兩者的資料分佈一致性檢定,再由比較處理單元依據資料分佈一致性檢定的結果判斷推論模型的訓練資料集與推論資料集兩者的對應特徵欄位的資料分佈是否一致;以及當該資料分佈不一致時,由比較處理單元從模型版本資訊庫所儲存的歷史的訓練資料集中找出與推論資料集相似分佈的訓練資料集,以依據相似分佈的訓練資料集將已訓練完成的歷史模型從模型版本資訊庫中部署至模型伺服單元,進而將已訓練完成的歷史模型更新或取代模型伺服單元中的推論模型來提供推論服務,俾維持模型推論品質。 The method for maintaining model inference quality in the present invention includes: setting a comparison period for the comparison processing unit, so that when the data accumulation time of the inference data set reaches the set comparison period, the comparison processing unit retrieves the inference data set from the inference information database ; Let the comparison processing unit compare the corresponding feature fields of the training data set of the inference model deployed in the model server unit and the inference data set retrieved from the inference information database to perform a data distribution consistency check of the two, Then, the comparison processing unit judges whether the data distribution of the corresponding feature fields of the training data set of the inference model and the inference data set are consistent according to the result of the data distribution consistency check; Find a training data set with similar distribution to the inference data set from the historical training data set stored in the model version information database, so as to deploy the trained historical model from the model version information database to the model server according to the similar distribution of the training data set unit, and then update or replace the inference model in the model server unit with the historical model that has been trained to provide inference service, so as to maintain the model inference quality.

為讓本發明之上述特徵與優點能更明顯易懂,下文特舉實施例,並配合所附圖式作詳細說明。在以下描述內容中將部分闡述本發明之 額外特徵及優點,且此等特徵及優點將部分自所述描述內容可得而知,或可藉由對本發明之實踐習得。應理解,前文一般描述與以下詳細描述二者均僅為例示性及解釋性的,且不欲約束本發明所欲主張之範圍。 In order to make the above-mentioned features and advantages of the present invention more obvious and easy to understand, the following embodiments are given and described in detail with the accompanying drawings. Some aspects of the present invention will be set forth in the following description. Additional features and advantages will come, in part, from the description, or may be learned by practice of the present invention. It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not intended to limit the scope of the invention as claimed.

1:維持模型推論品質之系統 1: A system to maintain the quality of model inferences

10:模型版本資訊庫 10: Model Version Information Base

20:比較處理單元 20: Compare Processing Units

30:模型伺服單元 30: Model servo unit

40:模型應用單元 40: Model Application Unit

50:推論資訊庫 50: Inference Information Base

AX:訓練資料集 AX: training dataset

BX:歷史資料集 BX: Historical Data Collection

C:推論資料 C: Inference data

CX:推論資料集 CX: Inference Dataset

D:模型元資料 D: Model metadata

M:推論模型 M: Inference model

N:歷史模型 N: Historical Model

S1至S7:步驟 S1 to S7: Steps

圖1為本發明中維持模型推論品質之系統的架構示意圖;以及 FIG. 1 is a schematic structural diagram of a system for maintaining model inference quality in the present invention; and

圖2為本發明中維持模型推論品質之系統及其方法的流程示意圖。 FIG. 2 is a schematic flowchart of the system and method for maintaining model inference quality in the present invention.

以下藉由特定的具體實施形態說明本發明之實施方式,熟悉此技術之人士可由本說明書所揭示之內容了解本發明之其它優點與功效,亦可因而藉由其它不同的具體等同實施形態加以施行或運用。 The embodiments of the present invention will be described below by means of specific specific embodiments. Those skilled in the art can understand other advantages and effects of the present invention from the contents disclosed in this specification, and can also be implemented by other specific and equivalent embodiments. or use.

圖1為本發明中維持模型推論品質之系統1的架構示意圖。如圖所示,維持模型推論品質之系統1至少包括互相連接或通訊之一模型版本資訊庫10(或稱模型資訊庫)、一比較處理單元20、一模型伺服單元30(或稱模型推論單元)、一模型應用單元40與一推論資訊庫50。 FIG. 1 is a schematic structural diagram of a system 1 for maintaining model inference quality in the present invention. As shown in the figure, the system 1 for maintaining model inference quality at least includes a model version information base 10 (or model information base) that is connected or communicated with each other, a comparison processing unit 20 , and a model server unit 30 (or model inference unit) ), a model application unit 40 and an inference information base 50 .

在一實施例中,比較處理單元20可為處理器(如中央處理器/微處理器)、處理晶片、處理電路、處理軟體(處理程式)、比較器、比較電路、比較軟體(比較程式)等,模型伺服單元30可為伺服主機、模型伺服器等,模型應用單元40可為模型應用軟體(模型應用程式)、應用程式介面等。模型版本資訊庫10或推論資訊庫50可利用關聯式資料庫(Relational Database)、物件導向資料庫(Object-oriented Database)、階層式資料庫、網路式資料庫等各式資料庫予以實作,或者單純利用檔案系統予以實作。但是,本發明並不以此為限。 In one embodiment, the comparison processing unit 20 may be a processor (such as a central processing unit/microprocessor), a processing chip, a processing circuit, a processing software (processing program), a comparator, a comparison circuit, a comparison software (comparing program) etc., the model server unit 30 may be a server host, a model server, etc., and the model application unit 40 may be a model application software (model application program), an application program interface, and the like. The model version repository 10 or the inference repository 50 may use a relational database Database), object-oriented database (Object-oriented Database), hierarchical database, network database and other databases to implement, or simply use the file system to implement. However, the present invention is not limited to this.

比較處理單元20係設定比較週期,以於推論資料集CX的資料累積時間達到所設定的比較週期時,由比較處理單元20從推論資訊庫50中擷取推論資料集CX。比較處理單元20亦可比較模型伺服單元30中所部署的推論模型M的訓練資料集AX與從推論資訊庫50中所擷取的推論資料集CX兩者的對應特徵欄位以進行兩者的資料分佈一致性檢定,再由比較處理單元20依據資料分佈一致性檢定的結果判斷推論模型M的訓練資料集AX與推論資料集CX兩者的對應特徵欄位的資料分佈是否一致。如果推論模型M的訓練資料集AX與推論資料集CX兩者的資料分佈不一致,則比較處理單元20可從模型版本資訊庫10所儲存的歷史的訓練資料集AX中找出與推論資料集CX相似分佈的訓練資料集AX,以依據相似分佈的訓練資料集AX將已訓練完成的歷史模型N從模型版本資訊庫10中部署至模型伺服單元30,進而將已訓練完成的歷史模型N更新或取代模型伺服單元30中的推論模型M來提供推論服務,俾維持模型推論品質。 The comparison processing unit 20 sets a comparison period, so that when the data accumulation time of the inference data set CX reaches the set comparison period, the comparison processing unit 20 retrieves the inference data set CX from the inference information database 50 . The comparison processing unit 20 can also compare the corresponding feature fields of the training data set AX of the inference model M deployed in the model server unit 30 and the inference data set CX retrieved from the inference database 50 to perform the comparison between the two. In the data distribution consistency check, the comparison processing unit 20 determines whether the data distributions of the corresponding feature fields of the training data set AX and the inference data set CX of the inference model M are consistent according to the results of the data distribution consistency check. If the data distributions of the training data set AX and the inference data set CX of the inference model M are inconsistent, the comparison processing unit 20 can find the inference data set CX from the historical training data set AX stored in the model version information database 10 . The similarly distributed training data set AX is used to deploy the trained historical model N from the model version information database 10 to the model server unit 30 according to the similarly distributed training data set AX, and then the trained historical model N is updated or The inference service is provided in place of the inference model M in the model server unit 30 to maintain the model inference quality.

申言之,模型版本資訊庫10係儲存訓練完成的歷史模型N(如歷史推論模型)、模型元資料D、訓練資料集AX與歷史資料集BX等,且已訓練完成的推論模型M可上線至模型伺服單元30(模型推論單元)以提供推論服務。模型應用單元40係透過應用程式介面將推論資料C(如特徵資料)傳送至模型伺服單元30,以由模型伺服單元30將推論資料C(如特徵資料)儲存至推論資訊庫50並將推論結果回覆予模型應用單元40。比較 處理單元20係擷取(如定期擷取)推論資訊庫50中的推論資料集CX來與模型版本資訊庫10中的訓練資料集AX及歷史資料集BX進行各特徵資料分佈比較與資料集整合比較,以依據比較結果決定是否更新推論模型M。 In other words, the model version information database 10 stores the trained historical model N (such as the historical inference model), the model metadata D, the training data set AX and the historical data set BX, etc., and the trained inference model M can be launched online. to the model server unit 30 (model inference unit) to provide inference services. The model application unit 40 transmits the inference data C (such as feature data) to the model server unit 30 through the application programming interface, so that the model server unit 30 stores the inference data C (such as the feature data) in the inference database 50 and the inference result. Reply to the model application unit 40 . Compare The processing unit 20 retrieves (eg periodically retrieves) the inference data set CX in the inference information database 50 to perform distribution comparison and data set integration of each feature data with the training data set AX and the historical data set BX in the model version information database 10 comparison, so as to decide whether to update the inference model M according to the comparison result.

在推論模型M完成訓練後,將訓練資料集AX(如模型訓練資料集)、模型元資料D與訓練參數儲存於模型版本資訊庫10。當推論模型M部署於模型伺服單元30(模型推論單元)後,模型伺服單元30可持續將欲預測的推論資料C(如特徵資料)儲存於推論資訊庫50,且比較處理單元20可定期比較歷史的訓練資料集AX(如模型訓練資料集)。若欲預測的推論資料C(如特徵資料)與推論模型M(如目前的推論模型)於訓練時採用的資料集的分佈不一致,則代表推論模型M(如目前的推論模型)必須更新,故可從模型版本資訊庫10中提取適合或相似分佈的資料集所訓練出的推論模型M以逕行部署至模型伺服單元30(模型推論單元)。因此,本發明不需等待實際值產生後再計算實際值與預測值的差異,即可主動判斷推論模型M(如目前的推論模型)是否適合目前的推論資料C(如特徵資料)。同時,本發明可以不需要重新訓練推論模型M,即能重複利用已訓練的歷史模型N(如歷史推論模型)並及時於模型伺服單元30中部署上線。而且,本發明對於模型推論品質屬於主動判斷且及時維持,亦有利於節省重新訓練推論模型M的時間。 After the inference model M is trained, the training data set AX (eg, the model training data set), the model metadata D and the training parameters are stored in the model version information database 10 . After the inference model M is deployed in the model server unit 30 (model inference unit), the model server unit 30 can continuously store the inference data C (such as characteristic data) to be predicted in the inference database 50, and the comparison processing unit 20 can periodically compare Historical training dataset AX (eg model training dataset). If the distribution of the data set used in the training of the inference data C (such as the feature data) to be predicted and the inference model M (such as the current inference model) is inconsistent, it means that the inference model M (such as the current inference model) must be updated, so The inference model M trained from a data set of suitable or similar distribution can be extracted from the model version information database 10 and deployed to the model server unit 30 (model inference unit). Therefore, the present invention can actively determine whether the inference model M (such as the current inference model) is suitable for the current inference data C (such as the characteristic data) without waiting for the actual value to be generated before calculating the difference between the actual value and the predicted value. At the same time, the present invention can reuse the trained historical model N (eg, historical inference model) without retraining the inference model M and deploy it in the model servo unit 30 in time. Moreover, the present invention actively judges the inference quality of the model and maintains it in time, which is also beneficial to save time for retraining the inference model M.

由於推論模型M是以訓練資料集AX的特徵資料進行訓練,如果欲推論的推論資料C(如特徵資料)與訓練資料集AX的分佈狀況有所差異(即資料分佈不一致),則推論模型M推論出的預測值必定會偏離實際值(即產生預測不準確,正確率下降的情形)。因此,本發明可以比較訓練資 料與推論資料C(如特徵資料)的特徵分佈情況來判斷推論模型M是否適合新進資料,進而改善習知技術以預測值及實際值計算模型正確率或健康度相關指標來判斷推論模型品質的方式。 Since the inference model M is trained on the characteristic data of the training data set AX, if the inference data C (such as the characteristic data) to be inferred is different from the distribution of the training data set AX (that is, the data distribution is inconsistent), the inference model M is The inferred predicted value must deviate from the actual value (ie, the prediction is inaccurate and the accuracy rate is reduced). Therefore, the present invention can compare training materials The characteristic distribution of data and inference data C (such as characteristic data) can be used to judge whether the inference model M is suitable for new data, and then the conventional technology can be improved to use the predicted value and actual value to calculate the model accuracy rate or health related indicators to judge the quality of the inference model. Way.

習知技術的推論模型完成訓練後,如果推論模型的效能指標達到一定或可接受的門檻值,即會將推論模型部署並提供上線預測服務,然而訓練模型所使用的資料乃基於過去收集累積的,隨著推論預測持續發生,新進資料亦持續進入,但推論模型是否適合新進資料,則必須等待新進資料對應的實際值與預測值進行比較才可得知。例如,在習知技術中,工廠透過加工機具的特徵資料預測製成品的公差,但加工需要一段時間,加工完成才知道成品的實際公差與預測公差之間的誤差,若等到實際公差量測出來,發現超出容許值才汰換模型,工廠的產線已經生產許多公差不符的半成品,且累積損失大量的生產成本(包含於物料及生產時間)。因此,本發明利用資料分佈的檢驗方法,提供不需等待實際值即可檢驗推論模型M是否適合新進資料,提升判斷推論模型M是否適合的時效性。同時,本發明檢驗推論模型M與訓練資料的分佈,如果資料分佈不一致代表推論結果會產生誤差,亦即推論模型M的品質產生變異,需要從歷史模型N(如歷史推論模型)中尋找訓練資料與推論資料分佈相符的模型進行替換,以維持推論模型M的品質。 After the inference model of the conventional technology is trained, if the performance index of the inference model reaches a certain or acceptable threshold, the inference model will be deployed and the online prediction service will be provided. However, the data used for training the model is based on the accumulated data collected in the past. , as the inference prediction continues to occur, the new data also continues to enter, but whether the inference model is suitable for the new data can only be known by comparing the actual value corresponding to the new data with the predicted value. For example, in the conventional technology, the factory predicts the tolerance of the finished product through the characteristic data of the processing machine, but it takes a period of time to process, and the error between the actual tolerance and the predicted tolerance of the finished product is not known until the actual tolerance is measured. , the model was replaced when it was found that it exceeded the allowable value. The production line of the factory has produced many semi-finished products with inconsistent tolerances, and a large amount of production costs (including materials and production time) have been accumulated accumulatively. Therefore, the present invention utilizes the data distribution test method to provide the ability to test whether the inference model M is suitable for new data without waiting for the actual value, thereby improving the timeliness of judging whether the inference model M is suitable. At the same time, the present invention tests the distribution of the inference model M and the training data. If the data distribution is inconsistent, it means that the inference result will have errors, that is, the quality of the inference model M will vary, and the training data needs to be searched from the historical model N (such as the historical inference model). Models that match the distribution of the inferred data are replaced to maintain the quality of the inferred model M.

推論模型的訓練過程相當繁瑣且耗時,經常需要反覆的利用不同的訓練資料集以找到效能最佳的模型係數,但習知技術僅儲存已訓練模型的健康度相關指標紀錄,故僅能提醒使用者達到正確率下降的告警,而無法自動尋找適合推論資料的歷史模型並進一步的替換推論模型。因此, 本發明比較歷史的訓練資料集AX與推論模型M的特徵分佈,當目前於模型伺服單元30中部署上線的推論模型M的資料特徵差異過大時,可以從歷史的訓練資料集AX中找出分佈較為類似的已訓練完成的推論模型M,自動將已訓練完成的推論模型M於模型伺服單元30中進行部署並提供上線服務,以利降低推論模型M之重新訓練的時間成本。又,當推論模型M於模型伺服單元30中部署應用後,本發明的模型伺服單元30係持續擷取欲預測的推論資料C(如特徵資料)並記錄於推論資訊庫50中,以定期與歷史的訓練資料集AX比較,若推論模型M的準確度下降至低於門檻值,且欲預測的推論資料C(如特徵資料)與過去的資料集相似,則從模型版本資訊庫10中提取相似(適合)的資料集所訓練出的推論模型M以逕行部署至模型伺服單元30,不需要進行重新訓練即能重複使用歷史模型N(如歷史推論模型)。 The training process of the inference model is quite cumbersome and time-consuming. It is often necessary to repeatedly use different training data sets to find the model coefficients with the best performance. However, the conventional technology only stores the health index records of the trained model, so it can only remind The user achieves the warning that the accuracy rate drops, and cannot automatically find a historical model suitable for the inference data and further replace the inference model. therefore, The present invention compares the characteristic distribution of the historical training data set AX and the inference model M, and when the data characteristic difference of the inference model M currently deployed in the model server unit 30 is too large, the distribution can be found from the historical training data set AX For a similar trained inference model M, the trained inference model M is automatically deployed in the model server unit 30 and an online service is provided, so as to reduce the time cost of retraining the inference model M. In addition, after the inference model M is deployed and applied in the model server unit 30, the model server unit 30 of the present invention continuously captures the inference data C (such as characteristic data) to be predicted and records it in the inference information database 50, so as to periodically communicate with Compared with the historical training data set AX, if the accuracy of the inference model M drops below the threshold value, and the inference data C (such as feature data) to be predicted is similar to the past data set, it is extracted from the model version information database 10 The inference model M trained from a similar (suitable) data set is directly deployed to the model server unit 30, and the historical model N (eg, the historical inference model) can be reused without retraining.

圖2為本發明中維持模型推論品質之系統1及其方法的流程示意圖,並參閱圖1予以說明。 FIG. 2 is a schematic flowchart of the system 1 and the method for maintaining model inference quality in the present invention, and is described with reference to FIG. 1 .

如圖2之步驟S1所示,設定比較週期、歷史資料區間與門檻值(包括次數門檻值)。比較處理單元20係事先設定比較週期,隨著推論資料C(如特徵資料)持續儲存至推論資訊庫50,當推論資料集CX或推論資料C(如特徵資料)的資料累積時間達到比較週期時,比較處理單元20係透過後續步驟進行特徵資料的比較。由於推論模型M在訓練時會將訓練資料集AX記錄於模型版本資訊庫10(模型資訊庫)中,全部比較需要大量的時間,故比較處理單元20需先設定比較的歷史資料區間,以依據所設定的歷史資料區間從歷史的訓練資料集AX中找出與推論模型M最相似的歷史 訓練資料。另外,比較處理單元20需設定比較的門檻值,亦即接受資料是否一致的顯著水準,門檻值愈高,拒絕資料分佈為一致的機率愈高,而門檻值愈低,拒絕資料分佈為一致的機率愈低,在一實施例中,係依據嚴謹程度選擇門檻值為例如0.05,0.01,0.001等,且可依統計檢定的一般原則設定門檻值。 As shown in step S1 of FIG. 2 , the comparison period, the historical data interval and the threshold value (including the frequency threshold value) are set. The comparison processing unit 20 sets a comparison period in advance, and as the inference data C (such as characteristic data) is continuously stored in the inference information database 50, when the data accumulation time of the inference data set CX or the inference data C (such as the characteristic data) reaches the comparison period , the comparison processing unit 20 performs the comparison of the characteristic data through the subsequent steps. Since the inference model M will record the training data set AX in the model version information base 10 (model information base) during training, all comparisons require a lot of time, so the comparison processing unit 20 needs to set the comparison historical data interval first, so as to The set historical data interval finds the history most similar to the inference model M from the historical training data set AX training data. In addition, the comparison processing unit 20 needs to set a threshold value for comparison, that is, a significant level of whether the accepted data are consistent. The higher the threshold value, the higher the probability of rejecting the data distribution is consistent, and the lower the threshold value, the rejecting data distribution is consistent. The lower the probability is, in one embodiment, the threshold value is selected according to the degree of rigor, such as 0.05, 0.01, 0.001, etc., and the threshold value can be set according to the general principle of statistical verification.

如圖2之步驟S2所示,儲存訓練資料集AX與模型元資料D至模型版本資訊庫10。在推論模型M完成訓練後,將訓練資料集AX與模型元資料D(如模型建立時間、模型訓練演算法、模型標籤、模型特徵、模型評估指標、訓練完成的模型等)儲存於模型版本資訊庫10,以利後續查詢歷史模型N(如歷史推論模型)時使用,且模型版本資訊庫10可利用市面上適合的各型資料庫予以實作。又,有別於習知技術僅儲存訓練後的推論模型的模型元資料而未儲存訓練資料集,本發明將訓練資料集AX亦儲存於模型版本資訊庫10,後續僅需查詢比較,如有相似資料分佈的推論模型M即可於模型伺服單元30中部署上線,不須重新訓練推論模型M,能發揮節省時間之功效。 As shown in step S2 of FIG. 2 , the training data set AX and the model metadata D are stored in the model version information base 10 . After the inference model M is trained, the training data set AX and model metadata D (such as model creation time, model training algorithm, model labels, model features, model evaluation indicators, trained models, etc.) are stored in the model version information The database 10 is used for subsequent query of the historical model N (eg, historical inference model), and the model version information database 10 can be implemented by using various types of databases suitable for the market. In addition, different from the prior art that only stores the model metadata of the inference model after training and does not store the training data set, the present invention also stores the training data set AX in the model version information database 10, and only needs to query and compare in the follow-up. The inference model M with similar data distribution can be deployed online in the model server unit 30 , and there is no need to retrain the inference model M, which can save time.

如圖2之步驟S3所示,模型伺服單元30(模型推論單元)儲存推論資料C(如特徵資料)至推論資訊庫50。模型伺服單元30可在推論資訊庫50中持續儲存多個推論資料C(如特徵資料)以組成推論資料CX,推論資料C是使用者透過模型應用單元40傳送至模型伺服單元30的特徵資料,再由模型伺服單元30進行預測推論。儲存推論資料C(如特徵資料)是為了提供後續與推論模型M(如目前的推論模型)的訓練資料及歷史模型 N(如歷史推論模型)的訓練資料進行比較,故本發明不需等待實際值發生後再與預測結果進行比較,僅需使用推論資料C(如特徵資料),因而較習知技術更快速又簡便。 As shown in step S3 of FIG. 2 , the model server unit 30 (model inference unit) stores the inference data C (eg, characteristic data) to the inference information database 50 . The model server unit 30 can continuously store a plurality of inference data C (such as characteristic data) in the inference information database 50 to form the inference data CX. The inference data C is the characteristic data sent by the user to the model server unit 30 through the model application unit 40 . The model servo unit 30 then performs prediction inference. The purpose of storing inference data C (such as feature data) is to provide training data and historical models for follow-up and inference model M (such as the current inference model). The training data of N (such as historical inference model) are compared, so the present invention does not need to wait for the actual value to occur before comparing with the predicted result, but only needs to use the inference data C (such as characteristic data), so it is faster and more efficient than the conventional technology. Simple.

如圖2之步驟S4所示,提取設定區間的歷史資料集BX與推論資訊庫50中的推論資料集CX。當推論資料集CX的資料累積時間達到上述步驟S1中所設定的比較週期時,比較處理單元20可從推論資訊庫50中擷取上述步驟S3中所儲存(定期儲存)的推論資料集CX,亦可從模型版本資訊庫10中擷取上述步驟S1中所設定的歷史資料區間的歷史資料集BX的特徵欄位(如各特徵欄位),再由比較處理單元20比較推論資料集CX與歷史資料集BX兩者的特徵欄位(如各特徵欄位)。 As shown in step S4 of FIG. 2 , the historical data set BX of the set interval and the inference data set CX in the inference information database 50 are extracted. When the data accumulation time of the inference data set CX reaches the comparison period set in the above step S1, the comparison processing unit 20 can retrieve the inference data set CX stored (periodically stored) in the above step S3 from the inference information database 50, The characteristic fields (such as each characteristic field) of the historical data set BX of the historical data interval set in the above step S1 can also be extracted from the model version information database 10, and then the comparison processing unit 20 compares the inference data set CX with The characteristic fields of both historical data sets BX (eg each characteristic field).

因各推論資料(特徵資料)的分佈互不相同,即並非全部的推論資料C(如特徵資料)都屬於常態分佈,無法同時一次檢定,故本發明提出二階段(或稱二步驟)的檢定方式以解決此問題,如下列圖2之步驟S5及步驟S6所述。 Because the distribution of each inference data (characteristic data) is different from each other, that is, not all the inference data C (such as characteristic data) belong to the normal distribution, and cannot be verified at the same time. Therefore, the present invention proposes a two-stage (or two-step) verification. way to solve this problem, as described in the following steps S5 and S6 in FIG. 2 .

如圖2之步驟S5所示,各特徵資料分佈比較。比較處理單元20係比較模型伺服單元中的推論模型M(如目前的推論模型)的訓練資料集AX與上述步驟S4中從推論資訊庫50中所擷取的推論資料集CX兩者的對應特徵欄位以進行兩者的資料分佈一致性檢定(如KS(Kolmogorov-Smirnov;柯爾莫哥洛夫-斯米爾諾夫)檢定),再由比較處理單元20依據資料分佈一致性檢定的結果判斷或得知推論模型M(如目前的推論模型)的訓練資料集AX與推論資料集CX兩者的對應特徵欄位的資料分佈是否一致。比較處理單元20將推論模型M的訓練資料集AX與推論 資料集CX兩者的對應特徵欄位進行資料分佈一致性檢定(如KS檢定)後,會得到兩者的對應特徵欄位的pi值(如統計值),其中i為正整數。如果pi值(如統計值)小於上述步驟S1中所設定的門檻值,表示兩者的對應特徵欄位的資料分佈是不一致的;反之,如果pi值(如統計值)大於或等於門檻值,表示兩者的對應特徵欄位的資料分佈是一致的。 As shown in step S5 of FIG. 2 , the distribution of each characteristic data is compared. The comparison processing unit 20 compares the corresponding features of the training data set AX of the inference model M (such as the current inference model) in the model servo unit and the inference data set CX extracted from the inference database 50 in the above step S4. field to carry out the data distribution consistency test (such as KS (Kolmogorov-Smirnov; Kolmogorov-Smirnov) test), and then the comparison processing unit 20 judges based on the results of the data distribution consistency test Or know whether the data distributions of the corresponding feature fields of the training data set AX of the inference model M (such as the current inference model) and the inference data set CX are consistent. The comparison processing unit 20 performs a data distribution consistency test (such as KS test) on the corresponding feature fields of the training data set AX and the inference data set CX of the inference model M, and obtains the pi of the corresponding feature fields of the two value (such as a statistic), where i is a positive integer. If the p i value (such as the statistical value) is less than the threshold value set in the above step S1, it means that the data distributions of the corresponding feature fields of the two are inconsistent; on the contrary, if the p i value (such as the statistical value) is greater than or equal to the threshold value, indicating that the data distributions of the corresponding feature fields of the two are consistent.

接著,比較處理單元20係對上述步驟S4中所擷取的歷史的訓練資料集AX與推論資料集CX(如目前的推論資料集)兩者的對應特徵欄位進行資料分佈一致性檢定(如KS檢定),以由比較處理單元20依據資料分佈一致性檢定的結果判斷(得知)歷史的訓練資料集AX與推論資料集CX兩者的對應特徵欄位的資料分佈是否一致。如果pi值(如統計值)小於門檻值,表示兩者的對應特徵欄位的資料分佈是不一致的;反之,如果pi值(如統計值)大於或等於門檻值,表示兩者的對應特徵欄位的資料分佈是一致的。惟,本發明不限於使用KS檢定方法,其它資料分佈一致性檢定的方法,如Mann-Whitney(曼-惠特尼;簡稱MW)、Kruskal-Wallis(克拉斯卡-瓦歷斯;簡稱KW)...等資料分佈檢定方法,也可以採用。 Next, the comparison processing unit 20 performs a data distribution consistency check (eg KS test), so that the comparison processing unit 20 judges (learns) whether the data distributions of the corresponding feature fields of the historical training data set AX and the inference data set CX are consistent according to the result of the data distribution consistency test. If the p i value (such as the statistical value) is less than the threshold value, it means that the data distributions of the corresponding feature fields of the two are inconsistent; on the contrary, if the p i value (such as the statistical value) is greater than or equal to the threshold value, it means that the two correspond to each other. The distribution of data in the characteristic fields is consistent. However, the present invention is not limited to the use of the KS test method, other methods of data distribution consistency test, such as Mann-Whitney (Mann-Whitney; MW for short), Kruskal-Wallis (Klaska-Wallis; KW for short) ...and other data distribution verification methods can also be used.

如圖2之步驟S6所示,資料集整合比較。在上述步驟S5中,比較處理單元20針對推論模型M(如目前的推論模型)與歷史的訓練資料集AX及推論資料集CX比較各特徵資料分佈的一致性,此時僅知悉各特徵欄位的資料分佈的統計值。因此,在步驟S6中,比較處理單元20係針對所有特徵欄位進行檢驗,透過在步驟S5中得到各特徵欄位分佈一致性的pi值(如統計值),比較處理單元20再比較推論模型M(如目前的推論模型)的訓練資料集AX與推論資料集CX兩者的對應特徵欄位的pi值(如統 計值)與門檻值以計算pi小於門檻值的次數,再進行次數檢驗(如二項分配檢定)而得到pj值(如統計次數),其中j為正整數。如果pj(如統計次數)小於上述步驟S1中所設定的門檻值(如次數門檻值),表示推論模型M(如目前的推論模型)的訓練資料集AX與推論資料集CX兩者的整體資料分佈是不一致的;反之,如果pj值(如統計次數)大於或等於門檻值(如次數門檻值),表示推論模型M(如目前的推論模型)的訓練資料集AX與推論資料集CX兩者的整體資料分佈是一致的。惟,本發明不限於使用二項分配檢定方法,其它次數檢定的方法,如符號檢定、Wilcoxon(魏克生)符號等級檢定...等次數檢定方法,也可以採用。 As shown in step S6 of FIG. 2 , the data sets are integrated and compared. In the above step S5, the comparison processing unit 20 compares the consistency of the distribution of each feature data with respect to the inference model M (such as the current inference model) with the historical training data set AX and inference data set CX, and only knows each feature field at this time. Statistical value of the data distribution. Therefore, in step S6, the comparison processing unit 20 checks all the feature fields, and by obtaining the p i values (such as statistical values) of the distribution consistency of each feature field in step S5, the comparison processing unit 20 then compares the inferences The p i value (such as statistical value) and the threshold value of the corresponding feature fields of the training data set AX and the inference data set CX of the model M (such as the current inference model) are calculated to calculate the number of times that p i is smaller than the threshold value, and then carry out The number of tests (such as binomial distribution test) to obtain the value of p j (such as statistical times), where j is a positive integer. If p j (such as the number of statistics) is less than the threshold value (such as the threshold value of times) set in the above step S1, it represents the whole of the training data set AX and the inference data set CX of the inference model M (such as the current inference model). The data distribution is inconsistent; on the contrary, if the value of p j (such as the number of statistics) is greater than or equal to the threshold value (such as the threshold value of the number of times), it means that the training data set AX and the inference data set CX of the inference model M (such as the current inference model) The overall data distribution of the two is consistent. However, the present invention is not limited to the use of the binomial distribution test method, and other times test methods, such as symbol test, Wilcoxon symbol level test, etc., can also be used.

由上述步驟S3至步驟S6的說明可知,本發明僅需要欲推論的推論資料C(如特徵資料),不需要等待實際值,故本發明能改善習知技術需要仰賴模型預測值與實際值計算準確率之缺點,亦能在推論品質的判斷上提升時效性。 As can be seen from the description of the above steps S3 to S6, the present invention only needs the inference data C (such as characteristic data) to be inferred, and does not need to wait for the actual value. Therefore, the present invention can improve the conventional technology and rely on the calculation of the model predicted value and the actual value. The shortcoming of accuracy can also improve the timeliness in the judgment of inference quality.

如圖2之步驟S7所示,更新推論模型M。如果推論模型M(如目前的推論模型)的訓練資料集AX與推論資料集CX兩者的資料分佈不一致,則比較處理單元20係從模型版本資訊庫10所儲存的歷史的訓練資料集AX中找出與推論資料集CX相似分佈的訓練資料集AX,以依據相似分佈的訓練資料集AX將已訓練完成的歷史模型N(如歷史推論模型)從模型版本資訊庫10中部署至模型伺服單元30(模型推論單元),進而將已訓練完成的歷史模型N更新或取代模型伺服單元30中的推論模型M(如目前的推論模型)來提供推論服務,俾維持模型推論品質。因此,本發明能部署推論模型M與訓練資料分佈一致的已訓練的歷史模型N(如歷史 推論模型),不需以新進的模型重新訓練推論模型M,在維持模型推論品質的情況下,有利於節省重新訓練模型的時間。 As shown in step S7 of FIG. 2 , the inference model M is updated. If the data distributions of the training data set AX and the inference data set CX of the inference model M (such as the current inference model) are inconsistent, the comparison processing unit 20 selects the data from the historical training data set AX stored in the model version information database 10 . Find a training data set AX with a similar distribution to the inference data set CX, so as to deploy the trained historical model N (such as a historical inference model) from the model version information database 10 to the model server unit according to the similarly distributed training data set AX 30 (model inference unit), and then update or replace the inference model M (such as the current inference model) in the model server unit 30 with the trained historical model N to provide inference services to maintain the model inference quality. Therefore, the present invention can deploy a trained historical model N (such as historical Inference model), there is no need to retrain the inference model M with the newly advanced model, which is beneficial to save the time of retraining the model while maintaining the inference quality of the model.

以下提供兩個實施例加以說明之。 Two examples are provided below to illustrate them.

第一實施例:習知技術以模型績效指標或模型健康度等檢驗推論模型的效能,當推論模型的效能低於設定預期時,僅能以新進資料重新訓練推論模型,再將推論模型重新上線以提供推論服務。相對地,本發明能直接比對過去的歷史訓練資料與新進資料的分佈,如果資料分佈一致,則可以直接從模型版本資訊庫10(模型資料庫)取用已完成訓練的推論模型M來提供上線服務,從而節省如資料科學家重新訓練推論模型M的時間。 The first embodiment: the conventional technology uses model performance indicators or model health to test the performance of the inference model. When the performance of the inference model is lower than the set expectations, the inference model can only be retrained with new data, and then the inference model can be re-launched to provide inference services. Relatively, the present invention can directly compare the distribution of the past historical training data and the new data. If the data distribution is consistent, the inference model M that has been trained can be directly obtained from the model version information database 10 (model database) to provide the data. On-line service, thereby saving the time for data scientists to retrain the inference model M.

第一實施例係假設資料科學家將訓練房價預測的推論模型M,使用迴歸(regression)演算法進行多次的模型訓練後,提供推論模型M(如迴歸預測模型)的推論服務。 The first embodiment assumes that a data scientist will train an inference model M for housing price prediction, and after performing multiple model trainings using a regression algorithm, provide inference services for the inference model M (eg, a regression prediction model).

如圖2之步驟S1所示,設定比較週期、歷史資料區間與門檻值。將推論資料集CX與推論模型M(如目前的推論模型)的訓練資料集AX及歷史資料集BX(如全部歷史資料集)進行比較前,需先設定比較週期、歷史資料區間與門檻值。例如,在第一實施例中,比較週期設定為推論模型M累積20筆即觸發比較;由於歷史資料集BX眾多,逐一比較相對耗時,故需先行設定比較的歷史資料區間,第一實施例設定比較前一已訓練的推論模型M的歷史資料;接著,設定門檻值,例如門檻值為0.05。 As shown in step S1 of FIG. 2 , a comparison period, a historical data interval and a threshold value are set. Before comparing the inference data set CX with the training data set AX of the inference model M (such as the current inference model) and the historical data set BX (such as all historical data sets), it is necessary to set the comparison period, historical data interval and threshold value. For example, in the first embodiment, the comparison period is set so that the comparison is triggered when the inference model M accumulates 20 records; since there are many historical data sets BX, it is relatively time-consuming to compare one by one, so it is necessary to set the historical data interval for comparison in advance. The first embodiment Set and compare the historical data of the previously trained inference model M; then, set a threshold value, for example, the threshold value is 0.05.

如圖2之步驟S2所示,儲存訓練資料集AX與模型元資料D至模型版本資訊庫10。例如,第一實施例將訓練房價預測的推論模型M,而影響房價的因素的資料有十二項,分別標記為X1,X2,X3,X4,X5,X6,X7, X8,X9,X10,X11,X12,因此以蒐集的資料建立推論模型M,資料如下表1所載。 As shown in step S2 of FIG. 2 , the training data set AX and the model metadata D are stored in the model version information base 10 . For example, the first embodiment will train an inference model M for housing price prediction, and there are twelve items of data on factors affecting housing prices, which are marked as X 1 , X 2 , X 3 , X 4 , X 5 , X 6 , X 7 , X 8 , X 9 , X 10 , X 11 , X 12 , so an inference model M is established based on the collected data. The data are shown in Table 1 below.

表1:

Figure 109138630-A0101-12-0014-1
Table 1:
Figure 109138630-A0101-12-0014-1

對應的房價AY=[24,21.6,34.7,33.4,36.2,28.7,22.9,27.1, 16.5,18.9,15,18.9,21.7,20.4,18.2,19.9,23.1,17.5,20.2,18.2],訓練完成的推論模型M稱為推論模型M1。資料科學家將另一已訓練完成的推論模型(稱為推論模型M2)存放於模型版本資訊庫10中,假設推論模型M2係透過下表2所載之資料進行機器學習訓練。完成訓練過程後,模型伺服單元30中用以上線提供推論服務的是推論模型M1。 Corresponding house price AY=[24,21.6,34.7,33.4,36.2,28.7,22.9,27.1, 16.5, 18.9, 15, 18.9, 21.7, 20.4, 18.2, 19.9, 23.1, 17.5, 20.2, 18.2], the trained inference model M is called the inference model M1. The data scientist stores another trained inference model (called the inference model M2 ) in the model version database 10 , assuming that the inference model M2 is trained by machine learning through the data shown in Table 2 below. After the training process is completed, the inference model M1 is used in the model server unit 30 to provide the inference service online.

表2:

Figure 109138630-A0101-12-0015-2
Table 2:
Figure 109138630-A0101-12-0015-2

Figure 109138630-A0101-12-0016-3
Figure 109138630-A0101-12-0016-3

如圖2之步驟S3所示,模型伺服單元30(模型推論單元)可儲存推論資料C(如特徵資料)至推論資訊庫50。推論模型M1於模型伺服單元30中上線服務後,陸續有推論資料C(如特徵資料)透過模型應用單元40進入模型伺服單元30以進行推論,這些推論資料C(如特徵資料)也持續被蒐集儲存於推論資訊庫50中,資料如下表3所載。 As shown in step S3 of FIG. 2 , the model server unit 30 (the model inference unit) can store the inference data C (eg, characteristic data) to the inference database 50 . After the inference model M1 is launched in the model server unit 30, the inference data C (such as characteristic data) are successively entered into the model server unit 30 through the model application unit 40 for inference, and these inference data C (such as characteristic data) are also continuously collected. The data are stored in the inference information database 50, and the data are listed in Table 3 below.

表3:

Figure 109138630-A0101-12-0016-4
table 3:
Figure 109138630-A0101-12-0016-4

Figure 109138630-A0101-12-0017-5
Figure 109138630-A0101-12-0017-5

如圖2之步驟S4所示,從模型版本資訊庫10提取所設定的歷史資料區間的歷史資料集BX,並從推論資訊庫50擷取目前的推論資 料集CX。例如,在第一實施例中,上線的推論模型M的訓練資料集AX為[AX1,AX2,AX3,AX4,AX5,AX6,AX7,AX8,AX9,AX10,AX11,AX12];歷史資料集BX為[BX1,BX2,BX3,BX4,BX5,BX6,BX7,BX8,BX9,BX10,BX11,BX12];推論資料集CX為[CX1,CX2,CX3,CX4,CX5,CX6,CX7,CX8,CX9,CX10,CX11,CX12]等資料。 As shown in step S4 of FIG. 2 , the historical data set BX of the set historical data interval is extracted from the model version information database 10 , and the current inference data set CX is extracted from the inference information database 50 . For example, in the first embodiment, the training data set AX of the on-line inference model M is [AX 1 , AX 2 , AX 3 , AX 4 , AX 5 , AX 6 , AX 7 , AX 8 , AX 9 , AX 10 ,AX 11 ,AX 12 ]; historical data set BX is [BX 1 ,BX 2 ,BX 3 ,BX 4 ,BX 5 ,BX 6 ,BX 7 ,BX 8 ,BX 9 ,BX 10 ,BX 11 ,BX 12 ] The inference data set CX is [CX 1 , CX 2 , CX 3 , CX 4 , CX 5 , CX 6 , CX 7 , CX 8 , CX 9 , CX 10 , CX 11 , CX 12 ] and other data.

如圖2之步驟S5所示,各特徵資料分佈比較。比較處理單元20可擷取資料集對應的特徵欄位並檢驗其資料分佈是否相似,比較訓練資料集[AXi]與推論資料集[CXi],透過資料分佈一致性檢定(如KS核定)獲得p值,結果如下表4所載。 As shown in step S5 of FIG. 2 , the distribution of each characteristic data is compared. The comparison processing unit 20 can retrieve the characteristic fields corresponding to the data sets and check whether their data distributions are similar, compare the training data set [AX i ] and the inference data set [CX i ], and pass the data distribution consistency check (eg, KS verification) p-values were obtained and the results are reported in Table 4 below.

表4:

Figure 109138630-A0101-12-0018-6
Table 4:
Figure 109138630-A0101-12-0018-6

Figure 109138630-A0101-12-0019-7
Figure 109138630-A0101-12-0019-7

本發明之資料分佈一致性檢定(如KS檢定)可利用各式統計軟體或以程式計算獲得。如果資料分佈一致性檢定(如KS檢定)所得的p值小於門檻值(即顯著水準),例如門檻值為0.05,則代表兩個母體的資料分佈不一致。在第一實施例中,上線的推論模型M的訓練資料集AX與推論資料集CX的十二項特徵中有十項特徵是分佈不一致的,確定產生特徵飄移的現象,亦即目前上線的推論模型M已經不適合目前的推論資料集CX。 The data distribution consistency test (eg, KS test) of the present invention can be obtained by using various statistical software or by program calculation. If the p value obtained by the data distribution consistency test (such as the KS test) is less than the threshold value (ie, the significant level), for example, the threshold value is 0.05, it means that the data distributions of the two mothers are inconsistent. In the first embodiment, the distribution of ten of the twelve features of the training data set AX of the inference model M and the inference data set CX is inconsistent, and it is determined that the phenomenon of feature drift occurs, that is, the inference that is currently online. Model M is no longer suitable for the current inference dataset CX.

接著,檢驗歷史資料集BX如[BX1,BX2,BX3,BX4,BX5,BX6,BX7,BX8,BX9,BX10,BX11,BX12]與推論資料集CX如[CX1,CX2,CX3,CX4,CX5,CX6,CX7,CX8,CX9,CX10,CX11,CX12],可得p值的結果如下表5所載。在表5中,十二個特徵比較後,所有p值皆未小於0.05,表示推論資料集CX與歷史資料集BX的十二個特徵的資料分佈是一致的。 Next, check the historical data set BX such as [BX 1 , BX 2 , BX 3 , BX 4 , BX 5 , BX 6 , BX 7 , BX 8 , BX 9 , BX 10 , BX 11 , BX 12 ] and the inference data set CX Such as [CX 1 , CX 2 , CX 3 , CX 4 , CX 5 , CX 6 , CX 7 , CX 8 , CX 9 , CX 10 , CX 11 , CX 12 ], the p-value results are shown in Table 5 below . In Table 5, after the twelve features are compared, all p-values are not less than 0.05, indicating that the data distributions of the twelve features of the inference data set CX and the historical data set BX are consistent.

表5:

Figure 109138630-A0101-12-0019-8
table 5:
Figure 109138630-A0101-12-0019-8

Figure 109138630-A0101-12-0020-9
Figure 109138630-A0101-12-0020-9

如圖2之步驟S6所示,資料集整合比較。對所有特徵欄位進行次數計算並檢驗,由於推論模型M(如目前的推論模型)的訓練資料集AX與推論資料集CX的特徵資料經資料分佈一致性檢定(如KS檢定)後,p值大於0.05的次數t=2,總特徵數n=12,計算統計值SB為二項分配SB~B(12,2,0.5),其累積機率分佈為

Figure 109138630-A0101-12-0020-10
,透過計算或查表(如下表6)可得SB~B(12,2,0.5)=0.019281<0.05,因此可得知推論模型M(如目前的推論模型)的訓練資料集AX與推論資料集CX的各相對應特徵資料的分佈是不一致的,確定產生資料飄移的現象。而且,歷史資料集BX與推論資料集CX的特徵資料經資料分佈一致性檢定(如KS檢定)後,p值大於0.05的次數t=12,總特徵數n=12,計算統計值SB為二項分配SB~B(12,12,0.5),其累積機率分佈為
Figure 109138630-A0101-12-0020-11
qn-x,透過計算或查表(如下表6)可得SB~B(12,12,0.5)=1>0.05,因此可得知歷史資料集BX與推論資料集CX的整體資料(各相對應特徵資料)的分佈是趨於一致的。 As shown in step S6 of FIG. 2 , the data sets are integrated and compared. Count and test the number of all feature fields. Since the training data set AX of the inference model M (such as the current inference model) and the feature data of the inference data set CX are tested for the consistency of the data distribution (such as the KS test), the p value The number of times greater than 0.05 is t=2, the total number of features is n=12, and the calculated statistical value SB is the binomial distribution SB~B(12,2,0.5), and its cumulative probability distribution is
Figure 109138630-A0101-12-0020-10
, SB~B(12,2,0.5)=0.019281<0.05 can be obtained by calculation or table lookup (see Table 6 below), so the training data set AX and inference data of the inference model M (such as the current inference model) can be known The distribution of the corresponding characteristic data of the set CX is inconsistent, and the phenomenon of data drift is determined. Moreover, after the characteristic data of the historical data set BX and the inference data set CX are tested for the consistency of the data distribution (such as the KS test), the number of times the p value is greater than 0.05 is t=12, the total number of features is n=12, and the calculated statistical value SB is two The term is assigned SB~B(12,12,0.5), and its cumulative probability distribution is
Figure 109138630-A0101-12-0020-11
q nx , SB~B(12,12,0.5)=1>0.05 can be obtained by calculation or table lookup (see Table 6 below), so the overall data of historical data set BX and inference data set CX can be known (each corresponding to The distribution of characteristic data) tends to be consistent.

表6:

Figure 109138630-A0101-12-0020-12
Table 6:
Figure 109138630-A0101-12-0020-12

Figure 109138630-A0101-12-0021-13
Figure 109138630-A0101-12-0021-13

如圖2之步驟S7所示,更新推論模型M。由於推論模型M(如目前的推論模型)的訓練資料集[AXi]與推論資料集[CXi]的資料分佈不一致,而歷史資料集[BXi]與推論資料集[CXi]的各相對應特徵資料的分佈是趨於一致的,目前的推論資料C(如特徵資料)更適合使用歷史資料訓練的推論模型M2進行推論,因此將推論模型M2從模型版本資訊庫10中部署至模型伺服單元30(模型推論單元)以取代推論模型M1,從而完成更新推論模型M以提供予模型應用單元40呼叫使用。 As shown in step S7 of FIG. 2 , the inference model M is updated. Because the data distribution of the training data set [AX i ] of the inference model M (such as the current inference model) is inconsistent with the data distribution of the inference data set [CX i ], and the historical data set [BX i ] and the inference data set [CX i ] have different data distributions. The distribution of the corresponding feature data tends to be consistent, and the current inference data C (such as feature data) is more suitable for inference using the inference model M2 trained with historical data. Therefore, the inference model M2 is deployed from the model version information database 10 to the model The servo unit 30 (model inference unit) replaces the inference model M1, thereby completing the updating of the inference model M and providing it to the model application unit 40 for calling use.

依據訓練資料集AX如[AX1,AX2,AX3,AX4,AX5,AX6,AX7,AX8,AX9,AX10,AX11,AX12]得出推論模型M1為YModeA=21.34277+0.168947X1+0.312266X2+0.005807X3+0X4+8.46927X5-0.06841X6-2.80617X7+3.069507X8-0.14161X9+0X10-0.0087X11-0.085X12,歷史資料集BX如[BX1,BX2,BX3,BX4,BX5,BX6,BX7,BX8,BX9,BX10,BX11, BX12]得出推論模型M2為YModeB=50.18587+136.6193X1-0.02561X2-0.31037X3-36.7141X4+10.07272X5-0.0793X6-0.87524X7+0.401028X8-0.0216X9-0.47391X10-0.11378X11-1.09101X12,目前新進的推論資料集CX如[CX1,CX2,CX3,CX4,CX5,CX6,CX7,CX8,CX9,CX10,CX11,CX12],以推論模型M1進行新進資料的推論得到評估指標如MAPE(mean absolute percentage error;平均絕對百分比誤差)為0.4742,而以推論模型M2獲得之MAPE(平均絕對百分比誤差)為0.1459。因此,實際上驗證將推論模型M更換為已訓練的歷史模型N的MAPE(平均絕對百分比誤差)確實獲得提升。 According to the training data set AX such as [AX 1 , AX 2 , AX 3 , AX 4 , AX 5 , AX 6 , AX 7 , AX 8 , AX 9 , AX 10 , AX 11 , AX 12 ], the inference model M1 is Y ModeA =21.34277+0.168947X 1 +0.312266X 2 +0.005807X 3 +0X 4 +8.46927X 5 -0.06841X 6 -2.80617X 7 +3.069507X 8 -0.14161X 9 +0X 10 -0.0087X 12.0, 11 -0. Historical data set BX such as [BX 1 , BX 2 , BX 3 , BX 4 , BX 5 , BX 6 , BX 7 , BX 8 , BX 9 , BX 10 , BX 11 , BX 12 ] The inference model M2 is Y ModeB =50.18587+136.6193X 1 -0.02561X 2 -0.31037X 3 -36.7141X 4 +10.07272X 5 -0.0793X 6 -0.87524X 7 +0.401028X 8 -0.0216X 9 -0.47391X 10 -1280.113 , the current new inference data set CX such as [CX 1 , CX 2 , CX 3 , CX 4 , CX 5 , CX 6 , CX 7 , CX 8 , CX 9 , CX 10 , CX 11 , CX 12 ] to infer the model The evaluation index such as MAPE (mean absolute percentage error; mean absolute percentage error) obtained by inference of new data in M1 was 0.4742, while the MAPE (mean absolute percentage error) obtained by inference model M2 was 0.1459. Therefore, it is actually verified that the MAPE (Mean Absolute Percent Error) of replacing the inference model M with the trained historical model N does indeed improve.

第一實施例使用推論資料C(如特徵資料)進行資料分佈檢驗,若資料分佈不一致,則表示推論模型M不適合目前的推論資料C(如特徵資料),不需要等待真實的實際資料再計算模型正確率才更換模型。又,本發明檢驗過去已訓練完成的歷史模型N中選擇適合當前推論資料分佈的模型直接更新部署推論模型M,而不須重新訓練新模型,節省訓練模型的成本並具有時效性。 The first embodiment uses inference data C (such as characteristic data) to test the data distribution. If the data distribution is inconsistent, it means that the inference model M is not suitable for the current inference data C (such as characteristic data), and there is no need to wait for the real actual data to calculate the model. The correct rate is to replace the model. In addition, the present invention selects a model suitable for the current inference data distribution in the historical model N that has been trained in the past to directly update and deploy the inference model M without retraining a new model, which saves the cost of training the model and has timeliness.

第二實施例:本發明的推論模型M不僅可用於迴歸預測模型(見第一實施例),亦能用於假設資料科學家將訓練顧客金融風險分類預測的二元分類模型(見第二實施例),但不以此為限。 Second Embodiment: The inference model M of the present invention can be used not only for regression prediction models (see the first embodiment), but also for binary classification models assuming that data scientists will train customer financial risk classification predictions (see the second embodiment) ), but not limited thereto.

如圖2之步驟S1所示,設定比較週期、歷史資料區間與門檻值。將推論資料集CX與推論模型M(如目前的推論模型)的訓練資料集AX及歷史資料集BX(如全部歷史資料集)進行比較前,需先設定比較週期、歷史資料區間與門檻值。例如,在第二實施例中,比較週期設定為推論模 型M累積20筆即觸發比較;由於歷史資料集BX眾多,逐一比較相對耗時,故需先行設定比較的歷史資料區間,第二實施例設定比較前一已訓練的推論模型的歷史資料;接著,設定門檻值,例如門檻值為0.05。 As shown in step S1 of FIG. 2 , a comparison period, a historical data interval and a threshold value are set. Before comparing the inference data set CX with the training data set AX of the inference model M (such as the current inference model) and the historical data set BX (such as all historical data sets), it is necessary to set the comparison period, historical data interval and threshold value. For example, in the second embodiment, the comparison period is set to the inference mode Model M accumulates 20 records to trigger the comparison; since there are many historical data sets BX, it is relatively time-consuming to compare one by one, so it is necessary to set the historical data interval for comparison first, and the second embodiment sets and compares the historical data of the previously trained inference model; then , set the threshold value, for example, the threshold value is 0.05.

如圖2之步驟S2所示,儲存訓練資料集AX與模型元資料D至模型版本資訊庫10。例如,第二實施例將訓練顧客金融風險分類預測的推論模型M,而影響風險分類的因素是由顧客資料蒐集的資料有十一項,分別標記為X1,X2,X3,X4,X5,X6,X7,X8,X9,X10,X11,因此以蒐集的資料建立推論模型M,資料如下表7所載。 As shown in step S2 of FIG. 2 , the training data set AX and the model metadata D are stored in the model version information base 10 . For example, the second embodiment will train an inference model M for predicting customer financial risk classification, and the factors affecting the risk classification are eleven items of data collected from customer data, marked as X 1 , X 2 , X 3 , X 4 respectively , X 5 , X 6 , X 7 , X 8 , X 9 , X 10 , X 11 , so an inference model M is established based on the collected data. The data are shown in Table 7 below.

表7:

Figure 109138630-A0101-12-0023-14
Table 7:
Figure 109138630-A0101-12-0023-14

Figure 109138630-A0101-12-0024-15
Figure 109138630-A0101-12-0024-15

對應的風險分類AY=[1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0],訓練完成的推論模型M稱為推論模型M1。資料科學家將另一已訓練完成的推論模型M(稱為推論模型M2)存放於模型版本資訊庫10中,假設推論模型M2係透過下表8所載之資料進行機器學習訓練。完成訓練過程後,模型伺服單元30中用以上線提供推論服務的是推論模型M1。 The corresponding risk classification AY=[1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0], the training is completed The inference model M is called the inference model M1. The data scientist stores another trained inference model M (called the inference model M2 ) in the model version database 10 . It is assumed that the inference model M2 is trained by machine learning through the data shown in Table 8 below. After the training process is completed, the inference model M1 is used in the model server unit 30 to provide the inference service online.

表8:

Figure 109138630-A0101-12-0024-16
Table 8:
Figure 109138630-A0101-12-0024-16

Figure 109138630-A0101-12-0025-17
Figure 109138630-A0101-12-0025-17

如圖2之步驟S3所示,模型伺服單元30(模型推論單元)可儲存推論資料C(如特徵資料)至推論資訊庫50。推論模型M1於模型伺服單元30中上線服務後,陸續有推論資料C(如特徵資料)透過模型應用單元40進入模型伺服單元30以進行推論,這些推論資料C(如特徵資料)也持續 被蒐集儲存於推論資訊庫50中,資料如下表9所載。 As shown in step S3 of FIG. 2 , the model server unit 30 (the model inference unit) can store the inference data C (eg, characteristic data) to the inference database 50 . After the inference model M1 goes online in the model server unit 30, inference data C (such as feature data) successively enters the model server unit 30 through the model application unit 40 for inference, and these inference data C (such as feature data) also continue to The data are collected and stored in the inference database 50, and the data are listed in Table 9 below.

表9:

Figure 109138630-A0101-12-0026-18
Table 9:
Figure 109138630-A0101-12-0026-18

Figure 109138630-A0101-12-0027-19
Figure 109138630-A0101-12-0027-19

如圖2之步驟S4所示,從模型版本資訊庫10提取所設定的歷史資料區間的歷史資料集BX,並從推論資訊庫50中擷取目前的推論資料集CX。例如,在第二實施例中,上線的推論模型M的訓練資料集AX為[AX1,AX2,AX3,AX4,AX5,AX6,AX7,AX8,AX9,AX10,AX11];歷史資料集BX為[BX1,BX2,BX3,BX4,BX5,BX6,BX7,BX8,BX9,BX10,BX11];推論資料集CX為[CX1,CX2,CX3,CX4,CX5,CX6,CX7,CX8,CX9,CX10,CX11]等資料。 As shown in step S4 of FIG. 2 , the historical data set BX of the set historical data interval is extracted from the model version information database 10 , and the current inference data set CX is extracted from the inference information database 50 . For example, in the second embodiment, the training data set AX of the on-line inference model M is [AX 1 , AX 2 , AX 3 , AX 4 , AX 5 , AX 6 , AX 7 , AX 8 , AX 9 , AX 10 ,AX 11 ]; the historical data set BX is [BX 1 , BX 2 , BX 3 , BX 4 , BX 5 , BX 6 , BX 7 , BX 8 , BX 9 , BX 10 , BX 11 ]; the inference data set CX is [CX 1 , CX 2 , CX 3 , CX 4 , CX 5 , CX 6 , CX 7 , CX 8 , CX 9 , CX 10 , CX 11 ] and other information.

如圖2之步驟S5所示,各特徵資料分佈比較。比較處理單元20執行區域資料比較,擷取資料集對應的特徵欄位並檢驗其資料分佈是否相似,比較訓練資料集[AXi]與推論資料集[CXi],透過資料分佈一致性檢定(如KS核定)獲得p值,結果如下表10所載。 As shown in step S5 of FIG. 2 , the distribution of each characteristic data is compared. The comparison processing unit 20 performs regional data comparison, extracts the characteristic fields corresponding to the data sets and checks whether the data distributions are similar, compares the training data set [AX i ] and the inference data set [CX i ], and checks the consistency of the data distribution through the data distribution consistency check ( p-values were obtained as approved by KS) and the results are reported in Table 10 below.

表10:

Figure 109138630-A0101-12-0027-20
Table 10:
Figure 109138630-A0101-12-0027-20

Figure 109138630-A0101-12-0028-21
Figure 109138630-A0101-12-0028-21

本發明之資料分佈一致性檢定(如KS檢定)可利用各式統計軟體或以程式計算獲得。如果資料分佈一致性檢定(如KS檢定)所得的p值小於門檻值(即顯著水準),例如門檻值為0.05,則代表兩個母體的資料分佈不一致。在第二實施例中,上線的推論模型M的訓練資料集AX與推論資料集CX的十一項特徵中有十項特徵是分佈不一致的,確定產生特徵飄移的現象,亦即目前上線的推論模型M已經不適合目前的推論資料集CX。 The data distribution consistency test (eg, KS test) of the present invention can be obtained by using various statistical software or by program calculation. If the p value obtained by the data distribution consistency test (such as the KS test) is less than the threshold value (ie, the significant level), for example, the threshold value is 0.05, it means that the data distributions of the two mothers are inconsistent. In the second embodiment, ten of the eleven features of the training data set AX of the online inference model M and the inference data set CX are inconsistent in distribution, and it is determined that the phenomenon of feature drift occurs, that is, the inference that is currently online Model M is no longer suitable for the current inference dataset CX.

接著,檢驗歷史資料集BX如[BX1,BX2,BX3,BX4,BX5,BX6,BX7,BX8,BX9,BX10,BX11]與推論資料集CX如[CX1,CX2,CX3,CX4,CX5,CX6,CX7,CX8,CX9,CX10,CX11],可得p值的結果如下表11所載。在表11中,十一個特徵比較後,僅有一個特徵的p值小於0.05,表示推論資料集CX與歷史資料集BX的十一個特徵的資料分佈是一致的。 Next, check the historical data set BX such as [BX 1 , BX 2 , BX 3 , BX 4 , BX 5 , BX 6 , BX 7 , BX 8 , BX 9 , BX 10 , BX 11 ] and the inference data set CX such as [CX 1 , CX 2 , CX 3 , CX 4 , CX 5 , CX 6 , CX 7 , CX 8 , CX 9 , CX 10 , CX 11 ], the p-value results are shown in Table 11 below. In Table 11, after the eleven features are compared, only one feature's p-value is less than 0.05, indicating that the data distributions of the eleven features of the inference data set CX and the historical data set BX are consistent.

表11:

Figure 109138630-A0101-12-0028-22
Table 11:
Figure 109138630-A0101-12-0028-22

Figure 109138630-A0101-12-0029-24
Figure 109138630-A0101-12-0029-24

如圖2之步驟S6所示,資料集整合比較。對所有特徵欄位進行次數計算並檢驗,由於推論模型M(如目前的推論模型)的訓練資料集AX與推論資料集CX的特徵資料經資料分佈一致性檢定(如KS檢定)後,p值大於0.05的次數t=1,總特徵數n=11,計算統計值SB為二項分配SB~B(11,1,0.5),其累積機率分佈為

Figure 109138630-A0101-12-0029-25
,透過計算或查表(如下表12)可得SB~B(11,1,0.5)=0.005859<0.05,因此可得知推論模型M(如目前的推論模型)的訓練資料集AX與推論資料集CX的整體資料分佈是不一致的,確定產生資料飄移的現象。而且,歷史資料集BX與推論資料集CX的特徵資料經資料分佈一致性檢定(如KS檢定)後,p值大於0.05的次數t=10,總特徵數n=11,計算統計值SB為二項分配SB~B(11,10,0.5),其累積機率分佈為
Figure 109138630-A0101-12-0029-26
,透過計算或查表(如下表12)可得SB~B(11,10,0.5)=0.99915>0.05,因此可得 知歷史資料集BX與推論資料集CX的整體資料(各相對應特徵資料)的分佈是趨於一致的。 As shown in step S6 of FIG. 2 , the data sets are integrated and compared. Count and test the number of all feature fields. Since the training data set AX of the inference model M (such as the current inference model) and the feature data of the inference data set CX are tested for the consistency of the data distribution (such as the KS test), the p value The number of times greater than 0.05 is t=1, the total number of features is n=11, and the calculated statistical value SB is the binomial distribution SB~B(11,1,0.5), and its cumulative probability distribution is
Figure 109138630-A0101-12-0029-25
, SB~B(11,1,0.5)=0.005859<0.05 can be obtained by calculation or table lookup (see Table 12 below), so the training data set AX and inference data of the inference model M (such as the current inference model) can be obtained The overall data distribution of set CX is inconsistent, identifying the phenomenon that produces data drift. Moreover, after the characteristic data of the historical data set BX and the inference data set CX are tested for the consistency of the data distribution (such as the KS test), the number of times the p value is greater than 0.05 is t=10, the total number of features is n=11, and the calculated statistical value SB is two The term is assigned SB~B(11,10,0.5), and its cumulative probability distribution is
Figure 109138630-A0101-12-0029-26
, SB~B(11,10,0.5)=0.99915>0.05 can be obtained by calculation or table lookup (see Table 12 below), so the overall data of historical data set BX and inference data set CX (each corresponding characteristic data can be obtained) ) distribution tends to be consistent.

表12:

Figure 109138630-A0101-12-0030-27
Table 12:
Figure 109138630-A0101-12-0030-27

如圖2之步驟S7所示,更新推論模型M。由於推論模型M(如目前的推論模型)的訓練資料集[AXi]與推論資料集[CXi]的資料分佈不一致,而歷史資料集[BXi]與推論資料集[CXi]的各相對應特徵資料的分佈是趨於一致的,目前的推論資料C(如特徵資料)更適合使用歷史資料訓練的推論模型M2進行推論,因此將推論模型M2從模型版本資訊庫10中部署至模型伺服單元30(模型推論單元)以取代推論模型M1,從而完成更新推論模型M以提供予模型應用單元40呼叫使用。 As shown in step S7 of FIG. 2 , the inference model M is updated. Because the data distribution of the training data set [AX i ] of the inference model M (such as the current inference model) is inconsistent with the data distribution of the inference data set [CX i ], and the historical data set [BX i ] and the inference data set [CX i ] have different data distributions. The distribution of the corresponding feature data tends to be consistent, and the current inference data C (such as feature data) is more suitable for inference using the inference model M2 trained with historical data. Therefore, the inference model M2 is deployed from the model version information database 10 to the model The servo unit 30 (model inference unit) replaces the inference model M1, thereby completing the updating of the inference model M and providing it to the model application unit 40 for calling use.

依據訓練資料集AX如[AX1,AX2,AX3,AX4,AX5,AX6,AX7,AX8,AX9,AX10,AX11]透過羅吉斯分類演算法訓練出推論模型M1,歷史資料集BX如[BX1,BX2,BX3,BX4,BX5,BX6,BX7,BX8,BX9,BX10,BX11]訓練出推論模型M2,目前新進的推論資料集CX如[CX1,CX2,CX3,CX4,CX5,CX6,CX7,CX8,CX9,CX10,CX11],以推論模型M1進行新進資料的推論得到分類模型正確率評估指標(Category accuracy;CA)為0.7,而以推論模型M2對新進資料分類獲得之CA為0.8。因此,實際上驗證將推論模型M更換為已訓練的歷史模型N後的正確率確實獲得提升。 According to the training data set AX such as [AX 1 , AX 2 , AX 3 , AX 4 , AX 5 , AX 6 , AX 7 , AX 8 , AX 9 , AX 10 , AX 11 ], the inference is trained by the Loggers classification algorithm Model M1, historical data set BX such as [BX 1 , BX 2 , BX 3 , BX 4 , BX 5 , BX 6 , BX 7 , BX 8 , BX 9 , BX 10 , BX 11 ] to train the inference model M2, which is currently new The inference data set CX is such as [CX 1 , CX 2 , CX 3 , CX 4 , CX 5 , CX 6 , CX 7 , CX 8 , CX 9 , CX 10 , CX 11 ], and the inference model M1 is used to infer the new data The classification model accuracy evaluation index (Category accuracy; CA) is 0.7, and the CA obtained by classifying the new data with the inference model M2 is 0.8. Therefore, it is actually verified that the accuracy of replacing the inference model M with the trained historical model N is indeed improved.

第二實施例說明透過比較資料集特徵的分佈判斷目前上線服務的推論模型M是否適合目前的推論資料C(如特徵資料),不需要等待實際的標籤資料即可判斷模型推論品質。如果上線的推論模型M的訓練資料集與推論資料集CX的特徵資料分佈不一致,表示模型推論品質下降,需要更新推論模型M。又,本發明能從已訓練的歷史模型N尋找適合目前的推論資料C(如特徵資料)的推論模型M,如果推論資料與歷史模型N的訓練資料分佈一致,即可將此歷史模型N於模型伺服單元30中部署上線服務,而不需重新訓練新模型,以利節省時間及訓練成本。 The second embodiment describes whether the inference model M of the currently online service is suitable for the current inference data C (such as feature data) by comparing the distribution of data set features, and the inference quality of the model can be judged without waiting for the actual label data. If the training data set of the online inference model M is inconsistent with the characteristic data distribution of the inference data set CX, it means that the inference quality of the model has deteriorated, and the inference model M needs to be updated. In addition, the present invention can find an inference model M suitable for the current inference data C (such as characteristic data) from the trained historical model N. If the inference data is consistent with the training data distribution of the historical model N, the historical model N can be placed in The online service is deployed in the model server unit 30 without retraining a new model, so as to save time and training cost.

綜上所述,本發明中維持模型推論品質之系統及其方法係至少具有下列特色、優點或技術功效。 To sum up, the system and method for maintaining the quality of model inference in the present invention have at least the following features, advantages or technical effects.

一、本發明係利用推論模型的訓練資料集與推論資料集進行分佈一致的比較,以判斷推論模型是否適用於新進資料的分佈,有別於習知技術以準確度指標判斷推論模型的健康度。 1. The present invention uses the training data set of the inference model to compare the distribution of the inference data set to determine whether the inference model is suitable for the distribution of the new data, which is different from the conventional technology to judge the health of the inference model by the accuracy index .

二、本發明係(定期)比較推論資料集與歷史資料集的特徵欄 位,且比較方式僅需推論資料(特徵資料),而不需要等待實際值,故更快速又簡便。 2. The present invention is a (periodic) comparison of the characteristic column of the inference data set and the historical data set Bit, and the comparison method only needs to infer the data (characteristic data), and does not need to wait for the actual value, so it is faster and easier.

三、因各推論資料(特徵資料)的分佈互不相同,即並非全部的推論資料(特徵資料)都屬於常態分佈,無法同時一次檢定,故本發明提出二階段(或二步驟)的檢定方式以解決此問題。 3. Because the distribution of each inference data (characteristic data) is different from each other, that is, not all inference data (characteristic data) belong to the normal distribution and cannot be verified at the same time, so the present invention proposes a two-stage (or two-step) verification method to resolve this issue.

四、本發明改善習知技術於模型上線後需要回收真實的實際資料才能判斷模型誤差程度的缺點,能提升對於模型品質判斷的時效性。 Fourth, the present invention improves the disadvantage of the conventional technology that after the model goes online, the actual data needs to be recovered to judge the error degree of the model, and the timeliness of judging the quality of the model can be improved.

五、本發明係從歷史的訓練資料集(如模型訓練資料集)中提取適合新進資料的推論模型,不須重新訓練推論模型即可更新推論模型,節省重新訓練推論模型的時間。 5. The present invention extracts an inference model suitable for new data from a historical training data set (such as a model training data set), and the inference model can be updated without retraining the inference model, saving the time of retraining the inference model.

六、本發明應用之產業為例如製造業、金融業、服務業等各種的產業;同時,本發明應用之產品為例如機器學習平台、深度學習平台等各種的產品,但不以此為限。 6. The industries to which the present invention is applied are various industries such as manufacturing, finance, and service industries; meanwhile, the products to which the present invention is applied are various products such as machine learning platforms and deep learning platforms, but are not limited thereto.

上述實施形態僅例示性說明本發明之原理、特點及其功效,並非用以限制本發明之可實施範疇,任何熟習此項技藝之人士均能在不違背本發明之精神及範疇下,對上述實施形態進行修飾與改變。任何使用本發明所揭示內容而完成之等效改變及修飾,均仍應為申請專利範圍所涵蓋。因此,本發明之權利保護範圍應如申請專利範圍所列。 The above-mentioned embodiments are only illustrative of the principles, features and effects of the present invention, and are not intended to limit the applicable scope of the present invention. Modifications and changes are made to the implementation form. Any equivalent changes and modifications made by using the contents disclosed in the present invention should still be covered by the scope of the patent application. Therefore, the protection scope of the present invention should be listed in the scope of the patent application.

1:維持模型推論品質之系統 1: A system to maintain the quality of model inferences

10:模型版本資訊庫 10: Model Version Information Base

20:比較處理單元 20: Compare Processing Units

30:模型伺服單元 30: Model servo unit

40:模型應用單元 40: Model Application Unit

50:推論資訊庫 50: Inference Information Base

AX:訓練資料集 AX: training dataset

BX:歷史資料集 BX: Historical Data Collection

C:推論資料 C: Inference data

CX:推論資料集 CX: Inference Dataset

D:模型元資料 D: Model metadata

M:推論模型 M: Inference model

N:歷史模型 N: Historical Model

Claims (16)

一種維持模型推論品質之系統,包括:推論資訊庫與模型版本資訊庫,係分別儲存有推論資料集與訓練資料集;模型伺服單元,係用以部署推論模型;以及比較處理單元,係設定比較週期,以於該推論資料集的資料累積時間達到所設定的該比較週期時,由該比較處理單元從該推論資訊庫中擷取該推論資料集,以供該比較處理單元比較該模型伺服單元中所部署的該推論模型的訓練資料集與從該推論資訊庫中所擷取的該推論資料集兩者的對應特徵欄位以進行兩者的資料分佈一致性檢定,再由該比較處理單元依據該資料分佈一致性檢定的結果判斷該推論模型的訓練資料集與該推論資料集兩者的對應特徵欄位的資料分佈是否一致,其中,當該資料分佈不一致時,由該比較處理單元從該模型版本資訊庫所儲存的歷史的訓練資料集中找出與該推論資料集相似分佈的訓練資料集,以依據該相似分佈的訓練資料集將已訓練完成的歷史模型從該模型版本資訊庫中部署至該模型伺服單元,進而將已訓練完成的該歷史模型更新或取代該模型伺服單元中的該推論模型來提供推論服務,俾維持模型推論品質,其中,該比較處理單元更設定歷史資料區間,以從該模型版本資訊庫中擷取所設定的該歷史資料區間的歷史資料集的特徵欄位,俾由該比較處理單元比較該推論資料集與該歷史資料集兩者的特徵欄位。 A system for maintaining model inference quality, comprising: an inference information base and a model version information base, respectively storing an inference data set and a training data set; a model server unit for deploying an inference model; and a comparison processing unit for setting comparison a period, so that when the data accumulation time of the inference data set reaches the set comparison period, the comparison processing unit retrieves the inference data set from the inference information database for the comparison processing unit to compare the model servo unit The corresponding feature fields of the training data set of the inference model deployed in the inference model and the inference data set extracted from the inference information database are used to check the data distribution consistency between the two, and then the comparison processing unit According to the result of the data distribution consistency check, it is judged whether the data distribution of the corresponding feature fields of the training data set of the inference model and the inference data set are consistent. From the historical training data set stored in the model version information base, find a training data set with a similar distribution to the inference data set, so as to extract the trained historical model from the model version information base according to the similarly distributed training data set Deploying to the model server unit, and then updating or replacing the inference model in the model server unit with the historical model that has been trained to provide inference services to maintain model inference quality, wherein the comparison processing unit further sets a historical data interval , so as to retrieve the feature fields of the historical data set of the set historical data interval from the model version information database, so that the comparison processing unit compares the feature fields of the inference data set and the historical data set. 如請求項1所述之系統,其中,該推論資訊庫或該模型版本資訊庫係利用關聯式資料庫、物件導向資料庫、階層式資料庫、網路式資料庫、或檔案系統予以實作。 The system of claim 1, wherein the inference repository or the model version repository is implemented using a relational database, an object-oriented database, a hierarchical database, a network-based database, or a file system . 如請求項1所述之系統,其中,該模型版本資訊庫係用以儲存歷史資料集、訓練資料集與模型元資料,而該推論資訊庫所儲存的該推論資料集係由多個推論資料組成。 The system of claim 1, wherein the model version information base is used for storing historical data sets, training data sets and model metadata, and the inference data set stored in the inference information base consists of a plurality of inference data sets composition. 如請求項1所述之系統,其中,該比較處理單元係使用KS(柯爾莫哥洛夫-斯米爾諾夫)檢定方法、Mann-Whitney(曼-惠特尼)檢定方法、或Kruskal-Wallis(克拉斯卡-瓦歷斯)檢定方法,以對該推論模型的訓練資料集與該推論資料集兩者的對應特徵欄位進行該資料分佈一致性檢定。 The system of claim 1, wherein the comparison processing unit uses the KS (Kolmogorov-Smirnov) test method, the Mann-Whitney (Mann-Whitney) test method, or the Kruskal- The Wallis (Clarska-Wallis) test method is used to perform the data distribution consistency test with the corresponding feature fields of both the training data set of the inference model and the inference data set. 一種維持模型推論品質之系統,包括:推論資訊庫與模型版本資訊庫,係分別儲存有推論資料集與訓練資料集;模型伺服單元,係用以部署推論模型;以及比較處理單元,係設定比較週期,以於該推論資料集的資料累積時間達到所設定的該比較週期時,由該比較處理單元從該推論資訊庫中擷取該推論資料集,以供該比較處理單元比較該模型伺服單元中所部署的該推論模型的訓練資料集與從該推論資訊庫中所擷取的該推論資料集兩者的對應特徵欄位以進行兩者的資料分佈一致性檢定,再由該比較處理單元依據該資料分佈一致性檢定的結果判斷該推論模型的訓練資料集與該推論資料集兩者的對應特徵欄位的資料分佈是否一致,其中,當該資料分佈不一致時,由該比較處理單元從該模型版本資訊庫所儲存的歷史的訓練資料集中找出與該推論資料集相似分佈的訓練資料集,以依據該相似分佈的訓練資料集將已訓練完成的歷史模型從該模型版本資訊庫中部署至該模型伺服單元,進而將已訓練完成的該歷史模型更新或取代該模型伺服單元中的該推論模型來提供推論服務,俾維持模型推論品質, 其中,該比較處理單元更設定有一門檻值,以在該比較處理單元將該推論模型的訓練資料集與該推論資料集兩者的對應特徵欄位進行該資料分佈一致性檢定後得到該兩者的對應特徵欄位的統計值,如果該統計值小於該門檻值,表示該兩者的對應特徵欄位的資料分佈是不一致的,反之,如果該統計值大於或等於該門檻值,表示該兩者的對應特徵欄位的資料分佈是一致的。 A system for maintaining model inference quality, comprising: an inference information base and a model version information base, respectively storing an inference data set and a training data set; a model server unit for deploying an inference model; and a comparison processing unit for setting comparison a period, so that when the data accumulation time of the inference data set reaches the set comparison period, the comparison processing unit retrieves the inference data set from the inference information database for the comparison processing unit to compare the model servo unit The corresponding feature fields of the training data set of the inference model deployed in the inference model and the inference data set extracted from the inference information database are used to check the data distribution consistency between the two, and then the comparison processing unit According to the result of the data distribution consistency check, it is judged whether the data distribution of the corresponding feature fields of the training data set of the inference model and the inference data set are consistent. From the historical training data set stored in the model version information base, find a training data set with a similar distribution to the inference data set, so as to extract the trained historical model from the model version information base according to the similarly distributed training data set Deploy to the model server unit, and then update or replace the inference model in the model server unit with the historical model that has been trained to provide inference services, so as to maintain the model inference quality, Wherein, the comparison processing unit further sets a threshold value, so that the comparison processing unit obtains the data distribution consistency check on the corresponding feature fields of the training data set of the inference model and the inference data set by the comparison processing unit. The statistical value of the corresponding characteristic field of the The data distribution of the corresponding feature fields of the authors is consistent. 如請求項5所述之系統,其中,該比較處理單元更計算該統計值小於該門檻值的次數以進行次數檢驗而得到統計次數,如果該統計次數小於次數門檻值,表示該推論模型的訓練資料集與該推論資料集兩者的整體資料分佈是不一致的,反之,如果該統計次數大於或等於該次數門檻值,表示該推論模型的訓練資料集與該推論資料集兩者的整體資料分佈是一致的。 The system according to claim 5, wherein the comparison processing unit further calculates the number of times the statistic value is smaller than the threshold value to perform a frequency test to obtain the statistic number, if the statistic number is less than the number of times the threshold value, it means the training of the inference model The overall data distribution of the data set and the inference data set is inconsistent. On the contrary, if the number of statistics is greater than or equal to the threshold of the number of times, it indicates the overall data distribution of the training data set of the inference model and the inference data set. is consistent. 如請求項6所述之系統,其中,該比較處理單元係使用二項分配檢定方法、符號檢定方法、或Wilcoxon(魏克生)符號等級檢定方法,進行該次數檢驗而得到該統計次數。 The system of claim 6, wherein the comparison processing unit uses a binomial distribution test method, a sign test method, or a Wilcoxon (Weiksen) sign level test method to perform the number of tests to obtain the statistical times. 一種維持模型推論品質之系統,包括:推論資訊庫與模型版本資訊庫,係分別儲存有推論資料集與訓練資料集;模型伺服單元,係用以部署推論模型;以及比較處理單元,係設定比較週期,以於該推論資料集的資料累積時間達到所設定的該比較週期時,由該比較處理單元從該推論資訊庫中擷取該推論資料集,以供該比較處理單元比較該模型伺服單元中所部署的該推論模型的訓練資料集與從該推論資訊庫中所擷取的該推論資料集兩者的對應特徵欄位以進行兩者的資料分佈一致性檢定,再由該比較處理單元依據該 資料分佈一致性檢定的結果判斷該推論模型的訓練資料集與該推論資料集兩者的對應特徵欄位的資料分佈是否一致,其中,當該資料分佈不一致時,由該比較處理單元從該模型版本資訊庫所儲存的歷史的訓練資料集中找出與該推論資料集相似分佈的訓練資料集,以依據該相似分佈的訓練資料集將已訓練完成的歷史模型從該模型版本資訊庫中部署至該模型伺服單元,進而將已訓練完成的該歷史模型更新或取代該模型伺服單元中的該推論模型來提供推論服務,俾維持模型推論品質,其中,該比較處理單元更對歷史的該訓練資料集與該推論資料集兩者的對應特徵欄位進行資料分佈一致性檢定,以由該比較處理單元依據該資料分佈一致性檢定的結果判斷歷史的該訓練資料集與該推論資料集兩者的對應特徵欄位的資料分佈是否一致。 A system for maintaining model inference quality, comprising: an inference information base and a model version information base, respectively storing an inference data set and a training data set; a model server unit for deploying an inference model; and a comparison processing unit for setting comparison a period, so that when the data accumulation time of the inference data set reaches the set comparison period, the comparison processing unit retrieves the inference data set from the inference information database for the comparison processing unit to compare the model servo unit The corresponding feature fields of the training data set of the inference model deployed in the inference model and the inference data set extracted from the inference information database are used to check the data distribution consistency between the two, and then the comparison processing unit According to the The result of the data distribution consistency check determines whether the data distributions of the corresponding feature fields of the inference model training data set and the inference data set are consistent. Find a training data set with a similar distribution to the inference data set from the historical training data set stored in the version information base, and deploy the trained historical model from the model version information base to the model version information set according to the similarly distributed training data set. The model server unit further updates or replaces the inference model in the model server unit with the historical model that has been trained to provide inference services to maintain model inference quality, wherein the comparison processing unit is more accurate to the historical training data The data distribution consistency check is performed on the corresponding feature fields of the data set and the inference data set, so that the comparison processing unit judges the historical training data set and the inference data set according to the result of the data distribution consistency check. Whether the data distribution of the corresponding characteristic fields is consistent. 一種維持模型推論品質之方法,包括:令比較處理單元設定比較週期,以於推論資料集的資料累積時間達到所設定的該比較週期時,由該比較處理單元從推論資訊庫中擷取該推論資料集;令該比較處理單元比較模型伺服單元中所部署的推論模型的訓練資料集與從該推論資訊庫中所擷取的該推論資料集兩者的對應特徵欄位以進行兩者的資料分佈一致性檢定,再由該比較處理單元依據該資料分佈一致性檢定的結果判斷該推論模型的訓練資料集與該推論資料集兩者的對應特徵欄位的資料分佈是否一致;以及當該資料分佈不一致時,由該比較處理單元從模型版本資訊庫所儲存的歷史的訓練資料集中找出與該推論資料集相似分佈的訓練資料集,以依據該相似分佈的訓練資料集將已訓練完成的歷史模型從該模型版本資訊庫 中部署至該模型伺服單元,進而將已訓練完成的該歷史模型更新或取代該模型伺服單元中的該推論模型來提供推論服務,俾維持模型推論品質,其中,該比較處理單元更設定歷史資料區間,以從該模型版本資訊庫中擷取所設定的該歷史資料區間的歷史資料集的特徵欄位,俾由該比較處理單元比較該推論資料集與該歷史資料集兩者的特徵欄位。 A method for maintaining model inference quality, comprising: setting a comparison period by a comparison processing unit, so that when the data accumulation time of an inference data set reaches the set comparison period, the comparison processing unit retrieves the inference from an inference information database a data set; let the comparison processing unit compare the training data set of the inference model deployed in the model server unit with the corresponding feature fields of the inference data set retrieved from the inference information database to perform the two data distribution consistency check, the comparison processing unit then judges whether the data distributions of the corresponding feature fields of the training data set of the inference model and the inference data set are consistent according to the result of the data distribution consistency check; and when the data When the distributions are inconsistent, the comparison processing unit finds out a training data set with a similar distribution to the inference data set from the historical training data set stored in the model version information database, so as to classify the trained data set according to the similar distribution of the training data set. Historical models from this model version repository It is deployed in the model server unit, and then the historical model that has been trained is updated or replaced by the inference model in the model server unit to provide inference services, so as to maintain the model inference quality, wherein the comparison processing unit further sets the historical data an interval to retrieve the feature field of the historical data set of the set historical data interval from the model version information database, so that the comparison processing unit compares the feature field of the inference data set and the historical data set . 如請求項9所述之方法,其中,該推論資訊庫或該模型版本資訊庫係利用關聯式資料庫、物件導向資料庫、階層式資料庫、網路式資料庫、或檔案系統予以實作。 The method of claim 9, wherein the inference repository or the model version repository is implemented using a relational database, an object-oriented database, a hierarchical database, a network-based database, or a file system . 如請求項9所述之方法,更包括令該模型版本資訊庫儲存歷史資料集、訓練資料集與模型元資料,而令該推論資訊庫儲存多個推論資料以組成該推論資料集。 The method of claim 9, further comprising causing the model version information base to store historical data sets, training data sets and model metadata, and causing the inference information base to store a plurality of inference data to form the inference data set. 如請求項9所述之方法,其中,該比較處理單元係使用KS(柯爾莫哥洛夫-斯米爾諾夫)檢定方法、Mann-Whitney(曼-惠特尼)檢定方法、或Kruskal-Wallis(克拉斯卡-瓦歷斯)檢定方法,以對該推論模型的訓練資料集與該推論資料集兩者的對應特徵欄位進行該資料分佈一致性檢定。 The method of claim 9, wherein the comparison processing unit uses the KS (Kolmogorov-Smirnov) test method, the Mann-Whitney (Mann-Whitney) test method, or the Kruskal- The Wallis (Clarska-Wallis) test method is used to perform the data distribution consistency test with the corresponding feature fields of both the training data set of the inference model and the inference data set. 一種維持模型推論品質之方法,包括:令比較處理單元設定比較週期,以於推論資料集的資料累積時間達到所設定的該比較週期時,由該比較處理單元從推論資訊庫中擷取該推論資料集;令該比較處理單元比較模型伺服單元中所部署的推論模型的訓練資料集與從該推論資訊庫中所擷取的該推論資料集兩者的對應特徵欄位以進行兩者的資料分佈一致性檢定,再由該比較處理單元依據該資料分佈一致性 檢定的結果判斷該推論模型的訓練資料集與該推論資料集兩者的對應特徵欄位的資料分佈是否一致;以及當該資料分佈不一致時,由該比較處理單元從模型版本資訊庫所儲存的歷史的訓練資料集中找出與該推論資料集相似分佈的訓練資料集,以依據該相似分佈的訓練資料集將已訓練完成的歷史模型從該模型版本資訊庫中部署至該模型伺服單元,進而將已訓練完成的該歷史模型更新或取代該模型伺服單元中的該推論模型來提供推論服務,俾維持模型推論品質,其中,該比較處理單元更設定一門檻值,以在該比較處理單元將該推論模型的訓練資料集與該推論資料集兩者的對應特徵欄位進行該資料分佈一致性檢定後得到該兩者的對應特徵欄位的統計值,如果該統計值小於該門檻值,表示該兩者的對應特徵欄位的資料分佈是不一致的,反之,如果該統計值大於或等於該門檻值,表示該兩者的對應特徵欄位的資料分佈是一致的。 A method for maintaining model inference quality, comprising: setting a comparison period by a comparison processing unit, so that when the data accumulation time of an inference data set reaches the set comparison period, the comparison processing unit retrieves the inference from an inference information database a data set; let the comparison processing unit compare the training data set of the inference model deployed in the model server unit and the corresponding feature fields of the inference data set retrieved from the inference information database to perform the two data Distribution consistency check, and then the comparison processing unit will distribute consistency according to the data The result of the test determines whether the data distribution of the corresponding feature fields of the inference model training data set and the inference data set is consistent; and when the data distribution is inconsistent, the comparison processing unit stores the data from the model version information database. A training data set with similar distribution to the inference data set is found in the historical training data set, so as to deploy the trained historical model from the model version information database to the model server unit according to the similarly distributed training data set, and then Updating or replacing the inference model in the model server unit with the trained historical model to provide inference service to maintain the model inference quality, wherein the comparison processing unit further sets a threshold value, so that the comparison processing unit will After the data distribution consistency check is performed on the corresponding feature fields of the training data set of the inference model and the inference data set, the statistical values of the corresponding feature fields of the two are obtained. If the statistical value is less than the threshold value, it means The data distributions of the corresponding feature fields of the two are inconsistent. On the contrary, if the statistic value is greater than or equal to the threshold value, it means that the data distributions of the corresponding feature fields of the two are consistent. 如請求項13所述之方法,更包括令該比較處理單元計算該統計值小於該門檻值的次數以進行次數檢驗而得到統計次數,如果該統計次數小於次數門檻值,表示該推論模型的訓練資料集與該推論資料集兩者的整體資料分佈是不一致的,反之,如果該統計次數大於或等於該次數門檻值,表示該推論模型的訓練資料集與該推論資料集兩者的整體資料分佈是一致的。 The method as claimed in claim 13, further comprising causing the comparison processing unit to calculate the number of times the statistic value is smaller than the threshold value to perform a frequency test to obtain the statistic number, if the statistic number is less than the number of times the threshold value, indicating that the inference model is being trained The overall data distribution of the data set and the inference data set is inconsistent. On the contrary, if the number of statistics is greater than or equal to the threshold of the number of times, it indicates the overall data distribution of the training data set of the inference model and the inference data set. is consistent. 如請求項14所述之方法,其中,該比較處理單元係使用二項分配檢定方法、符號檢定方法、或Wilcoxon(魏克生)符號等級檢定方法,進行該次數檢驗而得到該統計次數。 The method of claim 14, wherein the comparison processing unit uses a binomial distribution test method, a sign test method, or a Wilcoxon (Weiksen) sign level test method to perform the number of tests to obtain the statistical times. 一種維持模型推論品質之方法,包括: 令比較處理單元設定比較週期,以於推論資料集的資料累積時間達到所設定的該比較週期時,由該比較處理單元從推論資訊庫中擷取該推論資料集;令該比較處理單元比較模型伺服單元中所部署的推論模型的訓練資料集與從該推論資訊庫中所擷取的該推論資料集兩者的對應特徵欄位以進行兩者的資料分佈一致性檢定,再由該比較處理單元依據該資料分佈一致性檢定的結果判斷該推論模型的訓練資料集與該推論資料集兩者的對應特徵欄位的資料分佈是否一致;以及當該資料分佈不一致時,由該比較處理單元從模型版本資訊庫所儲存的歷史的訓練資料集中找出與該推論資料集相似分佈的訓練資料集,以依據該相似分佈的訓練資料集將已訓練完成的歷史模型從該模型版本資訊庫中部署至該模型伺服單元,進而將已訓練完成的該歷史模型更新或取代該模型伺服單元中的該推論模型來提供推論服務,俾維持模型推論品質,其中,該比較處理單元更對歷史的該訓練資料集與該推論資料集兩者的對應特徵欄位進行資料分佈一致性檢定,以由該比較處理單元依據該資料分佈一致性檢定的結果判斷歷史的該訓練資料集與該推論資料集兩者的對應特徵欄位的資料分佈是否一致。 A method of maintaining the quality of model inferences, including: Let the comparison processing unit set a comparison period, so that when the data accumulation time of the inference data set reaches the set comparison period, the comparison processing unit retrieves the inference data set from the inference information database; let the comparison processing unit compare the models The corresponding feature fields of the training data set of the inference model deployed in the servo unit and the inference data set retrieved from the inference database are used to check the consistency of the data distribution between the two, and then processed by the comparison The unit judges whether the data distributions of the corresponding feature fields of the training data set of the inference model and the inference data set are consistent according to the result of the data distribution consistency check; and when the data distributions are inconsistent, the comparison processing unit determines from Find out a training data set with a similar distribution to the inference data set from the historical training data set stored in the model version information base, and deploy the trained historical model from the model version information base according to the similarly distributed training data set to the model server unit, and then update or replace the inference model in the model server unit with the historical model that has been trained to provide inference services, so as to maintain the model inference quality, wherein the comparison processing unit is more sensitive to the historical training The data distribution consistency check is performed on the corresponding feature fields of the data set and the inference data set, so that the comparison processing unit judges both the historical training data set and the inference data set according to the result of the data distribution consistency check Whether the data distribution of the corresponding characteristic fields is consistent.
TW109138630A 2020-11-05 2020-11-05 System and method for maintaining model inference quality TWI754446B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW109138630A TWI754446B (en) 2020-11-05 2020-11-05 System and method for maintaining model inference quality

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW109138630A TWI754446B (en) 2020-11-05 2020-11-05 System and method for maintaining model inference quality

Publications (2)

Publication Number Publication Date
TWI754446B true TWI754446B (en) 2022-02-01
TW202219845A TW202219845A (en) 2022-05-16

Family

ID=81329463

Family Applications (1)

Application Number Title Priority Date Filing Date
TW109138630A TWI754446B (en) 2020-11-05 2020-11-05 System and method for maintaining model inference quality

Country Status (1)

Country Link
TW (1) TWI754446B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080221830A1 (en) * 2007-03-09 2008-09-11 Entelechy Health Systems L.L.C. C/O Perioptimum Probabilistic inference engine
TW201926148A (en) * 2017-11-22 2019-07-01 香港商阿里巴巴集團服務有限公司 Machine learning model training method and device, and electronic device
CN109993300A (en) * 2017-12-29 2019-07-09 华为技术有限公司 A kind of training method and device of neural network model
CN111160566A (en) * 2019-12-26 2020-05-15 腾讯科技(深圳)有限公司 Sample generation method and device, computer readable storage medium and computer equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080221830A1 (en) * 2007-03-09 2008-09-11 Entelechy Health Systems L.L.C. C/O Perioptimum Probabilistic inference engine
TW201926148A (en) * 2017-11-22 2019-07-01 香港商阿里巴巴集團服務有限公司 Machine learning model training method and device, and electronic device
CN109993300A (en) * 2017-12-29 2019-07-09 华为技术有限公司 A kind of training method and device of neural network model
CN111160566A (en) * 2019-12-26 2020-05-15 腾讯科技(深圳)有限公司 Sample generation method and device, computer readable storage medium and computer equipment

Also Published As

Publication number Publication date
TW202219845A (en) 2022-05-16

Similar Documents

Publication Publication Date Title
US11373424B1 (en) Document analysis architecture
AU2017251771B2 (en) Statistical self learning archival system
CN111367777B (en) Alarm processing method, device, equipment and computer readable storage medium
CN114930385A (en) Computer-implemented method for defect analysis, apparatus for defect analysis, computer program product and intelligent defect analysis system
CN113590698A (en) Artificial intelligence technology-based data asset classification modeling and hierarchical protection method
CN116485020B (en) Supply chain risk identification early warning method, system and medium based on big data
EP4165487A1 (en) Document analysis architecture
CN117319452B (en) Safety inspection method and system applied to barium sulfate preparation
TWI754446B (en) System and method for maintaining model inference quality
CN113111139A (en) Alarm detection method and device based on Internet of things sensor
CN117688458A (en) Method and system for automatically optimizing technological parameters of injection molding die
CN116611745A (en) Plastic film quality evaluation method and system based on intelligent manufacturing
CN103714251A (en) Method, device and system for matching semiconductor product with machining device
CN116245380A (en) Method and device for determining service problems of target service and computer equipment
CN115730152A (en) Big data processing method and big data processing system based on user portrait analysis
US11776291B1 (en) Document analysis architecture
CN109255079B (en) Cloud service personality recommendation system and method based on sparse linear method
CN114924962B (en) Cross-project software defect prediction data selection method
CN116402241B (en) Multi-model-based supply chain data prediction method and device
TWI778683B (en) Providing test time estimation suggestion system based on product configuration information and method thereof
US11893505B1 (en) Document analysis architecture
US11893065B2 (en) Document analysis architecture
CN114428709B (en) SDS state detection method and system in cloud management platform
CN118114671A (en) Gaussian function-based text data set small sample named entity recognition method and system
CN113901223B (en) Method, device, computer equipment and storage medium for generating enterprise classification model