WO2022252960A1 - Method and apparatus for training prediction model, and computer device and storage medium - Google Patents

Method and apparatus for training prediction model, and computer device and storage medium Download PDF

Info

Publication number
WO2022252960A1
WO2022252960A1 PCT/CN2022/092573 CN2022092573W WO2022252960A1 WO 2022252960 A1 WO2022252960 A1 WO 2022252960A1 CN 2022092573 W CN2022092573 W CN 2022092573W WO 2022252960 A1 WO2022252960 A1 WO 2022252960A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
online
prediction model
flow data
training
Prior art date
Application number
PCT/CN2022/092573
Other languages
French (fr)
Chinese (zh)
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 京东城市(北京)数字科技有限公司
Publication of WO2022252960A1 publication Critical patent/WO2022252960A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/04Inference or reasoning models
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/26Government or public services

Definitions

  • the present disclosure relates to the technical field of artificial intelligence, and in particular to a training method, device, computer equipment, non-transitory computer-readable storage medium, computer program product and computer program for a prediction model.
  • a large number of artificial intelligence models may be used to construct various intelligent scenarios, such as traffic flow forecasting, traffic flow forecasting, air quality forecasting, monitoring and early warning, etc.
  • the input data processed by these models are usually in the form of streams
  • concept drift This phenomenon that the distribution or carried information changes over time is called concept drift.
  • the conceptual drift of the data will cause the performance of the artificial intelligence model to decline, resulting in the inability of the static artificial intelligence model to continuously meet the prediction requirements in the intelligent scene, thereby affecting the prediction effect of the artificial intelligence model.
  • the present disclosure aims to solve one of the technical problems in the related art at least to a certain extent.
  • the purpose of this disclosure is to propose a training method, device, computer equipment, non-transitory computer-readable storage medium, computer program product and computer program for a prediction model, which can take into account the learning speed of the prediction model for new knowledge, and Avoid the occurrence of catastrophic forgetting, effectively improve the prediction performance and prediction stability of the prediction model, enable the prediction model to continuously meet the prediction needs in intelligent scenarios, and improve the prediction effect of the prediction model.
  • the method for training the prediction model proposed by the embodiment of the first aspect of the present disclosure includes: obtaining current flow data and an online prediction model; if concept drift occurs in the current flow data, determine the degree of concept drift; and according to the degree value of the concept drift, combine the current flow data and target flow data to perform online training on the online prediction model to obtain a target prediction model, wherein the target flow data is obtained from multiple historical Sampled from streaming data.
  • the prediction model training method proposed in the embodiment of the first aspect of the present disclosure determines the training timing of the online prediction model training by combining the value of the degree of concept drift, so as to support the online learning process, if the concept drift of the current streaming data is large , so that the online training process has a faster model learning speed, so that the model can quickly grasp the new knowledge represented by the stream data that produces concept drift, so as to ensure the online real-time performance of the prediction model; and if the current concept drift of the stream data Smaller, it makes the online training process maintain a relatively low learning rate to prevent the occurrence of catastrophic forgetting, so as to fully take into account the learning speed of the prediction model for new knowledge and the stability of the prediction model, so that the prediction model can continue Meet the forecasting needs in intelligent scenarios and improve the forecasting effect of the forecasting model.
  • the prediction model training device proposed by the embodiment of the second aspect of the present disclosure includes: an acquisition module, used to obtain the current flow data and an online prediction model; a first determination module, used to obtain the current flow data When concept drift occurs, determine the degree value of concept drift; and a training module, configured to perform online training on the online prediction model in combination with the current flow data and target flow data according to the degree value of concept drift, so as to obtain A target prediction model; wherein, the target flow data is obtained by sampling from a plurality of historical flow data.
  • the prediction model training device proposed in the embodiment of the second aspect of the present disclosure determines the training timing of the online prediction model training by combining the value of the degree of concept drift, so as to support the online learning process, if the concept drift of the current streaming data is large , so that the online training process has a faster model learning speed, so that the model can quickly grasp the new knowledge represented by the stream data that produces concept drift, so as to ensure the online real-time performance of the prediction model; and if the current concept drift of the stream data Smaller, it makes the online training process maintain a relatively low learning rate to prevent the occurrence of catastrophic forgetting, so as to fully take into account the learning speed of the prediction model for new knowledge and the stability of the prediction model, so that the prediction model can continue Meet the forecasting needs in intelligent scenarios and improve the forecasting effect of the forecasting model.
  • the embodiment of the third aspect of the present disclosure provides a computer device, including a memory, a processor, and a computer program stored in the memory and operable on the processor.
  • a computer device including a memory, a processor, and a computer program stored in the memory and operable on the processor.
  • the embodiment of the fourth aspect of the present disclosure proposes a non-transitory computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the method for training the prediction model as proposed in the embodiment of the first aspect of the present disclosure is implemented. .
  • the embodiment of the fifth aspect of the present disclosure provides a computer program product.
  • the instruction processor in the computer program product executes, the method for training the prediction model as proposed in the embodiment of the first aspect of the present disclosure is executed.
  • the embodiment of the sixth aspect of the present disclosure provides a computer program, the computer program includes computer program code, when the computer program code is run on the computer, the computer executes the prediction model as proposed in the embodiment of the first aspect of the present disclosure training method.
  • FIG. 1 is a schematic flowchart of a method for training a prediction model proposed by an embodiment of the present disclosure
  • FIG. 2 is a schematic structural diagram of a training device for a prediction model proposed by an embodiment of the present disclosure
  • FIG. 3 is a schematic flowchart of a method for training a prediction model proposed by another embodiment of the present disclosure
  • FIG. 4 is a schematic flowchart of a method for training a prediction model proposed by another embodiment of the present disclosure
  • FIG. 5 is a schematic flowchart of a method for training a prediction model proposed by another embodiment of the present disclosure
  • FIG. 6 is a schematic structural diagram of a training device for a prediction model proposed by another embodiment of the present disclosure.
  • FIG. 7 is a schematic structural diagram of a training device for a prediction model proposed by an embodiment of the present disclosure.
  • FIG. 8 is a schematic structural diagram of a training device for a prediction model proposed in another embodiment of the present disclosure.
  • Figure 9 shows a block diagram of an exemplary computer device suitable for use in implementing embodiments of the present disclosure.
  • FIG. 1 is a schematic flowchart of a method for training a prediction model proposed by an embodiment of the present disclosure.
  • the execution subject of the prediction model training method in the embodiment of the present disclosure is a prediction model training device, which can be realized by software and/or hardware, and which can be configured in an electronic device.
  • Devices may include, but are not limited to, terminals, servers, and so on.
  • the artificial intelligence model used to predict the flow of people, traffic, air quality, monitoring and early warning in the smart city scene can be called a prediction model
  • the artificial intelligence model can be, for example, a neural network model, machine learning models, etc., without limitation.
  • the prediction model provides a training method for the prediction model, which can take into account the learning speed of the prediction model for new knowledge and avoid the occurrence of catastrophic forgetting, effectively improve the prediction performance and prediction stability of the prediction model, so that the prediction model can continuously meet the Forecast demand in intelligent scenarios and improve the forecasting effect of the forecasting model.
  • the method for training the prediction model includes steps S101-S103.
  • the prediction model used in the online environment to predict the flow of people, traffic, air quality, monitoring and early warning in the smart city scene can be called an online prediction model, that is to say, the online A predictive model is a predictive model that has been deployed in a scenario and performs corresponding predictive tasks.
  • the current flow data can be the flow data collected at the current time point.
  • the flow data refers to the flow data generated in the form of flow. With the change of the time of data generation and the environment, the distribution of data and the information reflected will also change.
  • the data that will change, the flow data can be used as the input of the online prediction model to trigger it to execute the corresponding prediction task, then in the embodiment of the present disclosure, it can support the dynamic collection of the current flow data, and support directly based on the current Online training of the online forecasting model is carried out according to the degree of concept drift of the stream data, and the stream data of the new training sample is formed by using the continuously acquired current stream data and the target stream data obtained by sampling the historical stream data to trigger the forecasting model Online training ensures the prediction performance of the online prediction model and controls the training speed of the online prediction model.
  • concept drift has occurred in the current stream data. If concept drift has occurred in the current stream data, determine the degree of concept drift. The value of the degree of concept drift indicates: current The extent to which concept drift occurs with streaming data.
  • the current flow data can be compared with multiple historical flow data to obtain the change between the current flow data and multiple historical flow data, and then the change can be quantified to obtain the degree of concept drift value, and compare the value of the degree of concept drift with a set threshold of the degree of concept drift, and determine whether to trigger online training of the prediction model according to the result of the comparison.
  • the embodiment of the present disclosure determines the training timing of the online prediction model training by combining the value of the degree of concept drift, so as to support the online learning process.
  • the process has a fast model learning speed, so that the model can quickly grasp the new knowledge represented by the flow data that produces concept drift, so as to ensure the online real-time performance of the prediction model;
  • the training process maintains a relatively low learning rate to prevent the occurrence of catastrophic forgetting, so as to comprehensively take into account the learning speed of the prediction model for new knowledge and the stability of the prediction model.
  • S103 According to the degree value of concept drift, combine the current flow data and the target flow data to conduct online training on the online prediction model to obtain the target prediction model, wherein the target flow data is obtained by sampling from multiple historical flow data .
  • the online prediction model combined with the current flow data and target flow data can be adaptively triggered to obtain the target prediction model according to the degree value of concept drift.
  • the prediction model obtained through training may be referred to as a target prediction model.
  • the historical flow data can be understood as: a current time point corresponding to the current flow data. Multiple flow data accumulated between can be called historical flow data.
  • the training timing of the online prediction model training is determined by combining the value of the degree of concept drift, so as to support the online learning process.
  • the fast model learning speed enables the model to quickly grasp the new knowledge represented by the streaming data that produces concept drift, so as to ensure the online real-time performance of the prediction model; and if the concept drift of the current streaming data is small, the online training process can be maintained.
  • Relatively low learning rate to prevent the occurrence of catastrophic forgetting so as to comprehensively take into account the learning speed of the prediction model for new knowledge and the stability of the prediction model, so that the prediction model can continuously meet the prediction needs in intelligent scenarios and improve Predictive performance of the predictive model.
  • FIG. 2 is a schematic structural diagram of a training device for a prediction model proposed by an embodiment of the present disclosure.
  • the description of the following embodiments of the present disclosure may be combined with what is shown in FIG. 2 , which is not limited thereto. in,
  • Data pool can be used to store all historical flow data.
  • Real-time data unit a unit for online real-time streaming data input.
  • This real-time data unit can receive real-time streaming data input, and input real-time streaming data to the reasoning service unit for model reasoning. At the same time, it will also receive real-time streaming data
  • the data is input to the data drift monitoring unit, which is used to calculate whether concept drift occurs in the real-time streaming data.
  • Playback buffer pool used to store the latest multiple historical stream data
  • the multiple historical stream data may specifically be part of the stream data in all the historical stream data in the above data pool
  • the online learning module can sample from the playback buffer pool to obtain the target Streaming data for online training of predictive models.
  • Sample flow data for training It can be randomly selected from the data pool, and the initial prediction model is trained offline, so that the trained prediction model is pushed to the model warehouse.
  • Model training use the number of sample streams for training to conduct offline training on the initial prediction model, so as to push the trained prediction model to the model warehouse, and in the actual prediction scenario, push the latest prediction model in the model warehouse to the inference service unit for online prediction, and thus the prediction model used by the inference service unit to provide inference services may be referred to as an online prediction model.
  • Data drift detection data set Receive current stream data and cache it to determine whether concept drift occurs and the degree value of concept drift, and refer to the degree value of concept drift to assist in online learning of online prediction models.
  • Concept drift evaluation module use the current flow data received by the data drift monitoring unit to calculate the degree of concept drift of the current flow data relative to the historical flow data, to determine whether the degree of concept drift of the current flow data is greater than the degree of concept drift threshold.
  • Online learning module The online data in the data pool, the playback cache pool, and the degree of concept drift are used for online training of the prediction model, and the trained prediction model is transmitted to the model warehouse, and the current flow data used for online learning is synchronized to the Playback cache pool.
  • Model warehouse store prediction models obtained from offline training and prediction models obtained from online training.
  • Reasoning service unit Obtain the latest prediction model from the model warehouse, use the latest prediction model to perform model reasoning on online data, and output prediction results.
  • FIG. 3 is a schematic flowchart of a prediction model training method proposed by another embodiment of the present disclosure.
  • the above-mentioned FIG. 2 may be combined together, including steps S301-S307.
  • the model training unit in Figure 2 above can be used to conduct offline model training using all the historical flow data in the data pool, and the prediction model is obtained after training, which will be used as the model basis for subsequent online training, and the model training unit will transfer the prediction model to to the model repository.
  • the inference service unit in FIG. 2 above obtains the latest prediction model from the model warehouse and uses it as the inference model of the system.
  • the real-time data unit may input the received real-time stream data into the data drift monitoring unit to calculate whether concept drift occurs in the real-time stream data, and determine the degree of concept drift if concept drift occurs in the current stream data.
  • current flow data can be compared with historical flow data to detect the degree of data drift, assuming that the judgment threshold for drift detection is set to Th (this Th can be called the concept drift threshold), if Drift detection output (the drift detection output can specifically be that the concept drift degree value is greater than or equal to the concept drift degree threshold) Th, then refer to the set rule to sample the target flow data from the historical flow data stored in the playback buffer pool.
  • Th can be called the concept drift threshold
  • S304 Perform online training on the online prediction model according to the current flow data and the target flow data.
  • the online prediction model can be trained online for a first set number of times according to the current stream data and the target stream data, wherein the first set number of times is the maximum value within the set number of times range.
  • the value of the degree of concept drift of the current stream data is greater than or equal to the threshold of the degree of concept drift, it can trigger the online training of the online prediction model directly, and train the set number of times.
  • the set number of times can be called The first set times.
  • the degree of concept drift of the current streaming data is greater than or equal to the threshold of the degree of concept drift, it can directly trigger the online training of the online prediction model, and the number of training iterations is Inc_Train_Num (the number of training iterations is Inc_Train_Num, that is, is called the first set number of times), so as to effectively ensure that the prediction model can quickly respond to changes in the distribution of stream data.
  • the above-mentioned first set number of times is the maximum value within the range of set times.
  • the drift detection output (the drift detection output can be specifically the concept drift degree value) is less than the concept drift degree threshold Th, then the current stream data can be stored in the playback buffer pool, and the data of the stream data stored in the playback buffer pool can be determined quantity.
  • the setting condition may be that the amount of data has reached the maximum amount of data that can be stored in the playback buffer pool, and there is no limit to this.
  • the current stream data will be stored in the playback buffer pool, and the data volume of the stream data stored in the playback buffer pool will be determined in real time. If If the amount of data does not reach the maximum amount of data that can be stored in the playback buffer pool, the current streaming data will be continuously obtained and the amount of data will be updated dynamically.
  • S307 If the amount of data satisfies the set conditions, refer to the set rules to sample the target stream data from the historical stream data stored in the playback buffer pool, and perform online training on the online prediction model according to the target stream data.
  • the target flow data is sampled from the historical flow data stored in the playback buffer pool, and the The target flow data is input into the online learning module to train the online prediction model online and iteratively update the online prediction model to ensure the effect of the online prediction model.
  • the online prediction model can be trained online for a second set number of times according to the target flow data, wherein the second set number of times is less than the first set number of times, and the second set number of times is based on the set number of times range
  • the maximum value, the minimum value, the value of the degree of concept drift, and the threshold value of the degree of concept drift are calculated.
  • the degree of concept drift of the current stream data when the degree of concept drift of the current stream data is less than the threshold of the degree of concept drift, online training is triggered by the amount of data. Considering that the degree of concept drift of the current stream data is small, the iterations of training can be appropriately reduced
  • the number of iterations Inc_Train_Num, the number of iterations Inc_Train_Num in this case may be referred to as the second set number of times.
  • the second set number of times please refer to the following.
  • the data set can be used to train the online prediction model online and repeat Inc_Train_Num times.
  • the trigger mechanism of online training is more flexible and applicable, and it is possible to timely avoid the error caused by the concept drift of streaming data.
  • the performance of the model decreases, effectively improving the prediction performance and prediction stability of the prediction model, so that the prediction model can continuously meet the prediction needs in intelligent scenarios, and improve the prediction effect of the prediction model. If the concept drift of the current streaming data is relatively large, online training of the online prediction model can be directly triggered, thereby effectively ensuring that the prediction model can quickly respond to changes in the distribution of streaming data.
  • the degree of concept drift in detecting the current flow data is small, after the storage of the playback buffer pool is full, the target flow data is sampled from the historical flow data stored in the playback buffer pool, and the target flow data is input into the online learning module, The online prediction model is trained online, and the online prediction model is updated iteratively to ensure the effect of the online prediction model.
  • the degree of concept drift of the current streaming data is small, and online training is triggered by the amount of data. Considering that the degree of concept drift of the current streaming data is small, the number of training iterations can be appropriately reduced, thus ensuring the stability of the prediction model training sex.
  • step (4) And judge whether the playback buffer pool meets the quantity requirement of online learning, if so, go to step (4), otherwise go to step (1).
  • Inc_Train_Num Inc_Train_max and Inc_Train_min represent the maximum number of iterations (the maximum value in the set number range) and the minimum number of iterations (the minimum value in the set number range) of online training, respectively.
  • Inc_Train_Num Inc_Train_max, so as to accelerate the learning speed.
  • Inc_Train_Num (Inc_Train_max-Inc_Train_min)*Concept_drift_value/Th+Inc_Train_Min.
  • the current stream data is stored in the playback buffer pool, and the first stream data in the playback buffer pool is deleted, wherein the storage corresponding to the first stream data order, before the corresponding storage order of other stream data, the first stream data and other stream data together constitute the stream data stored in the playback buffer pool, so that after the online training is completed, the latest stream data can be stored in the playback buffer pool in a timely manner.
  • the most "old" historical flow data is deleted to ensure that the total amount of sample flow data in the playback buffer pool remains unchanged, and the feature representation capability of the sample flow data in the playback buffer pool is guaranteed.
  • FIG. 4 is a schematic flowchart of a prediction model training method proposed by another embodiment of the present disclosure. The description of FIG. 4 may be combined with the above-mentioned FIG. 2 , including steps S401-S402.
  • S401 Determine the weight according to the data volume of the stream data stored in the playback buffer pool and the corresponding storage time of the historical stream data.
  • S402 From the historical flow data stored in the playback buffer pool, obtain a set amount of historical flow data based on selection probability sampling as the target flow data, and the ratio between the set amount and the amount of the current flow data is a preset value .
  • the selection probability may be specifically set according to the weight corresponding to the historical flow data, for details, please refer to the following description.
  • the embodiments of the present disclosure consider that in real prediction scenarios, the distribution deviation between the newer flow data and the historical flow data may be relatively large due to factors such as the data volume and data sampling of the newer flow data. Large, thus providing a weighted playback cache pool strategy to avoid the jitter of the online prediction model, which is more conducive to the security and stability of the online prediction model in real prediction scenarios.
  • the online training of the online prediction model by mixing the latest received current flow data with the historical flow data can effectively alleviate the deviation caused by the distribution jitter of the latest received current flow data, so that the implementation of the present disclosure
  • the weighted playback buffer pool can be used to store historical flow data, and during the online training process, a set amount of historical flow data is randomly sampled according to the weight of the stored historical flow data and used as target flow data, combined with current flow data To train the predictive model online.
  • this ratio can be expressed by parameter ⁇
  • the size of ⁇ determines Whether the online training of the online prediction model is more inclined to the model effect or the stability of the model, so that it can be adaptively set according to the needs of the actual prediction scenario, and there is no limit to this.
  • the method of setting the selection probability according to the weight corresponding to the historical flow data can be illustrated as follows:
  • Weighted experience replay means that when sampling samples, the most valuable samples are selected first, but the most valuable samples cannot be selected only, otherwise it will cause overfitting. The higher the value, the greater the probability of being drawn, and the lowest value. , there is also a certain probability of being drawn.
  • newer stream data when performing an online learning task, it is considered that newer stream data is more valuable for online prediction model learning, so that newer stream data can be configured to have a higher probability of being extracted.
  • the historical flow data in the playback buffer pool is sorted according to the corresponding storage time, which is recorded as x i , where i ⁇ [1, N], the smaller i is, the historical flow The closer the data is to the current point in time.
  • the probability (selection probability) of the historical flow data x i being sampled is:
  • ⁇ i A ⁇ i ;
  • A is the normalization factor:
  • the selection probability of the earliest historical stream data x N is about 1/e of the latest historical stream data x1 , where e is a natural constant.
  • the weighted playback buffer pool is used to store historical flow data, and the historical flow data obtained from the playback buffer pool based on selection probability sampling is mixed with a small amount of newer flow data received online in real time.
  • a new online training data set is formed to ensure that the online prediction model continuously learns new knowledge from new samples, while consolidating the old knowledge that has been mastered in the past, improving the performance of the online prediction model and training stability.
  • FIG. 5 is a schematic flowchart of a prediction model training method proposed by another embodiment of the present disclosure. The description of FIG. 5 may be combined with the above-mentioned FIG. 2 , including steps S501-S504.
  • the embodiments of the present disclosure also support adding several tag cache positions during the original online prediction model training, so as to ensure that when receiving real-time current stream data, if the labeled tag corresponding to the current stream data is the original online prediction
  • the online prediction model can still continue the online training process, reduce the number of retraining of the online prediction model, and improve the training efficiency, so that the training method of the prediction model in the embodiment of the present disclosure can be widely applied to streaming data Classification problems where the type of corresponding label changes.
  • FIG. 6 is a schematic structural diagram of a training device for a prediction model proposed by another embodiment of the present disclosure.
  • the description for the embodiment shown in FIG. 5 can be described as follows:
  • the label label corresponding to the current flow data may be a prediction label not supported by the current online prediction model, so in the embodiment of the present disclosure, in order to make the online prediction model output conform to the classification number, so that the online prediction model can effectively meet the needs of online model services in real business scenarios, it is possible to add several tag cache positions (size of max_label_buffer_size), when the label label does not belong to the prediction label currently supported by the online prediction model, you can directly associate the label label with the reserved label cache location without modifying the output of the online prediction model, so that the model can be directly trained online.
  • the target stream data in the playback cache pool is used to train the online prediction model to obtain the target prediction model.
  • the label label is not an unknown label (that is, the label label belongs to at least one prediction label supported by the online prediction model), it will be directly trained online.
  • the label label is an unknown label (that is, the label label does not belong to at least one prediction label supported by the online prediction model)
  • the online prediction model can be specifically such as the event classification model.
  • the probabilities of from high to low, give the three most eligible sectors.
  • Event distribution content and distribution target departments
  • the event classification model will monitor data drift in real time and trigger online training immediately when drift occurs.
  • a text classification algorithm can be used.
  • label_buffer_size a number of label buffer positions (label_buffer_size) will be added to the output category of the event classification model in advance.
  • label_buffer_size a number of label buffer positions
  • the new label can be directly associated with the reserved label cache location, without modifying the output of the event classification model, so that the event classification model can be directly trained online.
  • the event classification model mixes the new samples with the data randomly sampled from the playback buffer pool for online training.
  • Playback buffer pool size (N) 20000 Data drift detection pool size 100 Latest: online training data ratio ( ⁇ ) 0.1 Concept Drift Detection Algorithm MMD Concept Drift Threshold (Th) 0.01 Maximum number of iterations for online training (Inc_Train_max) 5 Minimum number of iterations for online training (Inc_Train_min) 1 Maximum number of unknown label positions (max_label_buffer_size) 5
  • the latest full data is used to retrain the event classification model: due to the continuous introduction of newer stream data, its online performance has been significantly improved compared with the static event classification model, but due to the event
  • the classification model training uses the full amount of data, and the calculation time for a single event classification model update is relatively long.
  • the weighted playback cache pool is introduced. Due to the increase in data processing work, the update time of the single event classification model has increased; the introduction of the cache pool data has increased the stability of the event classification model. Compared with the online update method, the model performance has been improved to a certain extent.
  • the online forecasting model can be specific, such as the parking lot flow forecasting model.
  • the parking lot flow forecasting model uses the inflow and outflow data of the parking lot in the previous 24 hours to predict the next two Inflow and outflow of hours.
  • a neural network model can be used for time series prediction, and the granularity of traffic data is one data point every half hour, that is, the input of the traffic flow prediction model of this parking lot is 48 consecutive time series points, and the output is 4 consecutive time series points.
  • an online training is performed every half hour, using the latest training sample (that is, the latest 52 data points, of which the first 48 points are used as the input of the parking lot flow prediction model, and the last 4 are used as the parking lot output of the traffic forecasting model) and 127 samples randomly sampled from the replay buffer pool (each sample is composed of 52 consecutive time series data points, the first 48 points are used as the input of the parking lot flow forecasting model, and the last 4 are used as the parking lot flow forecasting model output) to form a training set for online training.
  • a large learning rate and a small number of training iterations are used to enable the parking lot flow prediction model to quickly learn the current data distribution.
  • Playback buffer pool size (N) 20000 Data drift detection pool size 1000 Latest: online training data ratio ( ⁇ ) 1/64 Concept Drift Detection Algorithm ADWin Concept Drift Threshold (Th) 0.002 Maximum number of iterations for online training (Inc_Train_max) 5 Minimum number of iterations for online training (Inc_Train_min) 1
  • the static parking lot flow forecasting model can continuously reason about online data, but the performance of the parking lot flow forecasting model will gradually degrade over time.
  • T + 3 days of data online training method + weighted playback cache pool use the data received every 3 days, combined with some historical flow data in the weighted playback cache pool, to adjust the parking lot traffic prediction model.
  • This method does not require manual participation, and can automatically update the parking lot flow prediction model online; since only a small amount of newer flow data is used to update the parking lot flow prediction model, the calculation time is greatly shortened.
  • the effect of the parking lot flow forecasting model has a certain improvement compared to using the full amount of data to update the parking lot flow forecasting model.
  • the learning speed self-control method can adaptively adjust the learning speed according to the conceptual drift degree of the streaming data.
  • the performance of the parking lot flow prediction model can be improved to a certain extent.
  • FIG. 7 is a schematic structural diagram of a training device for a prediction model proposed by an embodiment of the present disclosure.
  • the training device 70 of this predictive model comprises:
  • An acquisition module 701, configured to acquire current flow data and an online prediction model
  • the first determination module 702 is configured to determine the degree of concept drift when the concept drift occurs in the current stream data
  • the training module 703 is used to perform online training on the online prediction model according to the degree of concept drift, combining the current flow data and the target flow data, so as to obtain the target prediction model; wherein, the target flow data is obtained from a plurality of historical flow data obtained by sampling.
  • the training module 703 is specifically used for:
  • the reference setting rule samples the target flow data from the historical flow data stored in the playback buffer pool
  • the online prediction model is trained online according to the current flow data and the target flow data.
  • the training module 703 is specifically used for:
  • the current flow data will be continuously obtained and the amount of data will be updated dynamically;
  • the training module 703 is specifically used for:
  • the online prediction model is trained online for a first set number of times according to the current stream data and the target stream data, wherein the first set number of times is a maximum value within the range of the set number of times.
  • the training module 703 is specifically used for:
  • the online prediction model is trained for a second set number of times online, wherein the second set number of times is less than the first set number of times, and the second set number of times is based on the maximum value in the set number of times range, The minimum value, the degree of concept drift value, and the degree of concept drift threshold are calculated.
  • the device 70 further includes:
  • the processing module 704 is configured to store the current stream data in the playback buffer pool after the target prediction model is obtained through training, and delete the first stream data in the playback buffer pool, wherein the storage order corresponding to the first stream data is different from other stream data Prior to the corresponding storage order, the first stream data and other stream data together constitute the stream data stored in the playback buffer pool.
  • the training module 703 is specifically used for:
  • a set amount of historical stream data is obtained based on selection probability sampling as the target stream data, and the ratio between the set amount and the current stream data is a preset value.
  • the selection probability is determined by the weight of historical flow data.
  • the device 70 also includes:
  • the second determination module 705 is configured to determine the weight according to the data volume of the stream data stored in the playback cache pool and the storage time corresponding to the historical stream data.
  • the acquiring module 701 is further configured to acquire, after acquiring the current stream data, an annotation label corresponding to the current stream data, and acquire at least one prediction label supported by the online prediction model;
  • the training module 703 is specifically used for:
  • the online prediction model is trained online according to the degree value of the concept drift, combined with the current flow data and the target flow data;
  • the online prediction model is updated and trained offline according to the degree of concept drift, combined with the current flow data and the target flow data.
  • the embodiment of the present disclosure also provides a training device for the prediction model.
  • the training method of the prediction model provided in the embodiment of FIG. 6 corresponds, so the implementation of the training method of the prediction model is also applicable to the training device of the prediction model provided in the embodiment of the present disclosure, and will not be described in detail in the embodiment of the present disclosure.
  • the training timing of the online prediction model training is determined by combining the value of the degree of concept drift, so as to support the online learning process.
  • the fast model learning speed enables the model to quickly grasp the new knowledge represented by the streaming data that produces concept drift, so as to ensure the online real-time performance of the prediction model; and if the concept drift of the current streaming data is small, the online training process can be maintained.
  • Relatively low learning rate to prevent the occurrence of catastrophic forgetting so as to comprehensively take into account the learning speed of the prediction model for new knowledge and the stability of the prediction model, so that the prediction model can continuously meet the prediction needs in intelligent scenarios and improve Predictive performance of the predictive model.
  • an embodiment of the present disclosure also proposes a computer device, including: a memory, a processor, and a computer program stored on the memory and operable on the processor.
  • the processor executes the program, it realizes the aforementioned The training method of the prediction model proposed in the embodiment.
  • the embodiments of the present disclosure also propose a non-transitory computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the training of the prediction model as proposed in the foregoing embodiments of the present disclosure is implemented. method.
  • the embodiments of the present disclosure further propose a computer program product.
  • the instruction processor in the computer program product executes, the method for training the prediction model as proposed in the foregoing embodiments of the present disclosure is executed.
  • the embodiments of the present disclosure also propose a computer program, the computer program includes computer program code, when the computer program code is run on the computer, the computer executes the predictive model as proposed in the foregoing embodiments of the present disclosure. training method.
  • Figure 9 shows a block diagram of an exemplary computer device suitable for use in implementing embodiments of the present disclosure.
  • the computer device 12 shown in FIG. 9 is only an example, and should not limit the functions and scope of use of the embodiments of the present disclosure.
  • computer device 12 takes the form of a general-purpose computing device.
  • Components of computer device 12 may include, but are not limited to: one or more processors or processing units 16 , system memory 28 , bus 18 connecting various system components including system memory 28 and processing unit 16 .
  • Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus structures.
  • these architectures include but are not limited to Industry Standard Architecture (Industry Standard Architecture; hereinafter referred to as: ISA) bus, Micro Channel Architecture (Micro Channel Architecture; hereinafter referred to as: MAC) bus, enhanced ISA bus, video electronics Standards Association (Video Electronics Standards Association; hereinafter referred to as: VESA) local bus and Peripheral Component Interconnection (hereinafter referred to as: PCI) bus.
  • Computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by computer device 12 and include both volatile and nonvolatile media, removable and non-removable media.
  • the memory 28 may include a computer system readable medium in the form of a volatile memory, such as a random access memory (Random Access Memory; hereinafter referred to as: RAM) 30 and/or a cache memory 32 .
  • Computer device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media.
  • storage system 34 may be used to read and write to non-removable, non-volatile magnetic media (not shown in FIG. 9, commonly referred to as a "hard drive").
  • a disk drive for reading and writing to a removable nonvolatile disk may be provided, as well as a removable nonvolatile disk (such as a Compact Disk ROM (Compact Disk).
  • Disc Read Only Memory hereinafter referred to as: CD-ROM
  • DVD-ROM Digital Video Disc Read Only Memory
  • each drive may be connected to bus 18 via one or more data media interfaces.
  • Memory 28 may include at least one program product having a set (eg, at least one) of program modules configured to perform the functions of various embodiments of the present disclosure.
  • a program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including but not limited to an operating system, one or more application programs, other program modules, and program data , each or some combination of these examples may include implementations of network environments.
  • the program modules 42 generally perform the functions and/or methods of the embodiments described in the present disclosure.
  • the computer device 12 may also communicate with one or more external devices 14 (e.g., a keyboard, pointing device, display 24, etc.), and with one or more devices that enable a user to interact with the computer device 12, and/or with Any device (eg, network card, modem, etc.) that enables the computing device 12 to communicate with one or more other computing devices. Such communication may occur through input/output (I/O) interface 22 .
  • the computer device 12 can also communicate with one or more networks (such as a local area network (Local Area Network; hereinafter referred to as: LAN), a wide area network (Wide Area Network; hereinafter referred to as: WAN) and/or public networks, such as the Internet, through the network adapter 20. ) communication.
  • networks such as a local area network (Local Area Network; hereinafter referred to as: LAN), a wide area network (Wide Area Network; hereinafter referred to as: WAN) and/or public networks, such as the Internet, through the network adapt
  • network adapter 20 communicates with other modules of computer device 12 via bus 18 .
  • other hardware and/or software modules may be used in conjunction with computer device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives And data backup storage system, etc.
  • the processing unit 16 executes various functional applications and data processing by running the programs stored in the system memory 28 , such as realizing the training method of the prediction model mentioned in the foregoing embodiments.
  • various parts of the present disclosure may be implemented in hardware, software, firmware or a combination thereof.
  • various steps or methods may be implemented by software or firmware stored in memory and executed by a suitable instruction execution system.
  • a suitable instruction execution system For example, if implemented in hardware, as in another embodiment, it can be implemented by any one or combination of the following techniques known in the art: Discrete logic circuits, ASICs with suitable combinational logic gates, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.
  • each functional unit in each embodiment of the present disclosure may be integrated into one processing module, each unit may exist separately physically, or two or more units may be integrated into one module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules. If the integrated modules are realized in the form of software function modules and sold or used as independent products, they can also be stored in a computer-readable storage medium.
  • the storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, and the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Strategic Management (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Human Resources & Organizations (AREA)
  • General Engineering & Computer Science (AREA)
  • Economics (AREA)
  • Tourism & Hospitality (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Development Economics (AREA)
  • General Business, Economics & Management (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Marketing (AREA)
  • Computing Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Evolutionary Biology (AREA)
  • Primary Health Care (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Educational Administration (AREA)
  • Game Theory and Decision Science (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Molecular Biology (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

Provided are a method and apparatus for training a prediction model, and a computer device and a storage medium. The method comprises: acquiring the current streaming data and an online prediction model; if concept drift occurs in the current streaming data, determining a degree value of the concept drift; and according to the degree value of the concept drift, performing online training on the online prediction model in combination with the current streaming data and target streaming data, so as to obtain a target prediction model, wherein the target streaming data is sampled from a plurality of pieces of historical streaming data.

Description

预测模型的训练方法、装置、计算机设备及存储介质Prediction model training method, device, computer equipment and storage medium
相关申请的交叉引用Cross References to Related Applications
本申请基于申请号为202110610089.3、申请日为2021年6月1日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。This application is based on a Chinese patent application with application number 202110610089.3 and a filing date of June 1, 2021, and claims the priority of this Chinese patent application. The entire content of this Chinese patent application is hereby incorporated by reference into this application.
技术领域technical field
本公开涉及人工智能技术领域,具体涉及一种预测模型的训练方法、装置、计算机设备、非临时性计算机可读存储介质、计算机程序产品和计算机程序。The present disclosure relates to the technical field of artificial intelligence, and in particular to a training method, device, computer equipment, non-transitory computer-readable storage medium, computer program product and computer program for a prediction model.
背景技术Background technique
在建设智慧城市的项目中,可能会使用大量的人工智能模型建构各种智能场景,如人流量预测、车流量预测,空气质量预测和监测预警等,这些模型处理的输入数据通常以流的形式产生,而随着数据产生的时间和环境的变化,数据的分布和所反映的信息也会发生变化。这种的分布或携带的信息随着时间的推移而发生变化的现象,被称为概念漂移。而数据的概念漂移,会引起人工智能模型的性能下降,导致静态的人工智能模型无法持续地满足智能场景中的预测需求,从而影响人工智能模型的预测效果。In the project of building a smart city, a large number of artificial intelligence models may be used to construct various intelligent scenarios, such as traffic flow forecasting, traffic flow forecasting, air quality forecasting, monitoring and early warning, etc. The input data processed by these models are usually in the form of streams As the time and environment of data generation change, the distribution of data and the information reflected will also change. This phenomenon that the distribution or carried information changes over time is called concept drift. The conceptual drift of the data will cause the performance of the artificial intelligence model to decline, resulting in the inability of the static artificial intelligence model to continuously meet the prediction requirements in the intelligent scene, thereby affecting the prediction effect of the artificial intelligence model.
相关技术中,在参考数据的概念漂移来辅助对预测模型进行训练时,不能够兼顾预测性能和预测稳定性,从而影响预测模型的线上预测效果。In related technologies, when the concept drift of reference data is used to assist in the training of the prediction model, both prediction performance and prediction stability cannot be considered, thereby affecting the online prediction effect of the prediction model.
发明内容Contents of the invention
本公开旨在至少在一定程度上解决相关技术中的技术问题之一。The present disclosure aims to solve one of the technical problems in the related art at least to a certain extent.
为此,本公开的目的在于提出一种预测模型的训练方法、装置、计算机设备、非临时性计算机可读存储介质、计算机程序产品和计算机程序,能够兼顾预测模型对新知识的学习速度,和避免灾难性遗忘的发生,有效地提升预测模型的预测性能和预测稳定性,使得预测模型能够持续地满足智能场景中的预测需求,提升预测模型的预测效果。Therefore, the purpose of this disclosure is to propose a training method, device, computer equipment, non-transitory computer-readable storage medium, computer program product and computer program for a prediction model, which can take into account the learning speed of the prediction model for new knowledge, and Avoid the occurrence of catastrophic forgetting, effectively improve the prediction performance and prediction stability of the prediction model, enable the prediction model to continuously meet the prediction needs in intelligent scenarios, and improve the prediction effect of the prediction model.
为达到上述目的,本公开第一方面实施例提出的预测模型的训练方法,包括:获取当前流数据和线上预测模型;如果所述当前流数据发生概念漂移,则确定概念漂移的程度值;以及根据所述概念漂移的程度值,结合所述当前流数据和目标流数据对所述线上预测模型进行在线训练,以得到目标预测模型,其中,所述目标流数据,是从多个历史流数据之中采样得到的。In order to achieve the above purpose, the method for training the prediction model proposed by the embodiment of the first aspect of the present disclosure includes: obtaining current flow data and an online prediction model; if concept drift occurs in the current flow data, determine the degree of concept drift; and according to the degree value of the concept drift, combine the current flow data and target flow data to perform online training on the online prediction model to obtain a target prediction model, wherein the target flow data is obtained from multiple historical Sampled from streaming data.
本公开第一方面实施例提出的预测模型的训练方法,通过结合概念漂移的程度值来确定线上预测模型训练的训练时机,从而支持在线学习过程中,如果当前流数据的概念漂移程度较大,则实现使得在线训练过程具有较快的模型学习速度,使模型快速掌握产生概念漂移的流数据所表征的新知识,以保证预测模型的线上实时表现;而如果当前流数据的概念漂移程度较小,则使得在线训练过程保持相对较低的学习速率,以防止灾难性遗忘的发生,从而全面地兼顾预测模型对新知识的学习速度,和预测模型的稳定性能,使得预测模型能够持续地满足智能场景中的预测需求,提升预测模型的预测效果。The prediction model training method proposed in the embodiment of the first aspect of the present disclosure determines the training timing of the online prediction model training by combining the value of the degree of concept drift, so as to support the online learning process, if the concept drift of the current streaming data is large , so that the online training process has a faster model learning speed, so that the model can quickly grasp the new knowledge represented by the stream data that produces concept drift, so as to ensure the online real-time performance of the prediction model; and if the current concept drift of the stream data Smaller, it makes the online training process maintain a relatively low learning rate to prevent the occurrence of catastrophic forgetting, so as to fully take into account the learning speed of the prediction model for new knowledge and the stability of the prediction model, so that the prediction model can continue Meet the forecasting needs in intelligent scenarios and improve the forecasting effect of the forecasting model.
为达到上述目的,本公开第二方面实施例提出的预测模型的训练装置,包括:获取模块,用于获取当前流数据和线上预测模型;第一确定模块,用于在所述当前流数据发生概念漂移时,确定概念漂移的程度值;以及训练模块,用于根据所述概念漂移的程度值,结合所述当前流数据和目标流数据对所述线上预测模型进行在线训练,以得到目标预测模型;其中,所述目标流数据,是从多个历史流数据之中采样得到的。In order to achieve the above purpose, the prediction model training device proposed by the embodiment of the second aspect of the present disclosure includes: an acquisition module, used to obtain the current flow data and an online prediction model; a first determination module, used to obtain the current flow data When concept drift occurs, determine the degree value of concept drift; and a training module, configured to perform online training on the online prediction model in combination with the current flow data and target flow data according to the degree value of concept drift, so as to obtain A target prediction model; wherein, the target flow data is obtained by sampling from a plurality of historical flow data.
本公开第二方面实施例提出的预测模型的训练装置,通过结合概念漂移的程度值来确定线上预测模型训练的训练时机,从而支持在线学习过程中,如果当前流数据的概念漂移程度较大,则实现使得在线训练过程具有较快的模型学习速度,使模型快速掌握产生概念漂移的流数据所表征的新知识,以保证预测模型的线上实时表现;而如果当前流数据的概念漂移程度较小,则使得在线训练过程保持相对较低的学习速率,以防止灾难性遗忘的发生,从而全面地兼顾预测模型对新知识的学习速度,和预测模型的稳定性能,使得预测模型能够持续地满足智能场景中的预测需求,提升预测模型的预测效果。The prediction model training device proposed in the embodiment of the second aspect of the present disclosure determines the training timing of the online prediction model training by combining the value of the degree of concept drift, so as to support the online learning process, if the concept drift of the current streaming data is large , so that the online training process has a faster model learning speed, so that the model can quickly grasp the new knowledge represented by the stream data that produces concept drift, so as to ensure the online real-time performance of the prediction model; and if the current concept drift of the stream data Smaller, it makes the online training process maintain a relatively low learning rate to prevent the occurrence of catastrophic forgetting, so as to fully take into account the learning speed of the prediction model for new knowledge and the stability of the prediction model, so that the prediction model can continue Meet the forecasting needs in intelligent scenarios and improve the forecasting effect of the forecasting model.
本公开第三方面实施例提出了一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时,实现如本公开第一方面实施例提出的预测模型的训练方法。The embodiment of the third aspect of the present disclosure provides a computer device, including a memory, a processor, and a computer program stored in the memory and operable on the processor. On the one hand, the training method of the prediction model proposed by the embodiment.
本公开第四方面实施例提出了一种非临时性计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如本公开第一方面实施例提出的预测模型的训练方法。The embodiment of the fourth aspect of the present disclosure proposes a non-transitory computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the method for training the prediction model as proposed in the embodiment of the first aspect of the present disclosure is implemented. .
本公开第五方面实施例提出了一种计算机程序产品,当所述计算机程序产品中的指令处理器执行时,执行如本公开第一方面实施例提出的预测模型的训练方法。The embodiment of the fifth aspect of the present disclosure provides a computer program product. When the instruction processor in the computer program product executes, the method for training the prediction model as proposed in the embodiment of the first aspect of the present disclosure is executed.
本公开第六方面实施例提出了一种计算机程序,所述计算机程序包括计算机程序代码,当所述计算机程序代码在计算机上运行时,使得计算机执行如本公开第一方面实施例提出的预测模型的训练方法。The embodiment of the sixth aspect of the present disclosure provides a computer program, the computer program includes computer program code, when the computer program code is run on the computer, the computer executes the prediction model as proposed in the embodiment of the first aspect of the present disclosure training method.
本公开附加的方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本公开的实践了解到。Additional aspects and advantages of the disclosure will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the disclosure.
附图说明Description of drawings
本公开上述的和/或附加的方面和优点从下面结合附图对实施例的描述中将变得明显和容易理解,其中:The above and/or additional aspects and advantages of the present disclosure will become apparent and understandable from the following description of the embodiments in conjunction with the accompanying drawings, wherein:
图1是本公开一实施例提出的预测模型的训练方法的流程示意图;FIG. 1 is a schematic flowchart of a method for training a prediction model proposed by an embodiment of the present disclosure;
图2是本公开一实施例提出的预测模型的训练装置的架构示意图;FIG. 2 is a schematic structural diagram of a training device for a prediction model proposed by an embodiment of the present disclosure;
图3是本公开另一实施例提出的预测模型的训练方法的流程示意图;FIG. 3 is a schematic flowchart of a method for training a prediction model proposed by another embodiment of the present disclosure;
图4是本公开另一实施例提出的预测模型的训练方法的流程示意图;FIG. 4 is a schematic flowchart of a method for training a prediction model proposed by another embodiment of the present disclosure;
图5是本公开另一实施例提出的预测模型的训练方法的流程示意图;FIG. 5 is a schematic flowchart of a method for training a prediction model proposed by another embodiment of the present disclosure;
图6是本公开另一实施例提出的预测模型的训练装置的架构示意图;FIG. 6 is a schematic structural diagram of a training device for a prediction model proposed by another embodiment of the present disclosure;
图7是本公开一实施例提出的预测模型的训练装置的结构示意图;7 is a schematic structural diagram of a training device for a prediction model proposed by an embodiment of the present disclosure;
图8是本公开另一实施例提出的预测模型的训练装置的结构示意图;FIG. 8 is a schematic structural diagram of a training device for a prediction model proposed in another embodiment of the present disclosure;
图9示出了适于用来实现本公开实施方式的示例性计算机设备的框图。Figure 9 shows a block diagram of an exemplary computer device suitable for use in implementing embodiments of the present disclosure.
具体实施方式Detailed ways
下面详细描述本公开的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,仅用于解释本公开,而不能理解为对本公开的限制。相反,本公开的实施例包括落入所附加权利要求书的精神和内涵范围内的所有变化、修改和等同物。Embodiments of the present disclosure are described in detail below, examples of which are illustrated in the drawings, in which the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the figures are exemplary only for explaining the present disclosure and should not be construed as limiting the present disclosure. On the contrary, the embodiments of the present disclosure include all changes, modifications and equivalents coming within the spirit and scope of the appended claims.
图1是本公开一实施例提出的预测模型的训练方法的流程示意图。FIG. 1 is a schematic flowchart of a method for training a prediction model proposed by an embodiment of the present disclosure.
其中,需要说明的是,本公开实施例的预测模型的训练方法的执行主体为预测模型的训练装置,该装置可以由软件和/或硬件的方式实现,该装置可以配置在电子设备中,电子设备可以包括但不限于终端、服务器端等。Wherein, it should be noted that the execution subject of the prediction model training method in the embodiment of the present disclosure is a prediction model training device, which can be realized by software and/or hardware, and which can be configured in an electronic device. Devices may include, but are not limited to, terminals, servers, and so on.
其中,用于对智慧城市场景中进行人流量预测、车流量预测,空气质量预测和监测预警等的人工智能模型,可以被称为预测模型,而人工智能模型可以例如为神经网络模型、机器学习模型等等,对此不做限制。Among them, the artificial intelligence model used to predict the flow of people, traffic, air quality, monitoring and early warning in the smart city scene can be called a prediction model, and the artificial intelligence model can be, for example, a neural network model, machine learning models, etc., without limitation.
本公开实施例中,正是为了解决相关技术中在参考数据的概念漂移来辅助对预测模型进行训练时,不能够兼顾预测性能和预测稳定性,从而影响预测模型的线上预测效果的技术问题,提供了一种预测模型的训练方法,能够兼顾预测模型对新知识的学习速度,和避免灾难性遗忘的发生,有效地提升预测模型的预测性能和预测稳定性,使得预测模型能够持续地满足智能场景中的预测需求,提升预测模型的预测效果。In the embodiment of the present disclosure, it is precisely to solve the technical problem that in the related art, when the concept drift of reference data is used to assist in the training of the prediction model, the prediction performance and the stability of the prediction cannot be taken into account, thereby affecting the online prediction effect of the prediction model. , provides a training method for the prediction model, which can take into account the learning speed of the prediction model for new knowledge and avoid the occurrence of catastrophic forgetting, effectively improve the prediction performance and prediction stability of the prediction model, so that the prediction model can continuously meet the Forecast demand in intelligent scenarios and improve the forecasting effect of the forecasting model.
如图1所示,该预测模型的训练方法包括步骤S101-S103。As shown in FIG. 1 , the method for training the prediction model includes steps S101-S103.
S101:获取当前流数据和线上预测模型。S101: Obtain current streaming data and an online prediction model.
其中,线上环境中用于对智慧城市场景中进行人流量预测、车流量预测,空气质量预测和监测预警等的预测模型,可以被称为线上预测模型,也即是说,该线上预测模型是已部署在场景中并执行相应的预测任务的预测模型。Among them, the prediction model used in the online environment to predict the flow of people, traffic, air quality, monitoring and early warning in the smart city scene can be called an online prediction model, that is to say, the online A predictive model is a predictive model that has been deployed in a scenario and performs corresponding predictive tasks.
其中,当前流数据,可以是当前时间点所采集的流数据,该流数据,是指以流的形式产生,而随着数据产生的时间和环境的变化,数据的分布和所反映的信息也会发生变化的数据,该流数据可以被用于作为线上预测模型的输入,以触发其执行相应的预测任务,则本公开实施例中,可以支持动态地采集当前流数据,支持直接根据当前流数据发生概念漂移的程度来对线上预测模型进行在线训练,利用持续获取的当前流数据及对历史流数据采样得到的目标流数据组成新的训练用样本的流数据,以触发进行预测模型在线训练,保证线上预测模型的预测表现能力,以及控制线上预测模型的训练速度。Among them, the current flow data can be the flow data collected at the current time point. The flow data refers to the flow data generated in the form of flow. With the change of the time of data generation and the environment, the distribution of data and the information reflected will also change. The data that will change, the flow data can be used as the input of the online prediction model to trigger it to execute the corresponding prediction task, then in the embodiment of the present disclosure, it can support the dynamic collection of the current flow data, and support directly based on the current Online training of the online forecasting model is carried out according to the degree of concept drift of the stream data, and the stream data of the new training sample is formed by using the continuously acquired current stream data and the target stream data obtained by sampling the historical stream data to trigger the forecasting model Online training ensures the prediction performance of the online prediction model and controls the training speed of the online prediction model.
S102:如果当前流数据发生概念漂移,则确定概念漂移的程度值。S102: If concept drift occurs in the current stream data, determine a degree value of concept drift.
上述在获取当前流数据和线上预测模型之后,可以实时地判断当前流数据是否发生概念漂移,如果当前流数据发生概念漂移,则确定概念漂移的程度值,该概念漂移的程度值指示:当前流数据发生概念漂移的程度情况。After obtaining the current stream data and the online prediction model, it is possible to judge in real time whether concept drift has occurred in the current stream data. If concept drift has occurred in the current stream data, determine the degree of concept drift. The value of the degree of concept drift indicates: current The extent to which concept drift occurs with streaming data.
举例而言,可以将当前流数据和多个历史流数据进行比对,获得当前流数据和多个历史流数据之间的变化情况,而后可以对该变化情况进行量化处理,得到概念漂移的程度值,并将概念漂移的程度值与 一个设定的概念漂移程度阈值进行比对,根据比对的结果来确定是否触发对预测模型进行在线训练。For example, the current flow data can be compared with multiple historical flow data to obtain the change between the current flow data and multiple historical flow data, and then the change can be quantified to obtain the degree of concept drift value, and compare the value of the degree of concept drift with a set threshold of the degree of concept drift, and determine whether to trigger online training of the prediction model according to the result of the comparison.
也即是说,本公开实施例通过结合概念漂移的程度值来确定线上预测模型训练的训练时机,从而支持在线学习过程中,如果当前流数据的概念漂移程度较大,则实现使得在线训练过程具有较快的模型学习速度,使模型快速掌握产生概念漂移的流数据所表征的新知识,以保证预测模型的线上实时表现;而如果当前流数据的概念漂移程度较小,则使得在线训练过程保持相对较低的学习速率,以防止灾难性遗忘的发生,从而全面地兼顾预测模型对新知识的学习速度,和预测模型的稳定性能。That is to say, the embodiment of the present disclosure determines the training timing of the online prediction model training by combining the value of the degree of concept drift, so as to support the online learning process. The process has a fast model learning speed, so that the model can quickly grasp the new knowledge represented by the flow data that produces concept drift, so as to ensure the online real-time performance of the prediction model; The training process maintains a relatively low learning rate to prevent the occurrence of catastrophic forgetting, so as to comprehensively take into account the learning speed of the prediction model for new knowledge and the stability of the prediction model.
S103:根据概念漂移的程度值,结合当前流数据和目标流数据对线上预测模型进行在线训练,以得到目标预测模型,其中,目标流数据,是从多个历史流数据之中采样得到的。S103: According to the degree value of concept drift, combine the current flow data and the target flow data to conduct online training on the online prediction model to obtain the target prediction model, wherein the target flow data is obtained by sampling from multiple historical flow data .
上述在确定概念漂移的程度值之后,可以依据概念漂移的程度值自适应地触发结合当前流数据和目标流数据对线上预测模型进行在线训练,以得到目标预测模型。After the degree value of concept drift is determined, the online prediction model combined with the current flow data and target flow data can be adaptively triggered to obtain the target prediction model according to the degree value of concept drift.
其中,训练得到的预测模型,可以被称为目标预测模型。Wherein, the prediction model obtained through training may be referred to as a target prediction model.
其中,历史流数据可以理解为:与当前流数据对应一个当前时间点,在当前时间点之前,通常随着时间的推移,真实场景之中会源源不断地产生流式的数据,从而当前时间点之间所积累得到的多个流数据,可以被称为历史流数据。Among them, the historical flow data can be understood as: a current time point corresponding to the current flow data. Multiple flow data accumulated between can be called historical flow data.
本公开实施例中,通过结合概念漂移的程度值来确定线上预测模型训练的训练时机,从而支持在线学习过程中,如果当前流数据的概念漂移程度较大,则实现使得在线训练过程具有较快的模型学习速度,使模型快速掌握产生概念漂移的流数据所表征的新知识,以保证预测模型的线上实时表现;而如果当前流数据的概念漂移程度较小,则使得在线训练过程保持相对较低的学习速率,以防止灾难性遗忘的发生,从而全面地兼顾预测模型对新知识的学习速度,和预测模型的稳定性能,使得预测模型能够持续地满足智能场景中的预测需求,提升预测模型的预测效果。In the embodiment of the present disclosure, the training timing of the online prediction model training is determined by combining the value of the degree of concept drift, so as to support the online learning process. The fast model learning speed enables the model to quickly grasp the new knowledge represented by the streaming data that produces concept drift, so as to ensure the online real-time performance of the prediction model; and if the concept drift of the current streaming data is small, the online training process can be maintained. Relatively low learning rate to prevent the occurrence of catastrophic forgetting, so as to comprehensively take into account the learning speed of the prediction model for new knowledge and the stability of the prediction model, so that the prediction model can continuously meet the prediction needs in intelligent scenarios and improve Predictive performance of the predictive model.
举例说明如下,如图2所示,图2是本公开一实施例提出的预测模型的训练装置的架构示意图。本公开下述实施例的描述可以一并结合图2所示,对此不做限制。其中,An example is described as follows, as shown in FIG. 2 , which is a schematic structural diagram of a training device for a prediction model proposed by an embodiment of the present disclosure. The description of the following embodiments of the present disclosure may be combined with what is shown in FIG. 2 , which is not limited thereto. in,
数据池:可以被用于存储全部的历史流数据。Data pool: can be used to store all historical flow data.
实时数据单元:线上实时流数据输入的单元,该实时数据单元可以接收实时的流数据输入,并将实时的流数据输入到推理服务单元,进行模型推理,同时,也将接收的实时的流数据输入数据漂移监测单元,用以计算实时的流数据是否发生概念漂移。Real-time data unit: a unit for online real-time streaming data input. This real-time data unit can receive real-time streaming data input, and input real-time streaming data to the reasoning service unit for model reasoning. At the same time, it will also receive real-time streaming data The data is input to the data drift monitoring unit, which is used to calculate whether concept drift occurs in the real-time streaming data.
回放缓存池:用以存储最新的多个历史流数据,该多个历史流数据可以具体是上述数据池之中全部的历史流数据中的部分流数据,在线学习模块可以从回放缓存池采样得到目标流数据,进行预测模型的在线训练。Playback buffer pool: used to store the latest multiple historical stream data, the multiple historical stream data may specifically be part of the stream data in all the historical stream data in the above data pool, and the online learning module can sample from the playback buffer pool to obtain the target Streaming data for online training of predictive models.
训练用的样本流数据:可以是从数据池中随机选取的,对初始的预测模型进行离线训练,从而将训练得到的预测模型推送至模型仓库。Sample flow data for training: It can be randomly selected from the data pool, and the initial prediction model is trained offline, so that the trained prediction model is pushed to the model warehouse.
模型训练:利用训练用的样本流数,初始的预测模型进行离线训练,从而将训练得到的预测模型推送至模型仓库,而在实际预测场景之中,通过将模型仓库之中最新的预测模型推送至推理服务单元,以进行线上预测,从而推理服务单元提供推理服务时所采用的预测模型,可以被称为线上预测模型。Model training: use the number of sample streams for training to conduct offline training on the initial prediction model, so as to push the trained prediction model to the model warehouse, and in the actual prediction scenario, push the latest prediction model in the model warehouse to the inference service unit for online prediction, and thus the prediction model used by the inference service unit to provide inference services may be referred to as an online prediction model.
数据漂移检测数据集:接收当前流数据,并进行缓存,用于确定是否发生概念漂移,以及概念漂移的程度值,并参考概念漂移的程度值辅助进行线上预测模型的在线学习。Data drift detection data set: Receive current stream data and cache it to determine whether concept drift occurs and the degree value of concept drift, and refer to the degree value of concept drift to assist in online learning of online prediction models.
概念漂移评估模块:利用数据漂移监测单元的接收的当前流数据,计算当前流数据相对于历史流数据的概念漂移的程度值,用以判断当前流数据的概念漂移的程度值是否大于概念漂移程度阈值。Concept drift evaluation module: use the current flow data received by the data drift monitoring unit to calculate the degree of concept drift of the current flow data relative to the historical flow data, to determine whether the degree of concept drift of the current flow data is greater than the degree of concept drift threshold.
在线学习模块:数据池的在线数据、回放缓存池、概念漂移的程度值,对预测模型进行在线训练,并将训练得到的预测模型,传输至模型仓库,同时在线学习使用的当前流数据同步至回放缓存池中。Online learning module: The online data in the data pool, the playback cache pool, and the degree of concept drift are used for online training of the prediction model, and the trained prediction model is transmitted to the model warehouse, and the current flow data used for online learning is synchronized to the Playback cache pool.
模型仓库:存储离线训练得到的预测模型和在线训练得到的预测模型。Model warehouse: store prediction models obtained from offline training and prediction models obtained from online training.
推理服务单元:从模型仓库获取最新的预测模型,利用最新的预测模型,对线上数据进行模型推理,输出预测结果。Reasoning service unit: Obtain the latest prediction model from the model warehouse, use the latest prediction model to perform model reasoning on online data, and output prediction results.
图3是本公开另一实施例提出的预测模型的训练方法的流程示意图,针对图3的描述说明,可以一并结合上述图2,包括步骤S301-S307。FIG. 3 is a schematic flowchart of a prediction model training method proposed by another embodiment of the present disclosure. For the description of FIG. 3 , the above-mentioned FIG. 2 may be combined together, including steps S301-S307.
S301:获取当前流数据和线上预测模型。S301: Obtain current streaming data and an online prediction model.
可以采用上述图2中的模型训练单元,利用数据池中全部的历史流数据,进行离线模型训练,训练得到预测模型,其将作为之后在线训练的模型基础,同时模型训练单元会将预测模型传输至模型仓库之中。The model training unit in Figure 2 above can be used to conduct offline model training using all the historical flow data in the data pool, and the prediction model is obtained after training, which will be used as the model basis for subsequent online training, and the model training unit will transfer the prediction model to to the model repository.
由上述图2中的推理服务单元,从模型仓库获取最新的预测模型,用以作为系统的推理模型。The inference service unit in FIG. 2 above obtains the latest prediction model from the model warehouse and uses it as the inference model of the system.
S302:如果当前流数据发生概念漂移,则确定概念漂移的程度值。S302: If concept drift occurs in the current flow data, determine a degree value of concept drift.
可以由实时数据单元将接收的实时的流数据输入数据漂移监测单元,用以计算实时的流数据是否发生概念漂移,以及如果当前流数据发生概念漂移,则确定概念漂移的程度值。The real-time data unit may input the received real-time stream data into the data drift monitoring unit to calculate whether concept drift occurs in the real-time stream data, and determine the degree of concept drift if concept drift occurs in the current stream data.
S303:如果概念漂移的程度值大于或者等于概念漂移程度阈值,则参考设定规则从回放缓存池已存储的历史流数据之中采样得到目标流数据。S303: If the value of the degree of concept drift is greater than or equal to the threshold of the degree of concept drift, refer to the set rule to sample the target stream data from the historical stream data stored in the playback buffer pool.
例如,可以采用当前流数据和历史流数据进行比对,以进行数据漂移的程度的检测,假设漂移检测的判断门限值设置为Th(该Th则可以被称为概念漂移程度阈值),如果漂移检测输出(漂移检测输出可以具体是概念漂移的程度值大于或者等于概念漂移程度阈值)Th,则参考设定规则从回放缓存池已存储的历史流数据之中采样得到目标流数据。For example, current flow data can be compared with historical flow data to detect the degree of data drift, assuming that the judgment threshold for drift detection is set to Th (this Th can be called the concept drift threshold), if Drift detection output (the drift detection output can specifically be that the concept drift degree value is greater than or equal to the concept drift degree threshold) Th, then refer to the set rule to sample the target flow data from the historical flow data stored in the playback buffer pool.
S304:根据当前流数据和目标流数据对线上预测模型进行在线训练。S304: Perform online training on the online prediction model according to the current flow data and the target flow data.
在一些实施例中,可以根据当前流数据和目标流数据对线上预测模型在线训练第一设定次数,其中,第一设定次数是设定次数范围之中的最大值。In some embodiments, the online prediction model can be trained online for a first set number of times according to the current stream data and the target stream data, wherein the first set number of times is the maximum value within the set number of times range.
其中,如果当前流数据的概念漂移的程度值大于或者等于概念漂移程度阈值,则可以触发直接对线上预测模型进行在线训练,并训练设定的次数,该设定的次数,可以被称为第一设定次数。Among them, if the value of the degree of concept drift of the current stream data is greater than or equal to the threshold of the degree of concept drift, it can trigger the online training of the online prediction model directly, and train the set number of times. The set number of times can be called The first set times.
举例而言,若当前流数据的概念漂移的程度值大于或者等于概念漂移程度阈值,则可以直接触发对线上预测模型进行在线训练,训练迭代次数为Inc_Train_Num(该训练迭代次数为Inc_Train_Num,即可以被称为第一设定次数),从而能够有效地保证预测模型能够快速响应流数据的分布发生的变化。For example, if the degree of concept drift of the current streaming data is greater than or equal to the threshold of the degree of concept drift, it can directly trigger the online training of the online prediction model, and the number of training iterations is Inc_Train_Num (the number of training iterations is Inc_Train_Num, that is, is called the first set number of times), so as to effectively ensure that the prediction model can quickly respond to changes in the distribution of stream data.
上述的第一设定次数是设定次数范围之中的最大值。The above-mentioned first set number of times is the maximum value within the range of set times.
S305:如果概念漂移的程度值小于概念漂移程度阈值,则将当前流数据存储至回放缓存池之中,并确定回放缓存池中已存储流数据的数据量是否满足设定条件。S305: If the degree of concept drift is less than the threshold of concept drift, store the current stream data in the playback buffer pool, and determine whether the data volume of the stream data stored in the playback buffer pool satisfies the set condition.
例如,如果漂移检测输出(漂移检测输出可以具体是概念漂移程度值)小于概念漂移程度阈值Th,则可以将当前流数据存储至回放缓存池之中,并确定回放缓存池中已存储流数据的数据量。For example, if the drift detection output (the drift detection output can be specifically the concept drift degree value) is less than the concept drift degree threshold Th, then the current stream data can be stored in the playback buffer pool, and the data of the stream data stored in the playback buffer pool can be determined quantity.
S306:如果数据量不满足设定条件,则持续获取当前流数据,并动态地对数据量进行更新。S306: If the amount of data does not meet the set condition, continuously acquire the current flow data, and dynamically update the amount of data.
而设定条件可以是数据量已达到回放缓存池所能够存储的最大数据量,对此不做限制。The setting condition may be that the amount of data has reached the maximum amount of data that can be stored in the playback buffer pool, and there is no limit to this.
也即是说,如果当前流数据的概念漂移的程度值小于概念漂移程度阈值,则将当前流数据存储至回放缓存池之中,并实时地确定回放缓存池中已存储流数据的数据量,如果数据量未达到回放缓存池所能够存储的最大数据量,则持续获取当前流数据,并动态地对数据量进行更新。That is to say, if the degree of concept drift of the current stream data is less than the threshold value of the degree of concept drift, the current stream data will be stored in the playback buffer pool, and the data volume of the stream data stored in the playback buffer pool will be determined in real time. If If the amount of data does not reach the maximum amount of data that can be stored in the playback buffer pool, the current streaming data will be continuously obtained and the amount of data will be updated dynamically.
S307:如果数据量满足设定条件,则参考设定规则从回放缓存池已存储的历史流数据之中采样得到目标流数据,并根据目标流数据对线上预测模型进行在线训练。S307: If the amount of data satisfies the set conditions, refer to the set rules to sample the target stream data from the historical stream data stored in the playback buffer pool, and perform online training on the online prediction model according to the target stream data.
在实时地确定回放缓存池中已存储流数据的数据量时,如果数据量达到回放缓存池所能够存储的最大数据量,则参考设定规则从回放缓存池已存储的历史流数据之中采样得到目标流数据,并根据目标流数据对线上预测模型进行在线训练。When determining the data volume of stream data stored in the playback cache pool in real time, if the data volume reaches the maximum data volume that can be stored in the playback cache pool, then refer to the set rule to sample from the historical stream data stored in the playback cache pool Obtain the target flow data, and perform online training on the online prediction model based on the target flow data.
举例而言,若检测当前流数据的概念漂移的程度值小于概念漂移程度阈值,则在回放缓存池存储满后,从回放缓存池已存储的历史流数据之中采样得到目标流数据,并将目标流数据输入在线学习模块,以对线上预测模型进行在线训练,对线上预测模型进行迭代更新,保证线上预测模型的效果。For example, if it is detected that the degree of concept drift of the current flow data is less than the threshold value of the degree of concept drift, then after the storage of the playback buffer pool is full, the target flow data is sampled from the historical flow data stored in the playback buffer pool, and the The target flow data is input into the online learning module to train the online prediction model online and iteratively update the online prediction model to ensure the effect of the online prediction model.
一些实施例中,可以根据目标流数据对线上预测模型在线训练第二设定次数,其中,第二设定次数小于第一设定次数,且第二设定次数,是根据设定次数范围之中的最大值、最小值、概念漂移的程度值,以及概念漂移程度阈值计算得出的。In some embodiments, the online prediction model can be trained online for a second set number of times according to the target flow data, wherein the second set number of times is less than the first set number of times, and the second set number of times is based on the set number of times range The maximum value, the minimum value, the value of the degree of concept drift, and the threshold value of the degree of concept drift are calculated.
本公开实施例中,在当前流数据的概念漂移的程度值小于概念漂移程度阈值,由数据量来触发进行的在线训练,考虑到当前流数据的概念漂移程度较小,可适当减少训练的迭代次数Inc_Train_Num,则该种情况下的迭代次数Inc_Train_Num可以被称为第二设定次数,针对第二设定次数的计算方式可以具体参见下述。In the embodiment of the present disclosure, when the degree of concept drift of the current stream data is less than the threshold of the degree of concept drift, online training is triggered by the amount of data. Considering that the degree of concept drift of the current stream data is small, the iterations of training can be appropriately reduced The number of iterations Inc_Train_Num, the number of iterations Inc_Train_Num in this case may be referred to as the second set number of times. For the calculation method of the second set number of times, please refer to the following.
举例而言,可以在上述图2中所示的在线学习模块中,利用数据集,对线上预测模型进行在线训练,并重复Inc_Train_Num次,本公开实施例中,还可以引入回放缓存池和增加未知标签的技术特征,以辅助增加线上预测模型的训练稳定性、降低模型重训次数,提升训练效率。For example, in the above-mentioned online learning module shown in Figure 2, the data set can be used to train the online prediction model online and repeat Inc_Train_Num times. In the embodiment of the present disclosure, it is also possible to introduce a playback cache pool and increase The technical characteristics of unknown labels help to increase the training stability of the online prediction model, reduce the number of model retraining, and improve training efficiency.
本公开实施例中,还支持将训练用的最新接收的当前流数据,实时地放入回放缓存池之中,将在线训练得到的目标预测模型,放入模型仓库之中,以满足后续的场景需求。In the embodiment of the present disclosure, it is also supported to put the latest received current stream data for training into the playback buffer pool in real time, and put the target prediction model obtained from online training into the model warehouse to meet the needs of subsequent scenarios .
本公开实施例中,由于是根据概念漂移的程度来触发对线上预测模型进行在线训练,从而使得在线训练的触发机制更为灵活和适用,能够及时地避免由于流数据的概念漂移而导致的模型性能下降,有效地提升预测模型的预测性能和预测稳定性,使得预测模型能够持续地满足智能场景中的预测需求,提升预测模型的预测效果。若当前流数据的概念漂移的程度较大,则可以直接触发对线上预测模型进行在线训练,从而能够有效地保证预测模型能够快速响应流数据的分布发生的变化。若检测当前流数据的概念漂移的程度较小,则在回放缓存池存储满后,从回放缓存池已存储的历史流数据之中采样得到目标流数据,并将目标流数据输入在线学习模块,以对线上预测模型进行在线训练,对线上预测模型进行迭代更新,保证线上预测模型的效果。在当前流数据的概念漂移的程度较小,由数据量来触发进行的在线训练, 考虑到当前流数据的概念漂移程度较小,可适当减少训练的迭代次数,从而保证了预测模型训练的稳定性。In the embodiment of the present disclosure, because the online training of the online prediction model is triggered according to the degree of concept drift, the trigger mechanism of online training is more flexible and applicable, and it is possible to timely avoid the error caused by the concept drift of streaming data. The performance of the model decreases, effectively improving the prediction performance and prediction stability of the prediction model, so that the prediction model can continuously meet the prediction needs in intelligent scenarios, and improve the prediction effect of the prediction model. If the concept drift of the current streaming data is relatively large, online training of the online prediction model can be directly triggered, thereby effectively ensuring that the prediction model can quickly respond to changes in the distribution of streaming data. If the degree of concept drift in detecting the current flow data is small, after the storage of the playback buffer pool is full, the target flow data is sampled from the historical flow data stored in the playback buffer pool, and the target flow data is input into the online learning module, The online prediction model is trained online, and the online prediction model is updated iteratively to ensure the effect of the online prediction model. The degree of concept drift of the current streaming data is small, and online training is triggered by the amount of data. Considering that the degree of concept drift of the current streaming data is small, the number of training iterations can be appropriately reduced, thus ensuring the stability of the prediction model training sex.
举例而言,接收当前流数据进行推理,并根据业务反馈,获取真实结果;For example, receive current streaming data for reasoning, and obtain real results based on business feedback;
(1)根据当前流数据,计算相对于历史流数据的概念漂移的程度值,并记为Concept_drift_value,并判断当前流数据的概念漂移的程度值是否大于或者等于概念漂移程度阈值,如果当前流数据的概念漂移的程度较大,则转到第(4)步,否则进入第(2)步。(1) According to the current flow data, calculate the value of the degree of concept drift relative to the historical flow data, and record it as Concept_drift_value, and judge whether the value of the concept drift of the current flow data is greater than or equal to the concept drift threshold value, if the current flow data If the degree of concept drift is large, go to step (4), otherwise go to step (2).
(2)并判断回放缓存池是否达到在线学习的数量要求,达到则进入第(4)步,否则进入第(1)步。(2) And judge whether the playback buffer pool meets the quantity requirement of online learning, if so, go to step (4), otherwise go to step (1).
(3)计算在线训练次数Inc_Train_Num,其中,Inc_Train_max和Inc_Train_min分别表示在线训练的最大迭代次数(设定次数范围之中的最大值)和最小迭代次数(设定次数范围之中的最小值)。(3) Calculate the number of online training times Inc_Train_Num, where Inc_Train_max and Inc_Train_min represent the maximum number of iterations (the maximum value in the set number range) and the minimum number of iterations (the minimum value in the set number range) of online training, respectively.
(31)如果当前流数据的概念漂移的程度较大,Inc_Train_Num=Inc_Train_max,实现加快学习速度。(31) If the degree of concept drift of the current streaming data is large, Inc_Train_Num=Inc_Train_max, so as to accelerate the learning speed.
(32)如果当前流数据的概念漂移的程度较小,则降低在线训练的学习速度,可采用Inc_Train_Num=(Inc_Train_max-Inc_Train_min)*Concept_drift_value/Th+Inc_Train_Min的方式计算训练迭代次数。(32) If the degree of concept drift of the current stream data is small, then reduce the learning speed of online training, and the number of training iterations can be calculated in the way of Inc_Train_Num=(Inc_Train_max-Inc_Train_min)*Concept_drift_value/Th+Inc_Train_Min.
(4)在线训练过程:从回放缓存池中采样,得到目标流数据,将目标流数据与当前流数据混合,对线上预测模型进行在线训练。(4) Online training process: sample from the playback buffer pool to obtain target stream data, mix target stream data with current stream data, and conduct online training for the online prediction model.
(5)重复第(5)步Inc_Train_Num次后,将训练得到的目标预测模型推送入模型仓库。(5) After repeating step (5) Inc_Train_Num times, push the trained target prediction model into the model warehouse.
(6)将本轮接收得到的当前流数据,加入回放缓存池中,并根据先进先出原则,删除最先进入回放缓存池的数据,保证回放缓存池中样本总量不变。(6) Add the current stream data received in this round to the playback buffer pool, and delete the data that enters the playback buffer pool first according to the first-in-first-out principle to ensure that the total number of samples in the playback buffer pool remains unchanged.
(7)返回第(1)步。(7) Return to step (1).
也即是说,本公开实施例中,支持在训练得到目标预测模型之后,将当前流数据存储至回放缓存池之中,并删除回放缓存池之中的第一流数据,其中,第一流数据对应的存储次序,在其它流数据对应的存储次序之前,第一流数据和其它流数据共同构成回放缓存池之中存储的流数据,从而实现在线训练结束后,将最新流数据及时地存储至回放缓存池中,并根据先入先出原则,将最“陈旧”的历史流数据删除,保证回放缓存池样本流数据的总量不变,且保障回放缓存池中样本流数据的特征表征能力。That is to say, in the embodiment of the present disclosure, after the target prediction model is trained, the current stream data is stored in the playback buffer pool, and the first stream data in the playback buffer pool is deleted, wherein the storage corresponding to the first stream data order, before the corresponding storage order of other stream data, the first stream data and other stream data together constitute the stream data stored in the playback buffer pool, so that after the online training is completed, the latest stream data can be stored in the playback buffer pool in a timely manner. And according to the first-in-first-out principle, the most "old" historical flow data is deleted to ensure that the total amount of sample flow data in the playback buffer pool remains unchanged, and the feature representation capability of the sample flow data in the playback buffer pool is guaranteed.
图4是本公开另一实施例提出的预测模型的训练方法的流程示意图,针对图4的描述说明,可以一并结合上述图2,包括步骤S401-S402。FIG. 4 is a schematic flowchart of a prediction model training method proposed by another embodiment of the present disclosure. The description of FIG. 4 may be combined with the above-mentioned FIG. 2 , including steps S401-S402.
S401:根据回放缓存池中已存储流数据的数据量、历史流数据对应的存储时间确定权重。S401: Determine the weight according to the data volume of the stream data stored in the playback buffer pool and the corresponding storage time of the historical stream data.
S402:从回放缓存池已存储的历史流数据之中,基于选取概率采样得到设定数量的历史流数据并作为目标流数据,设定数量和当前流数据的数量之间的比例为预设值。S402: From the historical flow data stored in the playback buffer pool, obtain a set amount of historical flow data based on selection probability sampling as the target flow data, and the ratio between the set amount and the amount of the current flow data is a preset value .
其中的选取概率可以具体是根据与历史流数据对应的权重设定的,具体可以参见下述描述。The selection probability may be specifically set according to the weight corresponding to the historical flow data, for details, please refer to the following description.
也即是说,本公开实施例考虑到真实的预测场景之中,可能由于较新的流数据的数据量、数据采样等因素,而导致的较新的流数据和历史流数据的分布偏差较大,从而提供了一种带权回放缓存池策略,以避免线上预测模型抖动,更有利于真实预测场景之中对于线上预测模型的安全性与稳定性。That is to say, the embodiments of the present disclosure consider that in real prediction scenarios, the distribution deviation between the newer flow data and the historical flow data may be relatively large due to factors such as the data volume and data sampling of the newer flow data. Large, thus providing a weighted playback cache pool strategy to avoid the jitter of the online prediction model, which is more conducive to the security and stability of the online prediction model in real prediction scenarios.
举例而言,利用线上最新接收的当前流数据与历史流数据相混合以进行线上预测模型的在线训练,能够有效缓解最新接收的当前流数据的分布抖动带来的偏差,从而本公开实施例中,可以使用带权回放缓 存池存储历史流数据,并在在线训练过程中,根据已存储的历史流数据的权重随机采样设定数量的历史流数据并作为目标流数据,结合当前流数据来在线训练预测模型。For example, the online training of the online prediction model by mixing the latest received current flow data with the historical flow data can effectively alleviate the deviation caused by the distribution jitter of the latest received current flow data, so that the implementation of the present disclosure In this example, the weighted playback buffer pool can be used to store historical flow data, and during the online training process, a set amount of historical flow data is randomly sampled according to the weight of the stored historical flow data and used as target flow data, combined with current flow data To train the predictive model online.
本公开实施例中,还可以自适应地控制在线学习的训练数据中,较新流数据的数量与历史流数据的数量之间的比例(该比例可以用参数α表示),α的大小决定了针对线上预测模型的在线训练是更倾向于模型效果还是模型的稳定性,从而可以根据实际预测场景的需求自适应设置,对此不做限制。In the embodiment of the present disclosure, it is also possible to adaptively control the ratio between the number of newer flow data and the number of historical flow data in the online learning training data (this ratio can be expressed by parameter α), the size of α determines Whether the online training of the online prediction model is more inclined to the model effect or the stability of the model, so that it can be adaptively set according to the needs of the actual prediction scenario, and there is no limit to this.
在线学习样本的数据量:较新流数据的数量=1:α;The data volume of online learning samples: the number of newer streaming data = 1: α;
其中,α较小时,在线学习将更多的依赖于历史流数据,从而能够获取更好的模型稳定性,而α较大时,在线学习将更多的依赖于较新的流数据,从而能够使得目标预测模型的线上表现性能更佳。Among them, when α is small, online learning will rely more on historical streaming data, so that better model stability can be obtained; while when α is larger, online learning will rely more on newer streaming data, so that it can This makes the online performance of the target prediction model better.
在本公开实施例中,可以配置在线学习的训练数据train_set内较新流数据的数量与历史流数据的数量之间的比例为1:9,即α=0.1,在线学习的训练数据的数据量可以取回放缓存池所能够存储的数据量的1/20,对此不做限制。In the embodiment of the present disclosure, the ratio between the number of newer flow data and the number of historical flow data in the online learning training data train_set can be configured as 1:9, that is, α=0.1, the data volume of online learning training data 1/20 of the data that can be stored in the buffer pool can be retrieved without limitation.
本公开实施例中根据与历史流数据对应的权重设定选取概率的方式可以举例说明如下:In the embodiment of the present disclosure, the method of setting the selection probability according to the weight corresponding to the historical flow data can be illustrated as follows:
带权经验回放就是抽取样本时,优先抽取最有价值的样本,但是又不能只抽取最有价值,不然会造成过拟合,应该是价值越高的,抽取到的概率越大,价值最低的,也有一定的概率抽到。Weighted experience replay means that when sampling samples, the most valuable samples are selected first, but the most valuable samples cannot be selected only, otherwise it will cause overfitting. The higher the value, the greater the probability of being drawn, and the lowest value. , there is also a certain probability of being drawn.
本公开实施例中,在执行在线学习任务时,考虑到较新的流数据对线上预测模型的学习越具有价值,由此,可以配置较新的流数据具有更高的概率被抽取到。In the embodiments of the present disclosure, when performing an online learning task, it is considered that newer stream data is more valuable for online prediction model learning, so that newer stream data can be configured to have a higher probability of being extracted.
假设回放缓存池可缓存样本的数量大小为N,回放缓存池中的历史流数据依据与其对应的存储时间排序,记为x i,其中i∈[1,N],i越小,表示历史流数据越靠近当前时间点。设历史流数据对应的权重的下降率为γ=(1-1/N),则历史流数据x i被采样的概率(选取概率)为: Assuming that the number of samples that can be cached in the playback buffer pool is N, the historical flow data in the playback buffer pool is sorted according to the corresponding storage time, which is recorded as x i , where i∈[1, N], the smaller i is, the historical flow The closer the data is to the current point in time. Assuming that the decline rate of the weight corresponding to the historical flow data is γ=(1-1/N), then the probability (selection probability) of the historical flow data x i being sampled is:
ε i=Aγ iε i = Aγ i ;
其中,A为归一化因子:Among them, A is the normalization factor:
Figure PCTCN2022092573-appb-000001
Figure PCTCN2022092573-appb-000001
由此,本公开实施例的回放缓存池中所存储的历史流数据,最早的历史流数据x N的选取概率约为最新的历史流数据x 1的1/e,其中,e为自然常数,采用此方法设置历史流数据的权重,不会因为回放缓存池所缓存数据量的变化,而使早期的历史流数据被采样的概率降低,同时,该方式使历史流数据的数据量随着时间的增加,被采样的权重逐渐降低,能够有效地适用于存在概念漂移的场景下对回放缓存池中的历史流数据进行带权重采样。 Therefore, for the historical stream data stored in the replay buffer pool in the embodiment of the present disclosure, the selection probability of the earliest historical stream data x N is about 1/e of the latest historical stream data x1 , where e is a natural constant, Using this method to set the weight of historical flow data will not reduce the probability of early historical flow data being sampled due to changes in the amount of cached data in the playback buffer pool. With the increase of , the sampled weight gradually decreases, which can be effectively applied to the weighted sampling of the historical flow data in the playback buffer pool in the scenario where there is concept drift.
从而本公开实施例中,使用带权回放缓存池存放历史流数据,将从回放缓存池中基于选取概率采样得到的历史流数据与线上实时接收到的少量的较新的流数据进行混合,组成新的在线训练数据集,在保证在线预测模型不断地从新样本中学习新知识的同时,巩固过去已掌握的旧知识,提高了在线预测模型表现及训练稳定性。Therefore, in the embodiment of the present disclosure, the weighted playback buffer pool is used to store historical flow data, and the historical flow data obtained from the playback buffer pool based on selection probability sampling is mixed with a small amount of newer flow data received online in real time. A new online training data set is formed to ensure that the online prediction model continuously learns new knowledge from new samples, while consolidating the old knowledge that has been mastered in the past, improving the performance of the online prediction model and training stability.
图5是本公开另一实施例提出的预测模型的训练方法的流程示意图,针对图5的描述说明,可以一并结合上述图2,包括步骤S501-S504。FIG. 5 is a schematic flowchart of a prediction model training method proposed by another embodiment of the present disclosure. The description of FIG. 5 may be combined with the above-mentioned FIG. 2 , including steps S501-S504.
S501:获取与当前流数据对应的标注标签。S501: Obtain an annotation label corresponding to the current flow data.
S502:获取线上预测模型所支持的至少一种预测标签。S502: Obtain at least one prediction label supported by the online prediction model.
S503:如果标注标签属于至少一种预测标签,则根据概念漂移的程度值,结合当前流数据和目标流数据对线上预测模型进行在线训练。S503: If the label label belongs to at least one kind of prediction label, perform online training on the online prediction model in combination with the current flow data and the target flow data according to the degree value of concept drift.
S504:如果标注标签不属于至少一种预测标签,则根据概念漂移的程度值,结合当前流数据和目标流数据对线上预测模型进行线下的更新训练。S504: If the label label does not belong to at least one kind of prediction label, perform offline update training on the online prediction model according to the degree value of the concept drift, combined with the current flow data and the target flow data.
也即是说,本公开实施例还支持在原始的在线预测模型训练时加入若干个标签缓存位置,保证在接收实时的当前流数据时,若与当前流数据对应的标注标签是原始的在线预测模型不支持的标签时,在线预测模型仍然能够继续进行在线训练过程,降低在线预测模型重新训练次数,提高训练效率,从而使得本公开实施例中的预测模型的训练方法,可广泛应用于流数据对应的标签的类型发生变化的分类问题。That is to say, the embodiments of the present disclosure also support adding several tag cache positions during the original online prediction model training, so as to ensure that when receiving real-time current stream data, if the labeled tag corresponding to the current stream data is the original online prediction When the label is not supported by the model, the online prediction model can still continue the online training process, reduce the number of retraining of the online prediction model, and improve the training efficiency, so that the training method of the prediction model in the embodiment of the present disclosure can be widely applied to streaming data Classification problems where the type of corresponding label changes.
举例而言,一并参见图6,图6是本公开另一实施例提出的预测模型的训练装置的架构示意图,针对图5所示实施例的说明可以描述如下:For example, refer to FIG. 6 together. FIG. 6 is a schematic structural diagram of a training device for a prediction model proposed by another embodiment of the present disclosure. The description for the embodiment shown in FIG. 5 can be described as follows:
在分类问题的在线训练过程中,当前流数据对应的标注标签可能是当前的在线预测模型不支持的预测标签,从而本公开实施例中,为了使在线预测模型输出符合较新的流数据的分类个数,且使在线预测模型能够有效满足真实业务场景对线上模型服务的需求,可以在最初训练原始的在线预测模型时,预先在在线预测模型的输出类别中加入若干标签缓存位置(大小为max_label_buffer_size),当标注标签不属于在线预测模型当前所支持的预测标签时,可以直接将标注标签与预留的标签缓存位置相关联,无需修改在线预测模型的输出,使模型可以直接进行在线训练,处理完毕标签缓存位置后,采用回放缓存池中的目标流数据进行在线预测模型的训练,以得到目标预测模型。In the online training process of the classification problem, the label label corresponding to the current flow data may be a prediction label not supported by the current online prediction model, so in the embodiment of the present disclosure, in order to make the online prediction model output conform to the classification number, so that the online prediction model can effectively meet the needs of online model services in real business scenarios, it is possible to add several tag cache positions (size of max_label_buffer_size), when the label label does not belong to the prediction label currently supported by the online prediction model, you can directly associate the label label with the reserved label cache location without modifying the output of the online prediction model, so that the model can be directly trained online. After the tag cache location is processed, the target stream data in the playback cache pool is used to train the online prediction model to obtain the target prediction model.
利用历史流数据,将label_buffer_size设置为max_label_buffer_size,进行在线预测模型的训练;从回放缓存池中采样得到目标流数据;与接收到当前流数据合并,形成在线训练数据集,对于分类问题需额外处理未知数据标签,步骤如下:Use the historical flow data, set the label_buffer_size to max_label_buffer_size, and train the online prediction model; sample the target flow data from the playback buffer pool; merge it with the received current flow data to form an online training data set, and additional processing is required for the classification problem. Data label, the steps are as follows:
若标注标签不是未知标签(即标注标签属于线上预测模型所支持的至少一种预测标签),则直接在线训练。If the label label is not an unknown label (that is, the label label belongs to at least one prediction label supported by the online prediction model), it will be directly trained online.
若标注标签是未知标签(即标注标签不属于线上预测模型所支持的至少一种预测标签),计算未知标签的个数为unklabel_len,并比较未知标签的个数与标签缓存位置的个数label_buffer_size。If the label label is an unknown label (that is, the label label does not belong to at least one prediction label supported by the online prediction model), calculate the number of unknown labels as unklabel_len, and compare the number of unknown labels with the number of label cache locations label_buffer_size .
若label_buffer_size<unklabel_len时,即标签缓存位置不足以放入所有的未知标签,直接在线训练。If label_buffer_size<unklabel_len, that is, the label cache location is not enough to put all unknown labels, directly train online.
若label_buffer_size>unklabel_len时,将未知标签unklabel_len进行顺次编码,并更新标签缓存位置大小为label_buffer_size=label_buffer_size-unklabel_len,If label_buffer_size>unklabel_len, encode the unknown label unklabel_len sequentially, and update the label cache position size to label_buffer_size=label_buffer_size-unklabel_len,
利用在线训练数据集在最新的在线预测模型的基础上进行在线训练,更新模型参数,并将之保存为在线预测模型,如果迭代次数满足设定次数,则结束,以得到目标预测模型,如果迭代次数不满足设定次数,则重新训练在线预测模型,label_buffer_size设置为max_label_buffer_size,并进行在线训练。Use the online training data set to conduct online training on the basis of the latest online prediction model, update the model parameters, and save it as an online prediction model. If the number of iterations meets the set number, it will end to obtain the target prediction model. If iterative If the number of times does not meet the set number, retrain the online prediction model, set label_buffer_size to max_label_buffer_size, and perform online training.
针对本公开实施例的应用示例可以如下:An application example for the embodiments of the present disclosure may be as follows:
假设在线预测模型所执行的预测任务为市域治理事件分类,该在线预测模型可以具体例如事件分类模型,事件分类模型根据传入的事件内容和事件发生地,为事件预测需要派发的部门,按照预测的概率由高到低给出最符合条件的三个部门。事件分布(内容与派发的目标部门)会随时间、环境的改变而发生 变化,因此,事件分类模型会实时监控数据的漂移情况,并在漂移发生立即触发在线训练。Assuming that the prediction task performed by the online prediction model is the classification of city governance events, the online prediction model can be specifically such as the event classification model. The probabilities of , from high to low, give the three most eligible sectors. Event distribution (content and distribution target departments) will change with time and environment. Therefore, the event classification model will monitor data drift in real time and trigger online training immediately when drift occurs.
本公开实施例中,可以采用文本分类算法,为处理出现的未知标签,在训练事件分类模型时,将提前在事件分类模型输出类别中加入若干标签缓存位置(大小为label_buffer_size),当新标签出现时,新标签可以直接与预留的标签缓存位置相关联,无需修改事件分类模型输出,使事件分类模型可以直接进行在线训练。本事件分类模型在每接收一定量的新样本后,将新样本与从回放缓存池中随机采样的数据相混合,进行在线训练。In the embodiment of the present disclosure, a text classification algorithm can be used. In order to deal with the unknown labels that appear, when training the event classification model, a number of label buffer positions (label_buffer_size) will be added to the output category of the event classification model in advance. When a new label appears When , the new label can be directly associated with the reserved label cache location, without modifying the output of the event classification model, so that the event classification model can be directly trained online. After receiving a certain amount of new samples, the event classification model mixes the new samples with the data randomly sampled from the playback buffer pool for online training.
事件分类在线学习主要参数如下表1所示:The main parameters of event classification online learning are shown in Table 1 below:
表1Table 1
参数parameter 取值value
回放缓存池大小(N)Playback buffer pool size (N) 2000020000
数据漂移检测池大小Data drift detection pool size 100100
最新:在线训练数据比(α)Latest: online training data ratio (α) 0.10.1
概念漂移检测算法Concept Drift Detection Algorithm MMDMMD
概念漂移门限(Th)Concept Drift Threshold (Th) 0.010.01
在线训练最大迭代次数(Inc_Train_max)Maximum number of iterations for online training (Inc_Train_max) 55
在线训练最小迭代次数(Inc_Train_min)Minimum number of iterations for online training (Inc_Train_min) 11
最大未知标签位置数(max_label_buffer_size)Maximum number of unknown label positions (max_label_buffer_size) 55
通过试验发现,在发生漂移的数据上,相对于定量地利用全量数据对事件分类模型进行重训,原始事件分类模型的top3准确率下降约8.7%,通过提前在原始事件分类模型中加入未知标签缓存,在训练时从缓存池中进行样本抽样,在线学习事件分类模型在漂移数据上的top3准确率比原始事件分类模型提高2.1%。具体在漂移数据上的实验结果如下表2所示:Through experiments, it is found that on the drifted data, the top3 accuracy of the original event classification model drops by about 8.7% compared to quantitatively using the full amount of data to retrain the event classification model. By adding unknown labels to the original event classification model in advance Cache, samples are sampled from the cache pool during training, and the top3 accuracy of the online learning event classification model on drift data is 2.1% higher than that of the original event classification model. The specific experimental results on the drift data are shown in Table 2 below:
表2Table 2
Figure PCTCN2022092573-appb-000002
Figure PCTCN2022092573-appb-000002
结果分析:Result analysis:
利用静态事件分类模型,可以对线上数据进行持续的推理,但是事件分类模型会随着时间的推移,性能逐渐下降。Using the static event classification model, online data can be continuously reasoned, but the performance of the event classification model will gradually degrade over time.
在每接收到1000条数据后,利用最新的全量数据,对事件分类模型进行重新训练:由于较新的流数据的持续引入,其线上性能相对于静态事件分类模型得到显著提升,但是由于事件分类模型训练采用全量数据,单次事件分类模型更新的计算时间较长。After every 1000 pieces of data are received, the latest full data is used to retrain the event classification model: due to the continuous introduction of newer stream data, its online performance has been significantly improved compared with the static event classification model, but due to the event The classification model training uses the full amount of data, and the calculation time for a single event classification model update is relatively long.
利用在线事件分类模型更新的方式,加入未知标签缓存,可以极大地降低训练时间,同时,事件分类模型性能相对于利用全量数据进行重新训练相当。Using the online event classification model update method and adding unknown label cache can greatly reduce the training time. At the same time, the performance of the event classification model is comparable to retraining with full data.
在在线事件分类模型更新的基础上,引入带权回放缓存池,由于数据处理工作增加,单次事件分类模型更新时间有所增加;缓存池数据的引入增加了事件分类模型的稳定性,事件分类模型性能相对于在线更新方式得到了一定的提升。Based on the update of the online event classification model, the weighted playback cache pool is introduced. Due to the increase in data processing work, the update time of the single event classification model has increased; the introduction of the cache pool data has increased the stability of the event classification model. Compared with the online update method, the model performance has been improved to a certain extent.
假设在线预测模型所执行的预测任务为停车场流量预测,该在线预测模型可以具体例如停车场流量预测模型,停车场流量预测模型使用前24小时的停车场的流进、流出数据预测未来2个小时流进、流出情况。Assuming that the prediction task performed by the online prediction model is parking lot flow forecasting, the online forecasting model can be specific, such as the parking lot flow forecasting model. The parking lot flow forecasting model uses the inflow and outflow data of the parking lot in the previous 24 hours to predict the next two Inflow and outflow of hours.
本公开实施例可以采用神经网络模型进行时序预测,流量数据颗粒度为每半小时一个数据点,即本车场流量预测模型输入为连续48个时序点,输出为连续4个时序点。在原始车场流量预测模型的基础上,每隔半小时进行一次在线训练,使用最新一个训练样本(即最新的52个数据点,其中前48个点作为车场流量预测模型输入,后4个作为车场流量预测模型输出)与从回放缓存池中随机抽样的127个样本(每个样本均由连续52个时序数据点组成,前48个点作为车场流量预测模型输入,后4个作为车场流量预测模型输出)组成训练集进行在线训练,在训练过程中采用较大学习率和较少训练迭代次数使车场流量预测模型能够快速学习到当前的数据分布情况。In the embodiment of the present disclosure, a neural network model can be used for time series prediction, and the granularity of traffic data is one data point every half hour, that is, the input of the traffic flow prediction model of this parking lot is 48 consecutive time series points, and the output is 4 consecutive time series points. On the basis of the original parking lot flow prediction model, an online training is performed every half hour, using the latest training sample (that is, the latest 52 data points, of which the first 48 points are used as the input of the parking lot flow prediction model, and the last 4 are used as the parking lot output of the traffic forecasting model) and 127 samples randomly sampled from the replay buffer pool (each sample is composed of 52 consecutive time series data points, the first 48 points are used as the input of the parking lot flow forecasting model, and the last 4 are used as the parking lot flow forecasting model output) to form a training set for online training. During the training process, a large learning rate and a small number of training iterations are used to enable the parking lot flow prediction model to quickly learn the current data distribution.
车流量预测模型在线学习主要参数如下表3所示:The main parameters of the online learning of the traffic flow forecasting model are shown in Table 3 below:
表3table 3
参数parameter 取值value
回放缓存池大小(N)Playback buffer pool size (N) 2000020000
数据漂移检测池大小Data drift detection pool size 10001000
最新:在线训练数据比(α)Latest: online training data ratio (α) 1/641/64
概念漂移检测算法Concept Drift Detection Algorithm ADWinADWin
概念漂移门限(Th)Concept Drift Threshold (Th) 0.0020.002
在线训练最大迭代次数(Inc_Train_max)Maximum number of iterations for online training (Inc_Train_max) 55
在线训练最小迭代次数(Inc_Train_min)Minimum number of iterations for online training (Inc_Train_min) 11
在发生漂移的数据上进行试验发现,在线学习车场流量预测模型较原始车场流量预测模型在RMSE、MAE三项车场流量预测模型评价指标上均有下降。在漂移数据上的具体实验结果如下表4所示:Experiments on the drifting data show that the online learning depot flow forecasting model has a decline in the RMSE and MAE three depot flow forecasting model evaluation indicators compared with the original depot flow forecasting model. The specific experimental results on the drift data are shown in Table 4 below:
表4Table 4
Figure PCTCN2022092573-appb-000003
Figure PCTCN2022092573-appb-000003
Figure PCTCN2022092573-appb-000004
Figure PCTCN2022092573-appb-000004
结果分析:Result analysis:
静态的车场流量预测模型,可以对线上数据进行持续的推理,但是车场流量预测模型会随着时间的推移,性能逐渐下降。The static parking lot flow forecasting model can continuously reason about online data, but the performance of the parking lot flow forecasting model will gradually degrade over time.
T+3天全量更新:每3天,利用全量数据对车场流量预测模型进行一次重新训练,车场流量预测模型的效果优于静态的车场流量预测模型,但由于网络复杂,历史流数据较多,单次车场流量预测模型更新时间较长,难以满足城市车场流量预测模型的线上服务要求。Full update in T+3 days: every 3 days, use the full data to retrain the parking lot flow forecasting model. The effect of the parking lot flow forecasting model is better than the static parking lot flow forecasting model, but due to the complexity of the network and the large amount of historical flow data, The update time of a single parking lot flow forecasting model is long, and it is difficult to meet the online service requirements of the urban parking lot flow forecasting model.
T+3天的数据在线训练方式+带权回放缓存池:利用每3天接收到的数据,并结合带权回放缓存池里的部分历史流数据,对车场流量预测模型进行调整。该方法不需人工参与,可自动进行车场流量预测模型的线上更新;由于只用少量较新的流数据对车场流量预测模型进行更新,因此计算时间大幅缩短。T + 3 days of data online training method + weighted playback cache pool: use the data received every 3 days, combined with some historical flow data in the weighted playback cache pool, to adjust the parking lot traffic prediction model. This method does not require manual participation, and can automatically update the parking lot flow prediction model online; since only a small amount of newer flow data is used to update the parking lot flow prediction model, the calculation time is greatly shortened.
由于线上更新的方法,更多地考虑时间邻近流数据的影响,因此车场流量预测模型效果相对于利用全量数据对车场流量预测模型更新,有一定提升。Since the online update method takes more into account the impact of time-adjacent flow data, the effect of the parking lot flow forecasting model has a certain improvement compared to using the full amount of data to update the parking lot flow forecasting model.
学习速度自控制的方法,可根据流数据的概念漂移程度,自适应调整学习速度,在线上流数据存在漂移的情况下,车场流量预测模型性能得到一定提升。The learning speed self-control method can adaptively adjust the learning speed according to the conceptual drift degree of the streaming data. In the case of drifting online streaming data, the performance of the parking lot flow prediction model can be improved to a certain extent.
图7是本公开一实施例提出的预测模型的训练装置的结构示意图。FIG. 7 is a schematic structural diagram of a training device for a prediction model proposed by an embodiment of the present disclosure.
如图7所示,该预测模型的训练装置70包括:As shown in Figure 7, the training device 70 of this predictive model comprises:
获取模块701,用于获取当前流数据和线上预测模型;An acquisition module 701, configured to acquire current flow data and an online prediction model;
第一确定模块702,用于在当前流数据发生概念漂移时,确定概念漂移的程度值;以及The first determination module 702 is configured to determine the degree of concept drift when the concept drift occurs in the current stream data; and
训练模块703,用于根据概念漂移的程度值,结合当前流数据和目标流数据对线上预测模型进行在线训练,以得到目标预测模型;其中,目标流数据,是从多个历史流数据之中采样得到的。The training module 703 is used to perform online training on the online prediction model according to the degree of concept drift, combining the current flow data and the target flow data, so as to obtain the target prediction model; wherein, the target flow data is obtained from a plurality of historical flow data obtained by sampling.
在本公开的一些实施例中,训练模块703,具体用于:In some embodiments of the present disclosure, the training module 703 is specifically used for:
如果概念漂移的程度值大于或者等于概念漂移程度阈值,则参考设定规则从回放缓存池已存储的历史流数据之中采样得到目标流数据;If the value of the degree of concept drift is greater than or equal to the threshold of the degree of concept drift, the reference setting rule samples the target flow data from the historical flow data stored in the playback buffer pool;
根据当前流数据和目标流数据对线上预测模型进行在线训练。The online prediction model is trained online according to the current flow data and the target flow data.
在本公开的一些实施例中,训练模块703,具体用于:In some embodiments of the present disclosure, the training module 703 is specifically used for:
如果概念漂移的程度值小于概念漂移程度阈值,则将当前流数据存储至回放缓存池之中,并确定回放缓存池中已存储流数据的数据量;If the value of the degree of concept drift is less than the threshold value of the degree of concept drift, then store the current flow data in the playback buffer pool, and determine the data volume of the stored flow data in the playback buffer pool;
如果数据量不满足设定条件,则持续获取当前流数据,并动态地对数据量进行更新;If the amount of data does not meet the set conditions, the current flow data will be continuously obtained and the amount of data will be updated dynamically;
如果数据量满足设定条件,则参考设定规则从回放缓存池已存储的历史流数据之中采样得到目标流数据,并根据目标流数据对线上预测模型进行在线训练。If the amount of data satisfies the set conditions, then refer to the set rules to sample the target stream data from the historical stream data stored in the playback cache pool, and perform online training on the online prediction model based on the target stream data.
在本公开的一些实施例中,训练模块703,具体用于:In some embodiments of the present disclosure, the training module 703 is specifically used for:
根据当前流数据和目标流数据对线上预测模型在线训练第一设定次数,其中,第一设定次数是设定次数范围之中的最大值。The online prediction model is trained online for a first set number of times according to the current stream data and the target stream data, wherein the first set number of times is a maximum value within the range of the set number of times.
在本公开的一些实施例中,训练模块703,具体用于:In some embodiments of the present disclosure, the training module 703 is specifically used for:
根据目标流数据对线上预测模型在线训练第二设定次数,其中,第二设定次数小于第一设定次数,且第二设定次数,是根据设定次数范围之中的最大值、最小值、概念漂移的程度值,以及概念漂移程度阈值计算得出的。According to the target stream data, the online prediction model is trained for a second set number of times online, wherein the second set number of times is less than the first set number of times, and the second set number of times is based on the maximum value in the set number of times range, The minimum value, the degree of concept drift value, and the degree of concept drift threshold are calculated.
在本公开的一些实施例中,如图8所示,装置70还包括:In some embodiments of the present disclosure, as shown in FIG. 8 , the device 70 further includes:
处理模块704,用于在训练得到目标预测模型之后,将当前流数据存储至回放缓存池之中,并删除回放缓存池之中的第一流数据,其中,第一流数据对应的存储次序,在其它流数据对应的存储次序之前,第一流数据和其它流数据共同构成回放缓存池之中存储的流数据。The processing module 704 is configured to store the current stream data in the playback buffer pool after the target prediction model is obtained through training, and delete the first stream data in the playback buffer pool, wherein the storage order corresponding to the first stream data is different from other stream data Prior to the corresponding storage order, the first stream data and other stream data together constitute the stream data stored in the playback buffer pool.
在本公开的一些实施例中,训练模块703,具体用于:In some embodiments of the present disclosure, the training module 703 is specifically used for:
从回放缓存池已存储的历史流数据之中,基于选取概率采样得到设定数量的历史流数据并作为目标流数据,设定数量和当前流数据的数量之间的比例为预设值。From the historical stream data stored in the playback buffer pool, a set amount of historical stream data is obtained based on selection probability sampling as the target stream data, and the ratio between the set amount and the current stream data is a preset value.
在本公开的一些实施例中,选取概率由历史流数据的权重确定,如图8所示,装置70还包括:In some embodiments of the present disclosure, the selection probability is determined by the weight of historical flow data. As shown in FIG. 8, the device 70 also includes:
第二确定模块705,用于根据回放缓存池中已存储流数据的数据量、历史流数据对应的存储时间确定权重。The second determination module 705 is configured to determine the weight according to the data volume of the stream data stored in the playback cache pool and the storage time corresponding to the historical stream data.
在本公开的一些实施例中,其中,In some embodiments of the present disclosure, wherein,
获取模块701,还用于在获取当前流数据之后,获取与当前流数据对应的标注标签,并获取线上预测模型所支持的至少一种预测标签;The acquiring module 701 is further configured to acquire, after acquiring the current stream data, an annotation label corresponding to the current stream data, and acquire at least one prediction label supported by the online prediction model;
训练模块703,具体用于:The training module 703 is specifically used for:
如果标注标签属于至少一种预测标签,则根据概念漂移的程度值,结合当前流数据和目标流数据对线上预测模型进行在线训练;If the label label belongs to at least one kind of prediction label, the online prediction model is trained online according to the degree value of the concept drift, combined with the current flow data and the target flow data;
如果标注标签不属于至少一种预测标签,则根据概念漂移的程度值,结合当前流数据和目标流数据对线上预测模型进行线下的更新训练。If the label label does not belong to at least one prediction label, the online prediction model is updated and trained offline according to the degree of concept drift, combined with the current flow data and the target flow data.
与上述图1至图6实施例提供的预测模型的训练方法相对应,本公开实施例还提供一种预测模型的训练装置,由于本公开实施例提供的预测模型的训练装置与上述图1至图6实施例提供的预测模型的训练方法相对应,因此在预测模型的训练方法的实施方式也适用于本公开实施例提供的预测模型的训练装置,在本公开实施例中不再详细描述。Corresponding to the training method of the prediction model provided by the embodiments of FIGS. 1 to 6 above, the embodiment of the present disclosure also provides a training device for the prediction model. The training method of the prediction model provided in the embodiment of FIG. 6 corresponds, so the implementation of the training method of the prediction model is also applicable to the training device of the prediction model provided in the embodiment of the present disclosure, and will not be described in detail in the embodiment of the present disclosure.
本公开实施例中,通过结合概念漂移的程度值来确定线上预测模型训练的训练时机,从而支持在线学习过程中,如果当前流数据的概念漂移程度较大,则实现使得在线训练过程具有较快的模型学习速度,使模型快速掌握产生概念漂移的流数据所表征的新知识,以保证预测模型的线上实时表现;而如果当前流数据的概念漂移程度较小,则使得在线训练过程保持相对较低的学习速率,以防止灾难性遗忘的发生,从而全面地兼顾预测模型对新知识的学习速度,和预测模型的稳定性能,使得预测模型能够持续地满足智能场景中的预测需求,提升预测模型的预测效果。In the embodiment of the present disclosure, the training timing of the online prediction model training is determined by combining the value of the degree of concept drift, so as to support the online learning process. The fast model learning speed enables the model to quickly grasp the new knowledge represented by the streaming data that produces concept drift, so as to ensure the online real-time performance of the prediction model; and if the concept drift of the current streaming data is small, the online training process can be maintained. Relatively low learning rate to prevent the occurrence of catastrophic forgetting, so as to comprehensively take into account the learning speed of the prediction model for new knowledge and the stability of the prediction model, so that the prediction model can continuously meet the prediction needs in intelligent scenarios and improve Predictive performance of the predictive model.
为了实现上述实施例,本公开实施例还提出一种计算机设备,包括:存储器、处理器及存储在存储 器上并可在处理器上运行的计算机程序,处理器执行程序时,实现如本公开前述实施例提出的预测模型的训练方法。In order to realize the above-mentioned embodiments, an embodiment of the present disclosure also proposes a computer device, including: a memory, a processor, and a computer program stored on the memory and operable on the processor. When the processor executes the program, it realizes the aforementioned The training method of the prediction model proposed in the embodiment.
为了实现上述实施例,本公开实施例还提出一种非临时性计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如本公开前述实施例提出的预测模型的训练方法。In order to realize the above-mentioned embodiments, the embodiments of the present disclosure also propose a non-transitory computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the training of the prediction model as proposed in the foregoing embodiments of the present disclosure is implemented. method.
为了实现上述实施例,本公开实施例还提出一种计算机程序产品,当计算机程序产品中的指令处理器执行时,执行如本公开前述实施例提出的预测模型的训练方法。In order to realize the above-mentioned embodiments, the embodiments of the present disclosure further propose a computer program product. When the instruction processor in the computer program product executes, the method for training the prediction model as proposed in the foregoing embodiments of the present disclosure is executed.
为了实现上述实施例,本公开实施例还提出一种计算机程序,该计算机程序包括计算机程序代码,当该计算机程序代码在计算机上运行时,使得计算机执行如本公开前述实施例提出的预测模型的训练方法。In order to realize the above-mentioned embodiments, the embodiments of the present disclosure also propose a computer program, the computer program includes computer program code, when the computer program code is run on the computer, the computer executes the predictive model as proposed in the foregoing embodiments of the present disclosure. training method.
图9示出了适于用来实现本公开实施方式的示例性计算机设备的框图。图9显示的计算机设备12仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。Figure 9 shows a block diagram of an exemplary computer device suitable for use in implementing embodiments of the present disclosure. The computer device 12 shown in FIG. 9 is only an example, and should not limit the functions and scope of use of the embodiments of the present disclosure.
如图9所示,计算机设备12以通用计算设备的形式表现。计算机设备12的组件可以包括但不限于:一个或者多个处理器或者处理单元16,系统存储器28,连接不同系统组件(包括系统存储器28和处理单元16)的总线18。As shown in FIG. 9, computer device 12 takes the form of a general-purpose computing device. Components of computer device 12 may include, but are not limited to: one or more processors or processing units 16 , system memory 28 , bus 18 connecting various system components including system memory 28 and processing unit 16 .
总线18表示几类总线结构中的一种或多种,包括存储器总线或者存储器控制器,外围总线,图形加速端口,处理器或者使用多种总线结构中的任意总线结构的局域总线。举例来说,这些体系结构包括但不限于工业标准体系结构(Industry Standard Architecture;以下简称:ISA)总线,微通道体系结构(Micro Channel Architecture;以下简称:MAC)总线,增强型ISA总线、视频电子标准协会(Video Electronics Standards Association;以下简称:VESA)局域总线以及外围组件互连(Peripheral Component Interconnection;以下简称:PCI)总线。 Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus structures. For example, these architectures include but are not limited to Industry Standard Architecture (Industry Standard Architecture; hereinafter referred to as: ISA) bus, Micro Channel Architecture (Micro Channel Architecture; hereinafter referred to as: MAC) bus, enhanced ISA bus, video electronics Standards Association (Video Electronics Standards Association; hereinafter referred to as: VESA) local bus and Peripheral Component Interconnection (hereinafter referred to as: PCI) bus.
计算机设备12典型地包括多种计算机系统可读介质。这些介质可以是任何能够被计算机设备12访问的可用介质,包括易失性和非易失性介质,可移动的和不可移动的介质。 Computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by computer device 12 and include both volatile and nonvolatile media, removable and non-removable media.
存储器28可以包括易失性存储器形式的计算机系统可读介质,例如随机存取存储器(Random Access Memory;以下简称:RAM)30和/或高速缓存存储器32。计算机设备12可以进一步包括其它可移动/不可移动的、易失性/非易失性计算机系统存储介质。仅作为举例,存储系统34可以用于读写不可移动的、非易失性磁介质(图9未显示,通常称为“硬盘驱动器”)。The memory 28 may include a computer system readable medium in the form of a volatile memory, such as a random access memory (Random Access Memory; hereinafter referred to as: RAM) 30 and/or a cache memory 32 . Computer device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read and write to non-removable, non-volatile magnetic media (not shown in FIG. 9, commonly referred to as a "hard drive").
尽管图9中未示出,可以提供用于对可移动非易失性磁盘(例如“软盘”)读写的磁盘驱动器,以及对可移动非易失性光盘(例如:光盘只读存储器(Compact Disc Read Only Memory;以下简称:CD-ROM)、数字多功能只读光盘(Digital Video Disc Read Only Memory;以下简称:DVD-ROM)或者其它光介质)读写的光盘驱动器。在这些情况下,每个驱动器可以通过一个或者多个数据介质接口与总线18相连。存储器28可以包括至少一个程序产品,该程序产品具有一组(例如至少一个)程序模块,这些程序模块被配置以执行本公开各实施例的功能。Although not shown in FIG. 9, a disk drive for reading and writing to a removable nonvolatile disk (such as a "floppy disk") may be provided, as well as a removable nonvolatile disk (such as a Compact Disk ROM (Compact Disk). Disc Read Only Memory; hereinafter referred to as: CD-ROM), Digital Video Disc Read Only Memory (hereinafter referred to as: DVD-ROM) or other optical media). In these cases, each drive may be connected to bus 18 via one or more data media interfaces. Memory 28 may include at least one program product having a set (eg, at least one) of program modules configured to perform the functions of various embodiments of the present disclosure.
具有一组(至少一个)程序模块42的程序/实用工具40,可以存储在例如存储器28中,这样的程序模块42包括但不限于操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。程序模块42通常执行本公开所描述的实施例中的功能和/ 或方法。A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including but not limited to an operating system, one or more application programs, other program modules, and program data , each or some combination of these examples may include implementations of network environments. The program modules 42 generally perform the functions and/or methods of the embodiments described in the present disclosure.
计算机设备12也可以与一个或多个外部设备14(例如键盘、指向设备、显示器24等)通信,还可与一个或者多个使得用户能与该计算机设备12交互的设备通信,和/或与使得该计算机设备12能与一个或多个其它计算设备进行通信的任何设备(例如网卡,调制解调器等等)通信。这种通信可以通过输入/输出(I/O)接口22进行。并且,计算机设备12还可以通过网络适配器20与一个或者多个网络(例如局域网(Local Area Network;以下简称:LAN),广域网(Wide Area Network;以下简称:WAN)和/或公共网络,例如因特网)通信。如图所示,网络适配器20通过总线18与计算机设备12的其它模块通信。应当明白,尽管图中未示出,可以结合计算机设备12使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、RAID系统、磁带驱动器以及数据备份存储系统等。The computer device 12 may also communicate with one or more external devices 14 (e.g., a keyboard, pointing device, display 24, etc.), and with one or more devices that enable a user to interact with the computer device 12, and/or with Any device (eg, network card, modem, etc.) that enables the computing device 12 to communicate with one or more other computing devices. Such communication may occur through input/output (I/O) interface 22 . Moreover, the computer device 12 can also communicate with one or more networks (such as a local area network (Local Area Network; hereinafter referred to as: LAN), a wide area network (Wide Area Network; hereinafter referred to as: WAN) and/or public networks, such as the Internet, through the network adapter 20. ) communication. As shown, network adapter 20 communicates with other modules of computer device 12 via bus 18 . It should be appreciated that although not shown, other hardware and/or software modules may be used in conjunction with computer device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives And data backup storage system, etc.
处理单元16通过运行存储在系统存储器28中的程序,从而执行各种功能应用以及数据处理,例如实现前述实施例中提及的预测模型的训练方法。The processing unit 16 executes various functional applications and data processing by running the programs stored in the system memory 28 , such as realizing the training method of the prediction model mentioned in the foregoing embodiments.
需要说明的是,前述对预测模型的训练方法实施例的解释说明也适用于上述实施例中的计算机设备、非瞬时计算机可读存储介质、计算机程序产品和计算机程序,此处不再赘述。It should be noted that the foregoing explanations of the embodiments of the prediction model training method are also applicable to the computer equipment, non-transitory computer-readable storage media, computer program products, and computer programs in the above embodiments, and will not be repeated here.
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其它实施方案。本公开旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。Other embodiments of the present disclosure will be readily apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. The present disclosure is intended to cover any modification, use or adaptation of the present disclosure. These modifications, uses or adaptations follow the general principles of the present disclosure and include common knowledge or conventional technical means in the technical field not disclosed in the present disclosure. . The specification and examples are to be considered exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。It should be understood that the present disclosure is not limited to the precise constructions which have been described above and shown in the drawings, and various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
需要说明的是,在本公开的描述中,术语“第一”、“第二”等仅用于描述目的,而不能理解为指示或暗示相对重要性。此外,在本公开的描述中,除非另有说明,“多个”的含义是两个或两个以上。It should be noted that, in the description of the present disclosure, terms such as "first" and "second" are used for description purposes only, and should not be understood as indicating or implying relative importance. In addition, in the description of the present disclosure, unless otherwise specified, "plurality" means two or more.
流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现特定逻辑功能或过程的步骤的可执行指令的代码的模块、片段或部分,并且本公开的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本公开的实施例所属技术领域的技术人员所理解。Any process or method descriptions in flowcharts or otherwise described herein may be understood to represent modules, segments or portions of code comprising one or more executable instructions for implementing specific logical functions or steps of the process , and the scope of preferred embodiments of the present disclosure includes additional implementations in which functions may be performed out of the order shown or discussed, including substantially concurrently or in reverse order depending on the functions involved, which shall It is understood by those skilled in the art to which the embodiments of the present disclosure pertain.
应当理解,本公开的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或固件来实现。例如,如果用硬件来实现,和在另一实施方式中一样,可用本领域公知的下列技术中的任一项或他们的组合来实现:具有用于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(PGA),现场可编程门阵列(FPGA)等。It should be understood that various parts of the present disclosure may be implemented in hardware, software, firmware or a combination thereof. In the embodiments described above, various steps or methods may be implemented by software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented by any one or combination of the following techniques known in the art: Discrete logic circuits, ASICs with suitable combinational logic gates, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.
本技术领域的普通技术人员可以理解实现上述实施例方法携带的全部或部分步骤是可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,该程序在执行时,包括方法实施例的步骤之一或其组合。Those of ordinary skill in the art can understand that all or part of the steps carried by the methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium. During execution, one or a combination of the steps of the method embodiments is included.
此外,在本公开各个实施例中的各功能单元可以集成在一个处理模块中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也 可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing module, each unit may exist separately physically, or two or more units may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules. If the integrated modules are realized in the form of software function modules and sold or used as independent products, they can also be stored in a computer-readable storage medium.
上述提到的存储介质可以是只读存储器,磁盘或光盘等。The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, and the like.
在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本公开的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不一定指的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任何的一个或多个实施例或示例中以合适的方式结合。In the description of this specification, descriptions referring to the terms "one embodiment", "some embodiments", "example", "specific examples", or "some examples" mean that specific features described in connection with the embodiment or example , structure, material or characteristic is included in at least one embodiment or example of the present disclosure. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
尽管上面已经示出和描述了本公开的实施例,可以理解的是,上述实施例是示例性的,不能理解为对本公开的限制,本领域的普通技术人员在本公开的范围内可以对上述实施例进行变化、修改、替换和变型。Although the embodiments of the present disclosure have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limitations on the present disclosure, and those skilled in the art can understand the above-mentioned embodiments within the scope of the present disclosure. The embodiments are subject to changes, modifications, substitutions and variations.

Claims (22)

  1. 一种预测模型的训练方法,其特征在于,所述方法包括:A method for training a predictive model, characterized in that the method comprises:
    获取当前流数据和线上预测模型;Obtain current streaming data and online prediction models;
    如果所述当前流数据发生概念漂移,则确定概念漂移的程度值;以及If concept drift occurs to the current stream data, determining a degree value of concept drift; and
    根据所述概念漂移的程度值,结合所述当前流数据和目标流数据对所述线上预测模型进行在线训练,以得到目标预测模型,performing online training on the online prediction model in combination with the current flow data and the target flow data according to the degree value of the concept drift, so as to obtain the target prediction model,
    其中,所述目标流数据,是从多个历史流数据之中采样得到的。Wherein, the target flow data is obtained by sampling from a plurality of historical flow data.
  2. 如权利要求1所述的方法,其特征在于,所述根据所述概念漂移的程度值,结合所述当前流数据和目标流数据对所述线上预测模型进行在线训练,包括:The method according to claim 1, wherein the online training of the online prediction model in combination with the current flow data and the target flow data according to the degree value of the concept drift comprises:
    如果所述概念漂移的程度值大于或者等于概念漂移程度阈值,则参考设定规则从回放缓存池已存储的历史流数据之中采样得到所述目标流数据;If the value of the degree of concept drift is greater than or equal to the threshold value of the degree of concept drift, then refer to the set rule to sample the target flow data from the historical flow data stored in the playback buffer pool;
    根据所述当前流数据和所述目标流数据对所述线上预测模型进行在线训练。The online prediction model is trained online according to the current flow data and the target flow data.
  3. 如权利要求1所述的方法,其特征在于,所述根据所述概念漂移的程度值,结合所述当前流数据和目标流数据对所述线上预测模型进行在线训练,包括:The method according to claim 1, wherein the online training of the online prediction model in combination with the current flow data and the target flow data according to the degree value of the concept drift comprises:
    如果所述概念漂移的程度值小于概念漂移程度阈值,则将所述当前流数据存储至回放缓存池之中,并确定所述回放缓存池中已存储流数据的数据量;If the value of the degree of concept drift is less than the threshold value of the degree of concept drift, storing the current stream data in the playback buffer pool, and determining the data volume of the stored stream data in the playback buffer pool;
    如果所述数据量不满足设定条件,则持续获取所述当前流数据,并动态地对所述数据量进行更新;If the data volume does not meet the set condition, continuously acquire the current stream data, and dynamically update the data volume;
    如果所述数据量满足所述设定条件,则参考所述设定规则从回放缓存池已存储的历史流数据之中采样得到所述目标流数据,并根据所述目标流数据对所述线上预测模型进行在线训练。If the amount of data satisfies the set condition, refer to the set rule to sample the target stream data from the historical stream data stored in the playback buffer pool, and Predictive models are trained online.
  4. 如权利要求2所述的方法,其特征在于,所述根据所述当前流数据和所述目标流数据对所述线上预测模型进行在线训练,包括:The method according to claim 2, wherein the online training of the online prediction model according to the current flow data and the target flow data comprises:
    根据所述当前流数据和所述目标流数据对所述线上预测模型在线训练第一设定次数,其中,所述第一设定次数是设定次数范围之中的最大值。The online prediction model is trained online for a first set number of times according to the current stream data and the target stream data, wherein the first set number of times is a maximum value within a range of set times.
  5. 如权利要求3所述的方法,其特征在于,所述根据所述目标流数据对所述线上预测模型进行在线训练,包括:The method according to claim 3, wherein the online training of the online prediction model according to the target flow data comprises:
    根据所述目标流数据对所述线上预测模型在线训练第二设定次数,其中,所述第二设定次数小于所述第一设定次数,且所述第二设定次数,是根据设定次数范围之中的最大值、最小值、所述概念漂移的程度值,以及所述概念漂移程度阈值计算得出的。According to the target stream data, the online prediction model is trained online for a second set number of times, wherein the second set number of times is smaller than the first set number of times, and the second set number of times is based on The maximum value, the minimum value, the value of the degree of concept drift, and the threshold value of the degree of concept drift in the range of the set number of times are calculated.
  6. 如权利要求1至5中任一项所述的方法,其特征在于,在训练得到所述目标预测模型之后,包括:The method according to any one of claims 1 to 5, characterized in that, after training to obtain the target prediction model, comprising:
    将所述当前流数据存储至回放缓存池之中;storing the current stream data in a playback buffer pool;
    删除所述回放缓存池之中的第一流数据;delete the first-stream data in the playback buffer pool;
    其中,所述第一流数据对应的存储次序,在其它流数据对应的存储次序之前,所述第一流数据和所述其它流数据共同构成所述回放缓存池之中存储的流数据。Wherein, the storage order corresponding to the first stream data is before the storage order corresponding to other stream data, and the first stream data and the other stream data together constitute the stream data stored in the playback buffer pool.
  7. 如权利要求2或3所述的方法,其特征在于,所述参考所述设定规则从回放缓存池已存储的历史 流数据之中采样得到所述目标流数据,包括:The method according to claim 2 or 3, wherein the reference to the set rule is obtained by sampling the target flow data from the historical flow data stored in the playback buffer pool, including:
    从回放缓存池已存储的历史流数据之中,基于选取概率采样得到设定数量的历史流数据并作为所述目标流数据,所述设定数量和所述当前流数据的数量之间的比例为预设值。From the historical flow data stored in the playback buffer pool, a set amount of historical flow data is obtained based on selection probability sampling as the target flow data, the ratio between the set amount and the amount of the current flow data is the default value.
  8. 如权利要求7所述的方法,其特征在于,所述选取概率由所述历史流数据的权重确定,所述方法还包括:The method according to claim 7, wherein the selection probability is determined by the weight of the historical flow data, and the method further comprises:
    根据所述回放缓存池中已存储流数据的数据量、所述历史流数据对应的存储时间确定权重。The weight is determined according to the data volume of the stream data stored in the playback cache pool and the corresponding storage time of the historical stream data.
  9. 如权利要求1至8中任一项所述的方法,其特征在于,在所述获取当前流数据之后,还包括:The method according to any one of claims 1 to 8, characterized in that, after said acquiring the current stream data, further comprising:
    获取与所述当前流数据对应的标注标签;Obtain an annotation tag corresponding to the current stream data;
    获取所述线上预测模型所支持的至少一种预测标签;Obtain at least one prediction label supported by the online prediction model;
    如果所述标注标签属于所述至少一种预测标签,则根据所述概念漂移的程度值,结合所述当前流数据和目标流数据对所述线上预测模型进行在线训练;If the label label belongs to the at least one prediction label, performing online training on the online prediction model in combination with the current flow data and target flow data according to the degree value of the concept drift;
    如果所述标注标签不属于所述至少一种预测标签,则根据所述概念漂移的程度值,结合所述当前流数据和目标流数据对所述线上预测模型进行线下的更新训练。If the label label does not belong to the at least one prediction label, performing offline update training on the online prediction model in combination with the current flow data and the target flow data according to the degree value of the concept drift.
  10. 一种预测模型的训练装置,其特征在于,所述装置包括:A training device for a predictive model, characterized in that the device comprises:
    获取模块,用于获取当前流数据和线上预测模型;Acquisition module, used to obtain current flow data and online prediction model;
    第一确定模块,用于在所述当前流数据发生概念漂移时,确定概念漂移的程度值;以及A first determination module, configured to determine the degree of concept drift when the current stream data has concept drift; and
    训练模块,用于根据所述概念漂移的程度值,结合所述当前流数据和目标流数据对所述线上预测模型进行在线训练,以得到目标预测模型;其中,所述目标流数据,是从多个历史流数据之中采样得到的。A training module, configured to perform online training on the online prediction model in combination with the current flow data and target flow data according to the degree value of the concept drift, so as to obtain a target prediction model; wherein, the target flow data is Sampled from multiple historical flow data.
  11. 如权利要求10所述的装置,其特征在于,所述训练模块,具体用于:The device according to claim 10, wherein the training module is specifically used for:
    如果所述概念漂移的程度值大于或者等于概念漂移程度阈值,则参考设定规则从回放缓存池已存储的历史流数据之中采样得到所述目标流数据;If the value of the degree of concept drift is greater than or equal to the threshold value of the degree of concept drift, then refer to the set rule to sample the target flow data from the historical flow data stored in the playback buffer pool;
    根据所述当前流数据和所述目标流数据对所述线上预测模型进行在线训练。The online prediction model is trained online according to the current flow data and the target flow data.
  12. 如权利要求10所述的装置,其特征在于,所述训练模块,具体用于:The device according to claim 10, wherein the training module is specifically used for:
    如果所述概念漂移的程度值小于所述概念漂移程度阈值,则将所述当前流数据存储至回放缓存池之中,并确定所述回放缓存池中已存储流数据的数据量;If the value of the degree of concept drift is less than the threshold value of the degree of concept drift, storing the current stream data in a playback buffer pool, and determining the data volume of stream data stored in the playback buffer pool;
    如果所述数据量不满足设定条件,则持续获取所述当前流数据,并动态地对所述数据量进行更新;If the data volume does not meet the set condition, continuously acquire the current stream data, and dynamically update the data volume;
    如果所述数据量满足所述设定条件,则参考所述设定规则从回放缓存池已存储的历史流数据之中采样得到所述目标流数据,并根据所述目标流数据对所述线上预测模型进行在线训练。If the amount of data satisfies the set condition, refer to the set rule to sample the target stream data from the historical stream data stored in the playback buffer pool, and Predictive models are trained online.
  13. 如权利要求11所述的装置,其特征在于,所述训练模块,具体用于:The device according to claim 11, wherein the training module is specifically used for:
    根据所述当前流数据和所述目标流数据对所述线上预测模型在线训练第一设定次数,其中,所述第一设定次数是设定次数范围之中的最大值。The online prediction model is trained online for a first set number of times according to the current stream data and the target stream data, wherein the first set number of times is a maximum value within a range of set times.
  14. 如权利要求12所述的装置,其特征在于,所述训练模块,具体用于:The device according to claim 12, wherein the training module is specifically used for:
    根据所述目标流数据对所述线上预测模型在线训练第二设定次数,其中,所述第二设定次数小于所述第一设定次数,且所述第二设定次数,是根据设定次数范围之中的最大值、最小值、所述概念漂移的程度值,以及所述概念漂移程度阈值计算得出的。According to the target stream data, the online prediction model is trained online for a second set number of times, wherein the second set number of times is smaller than the first set number of times, and the second set number of times is based on The maximum value, the minimum value, the value of the degree of concept drift, and the threshold value of the degree of concept drift in the range of the set number of times are calculated.
  15. 如权利要求10至14中任一项所述的装置,其特征在于,所述装置还包括:The device according to any one of claims 10 to 14, wherein the device further comprises:
    处理模块,用于在训练得到所述目标预测模型之后,将所述当前流数据存储至回放缓存池之中,并删除所述回放缓存池之中的第一流数据,其中,所述第一流数据对应的存储次序,在其它流数据对应的存储次序之前,所述第一流数据和所述其它流数据共同构成所述回放缓存池之中存储的流数据。A processing module, configured to store the current stream data in the playback buffer pool after training the target prediction model, and delete the first stream data in the playback buffer pool, wherein the first stream data corresponds to A storage order, prior to the storage order corresponding to other stream data, the first stream data and the other stream data together constitute the stream data stored in the playback buffer pool.
  16. 如权利要求11或12所述的装置,其特征在于,所述训练模块,具体用于:The device according to claim 11 or 12, wherein the training module is specifically used for:
    从回放缓存池已存储的历史流数据之中,基于选取概率采样得到设定数量的历史流数据并作为所述目标流数据,所述设定数量和所述当前流数据的数量之间的比例为预设值。From the historical flow data stored in the playback buffer pool, a set amount of historical flow data is obtained based on selection probability sampling as the target flow data, the ratio between the set amount and the amount of the current flow data is the default value.
  17. 如权利要求16所述的装置,其特征在于,所述选取概率由所述历史流数据的权重确定,所述装置还包括:The device according to claim 16, wherein the selection probability is determined by the weight of the historical flow data, and the device further comprises:
    第二确定模块,用于根据所述回放缓存池中已存储流数据的数据量、所述历史流数据对应的存储时间确定权重。The second determination module is configured to determine the weight according to the data volume of the stream data stored in the playback buffer pool and the corresponding storage time of the historical stream data.
  18. 如权利要求10至17中任一项所述的装置,其特征在于,其中,The device according to any one of claims 10 to 17, wherein,
    所述获取模块,还用于在所述获取当前流数据之后,获取与所述当前流数据对应的标注标签,并获取所述线上预测模型所支持的至少一种预测标签;The acquiring module is further configured to acquire, after acquiring the current stream data, an annotation label corresponding to the current stream data, and acquire at least one prediction label supported by the online prediction model;
    所述训练模块,具体用于:The training module is specifically used for:
    如果所述标注标签属于所述至少一种预测标签,则根据所述概念漂移的程度值,结合所述当前流数据和目标流数据对所述线上预测模型进行在线训练;If the label label belongs to the at least one prediction label, performing online training on the online prediction model in combination with the current flow data and target flow data according to the degree value of the concept drift;
    如果所述标注标签不属于所述至少一种预测标签,则根据所述概念漂移的程度值,结合所述当前流数据和目标流数据对所述线上预测模型进行线下的更新训练。If the label label does not belong to the at least one prediction label, performing offline update training on the online prediction model in combination with the current flow data and the target flow data according to the degree value of the concept drift.
  19. 一种计算机设备,其特征在于,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时,实现如权利要求1至9中任一所述的方法。A computer device, characterized in that it comprises a memory, a processor, and a computer program stored on the memory and operable on the processor, when the processor executes the program, it realizes any one of claims 1 to 9. the method described.
  20. 一种非临时性计算机可读存储介质,当所述非临时性计算机可读存储介质中的指令由电子设备的处理器执行时,使得电子设备能够执行如权利要求1至9中任一项所述的方法。A non-transitory computer-readable storage medium, when the instructions in the non-transitory computer-readable storage medium are executed by the processor of the electronic device, the electronic device can perform the operation described in any one of claims 1 to 9. described method.
  21. 一种计算机程序产品,其特征在于,所述计算机程序产品中包括计算机程序代码,当所述计算机程序代码在计算机上运行时,实现如权利要求1至9中任一项所述的方法。A computer program product, characterized in that the computer program product includes computer program code, and when the computer program code is run on a computer, the method according to any one of claims 1 to 9 is realized.
  22. 一种计算机程序,其特征在于,所述计算机程序包括计算机程序代码,当所述计算机程序代码在计算机上运行时,使得计算机执行如权利要求1至9中任一项所述的方法。A computer program, characterized in that the computer program includes computer program code, and when the computer program code is run on a computer, the computer is made to execute the method according to any one of claims 1 to 9.
PCT/CN2022/092573 2021-06-01 2022-05-12 Method and apparatus for training prediction model, and computer device and storage medium WO2022252960A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110610089.3A CN113344196A (en) 2021-06-01 2021-06-01 Prediction model training method and device, computer equipment and storage medium
CN202110610089.3 2021-06-01

Publications (1)

Publication Number Publication Date
WO2022252960A1 true WO2022252960A1 (en) 2022-12-08

Family

ID=77474334

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/092573 WO2022252960A1 (en) 2021-06-01 2022-05-12 Method and apparatus for training prediction model, and computer device and storage medium

Country Status (2)

Country Link
CN (1) CN113344196A (en)
WO (1) WO2022252960A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116148801A (en) * 2023-04-18 2023-05-23 深圳市佰誉达科技有限公司 Millimeter wave radar-based target detection method and system
CN117786417A (en) * 2024-02-28 2024-03-29 之江实验室 Model training method, transient source identification method and device and electronic equipment

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113344196A (en) * 2021-06-01 2021-09-03 京东城市(北京)数字科技有限公司 Prediction model training method and device, computer equipment and storage medium
CN114422450B (en) * 2022-01-21 2024-01-19 中国人民解放军国防科技大学 Network traffic analysis method and device based on multi-source network traffic data
CN114444717A (en) * 2022-01-25 2022-05-06 杭州海康威视数字技术股份有限公司 Autonomous learning method, device, electronic equipment and machine-readable storage medium
CN115994611A (en) * 2022-10-25 2023-04-21 京东城市(北京)数字科技有限公司 Training method, prediction method, device and storage medium for category prediction model

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111143413A (en) * 2019-12-26 2020-05-12 太原科技大学 Anomaly detection method based on data flow concept drift
US20200151619A1 (en) * 2018-11-09 2020-05-14 Hewlett Packard Enterprise Development Lp Systems and methods for determining machine learning training approaches based on identified impacts of one or more types of concept drift
CN112231584A (en) * 2020-12-08 2021-01-15 平安科技(深圳)有限公司 Data pushing method and device based on small sample transfer learning and computer equipment
CN113344196A (en) * 2021-06-01 2021-09-03 京东城市(北京)数字科技有限公司 Prediction model training method and device, computer equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200034692A1 (en) * 2018-07-30 2020-01-30 National Chengchi University Machine learning system and method for coping with potential outliers and perfect learning in concept-drifting environment
CN112347416A (en) * 2020-10-30 2021-02-09 交控科技股份有限公司 Concept drift detection method and device for current data of turnout switch machine

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200151619A1 (en) * 2018-11-09 2020-05-14 Hewlett Packard Enterprise Development Lp Systems and methods for determining machine learning training approaches based on identified impacts of one or more types of concept drift
CN111143413A (en) * 2019-12-26 2020-05-12 太原科技大学 Anomaly detection method based on data flow concept drift
CN112231584A (en) * 2020-12-08 2021-01-15 平安科技(深圳)有限公司 Data pushing method and device based on small sample transfer learning and computer equipment
CN113344196A (en) * 2021-06-01 2021-09-03 京东城市(北京)数字科技有限公司 Prediction model training method and device, computer equipment and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116148801A (en) * 2023-04-18 2023-05-23 深圳市佰誉达科技有限公司 Millimeter wave radar-based target detection method and system
CN117786417A (en) * 2024-02-28 2024-03-29 之江实验室 Model training method, transient source identification method and device and electronic equipment
CN117786417B (en) * 2024-02-28 2024-05-10 之江实验室 Model training method, transient source identification method and device and electronic equipment

Also Published As

Publication number Publication date
CN113344196A (en) 2021-09-03

Similar Documents

Publication Publication Date Title
WO2022252960A1 (en) Method and apparatus for training prediction model, and computer device and storage medium
US11688404B2 (en) Fully supervised speaker diarization
CN112232416B (en) Semi-supervised learning method based on pseudo label weighting
CN108537176B (en) Target barrage identification method and device, terminal and storage medium
WO2019062417A1 (en) Application cleaning method and apparatus, storage medium and electronic device
US7353214B2 (en) Outlier determination rule generation device and outlier detection device, and outlier determination rule generation method and outlier detection method thereof
US20220004811A1 (en) Method and apparatus of training model, device, medium, and program product
CN109300179B (en) Animation production method, device, terminal and medium
US10339922B2 (en) Thematic segmentation of long content using deep learning and contextual cues
US9922034B2 (en) Displaying at least one categorized message based on a percentage
CN111651996A (en) Abstract generation method and device, electronic equipment and storage medium
US10592613B2 (en) Dialog flow evaluation
CN104516635B (en) Method, system and storage medium for managing content display
AU2021309929B2 (en) Anomaly detection in network topology
US20190164014A1 (en) Model maintenance device, pattern recognition system, model maintenance method, and computer program product
CN111160959B (en) User click conversion prediction method and device
CN110135912B (en) Information pushing method and device, server and storage medium
US20230325675A1 (en) Data valuation using reinforcement learning
CN111598678A (en) Incremental learning-based user financial risk identification method and device and electronic equipment
CN113826113A (en) Counting rare training data for artificial intelligence
WO2024087468A1 (en) Category prediction model training method, prediction method, device, and storage medium
US11526543B2 (en) Aggregate comment management from forwarded media content
CN111143517B (en) Human selection label prediction method, device, equipment and storage medium
CN110275779B (en) Resource acquisition method, device, equipment and storage medium
WO2022206244A1 (en) Reduced bandwidth consumption via generative adversarial networks

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22815007

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE