WO2018068742A1 - 数据处理方法和装置 - Google Patents

数据处理方法和装置 Download PDF

Info

Publication number
WO2018068742A1
WO2018068742A1 PCT/CN2017/105813 CN2017105813W WO2018068742A1 WO 2018068742 A1 WO2018068742 A1 WO 2018068742A1 CN 2017105813 W CN2017105813 W CN 2017105813W WO 2018068742 A1 WO2018068742 A1 WO 2018068742A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
time window
model
neural network
incremental
Prior art date
Application number
PCT/CN2017/105813
Other languages
English (en)
French (fr)
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 WO2018068742A1 publication Critical patent/WO2018068742A1/zh
Priority to US16/026,784 priority Critical patent/US11151451B2/en

Links

Images

Classifications

    • 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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/16Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/047Probabilistic or stochastic networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/049Temporal neural networks, e.g. delay elements, oscillating neurons or pulsed inputs
    • 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
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0241Advertisements
    • 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
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0241Advertisements
    • G06Q30/0242Determining effectiveness of advertisements

Definitions

  • the present application relates to the field of data processing, and in particular to a data processing method and apparatus.
  • Logistic Regression has been widely used in advertising data hit rate estimation in data processing.
  • the logistic regression model is a linear model, its limitation is that it is difficult to learn the original features and the nonlinear information in the feature combination.
  • constructing a deep neural network to estimate the click rate.
  • constructing a deep neural network ad click rate prediction can learn nonlinear information from the original features.
  • the task of deep neural network learning is to learn a click-rate estimation model based on given sufficient training data, and then use this learned model to predict user-to-advertising online in real time.
  • the data environment that is placed online by the Internet is rapidly changing.
  • the user group is rapidly changing, that is, new users are continuously added and users will continuously generate new behaviors and new points of interest; New data is constantly appearing, and old data will continue to be removed. Therefore, model updates for data processing must be fast enough to better accommodate the rapid changes in this data environment. In order to reflect the rapidly changing data environment, rapid model updates are required, which requires the training of the model to be completed in a limited time.
  • model training takes a lot of time. For example, a full-scale model training needs to be based on a randomly initialized model. After sufficient rounds of iteration using sufficient training data, a convergence model of the fully fitted data can be obtained. Since the data in the Internet is massive, and the model training itself takes a long time, involving a large amount of calculations will make the model training time longer, so it can not meet the needs of the model rapid update.
  • the embodiment of the present application provides a data processing method and apparatus to solve at least the technical problem of the problem that the data processing model in the related art cannot be quickly updated.
  • the embodiment of the present application provides a data processing method, the data processing method includes: acquiring first to-be-processed data input to a neural network, where the neural network is a model to be updated; Performing a first predetermined number of iterations on the neural network by using the first target data located in the first to-be-processed data to obtain a seed model of the neural network, where the first target data is located in the first time window.
  • the seed model is an initialization model of the neural network; acquiring first new data generated after a time corresponding to the first time window, and merging the first new data and the first pending data into a second standby Processing data; performing a second predetermined number of iterations on the seed model by using the second target data in the second to-be-processed data Practicing, obtaining a first incremental model of the neural network, wherein the second target data is located in a second time window, the second time window and the first time window having a first preset overlapping area;
  • the incremental model is published online.
  • the right boundary of the second time window matches the current time.
  • the method further includes:
  • the second incremental model is published online.
  • the model does not need to start training from the beginning, but the second new data and the second pending data are merged into the third to-be-processed data, and then the first The third target data in the three data to be processed performs the third predetermined number of iterative training on the first incremental model, and the second incremental model of the neural network is obtained, thereby greatly speeding up the update of the online model and being faster. Respond to changes in user behavior and the impact of new data on-line.
  • the right boundary of the third time window matches the first time.
  • the determining the third time window according to the first time and the second time window includes:
  • the third time window is determined according to a right boundary of the third time window and a left boundary of the third time window.
  • the method further includes:
  • the failure data is cleared from the first incremental model to obtain an updated incremental model
  • the update incremental model is published online.
  • Incremental mode The type is published online, so that the model can be reasonably sized, the size of the model is kept expanding, and meaningless data is delivered, thereby realizing the technical effect of quickly updating the model of data processing.
  • the failing data is cleared from the first incremental model to obtain the updated incremental model, including:
  • the method further includes:
  • the third incremental model is published online.
  • the right boundary of the fifth time window coincides with the second time.
  • the method further includes :
  • the historical data is fitted by the first incremental model to obtain a fitting result, wherein the historical data is the processed data to be processed;
  • the fitting result is carried by the first incremental model.
  • the seed model is subjected to a second predetermined number of iterative trainings by using the first data to be processed in the second time window, and the first incremental model of the neural network is obtained, and then the first incremental model is used for the history.
  • the data is fitted to obtain the fitting result, and the first incremental model carries the fitting result, and the incremental training of the model is realized, so that the model always carries the fitting state to all the historical data, and the fitting prediction is improved. Estimate the effect of accuracy.
  • the first predetermined number of iterations of the neural network is performed by using the first target data in the first to-be-processed data, including:
  • a cold start state In a cold start state, a random initialization process is performed on each layer parameter of the neural network to obtain an initialization parameter, wherein the cold start state is a state when the neural network is first processed;
  • the first predetermined number of iterations of the neural network is trained by the first target data and the initialization parameter to obtain a seed model of the neural network.
  • the layer parameters of the neural network are randomly initialized, including but not limited to one of the following methods:
  • Gaussian distribution random initialization processing is performed on each layer parameter of the neural network
  • Xavier initialization processing is performed on each layer parameter of the neural network.
  • the method is applied to a preset scenario, where the preset scenario includes but is not limited to one of the following:
  • the second preset number of times is less than or equal to the first preset number of times.
  • the third preset number of times is less than or equal to the first preset number of times.
  • the fourth preset number of times is less than or equal to the first preset number of times.
  • the embodiment of the present application provides a data processing apparatus, where the data processing apparatus includes: a first acquiring unit, configured to acquire first to-be-processed data input to a neural network, where the neural network is to be updated. a first iteration unit, configured to perform a first predetermined number of iterative training on the neural network by using the first target data in the first to-be-processed data to obtain a seed model of the neural network, where the first target data Located in the first time window, the seed model is an initialization model of the neural network; the second obtaining unit is configured to acquire first new data generated after the time corresponding to the first time window, and the first new data The incremental data and the first to-be-processed data are merged into the second to-be-processed data; the second iteration unit is configured to perform the second predetermined number of iterative training on the seed model by using the second target data in the first to-be-processed data Obtaining a first incremental model of the neural network, wherein
  • the right boundary of the second time window matches the current time.
  • the device further includes:
  • a first determining unit configured to determine a third time window according to the first time and the second time window after the first incremental model is published online, wherein the third time window and the second time window Having a second preset overlap area;
  • a third acquiring unit configured to acquire second added data generated after a time corresponding to the second time window, and merge the second newly added data and the second to-be-processed data into third to-be-processed data;
  • a third iteration unit configured to perform a third predetermined number of iterations training on the first incremental model by using the third target data in the third to-be-processed data, to obtain a second incremental model of the neural network, where The third target data is located in the third time window;
  • a second publishing unit configured to publish the second incremental model online.
  • the right boundary of the third time window coincides with the first time.
  • the first determining unit includes:
  • a determining module configured to determine whether there is indication information for pushing a new model, wherein the new model includes the second incremental model
  • a determining module when determining the indication information, determining the first time as a right boundary of the third time window, sliding the second time window to a right boundary of the third time window, and The right edge of the third time window is moved forward to the length of the third time window to obtain the left boundary of the third time window, and the third time is determined according to the right boundary of the third time window and the left boundary of the third time window. window.
  • the device further includes:
  • a determining unit configured to determine, according to a preset period, whether there is invalid data in the first incremental model after the first incremental model is published online, wherein the invalid data is the first pending data that stops pushing ;
  • a clearing unit configured to determine that the invalid data exists in the first incremental model according to the preset period, and clear the invalid data from the first incremental model to obtain an updated incremental model
  • the third issuing unit is configured to publish the updated incremental model online.
  • the clearing unit includes:
  • An expansion module configured to expand the second time window by a preset multiple to obtain a fourth time window
  • An acquiring module configured to acquire second to-be-processed data in the first incremental model, where the second to-be-processed data is used as the invalidation data, where the second to-be-processed data is not in the fourth time window;
  • a clearing module configured to clear the invalid data from the first incremental model to obtain the updated incremental model.
  • the device further includes:
  • a second determining unit configured to determine a fifth time window according to the second time and the fourth time window, wherein the fifth time window and the fourth time window have a third preset overlapping area
  • a fourth acquiring unit configured to acquire third added data generated after a time corresponding to the fourth time window, and merge the third added data and the second pending data into fourth to-be-processed data;
  • a fourth iteration unit configured to perform a fourth predetermined number of iterations training on the update incremental model by using the fourth target data in the fourth to-be-processed data, to obtain a third incremental model of the neural network, where The fourth target data is located in the fifth time window;
  • the fourth issuing unit is configured to publish the third incremental model online.
  • the right boundary of the fifth time window meets the second time.
  • the device further includes:
  • a fitting unit configured to fit the historical data by the first incremental model to obtain a fitting result, wherein the historical data is the processed data to be processed
  • a carrying unit for carrying the fitting result by the first incremental model.
  • the first iteration unit includes:
  • a processing module configured to perform random initialization processing on each layer parameter of the neural network in a cold start state to obtain an initialization parameter, where the cold start state is a state when the neural network is first processed;
  • An iterative module is configured to perform the first predetermined number of iterations training on the neural network by using the first target data and the initialization parameter to obtain a seed model of the neural network.
  • the layer parameters of the neural network are randomly initialized, including but not limited to one of the following methods:
  • Gaussian distribution random initialization processing is performed on each layer parameter of the neural network
  • Xavier initialization processing is performed on each layer parameter of the neural network.
  • the device is applied to a preset scenario, where the preset scenario includes but is not limited to one of the following:
  • the second preset number of times is less than or equal to the first preset number of times.
  • the third preset number of times is less than or equal to the first preset number of times.
  • the fourth preset number of times is less than or equal to the first preset number of times.
  • an embodiment of the present application provides a data processing terminal, where the terminal includes a processor and a memory:
  • the memory is configured to store program code and transmit the program code to the processor
  • the processor is operative to perform the data processing method of any one of claims 1-16 in accordance with instructions in the program code.
  • the embodiment of the present application provides a storage medium, wherein the storage medium is configured to store a program code, and the program code is used to execute the data processing method according to any one of claims 1-16. .
  • the embodiment of the present application provides a computer program product including instructions, which, when run on a computer, causes the computer to execute the data processing method according to any one of claims 1-16 .
  • an embodiment of the present application provides a data processing method, including:
  • the data processing device acquires first to-be-processed data input to the neural network, wherein the neural network is a model to be updated;
  • the data processing device performs the first predetermined number of iterations training on the neural network by using the first target data in the first to-be-processed data to obtain a seed model of the neural network, where the first target data is located at the first time.
  • the seed model is an initialization model of the neural network
  • the data processing device acquires the first new data generated after the time corresponding to the first time window, and merges the first new data and the first pending data into the second to-be-processed data;
  • the data processing device performs a second predetermined number of iterative training on the seed model by using the second target data in the second to-be-processed data to obtain a first incremental model of the neural network, where the second target data is located In the second time window, the second time window and the first time window have a first preset overlapping area;
  • the data processing device publishes the first incremental model online.
  • the right boundary of the second time window matches the current time.
  • the method further includes:
  • the data processing device determines a third time window according to the first time and the second time window, wherein the third time window and the second time window have a second preset overlapping area;
  • the data processing device acquires second added data generated after the time corresponding to the second time window, and merges the second added data and the second pending data into the third pending data;
  • the data processing device performs a third predetermined number of iterative training on the first incremental model by using the third target data in the third to-be-processed data to obtain a second incremental model of the neural network, where the third The target data is located in the third time window;
  • the data processing device publishes the second incremental model online.
  • a right boundary of the third time window meets the first time.
  • the data processing device determines the third time window according to the first time and the second time window, including:
  • the data processing device determines whether there is indication information for pushing a new model, wherein the new model includes the second incremental model;
  • the data processing device determines the first time as a right boundary of the third time window
  • the data processing device slides the second time window to a right boundary of the third time window, and the third time window
  • the right boundary of the mouth moves forward the length of the third time window to obtain the left boundary of the third time window;
  • the data processing device determines the third time window based on a right boundary of the third time window and a left boundary of the third time window.
  • the method further includes:
  • the data processing device determines, according to a preset period, whether there is invalid data in the first incremental model, where the invalid data is the first pending data that stops pushing;
  • the data processing device clears the failure data from the first incremental model to obtain an updated incremental model
  • the data processing device publishes the update incremental model online.
  • the data processing device clears the invalid data from the first incremental model to obtain the updated incremental model, including:
  • the data processing device expands the second time window by a preset multiple to obtain a fourth time window
  • the data processing device acquires the second to-be-processed data in the first incremental model, and uses the second to-be-processed data as the invalid data, wherein the second to-be-processed data is not in the fourth time window;
  • the invalidation data is cleared in an incremental model to obtain the updated incremental model.
  • the method further includes:
  • the data processing device determines a fifth time window according to the second time and the fourth time window, wherein the fifth time window and the fourth time window have a third preset overlapping area;
  • the data processing device acquires third added data generated after the time corresponding to the fourth time window, and merges the third new data and the second pending data into fourth to-be-processed data;
  • the data processing device performs a fourth predetermined number of iterative training on the updated incremental model by using the fourth target data in the fourth to-be-processed data to obtain a third incremental model of the neural network, wherein the fourth target The data is located in the fifth time window;
  • the data processing device publishes the third incremental model online.
  • a right boundary of the fifth time window meets the second time.
  • the method also includes:
  • the data processing device fits the historical data by using the first incremental model to obtain a fitting result, wherein the historical data is the processed data to be processed;
  • the data processing device carries the fitting result through the first incremental model.
  • the data processing device passes the first in the first to-be-processed data.
  • a target data performs the first predetermined number of iterative training on the neural network, including:
  • the data processing device performs random initialization processing on each layer parameter of the neural network to obtain an initialization parameter, where the cold start state is a state when the neural network is first processed;
  • the data processing device performs the first predetermined number of iterative training on the neural network by using the first target data and the initialization parameter to obtain a seed model of the neural network.
  • the data processing device performs random initialization processing on the layer parameters of the neural network, including but not limited to one of the following methods:
  • the data processing device performs an average distribution random initialization process on each layer parameter of the neural network
  • the data processing device performs a Gaussian distribution random initialization process on each layer parameter of the neural network
  • the data processing device performs Xavier initialization processing on each layer parameter of the neural network.
  • the method is applied to a preset scenario, where the preset scenario includes one of the following:
  • the second preset number of times is less than or equal to the first preset number of times.
  • the third preset number of times is less than or equal to the first preset number of times.
  • the fourth preset number of times is less than or equal to the first preset number of times.
  • the first to-be-processed data input to the neural network is obtained, where the neural network is a model to be updated; and the first target data in the first to-be-processed data is located in the first time window to the neural network.
  • the seed model is preset based on the target data including the newly added data directly on the seed model. Iterative training of the number of times, the incremental model of the neural network is obtained, and the incremental model is published online, thereby achieving the purpose of updating and releasing the incremental model, thereby realizing the technical effect of rapidly updating the data processing model. Solved the problem that the model of data processing cannot be updated quickly.
  • FIG. 1 is a schematic diagram showing a hardware environment of a data processing method according to an embodiment of the present application
  • FIG. 2 is a flow chart showing a data processing method according to an embodiment of the present application.
  • FIG. 3 is another flow chart of a data processing method according to an embodiment of the present application.
  • FIG. 4 is a flow chart showing a method of determining a third time window according to a first time and a second time window according to an embodiment of the present application
  • FIG. 5 is another flow chart of a data processing method according to an embodiment of the present application.
  • FIG. 6 is a flow chart showing a method of clearing failure data from a first incremental model in accordance with an embodiment of the present application
  • FIG. 7 is another flow chart of a data processing method according to an embodiment of the present application.
  • FIG. 8 is another flow chart of a data processing method according to an embodiment of the present application.
  • FIG. 9 is a flowchart showing a method for performing a first predetermined number of iterative training on a neural network by using first target data located in a first time window in the first to-be-processed data according to an embodiment of the present application;
  • FIG. 10 is a schematic diagram showing a fully connected structure of a deep neural network according to an embodiment of the present application.
  • FIG. 11 is another flow chart of a data processing method according to an embodiment of the present application.
  • FIG. 12 is a schematic diagram of periodically clearing a fail key according to an embodiment of the present application.
  • FIG. 13 is a schematic diagram of a data processing apparatus according to an embodiment of the present application.
  • FIG. 14 is another schematic diagram of another data processing apparatus according to an embodiment of the present application.
  • FIG. 15 is another schematic diagram of another data processing apparatus according to an embodiment of the present application.
  • FIG. 16 is another schematic diagram of another data processing apparatus according to an embodiment of the present application.
  • FIG. 17 is another schematic diagram of another data processing apparatus according to an embodiment of the present application.
  • FIG. 18 is a structural block diagram of a terminal according to an embodiment of the present application.
  • the embodiment of the present application provides a data processing method and device, so as to achieve the purpose of updating the incremental model, and realize the technical effect of quickly updating the model of the data processing, so that the model of the data processing cannot be quickly updated. The problem.
  • the model of the data processing can be used to fit the historical exposure data by learning, and has the function of estimating the click rate of the data click in a certain period of time, for example, the advertisement click rate in the data processing.
  • the estimated model has the effect of estimating the click rate of the ad for a period of time in the future.
  • the data processing method provided by the embodiment of the present application can be applied to a preset scenario, in which the click stream data is generated extremely rapidly, and a large amount of exposure data can be generated every day, for example, a click on a media file.
  • CTR Click-Through-Rate
  • the advertisement exposure data includes context features such as advertisement content, user content, and time
  • the advertisement exposure data is valuable annotation data, wherein whether the data is labeled data can be determined by whether the user clicks on a data.
  • the model for estimating the click rate needs to be updated quickly, and on the other hand, because the click rate prediction model is required to fit a large amount of history. Data to learn the invariant characteristics of the user's click behavior pattern. Therefore, for the update training of the data processing model, it is very wasteful to discard the previously trained model and train the model from scratch.
  • the incremental data update model may be used to train the data processing model, for example, the incremental update method is used to train the advertisement click rate estimation model.
  • the incremental update method is used to train the data processing model, so as to achieve the purpose of updating the incremental model. , in turn, to achieve the technical effect of quickly updating the model of data processing.
  • FIG. 1 is a schematic diagram of a hardware environment of a data processing method according to an embodiment of the present application, in which at least a server 101 and a terminal 102 are included.
  • the server 101 can communicate with the terminal 102 through a network, where the network can be a wide area network, a metropolitan area network, or a local area network.
  • the network can be a wide area network, a metropolitan area network, or a local area network.
  • the network can be a wide area network, a metropolitan area network, or a local area network.
  • other types of networks can also be used. limited.
  • the terminal 102 can be understood as a user terminal, which can be a mobile phone, a tablet computer, an e-book reader, and a motion picture expert to compress a standard audio layer 3 (Moving Picture Experts Group Audio Layer III, referred to as MP3) Player, Motion Picture Experts Compress Standard Audio Level IV (MP4) player, laptop portable computer and desktop computer, and so on.
  • MP3 Motion Picture Experts Group Audio Layer III
  • MP4 Motion Picture Experts Compress Standard Audio Level IV
  • the data processing method in the embodiment of the present application may be executed by the server 101, may be performed by the terminal 102, or may be jointly performed by the server 101 and the terminal 102, where the terminal 102 executes the embodiment of the present application.
  • the data processing method can also be executed by the client installed on it. This is not the case here.
  • the executor of the embodiment is arbitrarily limited as long as it is a data processing device having data processing capabilities.
  • the data processing method may include the following steps:
  • the first to-be-processed data input in the neural network may be the training data. Since the training data includes the exposure log, the first to-be-processed data may include at least a One-Hot Encoding vector, where The unique heat coding vector is obtained by discretizing the feature combination of the user characteristics and the data in the exposure log.
  • the first to-be-processed data input by the deep neural network may include a unique thermal coding vector, which is based on each The combination of user characteristics and ad features in the ad exposure log is discretized, and is suitable for deep learning of the ad click rate estimation scenario.
  • the unique heat coding is a processing method for the segmentation feature of the attribute class. For each feature, if the feature has M possible values, then the feature is subjected to the unique heat coding process. Becomes M (0-1) binary features. Since these binary features are mutually exclusive, only one binary feature can be activated at a time, wherein if activated, the possible value is 1, and if it is not activated, the possible value is 0. Therefore, after the unique heat encoding process, The data will become sparse.
  • the neural network is a model to be updated, for example the neural network may be a deep neural network to be updated.
  • the deep neural network consists of neurons, in particular, the deep neural network may consist of neuronal connections of a Multi-Layer Perceptron (MLP) neural network with two hidden layers. Since the deep neural network includes non-zero elements in an input vector, neuron participation is required in every back propagation calculation of neural network training. Therefore, deep neural networks are more complicated than general neural networks.
  • MLP Multi-Layer Perceptron
  • the model of the data processing may be initialized, and further, the model of the data processing may be randomly initialized.
  • the cold start state In the cold start state, the current time is backtracked, and the first time window can be determined.
  • the first time window is also a sliding data window, which is a fixed data window during cold start training.
  • the cold start state is a state when the neural network is processed for the first time, and is a software startup state, for example, may be a processing state after the fault recovery.
  • the time span of the first target data may be (the current time minus the time corresponding to the first time window, the current time), and the first target data located in the first time window in the first to-be-processed data may be
  • the neural network performs the first predetermined number of iterative trainings to obtain a seed model of the neural network, wherein the first preset number is the number of iterations of iterating over the neural network by the first target data, and each iteration training Have a learning step.
  • the seed model is an initialization model of the neural network, and is not released online for the time being, and the seed model is also the first model for starting the incremental update training of the model, which can be cold start, random initialization, and use a certain time window.
  • the mouth data is obtained by performing multiple iterations of training.
  • the seed model of the neural network can be obtained by training the model one iteration using the click exposure data in the first time window.
  • the first target data After the first predetermined number of iterations of the neural network are trained by the first target data to obtain the seed model of the neural network, if the first new data is generated after the time corresponding to the first time window, Then, the first added data may be obtained, and the first added data and the first pending data are combined to obtain second to-be-processed data, where the second to-be-processed data is a data object to be processed next.
  • S204 Perform a second predetermined number of iterations training on the seed model by using the second target data in the second time window in the second to-be-processed data to obtain a first incremental model of the neural network, where the second time window is The first time window has a first preset overlapping area, and the second preset number of times is less than or equal to the first preset number of times.
  • the seed model is trained in an incremental update manner, that is, the seed model is increased once. Volume update training.
  • the second time window may be obtained by using the first time window.
  • the right time boundary of the sliding first time window may be matched to the current time by sliding the first time window based on the seed model.
  • the right boundary of the sliding first time window may be used as the right boundary of the second time window, that is, the right boundary of the second time window may fit the current time.
  • the length of the second time window is acquired, and then the right boundary of the second time window is moved forward by the length of the second time window to obtain the left boundary of the second time window. After obtaining the left and right boundaries of the second time window, the second time window is obtained.
  • the second target data training model in the second time window may be iterated for a second predetermined number of iterations to obtain a first incremental model, and the first incremental model may estimate data when pushing the online line.
  • the click rate in which each iteration training has a learning step size.
  • the second preset number of times may be less than or equal to the first preset number of times.
  • the second click time of the advertisement click exposure data training model in the second time window may be used to obtain a first incremental model, and the first incremental model may be pushed. Estimated ad click rate when going online.
  • the length of the second time window may be the same as the length of the first time window, or may be different, and the length of the second time window is not limited herein.
  • the left boundary of the first time window is 00:00 of the day
  • the right border of the first time window is 23:00 of the day
  • the current time It is 23:10. Since the right boundary of the first time window is different from the current time by 10 minutes, it is necessary to slide the first time window to the right for 10 minutes, and the left boundary of the second time window is 00:10 of the current day, and the right of the second time window.
  • the boundary is 23:10 of the day (ie, the current time), thereby achieving the purpose of determining the second time window based on the current time and the first time window.
  • the length of time of the first time window described above is different from the length of the second time window. Assuming that the length of the first time window is 23 hours, the left boundary of the first time window is 00:00 of the day, the right border of the first time window is 23:00 of the day, and the length of the second time window is 22 hours, and The current time is 23:10. Due to the first time window The right boundary and the current time are different by 10 minutes.
  • the right boundary of the first time window is 23:10 of the current day (that is, the current time)
  • the right boundary of the second time window is 23:10 of the current day (that is, the current time)
  • the second The left boundary of the time window is 22 hours forward of the right boundary of the second time window, that is, the left boundary of the second time window is 01:10 of the current day, thereby determining the second time according to the current time and the first time window.
  • the first incremental model is released online, that is, the first incremental model is Push online to estimate the click-through rate of the data until the next new model push.
  • the first incremental model should appropriately reduce the model learning step size to avoid some training weights leaving the most advantageous. Therefore, in a possible implementation manner of this embodiment, the learning step size should be less than or equal to the learning step size used in the last iteration of the seed model training phase.
  • the model of data processing adopts the method of incremental update training, and the number of iterations of training each time is less than or equal to the number of iterations required for the fixed data window, the update speed of the online model is greatly accelerated, and the response can be faster. Changes in user behavior and the impact of new data on the line.
  • the model can memorize more persistent user information and data information, it is more accurate to fit the behavior of long-term data delivery and user click behavior.
  • the deep neural network has stronger expression ability, and the ability to fit the nonlinear characteristics of the data is stronger, and the weight of the incremental model is more than The processing capability is stronger, so that the CTR can be estimated more accurately, and the ability to estimate the click rate of the advertisement can be improved.
  • the above technical solution is preferably applied to a method for processing the first data to be processed in the deep neural network.
  • the first to-be-processed data input to the neural network may be obtained, wherein the neural network is a model to be updated; and the first target data pair located in the first time window in the first to-be-processed data
  • the neural network performs the first predetermined number of iterative training to obtain a seed model of the neural network, wherein the seed model is an initialization model of the neural network; acquiring the first new data generated after the time corresponding to the first time window, and The first new data and the first to-be-processed data are merged into the second to-be-processed data; and the seed model is subjected to a second predetermined number of iterative training through the second target data in the second to-be-processed data in the second time window.
  • a first incremental model of the neural network is obtained, wherein the second time window and the first time window have a first predetermined overlapping area.
  • the second preset number of times may be less than or equal to the first preset number of times; and the first incremental model is released online, thereby solving the problem that the model of the data processing cannot be updated quickly, thereby achieving fast Update the technical effects of the data processing model.
  • the above embodiment achieves the purpose of quickly updating the model in the data processing in order to avoid the time overhead caused by the de novo training of the model.
  • the third time window is determined according to the first time and the second time window, and the third incremental data is located in the third time window in the third pending data. Perform a third preset number of iterative training to obtain a second incremental model of the neural network, and publish the second incremental model online.
  • FIG. 3 is a flow chart of another data processing method in accordance with an embodiment of the present application. As shown in FIG. 3, the data processing method further includes the following steps:
  • the third time window is determined according to the first time and the second time window, wherein the third time window and the second time window There is a second preset overlapping area.
  • the second incremental update training is performed on the model in the data processing. And sliding the second time window according to the first incremental model, so that the right boundary of the second time window after the sliding fits the first time, and determines the right time of the third time window by the first time, that is, the third time window The right boundary coincides with the first time, thereby obtaining a third time window having a temporal overlap with the second time window.
  • the first time can be any time, of course, it can also be understood as the current time corresponding to the second incremental update training.
  • the second new data is generated after the time corresponding to the second time window, and the second added data is acquired, and the second added data and the second are generated.
  • the data to be processed is merged into the third to-be-processed data, which is the data object to be processed next.
  • the first incremental model is trained in an incremental update manner, that is, the first An incremental model performs an incremental update training.
  • the third incremental model is trained by the third target data training model in the third time window to obtain a second incremental model, and the second incremental model can estimate the click rate of the data when pushing the online, wherein each iteration Training has a learning step.
  • the third preset number of times may be less than or equal to the first preset number of times.
  • the third click time of the advertisement click exposure data training model in the third time window may be used to obtain a second incremental model, and the second incremental model may be pushed. Estimated ad click rate when going online.
  • This embodiment can be used to train the deep learning model for the advertisement click rate estimation based on the massive data, avoiding the time overhead brought by the model de novo training, and achieving the purpose of quickly updating the model.
  • the second incremental model is released online, that is, the second incremental model is Push online to estimate the click-through rate of the data until the next new model push.
  • the second incremental model should appropriately reduce the model learning step size to avoid some training weights leaving the most advantageous. Therefore, in a possible implementation manner of this embodiment, the learning step size should be less than or equal to the learning step size used in the last iteration of the seed model training phase.
  • the third time window is determined according to the first time and the second time window, wherein the third time window and the second time window have a second preset overlapping area Obtaining second added data generated after the time corresponding to the second time window, and combining the second added data and the second pending data into the third pending data; and the third pending data is located in the third
  • the third target data in the time window performs the third predetermined number of iterative training on the first incremental model to obtain the second incremental model of the neural network; the second incremental model is released online, and the data processing is realized.
  • the update of the model in the model achieves the effect of quickly updating the model in the data processing.
  • the step of “determining the third time window according to the first time and the second time window” in S301 may include: when it is determined that there is indication information for pushing the new model, The first time is determined as the right boundary of the third time window, the second time window is swept to the right boundary of the third time window, and the right boundary of the third time window is moved forward by the length of the third time window to obtain the third time. The left boundary of the window determines a third time window based on the right boundary of the third time window and the left boundary of the third time window.
  • the method for determining a third time window according to the first time and the second time window comprises the following steps:
  • S401 Determine whether there is indication information for pushing a new model, where the new model includes a second incremental model.
  • the new model After the first incremental model is published online, it is necessary to determine whether there is indication information for pushing the new model, wherein the new model includes a second incremental model, that is, whether it is necessary to determine whether to push the second increment.
  • the indication of the model is, whether it is necessary to determine whether to push the second increment.
  • S402. Determine the first time as the right boundary of the third time window, slide the second time window to the right boundary of the third time window, and move the right boundary of the third time window forward by the length of the third time window to obtain
  • the left boundary of the third time window determines the third time window according to the right boundary of the third time window and the left boundary of the third time window.
  • the first time may be determined as the right boundary of the third time window, specifically, by sliding the second time.
  • the window is to the first time, so that the right boundary of the second time window after the sliding fits the first time, thereby obtaining the right boundary of the third time window.
  • the right boundary of the third time window is moved forward by the length of the third time window, and the left boundary of the third time window can be obtained, so that the right boundary of the third time window and the left boundary of the third time window can be obtained.
  • the second incremental update training is performed on the model of the data processing.
  • the second time window may be slid such that the right boundary of the second time window after the sliding fits the first time, and the right boundary of the second time window after the sliding is the right boundary of the third time window .
  • the length of the third time window is acquired, and then the right boundary of the third time window is moved forward by the length of the third time window to obtain the left boundary of the third time window.
  • the third time window can be determined according to the right and left boundaries of the third time window.
  • the length of the third time window may be the same as the length of the second time window, or may be different, and the length of the third time window is not limited herein.
  • the length of time of the second time window described above is the same as the length of the third time window. Assume that the length of the second time window and the length of the third time window are both 23 hours, the left boundary of the second time window is 00:00 of the day, and the right border of the second time window is 23:00 of the day, and the first The time is 23:10.
  • the right boundary of the second time window is different from the first time by 10 minutes, it is necessary to slide the second time window to the right for 10 minutes to obtain the left boundary of the third time window as 00:10 of the current day, and the third time window
  • the right border is 23:10 of the day (ie, the first time), thereby achieving the purpose of determining the third time window according to the first time and the second time window.
  • the length of time of the second time window described above is different from the length of the third time window. Assuming that the length of the second time window is 23 hours, the left border of the second time window is 00:00 of the day, the right border of the second time window is 23:00 of the day, and the length of the third time window is 22 hours, and The first time is 23:10.
  • the right boundary of the second time window is different from the first time by 10 minutes, it is necessary to slide the right boundary of the second time window to the right for 10 minutes, and the right boundary of the third time window is 23:10 of the day (ie, , the first time), the left boundary of the third time window is 22 hours forward for the right boundary of the third time window, that is, the left boundary of the third time window is 01:10 of the day, thereby achieving the first time according to the first time And the second time window determines the purpose of the third time window.
  • the embodiment determines whether there is indication information for pushing a new model, wherein the new model includes a second incremental model; if the indication information is determined, determining the first time as the right boundary of the third time window, sliding the second The time window is to the right boundary of the third time window, and the right boundary of the third time window is moved forward by the length of the third time window to obtain the left boundary of the third time window, according to the right boundary and the third time of the third time window The left boundary of the window determines a third time window, and the purpose of determining the third time window according to the first time and the second time window is achieved.
  • each data has a certain lifetime. When the data is delivered for more than the scheduled delivery time, the data will be off the shelf and the data will become invalid data. Estimating the data from the shelves is meaningless.
  • the failure data may be determined in the first incremental model according to the preset period.
  • the failure data is cleared in the first incremental model, the updated incremental model is obtained, and the updated incremental model is published online.
  • FIG. 5 is a flowchart of another data processing method according to an embodiment of the present application. As shown in FIG. 5, the data processing method further includes the following steps:
  • S501 Determine, according to a preset period, whether there is invalid data in the first incremental model.
  • the failure data is periodically removed from the model, the key values of the failed data can be periodically removed from the model. Therefore, for the first incremental model, after the first incremental model is published on the line, whether the above-mentioned failure data exists in the first incremental model may be determined according to a preset period.
  • the failure data is cleared from the first incremental model to obtain an updated incremental model.
  • the first incremental model After determining whether the failure data exists in the first incremental model according to the preset period, if the first incremental model has failure data according to the preset period, that is, the data in the first incremental model changes with time, When the rack is stopped, the data of the off-site stop is removed from the first incremental model, and the updated incremental model without the invalid data is obtained, so that the model maintains a reasonable size, and the size of the model is continuously expanded, and the Meaningless data.
  • the updated incremental model is pushed online to estimate the click rate of the data.
  • the embodiment determines whether there is invalid data in the first incremental model according to the preset period, wherein the invalid data may be the first pending data that stops pushing. If it is determined according to the preset period that the failure data exists in the first incremental model, the failure data is cleared from the first incremental model, and an updated incremental model without the failure data is obtained, and then the updated incremental model is performed. Released to keep the model at a reasonable size, avoiding the size of the model from expanding, and delivering meaningless data, thus achieving the technical effect of quickly updating the model of data processing.
  • the step of “clearing the failure data from the first incremental model to obtain the updated incremental model” in S502 may include: acquiring the second incremental window in the first incremental model Expanding the second to-be-processed data in the fourth time window obtained by the preset multiple, and using the second to-be-processed data that is not in the fourth time window in the first incremental model as the failure data; and clearing the failure from the first incremental model Data, get the updated incremental model.
  • FIG. 6 is a flow chart of a method of clearing invalidation data from a first incremental model, in accordance with an embodiment of the present application. As shown in FIG. 6, the method for clearing the failure data from the first incremental model to obtain the updated incremental model includes the following steps:
  • the second time window is expanded according to the preset multiple of the time extension, and the fourth is obtained.
  • Time window is used as a barrier, that is, the boundary of the fourth time window is used as a criterion for judging whether the data is the invalid data. If the data is in the fourth time window, the data may be regarded as not invalid data, if the data If it is not in the fourth time window, the data can be considered as invalid data.
  • the second to-be-processed data that is not in the fourth time window in the first incremental model may be acquired, and the second to-be-processed data is used as the failure data in the first incremental model. That is, the feature in the first incremental model that is not in the fourth time window may be acquired, and the feature may be used as the failure data in the first incremental model, wherein the first incremental model is not in the fourth Features within the time window can be representative of neurons of the neural network.
  • the second to-be-processed data may be used as the failure data in the first incremental model. Then, the second to-be-processed data (ie, the failed data) is cleared from the first incremental model to obtain an updated incremental model, that is, the features in the first incremental model that are not in the fourth time window are cleared, and the update is increased. Quantity model.
  • the above method for clearing the failure data is also applicable to the method of clearing the failure data from the second incremental model, and the method of clearing the failure data in the subsequent generation of the new model in the process of subsequent model training, no longer here. Narration.
  • the second time window is obtained by expanding the second time window by a preset multiple; and the second to-be-processed data in the first incremental model that is not in the fourth time window is obtained, where the first incremental model is not present.
  • the second to-be-processed data in the fourth time window is used as the failure data; the failure data is cleared from the first incremental model, and the updated incremental model is obtained, and the failure data is cleared from the first incremental model, and the updated incremental model is obtained.
  • the purpose of the model is to maintain a reasonable size, which in turn achieves the technical effect of quickly updating the model of data processing.
  • the fifth time window may be determined according to the second time and the fourth time window, and the update is performed according to the fourth pending data pair in the fifth time window.
  • the quantity model performs the iterative training for the fourth preset number of times, obtains the third incremental model of the neural network, and publishes the third incremental model online.
  • FIG. 7 is a flowchart of another data processing method according to an embodiment of the present application. As shown in FIG. 7, the data processing method further includes the following steps:
  • the fifth time window may be determined according to the second time and the fourth time window, wherein the fifth time window and the fourth time window have a third Preset overlapping areas.
  • a fifth time window is determined according to the second time and the fourth time window, the fifth time window and the fourth time window having a third preset overlapping area.
  • the second time may be determined as the right boundary of the fifth time window, that is, the right boundary of the fifth time window may fit the second time.
  • the right boundary of the fourth time window after the sliding can be matched to the second time by sliding the fourth time window to the second time, thereby obtaining the right boundary of the fifth time window. Then, the right boundary of the fifth time window is moved forward by the length of the fifth time window, and the left boundary of the fifth time window is obtained.
  • the fifth time window can be determined according to the right boundary of the fifth time window and the left boundary of the fifth time window.
  • the second time can be any time.
  • it can also be understood as the current time corresponding to the third incremental update training.
  • the third new data is generated after the time corresponding to the fourth time window, and the third added data is acquired, and the third added data and the first
  • the data to be processed is merged into the fourth to-be-processed data, and the fourth to-be-processed data can be used as the data object to be processed next.
  • S703 Perform a iterative training on the updated incremental model for the fourth predetermined number of times by using the fourth target data in the fifth time window in the fourth to-be-processed data to obtain a third incremental model of the neural network.
  • the iterative training is performed on the updated incremental model according to the fourth target data in the fifth time window to obtain a third incremental model of the neural network.
  • the fourth target data may be advertisement click exposure data, that is, the update incremental model may be iterated by the advertisement click exposure data for a fourth preset number of times.
  • the fourth preset number of times may be less than or equal to the first preset number of times.
  • the method of clearing the failure data from the first incremental model is also applicable to the method of clearing the invalid data from the third incremental model, that is, the method of clearing the invalid data in the model can also be adopted. The method for clearing the invalid data from the first incremental model is not described here.
  • the embodiment determines a fifth time window according to the second time and the fourth time window, after the push update incremental model is online, wherein the fifth time window and the fourth time window have a third preset overlapping area;
  • the fourth target data in the fifth time window in the data to be processed performs the fourth predetermined number of iterative training on the updated incremental model to obtain a third incremental model of the neural network; and the third incremental model is released online.
  • the technical effect of the model for quickly updating data processing is achieved.
  • the seed model is subjected to a second predetermined number of iterative trainings by using the first data to be processed in the second time window, and after obtaining the first incremental model of the neural network, the first The incremental model fits the historical data to obtain the fitting result, and the fitting result is carried by the first incremental model.
  • FIG. 8 is a flowchart of another data processing method according to an embodiment of the present application. As shown in FIG. 8, the data processing method further includes the following steps:
  • the historical data is fitted by the first incremental model to obtain a fitting result.
  • the seed model is subjected to a second predetermined number of iterative trainings through the first data to be processed in the second time window, and after obtaining the first incremental model of the neural network, An incremental model fits the historical data to obtain a fitting result, wherein the historical data may be processed pending data.
  • the advertisement history exposure data can be fitted by learning so that the fitting result has the effect of predicting the advertisement click rate in a future period of time.
  • the historical data is fitted by the first incremental model, and after the fitting result is obtained, the fitting result is carried by the first incremental model.
  • model incremental training the model always carries the fitting state of all historical data.
  • the model of incremental training through the model can recognize the user behavior and data information. It is more generalized, so the model that is incrementally trained by the model is more accurate in estimating the click-through rate of the data.
  • the seed model is subjected to a second predetermined number of iterative trainings by using the first data to be processed in the second time window, and after obtaining the first incremental model of the neural network, the historical data is simulated by the first incremental model.
  • the result of the fitting is obtained, wherein the historical data is processed data to be processed; the first incremental model carries the fitting result, and the incremental training of the model is realized so that the model always carries the fitting of all historical data.
  • the state achieves the effect of improving the accuracy of the fitting prediction.
  • the step of performing the first predetermined number of iterations on the neural network by using the first target data located in the first time window in the first to-be-processed data in S202 may include: In the cold start state, random initialization processing is performed on each layer parameter of the neural network to obtain an initialization parameter, wherein the cold start state is a state when the neural network is first processed; and then, the first pending data is located in the first time.
  • the first target data and the initialization parameters in the window perform the iterative training for the first predetermined number of times on the neural network to obtain a seed model of the neural network.
  • FIG. 9 is a flowchart of a method for performing a first predetermined number of iterative training on a neural network by using first target data located in a first time window in the first to-be-processed data according to an embodiment of the present application. As shown in FIG. 9, the method includes the following steps:
  • S901 Perform random initialization processing on each layer parameter of the neural network in a cold start state to obtain an initialization parameter.
  • the cold start state is a state when the neural network is processed for the first time, and is a software startup state, for example, may be a processing state after the fault is recovered.
  • each layer parameter is initialized to obtain initialization parameters.
  • S902 Perform a iterative training on the neural network for a first predetermined number of times by using the first target data and the initialization parameter located in the first time window in the first to-be-processed data, thereby obtaining a seed model of the neural network.
  • a full-scale model training needs to be based on a randomly initialized model, using sufficient training data to obtain a convergence model of the fully fitted data after multiple iterations.
  • the convergence model can be used to process the data.
  • an initialization parameter is obtained; and the first target data and the initialization parameter located in the first time window in the first to-be-processed data are used to the neural network.
  • performing random initialization processing on each layer parameter of the neural network may include, but is not limited to, one of the following methods: performing initial initialization processing on each layer parameter of the neural network; Each layer parameter is subjected to random distribution random initialization processing; Gaussian distribution random initialization processing is performed on each layer parameter of the neural network; Xavier initialization processing is performed on each layer parameter of the neural network.
  • the foregoing data processing method may be applied to a preset scenario, where the preset scenario may include one of the following scenarios: a CTR estimation scenario of a media file; a training scenario of an image recognition model; and a speech recognition model Training scenarios; training scenarios for natural language understanding models.
  • the preset scenario may include one of the following scenarios: a CTR estimation scenario of a media file; a training scenario of an image recognition model; and a speech recognition model Training scenarios; training scenarios for natural language understanding models.
  • This embodiment considers from two aspects, whether it is possible to relay training from the old model on the one hand and avoid learning from the beginning; on the other hand, whether the old model can be used to fit historical data, so that the model keeps a memory of all knowledge, if The model in data processing always maintains relay training.
  • any historical data is learned by the model, and not just like the cold start full training based on a specific data set, only the specific data set has the ability to fit.
  • the functional characteristics of the embodiment of the present application are to improve the accuracy of the data click rate estimation, thereby improving the data click rate and revenue; the performance characteristic is to improve the training efficiency of the model, and the method is achieved by reducing the model pushing interval and improving the model quality. Respond to the purpose of user and data changes.
  • the new incremental model is always obtained based on the iterative training of the previous model. Pushing the new incremental model online, and so on, while periodically deleting the invalid data from the model according to the characteristics of the data to maintain the scale and accuracy of the model, including but not limited to the above first incremental model, The second incremental model and the third incremental model.
  • the incremental update method of the deep neural network model is taken as an example to describe the CTR estimation scenario of the media file.
  • the deep neural network has stronger expressive ability, and has stronger ability to fit the nonlinear characteristics of the data, and has stronger processing ability for multiple weights of the incremental model. So that it can be more accurately predicted Estimate CTR, which in turn can improve the ability to estimate ad click-through rates.
  • the deep neural network structure of this embodiment is a multi-layer perceptron MLP whose basic feature is that each neuron model in the network contains a differentiable nonlinear activation function; the deep neural network includes one or more hidden in The layer between the input and output neural nodes; the deep neural network exhibits a high degree of connectivity, the strength of which is determined by the synaptic weight of the deep neural network.
  • a commonly used algorithm for training MLP is Back Propagation (BP).
  • pCTR is the click-Through Rate Prediction of the user
  • user is the user feature
  • ad is the advertising feature.
  • the ad click rate estimate is a prediction of the effectiveness of the ad exposure, and is an important indicator for evaluating the appeal of the ad to the user, directly affecting the advertising revenue in the click-to-click mode.
  • income CTR * CPC, where CPC (Cost Per Click), which represents the cost per click, is a common form of pricing in the field of Internet advertising, which is generated for each click of the advertisement. cost of.
  • the logistic regression model is a model used by the industry to predict the ad click-through rate model for a long time:
  • x i is the vector of the user features and for advertising the features described; w i corresponding to each feature vector x i and x i represents the weight of the weight of each feature, since it can be determined based on the value of the characteristic pCTR, w i is also called a model.
  • the process of model training can be learned by fitting the exposure history data of a mass advertisement using a machine learning algorithm to determine a reasonable value of the w i vector. Since the cost function of the logical scale model is a convex function, the training logic return model is fast and simple, and the online prediction effect is good.
  • This embodiment can be applied to the advertisement click rate estimation, and is an advertising click rate estimation model training method.
  • the feature is to improve the accuracy of the ad click rate estimation, thereby improving the ad click rate and advertising revenue; the performance characteristics are to improve the efficiency of model training, and to achieve rapid response to users and advertising behavior by reducing the model push interval and improving the quality of the model.
  • the purpose of change is to improve the accuracy of the ad click rate estimation, thereby improving the ad click rate and advertising revenue.
  • the ad click rate prediction model can be used to predict the ad click rate in the future by learning to fit the ad historical exposure data.
  • the ad click rate prediction model needs to be updated quickly because user behavior and creatives are constantly changing; on the other hand, the ad click rate prediction model is required to fit massive historical data to learn the user's click on the advertising behavior mode. Invariant characteristics. Therefore, for the update training of the ad click rate prediction model, it would be very wasteful to skip the previous model training every time.
  • the technical scheme uses the incremental update method to train the advertisement click rate estimation model. The following is an incremental update method to train the advertisement click rate prediction model. Introduce:
  • FIG. 10 is a schematic diagram of a fully connected structure of a deep neural network according to an embodiment of the present application.
  • the deep neural network is a neuron connection of two hidden layer MLP neural networks, which is more complicated than a general neural network.
  • the input of the deep neural network is a One-Hot Encoding vector that discretizes the combination of user features and advertisement features in each advertisement exposure log in the training data, and outputs the result as a click rate estimate.
  • the deep neural network includes neurons that need to be involved in a backpropagation calculation in deep neural network training due to non-zero elements in an input vector, such as the scribing neurons in FIG.
  • the deep neural network is suitable for Deep Neural Networks (DNN) for advertising CTR prediction scenarios.
  • DNN Deep Neural Networks
  • FIG. 11 is a flow chart of another data processing method in accordance with an embodiment of the present application. As shown in FIG. 11, the data processing method includes the following steps:
  • Step 1 Train the seed model.
  • the advertisement clicks the exposure data to train the model I iteration, and the training obtains the seed model M0, and the seed model is not pushed online.
  • the random initialization method for the initialization model may be an average distributed random initialization method, a Gaussian distributed random initialization method, a Xavier initialization method, or the like.
  • Step 2 Incrementally update the model.
  • the first incremental update training based on the seed model M0, sliding the data window T0, so that the right boundary of the data window T0 fits the current time, and obtains the sliding data window T1; using the sliding data window T1, the advertisement clicks the exposure data to train the model i iterations , where i ⁇ I.
  • the model M1 is trained, and the model M1 is pushed online to estimate the click rate of the advertisement until the next new model push.
  • the second incremental update training based on the previous model M1, sliding the data window T1, so that the right boundary of the data window T1 fits the current time, and obtains the sliding data window T2; using the sliding data window T2, the advertisement clicks the exposure data to train the model i Iteration, where i ⁇ I.
  • the model M2 is trained, and the model M2 is pushed online to estimate the click rate of the advertisement until the next new model push.
  • the nth incremental update training based on the previous model Mn-1, sliding the data window Tn-1, making the right boundary of the data window Tn-1 fit the current time, obtaining the sliding data window Tn; using the sliding data window
  • the intra-Tn advertisement clicks on the exposure data training model i iterations, where i ⁇ I.
  • the model Mn is trained, and the push model Mn is used to estimate the click rate of the advertisement until the next new model push.
  • the model learning step size should be appropriately reduced.
  • the learning step size should be less than or equal to the learning step size used in the last iteration of the seed model training phase to avoid the training weights leaving the best advantage.
  • the number of learning iterations used in the step of incrementally updating the training model is adjustable, and different learning iteration numbers should not be used as new ideas.
  • Step 3 Clear the expired key periodically.
  • each advertisement has a certain life period t. After the scheduled delivery time, the advertisement will be put off the shelf, so then it is estimated to stop the advertisement. It will be meaningless.
  • FIG. 12 is a schematic diagram of periodic clearing of a failed key in accordance with an embodiment of the present application.
  • the data window Tn is stretched by x times to obtain Tn' as a barrier, and the feature (neuron representative) in which the model Mn is not in the data window is cleared, that is, The input layer neurons and the connection relationship represented by the invalid key are cleared to obtain the model Mn'.
  • Mn is used instead of Mn as the reference model.
  • the applicable field of the technical solution is applicable and portable to scenes such as image recognition model training, speech recognition model training, and natural language understanding model training, in addition to the advertisement CTR estimation scene.
  • the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases, the former is A better implementation.
  • the technical solution of the present application which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk,
  • the optical disc includes a number of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the methods described in various embodiments of the present application.
  • FIG. 13 is a schematic diagram of a data processing apparatus according to an embodiment of the present application.
  • the data processing apparatus may include: a first acquisition unit 10, a first iteration unit 20, a second acquisition unit 30, a second iteration unit 40, and a first distribution unit 50.
  • the first obtaining unit 10 is configured to acquire first to-be-processed data input to the neural network, where the neural network is a model to be updated.
  • the first iteration unit 20 is configured to perform a first predetermined number of iterative training on the neural network by using the first target data in the first to-be-processed data to obtain a seed model of the neural network, where the first target data is located in the first Within a time window, the seed model is an initialization model of the neural network.
  • the second acquiring unit 30 is configured to acquire first added data generated after the time corresponding to the first time window, and merge the first added data and the first pending data into the second to-be-processed data.
  • the second iteration unit 40 is configured to perform a second preset number of iterative training on the seed model by using the second target data in the second to-be-processed data to obtain a first incremental model of the neural network, where the second target data is located In the second time window, the second time window and the first time window have a first preset overlapping area.
  • the right boundary of the second time window matches the current time, and the second preset number of times is less than or equal to the first preset number of times.
  • the first publishing unit 50 is configured to publish the first incremental model online.
  • FIG. 14 is a schematic diagram of another data processing apparatus according to an embodiment of the present application.
  • the data processing apparatus may include a first acquisition unit 10, a first iteration unit 20, a second acquisition unit 30, a second iteration unit 40, and a first distribution unit 50.
  • the data processing apparatus further includes a first determining unit 60, a third obtaining unit 70, a third iteration unit 80, and a second issuing unit 90.
  • first obtaining unit 10 the first iteration unit 20, the second obtaining unit 30, the second iterative unit 40, and the first issuing unit 50 of the embodiment are in the data processing apparatus of the embodiment shown in FIG. The same effect. I will not repeat them here.
  • a first determining unit 60 configured to determine a third time window according to the first time and the second time window after the first incremental model is subjected to the online publishing, wherein the third time window and the second time window have The second preset overlapping area.
  • the right border of the third time window coincides with the first time.
  • the third acquiring unit 70 is configured to acquire second added data generated after the time corresponding to the second time window, and merge the second added data and the second pending data into the third pending data.
  • the third iteration unit 80 is configured to perform a third predetermined number of iterative training on the first incremental model by using the third target data in the third to-be-processed data to obtain a second incremental model of the neural network, where the third The target data is located in the third time window.
  • the third preset number of times is less than or equal to the first preset number of times.
  • the second issuing unit 90 is configured to publish the second incremental model online.
  • the data processing apparatus may include: a first obtaining unit 10, a first iteration unit 20, a second obtaining unit 30, a second iteration unit 40, a first issuing unit 50, a first determining unit 60, and a first The third acquisition unit 70, the third iteration unit 80, and the second distribution unit 90.
  • the first determining unit 60 includes: a determining module 61 and a determining module 62.
  • first obtaining unit 10 the first iteration unit 20, the second obtaining unit 30, the second iteration unit 40, the first issuing unit 50, the determining unit 60, and the third obtaining unit 70 in this embodiment
  • the third iteration unit 80 and the second distribution unit 90 have the same functions as those in the data processing apparatus of the embodiment shown in FIG. 14, and are not described herein again.
  • the determining module 61 is configured to determine whether there is indication information for pushing a new model, wherein the new model includes a second incremental model.
  • the determining module 62 is configured to determine the first time as the right boundary of the third time window when the determination information is determined, and slide the second time window to the right boundary of the third time window, and the right boundary of the third time window The length of the third time window is moved forward to obtain the left boundary of the third time window, and the third time window is determined according to the right boundary of the third time window and the left boundary of the third time window.
  • the data processing apparatus may include: a first acquisition unit 10, a first iteration unit 20, a second acquisition unit 30, a second iteration unit 40, and a first distribution unit 50.
  • the data processing apparatus further includes: a determining unit 100, a clearing unit 110, and a third issuing unit 120.
  • first obtaining unit 10 the first iteration unit 20, the second obtaining unit 30, the second iterative unit 40, and the first issuing unit 50 of the embodiment are in the data processing apparatus of the embodiment shown in FIG. The same effect, this I won't go into details here.
  • the determining unit 100 is configured to determine, according to the preset period, whether there is invalid data in the first incremental model after the first incremental model is published on the line, wherein the invalid data is the first pending data that stops pushing.
  • the clearing unit 110 is configured to determine that there is invalid data in the first incremental model according to a preset period, and clear the invalid data from the first incremental model to obtain an updated incremental model.
  • the third issuing unit 120 is configured to publish the updated incremental model online.
  • the data processing apparatus may include: a first obtaining unit 10, a first iteration unit 20, a second obtaining unit 30, a second iteration unit 40, a first issuing unit 50, a determining unit 100, and a clearing unit 110. And the third issuing unit 120.
  • the clearing unit 110 includes an expansion module 111, an obtaining module 112, and a clearing module 113.
  • first obtaining unit 10 the first iteration unit 20, the second iteration unit 40, the first issuing unit 50, the determining unit 100, the clearing unit 110, and the third issuing unit 120 of this embodiment are the same as those of FIG. 16.
  • the functions in the data processing apparatus of the illustrated embodiment are the same and will not be described herein.
  • the expansion module 111 is configured to expand the second time window by a preset multiple to obtain a fourth time window.
  • the obtaining module 112 is configured to acquire the second to-be-processed data in the first incremental model, and use the second to-be-processed data as the invalidation data, where the second to-be-processed data is not in the fourth time window.
  • the clearing module 113 is configured to clear the invalid data from the first incremental model to obtain an updated incremental model.
  • the data processing apparatus further includes: a second determining unit, a fourth obtaining unit, a fourth iteration unit, and a fourth issuing unit.
  • the first determining unit is configured to determine a fifth time window according to the second time and the fourth time window after the push update incremental model is online, wherein the fifth time window and the fourth time window have a third preset overlap region.
  • the fourth acquiring unit is configured to acquire third added data generated after the time corresponding to the fourth time window, and merge the third added data and the second pending data into the fourth pending data.
  • a fourth iteration unit configured to perform a fourth predetermined number of iterative training on the update incremental model by using the fourth target data in the fourth to-be-processed data, to obtain a third incremental model of the neural network, where the fourth target data
  • the fifth time window is located; in an embodiment, the fourth preset number is less than or equal to the first preset number of times, and the right boundary of the fifth time window is matched to the second time.
  • the fourth issuing unit is configured to publish the third incremental model online.
  • the data processing device further includes: a fitting unit and a carrying unit.
  • the fitting unit is configured to perform a second predetermined number of iterative training on the seed model through the first to-be-processed data in the second time window, obtain the first incremental model of the neural network, and pass the first incremental model.
  • the historical data is fitted to obtain a fitting result, wherein the historical data is the processed data to be processed.
  • the data processing apparatus further includes: the first iteration unit 20 includes: a processing module and an iteration module.
  • the processing module is configured to perform random initialization processing on each layer parameter of the neural network in a cold start state to obtain an initialization parameter, wherein the cold start state is a state when the neural network is first processed.
  • An iterative module configured to pass first target data and initialized in the first time window in the first to-be-processed data
  • the parameters perform the iterative training on the neural network for the first predetermined number of times, and the seed model of the neural network is obtained.
  • the foregoing processing module is configured to perform random initialization processing on each layer parameter of the neural network, including but not limited to one of the following methods: performing initial processing on each layer parameter of the neural network according to a certain constant; The parameters of each layer of the network are randomly distributed and initialized; the Gaussian distribution random initialization process is performed on each layer parameter of the neural network; and the Xavier initialization process is performed on each layer parameter of the neural network.
  • the foregoing preset scenario may include one of the following: a CTR estimation scenario of the media file; a training scenario of the image recognition model; a training scenario of the speech recognition model; and a training scenario of the natural language understanding model
  • the first obtaining unit 10 in this embodiment may be used to perform S201 in the first embodiment of the present application.
  • the first iteration unit 20 in this embodiment may be used to execute S202 in Embodiment 1 of the present application.
  • the second obtaining unit 30 in this embodiment may be used to perform S203 in the embodiment of the present application; the second iteration unit 40 in this embodiment may be used to execute S204 in Embodiment 1 of the present application, which is
  • the first first publishing unit 50 can be used to execute S205 in Embodiment 1 of the present application.
  • the above-mentioned units and modules are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the contents disclosed in the above embodiment 1. It should be noted that the foregoing module may be implemented in a hardware environment as shown in FIG. 1 as part of the device, and may be implemented by software or by hardware, where the hardware environment includes a network environment.
  • the first acquisition unit 10 acquires the first to-be-processed data input to the neural network, wherein the neural network is the model to be updated; and the first iteration unit 20 passes the first to-be-processed data in the first time window.
  • the first target data is subjected to a first predetermined number of iterative trainings on the neural network to obtain a seed model of the neural network, wherein the seed model is an initialization model of the neural network, and the second acquisition unit 30 acquires the corresponding time window.
  • the first new data generated after the time, and the first new data and the first pending data are merged into the second to-be-processed data; the second iteration unit 40 passes the first pending data in the second time window.
  • the second target data performs a second predetermined number of iterative training on the seed model to obtain a first incremental model of the neural network, wherein the second time window and the first time window have a first preset overlapping area, and the first release is performed.
  • the unit 50 publishes the first incremental model online, thereby solving the technical problem that the model of the data processing cannot be quickly updated. In turn, the technical effect of the model for quickly updating the data processing is achieved.
  • a server or terminal for implementing the above data processing method.
  • FIG. 18 is a structural block diagram of a terminal according to an embodiment of the present application.
  • the terminal may include one or more (only one shown in the figure) processor 181, memory 183, and transmission device 185.
  • the terminal may further include an input/output device 187. .
  • the memory 183 can be used to store a software program and a module, such as a data processing method and a program instruction/module corresponding to the device in the embodiment of the present application.
  • the processor 181 executes each of the software programs and modules stored in the memory 183.
  • a functional application and data processing, that is, the above data processing method is implemented.
  • Memory 183 may include high speed random access memory, and may also include non-volatile memory such as one or more magnetic storage devices, flash memory, or other non-volatile solid state memory.
  • memory 183 can further include memory remotely located relative to processor 181, which can be connected to the terminal over a network. Examples of the above networks include but not Limited to the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • the transmission device 185 described above is for receiving or transmitting data via a network, and can also be used for data transmission between the processor and the memory.
  • Specific examples of the above network may include a wired network and a wireless network.
  • the transmission device 185 includes a Network Interface Controller (NIC) that can be connected to other network devices and routers via a network cable to communicate with the Internet or a local area network.
  • the transmission device 185 is a Radio Frequency (RF) module for communicating with the Internet wirelessly.
  • NIC Network Interface Controller
  • RF Radio Frequency
  • the memory 183 is used to store an application.
  • the processor 181 can call the application stored in the memory 183 through the transmission device 185 to perform the following steps:
  • the first incremental model is published online.
  • the processor 181 is further configured to: after the online release of the first incremental model, determine a third time window according to the first time and the second time window, wherein the third time window and the second time window Having a second preset overlap area; acquiring second added data generated after the time corresponding to the second time window, and combining the second added data and the second pending data into the third pending data;
  • the third target data in the data to be processed performs the third predetermined number of iterative training on the first incremental model to obtain a second incremental model of the neural network, wherein the third target data is located in the third time window;
  • the two incremental models are published online.
  • the processor 181 is further configured to: determine whether there is indication information for pushing a new model, wherein the new model includes a second incremental model; if the indication information is determined, determining the first time as the third time window The right boundary, sliding the second time window to the right boundary of the third time window, and moving the right boundary of the third time window forward by the length of the third time window to obtain the left boundary of the third time window, according to the third time window The right boundary and the left boundary of the third time window determine a third time window.
  • the processor 181 is further configured to: after the first incremental model is published on the line, determine whether there is invalid data in the first incremental model according to a preset period, where the invalid data is the first to stop pushing Data to be processed; if it is determined according to the preset period that there is invalid data in the first incremental model, the invalid data is cleared from the first incremental model to obtain an updated incremental model; and the updated incremental model is released online.
  • the processor 181 is further configured to: expand the second time window by a preset multiple to obtain a fourth time window; acquire second to-be-processed data in the first incremental model, and use the second to-be-processed data as the invalid data.
  • the second pending data is not in the fourth time window; the invalid data is cleared from the first incremental model to obtain an updated incremental model.
  • the processor 181 is further configured to perform the following steps: after pushing the update incremental model to go online, according to the second time and the first
  • the fourth time window determines a fifth time window, wherein the fifth time window and the fourth time window have a third preset overlapping area; acquiring third added data generated after the time corresponding to the fourth time window, and the third The newly added data and the second to-be-processed data are merged into the fourth to-be-processed data; the fourth-order number of iterations is trained on the updated incremental model by the fourth target data in the fourth to-be-processed data, and the third neural network is obtained.
  • An incremental model in which the fourth target data is located within the fifth time window; the third incremental model is published online.
  • the processor 181 is further configured to: perform a second predetermined number of iterative training on the seed model by using the first to-be-processed data in the second time window to obtain the first incremental model of the neural network, and then pass the An incremental model fits the historical data to obtain a fitting result, wherein the historical data is the processed data to be processed; and the fitting result is carried by the first incremental model.
  • the processor 181 is further configured to perform the following steps: performing random initialization processing on each layer parameter of the neural network in the cold start state to obtain an initialization parameter, where the cold start state is a state when the neural network is first processed;
  • the first target data and the initialization parameters perform an iterative training on the neural network for a first predetermined number of times to obtain a seed model of the neural network.
  • a solution for data processing is provided.
  • the method of publishing the first incremental model online achieves the purpose of updating and publishing the incremental model, thereby realizing Quickly update the technical effects of the data processing model, and then solve the technical problem of the problem that the data processing model cannot be updated quickly.
  • FIG. 18 is only schematic, and the terminal can be a smart phone (such as an Android mobile phone, an iOS mobile phone, etc.), a tablet computer, a palm computer, and a mobile Internet device (MID). Terminal equipment such as PAD.
  • FIG. 18 does not limit the structure of the above electronic device.
  • the terminal may also include more or less components (such as a network interface, display device, etc.) than shown in FIG. 18, or have a different configuration than that shown in FIG.
  • Embodiments of the present application also provide a storage medium.
  • the storage medium may be used to execute program code of the data processing method.
  • the foregoing storage medium may be located on at least one of the plurality of network devices in the network shown in the foregoing embodiment.
  • the storage medium is arranged to store program code for performing the following steps:
  • the first incremental model is published online.
  • the storage medium is further configured to store program code for performing the step of determining a third time window based on the first time and the second time window after the first incremental model is published online
  • the third time window and the second time window have a second preset overlapping area; acquiring second added data generated after the time corresponding to the second time window, and adding the second added data and the second pending data
  • the data is merged into the third to-be-processed data; the first incremental model is subjected to the iterative training for the third predetermined number of times by the third target data in the third to-be-processed data, and the second incremental model of the neural network is obtained, wherein The three target data is located in the third time window; the second incremental model is released online.
  • the storage medium is further configured to store program code for performing the steps of: determining whether there is indication information for pushing a new model, wherein the new model includes a second incremental model; if an indication is determined Information, the first time is determined as the right boundary of the third time window, the second time window is swept to the right boundary of the third time window, and the right boundary of the third time window is moved forward by the length of the third time window, The left boundary of the third time window determines the third time window according to the right boundary of the third time window and the left boundary of the third time window.
  • the storage medium is further configured to store program code for performing the following steps: after the first incremental model is published online, determining whether there is a failure in the first incremental model according to a preset period Data, wherein the failure data is the first pending data that stops pushing; if it is determined according to the preset period that the failure data exists in the first incremental model, the failure data is cleared from the first incremental model, and the updated incremental model is obtained. ; The incremental model will be updated for online release.
  • the storage medium is further configured to store program code for performing the steps of: expanding the second time window by a preset multiple to obtain a fourth time window; obtaining the second waiting in the first incremental model The data is processed, and the second to-be-processed data is used as the failure data, wherein the second to-be-processed data is not in the fourth time window; the failure data is cleared from the first incremental model to obtain an updated incremental model.
  • the storage medium is further configured to store program code for performing the following steps: after pushing the update incremental model to go online, determining a fifth time window according to the second time and the fourth time window, wherein The fifth time window and the fourth time window have a third preset overlapping area; the acquisition is generated after the time corresponding to the fourth time window The third added data, and the third new data and the second pending data are merged into the fourth to-be-processed data; and the fourth incremental target is updated by the fourth target data in the fourth pending data.
  • the iterative training of the number of times obtains a third incremental model of the neural network, wherein the fourth target data is located in the fifth time window; and the third incremental model is released online.
  • the storage medium is further configured to store program code for performing the following steps: performing a second predetermined number of iterations of the seed model through the first to-be-processed data in the second time window to obtain After the first incremental model of the neural network, the historical data is fitted by the first incremental model to obtain a fitting result, wherein the historical data is the processed data to be processed; and the fitting result is carried by the first incremental model.
  • the storage medium is further configured to store program code for performing the following steps: in a cold start state, random initialization processing is performed on each layer parameter of the neural network to obtain an initialization parameter, wherein the cold start state The state of the neural network for the first time processing; the first target data and the initialization parameters are used for the first predetermined number of iterations of the neural network to obtain the seed model of the neural network.
  • the foregoing storage medium may include, but not limited to, a U disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), and a mobile device.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • the embodiment of the present application further provides a computer program product comprising instructions, when executed on a computer, causing the computer to execute any one of the data processing methods described in the foregoing various embodiments.
  • the integrated unit in the above embodiment if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in the above-described computer readable storage medium.
  • the technical solution of the present application in essence or the contribution to the prior art, or all or part of the technical solution may be embodied in the form of a software product, which is stored in a storage medium.
  • a number of instructions are included to cause one or more computer devices (which may be a personal computer, server or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present application.
  • the disclosed client may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • multiple units or components may be combined or may be Integrate into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, unit or module, and may be electrical or otherwise.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple networks. On the unit. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Strategic Management (AREA)
  • Finance (AREA)
  • Development Economics (AREA)
  • Accounting & Taxation (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Biomedical Technology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Molecular Biology (AREA)
  • Health & Medical Sciences (AREA)
  • Biophysics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Marketing (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Economics (AREA)
  • Game Theory and Decision Science (AREA)
  • General Business, Economics & Management (AREA)
  • Pure & Applied Mathematics (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Algebra (AREA)
  • Databases & Information Systems (AREA)
  • Probability & Statistics with Applications (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Medical Informatics (AREA)
  • Image Analysis (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

一种数据处理方法和装置。其中,该数据处理方法包括:获取输入至神经网络的第一待处理数据(S201),神经网络为待更新的模型;通过第一待处理数据中位于第一时间窗口内的第一目标数据对神经网络进行第一预设次数的迭代训练,得到神经网络的种子模型(S202);获取在第一时间窗口对应的时间之后产生的第一新增数据,并将第一新增数据和第一待处理数据合并为第二待处理数据(S203);通过第二待处理数据中位于第二时间窗口内的第二目标数据对种子模型进行第二预设次数的迭代训练,得到神经网络的第一增量模型(S204);将第一增量模型进行线上发布(S205)。该方法解决了数据处理的模型不能快速更新的问题的技术问题。

Description

数据处理方法和装置
本申请要求于2016年10月14日提交中国专利局、申请号为201610900390.7、申请名称为“数据处理方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及数据处理领域,具体而言,涉及一种数据处理方法和装置。
背景技术
随着数据处理技术的发展,在数据处理中,逻辑回归模型(Logistic Regression,简称为LR)已经广泛应用于广告点击率预估。然而,由于逻辑回归模型为一种线性模型,导致其局限性在于难以学习到原始特征以及特征组合中的非线性信息。
传统方式中存在构造深度神经网络的点击率预估方法,比如,构造深度神经网络的广告点击率预估,可以从原始特征中学习非线性信息。一方面,由于在传统的机器学习框架下,深度神经网络学习的任务就是在给定充分训练数据的基础上来学习一个点击率预估模型,然后利用这个学习到的模型来在线实时预测用户对广告的点击行为;另一方面,由于互联网在线投放的数据环境本身是快速变化的,比如用户群是快速变化的,即新用户不断加入且用户会不断产生新的行为和新的兴趣点;又比如,新数据不断出现,同时旧数据也会不断下架。因此,数据处理的模型更新必须快速,才能更好地适应这种数据环境的快速变化。为了体现快速变化的数据环境,需要实现快速的模型更新,从而需要在有限的时间内完成模型的训练。
在数据处理中,模型训练是需要花费大量时间的,比如一次全量的模型训练需要在随机初始化的模型基础上,使用充分的训练数据经过多轮迭代,才能够得到充分拟合数据的收敛模型。而由于互联网中的投放数据是海量的,并且模型训练本身也需要较长的时间,因此,涉及到大量的计算会使得模型训练的时间更加漫长,故不能满足模型快速更新的需求。
针对上述数据处理的模型不能快速更新的问题,目前尚未提出有效的解决方案。
发明内容
本申请实施例提供了一种数据处理方法和装置,以至少解决相关技术中数据处理的模型不能快速更新的问题的技术问题。
为了解决上述问题,第一方面,本申请实施例提供了一种数据处理方法,该数据处理方法包括:获取输入至神经网络的第一待处理数据,其中,该神经网络为待更新的模型;通过该第一待处理数据中位于的第一目标数据对该神经网络进行第一预设次数的迭代训练,得到该神经网络的种子模型,其中,该第一目标数据位于第一时间窗口内,该种子模型为该神经网络的初始化模型;获取在该第一时间窗口对应的时间之后产生的第一新增数据,并将该第一新增数据和该第一待处理数据合并为第二待处理数据;通过该第二待处理数据中的第二目标数据对该种子模型进行第二预设次数的迭代训 练,得到该神经网络的第一增量模型,其中,该第二目标数据位于第二时间窗口内,该第二时间窗口与该第一时间窗口具有第一预设重叠区域;该将第一增量模型进行线上发布。
在第一方面的一种可能的实现方式中,该第二时间窗口的右边界契合当前时间。
在第一方面的一种可能的实现方式中,在将该第一增量模型进行线上发布之后,该方法还包括:
根据第一时间和该第二时间窗口确定第三时间窗口,其中,该第三时间窗口与该第二时间窗口具有第二预设重叠区域;
获取在该第二时间窗口对应的时间之后产生的第二新增数据,并将该第二新增数据和该第二待处理数据合并为第三待处理数据;
通过该第三待处理数据中的第三目标数据对该第一增量模型进行第三预设次数的迭代训练,得到该神经网络的第二增量模型,其中,该第三目标数据位于该第三时间窗口内;
将该第二增量模型进行线上发布。
在该实现方式中,在产生第二新增数据后,不需要对模型从头开始训练,而是将第二新增数据和所述第二待处理数据合并为第三待处理数据,接着利用第三待处理数据中的第三目标数据对第一增量模型进行第三预设次数的迭代训练,得到神经网络的第二增量模型,从而大大加快了线上模型的更新速度,能更快地反应用户行为变化和新数据上线的影响。
在第一方面的一种可能的实现方式中,该第三时间窗口的右边界契合该第一时间。
在第一方面的一种可能的实现方式中,该根据第一时间和该第二时间窗口确定第三时间窗口,包括:
判断是否有用于推送新模型的指示信息,其中,该新模型包括该第二增量模型;
如果判断出有该指示信息,则将该第一时间确定为该第三时间窗口的右边界;
滑动该第二时间窗口至该第三时间窗口的右边界,并将该第三时间窗口的右边界向前推移该第三时间窗口的长度,得到该第三时间窗口的左边界;
根据该第三时间窗口的右边界和该第三时间窗口的左边界确定该第三时间窗口。
在第一方面的一种可能的实现方式中,在将该第一增量模型进行线上发布之后,该方法还包括:
按照预设周期判断该第一增量模型中是否存在失效数据,其中,该失效数据为停止推送的第一待处理数据;
如果按照该预设周期判断出该第一增量模型中存在该失效数据,则从该第一增量模型中清除该失效数据,得到更新增量模型;
将该更新增量模型进行线上发布。
在该实现方式中,通过按照预设周期判断出第一增量模型中存在失效数据,然后从第一增量模型中清除失效数据,得到不存在失效数据的更新增量模型,接着将该更新增量模 型进行线上发布,从而使模型保持合理的大小,避免模型的尺寸不断膨胀,且投放毫无意义的数据,进而实现了快速更新数据处理的模型的技术效果。
在第一方面的一种可能的实现方式中,该从该第一增量模型中清除该失效数据,得到该更新增量模型,包括:
将该第二时间窗口扩大预设倍数,得到第四时间窗口;
获取该第一增量模型中的第二待处理数据,将该第二待处理数据作为该失效数据,其中,该第二待处理数据不在该第四时间窗口内;从该第一增量模型中清除该失效数据,得到该更新增量模型。
在第一方面的一种可能的实现方式中,在推送该更新增量模型上线之后,该方法还包括:
根据第二时间和第四时间窗口确定第五时间窗口,其中,该第五时间窗口与该第四时间窗口具有第三预设重叠区域;
获取在该第四时间窗口对应的时间之后产生的第三新增数据,并将该第三新增数据和该第二待处理数据合并为第四待处理数据;
通过该第四待处理数据中的第四目标数据对该更新增量模型进行第四预设次数的迭代训练,得到该神经网络的第三增量模型,其中,该第四目标数据位于该第五时间窗口内;
将该第三增量模型进行线上发布。
在第一方面的一种可能的实现方式中,该第五时间窗口的右边界契合该第二时间。
在第一方面的一种可能的实现方式中,在通过该第二目标数据对该种子模型进行第二预设次数的迭代训练,得到该神经网络的第一增量模型之后,该方法还包括:
通过该第一增量模型对历史数据进行拟合,得到拟合结果,其中,该历史数据为处理过的待处理数据;
通过该第一增量模型携带该拟合结果。
该实现方式中,通过第二时间窗口内的第一待处理数据对种子模型进行第二预设次数的迭代训练,得到神经网络的第一增量模型之后,再利用第一增量模型对历史数据进行拟合,得到拟合结果,并将第一增量模型携带拟合结果,实现了模型增量式训练使得模型中永远携带有对所有历史数据的拟合状态,达到了提高拟合预估准确性的效果。
在第一方面的一种可能的实现方式中,该通过该第一待处理数据中的第一目标数据对该神经网络进行第一预设次数的迭代训练,包括:
在冷启动状态下,对该神经网络的各层参数进行随机初始化处理,得到初始化参数,其中,该冷启动状态为对该神经网络进行首次处理时的状态;
通过该第一目标数据和该初始化参数,对该神经网络进行该第一预设次数的迭代训练,得到该神经网络的种子模型。
在第一方面的一种可能的实现方式中,该对该神经网络的各层参数进行随机初始化处理,包括但不限于以下方法之一:
对该神经网络的各层参数分别进行按某常数初始化处理;
对该神经网络的各层参数进行平均分布随机初始化处理;
对该神经网络的各层参数进行高斯分布随机初始化处理;
对该神经网络的各层参数进行Xavier初始化处理。
在第一方面的一种可能的实现方式中,该方法应用于预设场景下,该预设场景包括但不限于以下之一:
媒体文件的CTR预估场景;
图像识别模型的训练场景;
语音识别模型的训练场景;
自然语言理解模型的训练场景。
在第一方面的一种可能的实现方式中,该第二预设次数小于或等于该第一预设次数。
在第一方面的一种可能的实现方式中,该第三预设次数小于或等于该第一预设次数。
在第一方面的一种可能的实现方式中,该第四预设次数小于或等于该第一预设次数。
第二方面,本申请实施例提供了一种数据处理装置,该数据处理装置包括:第一获取单元,用于获取输入至神经网络的第一待处理数据,其中,该神经网络为待更新的模型;第一迭代单元,用于通过该第一待处理数据中的第一目标数据对该神经网络进行第一预设次数的迭代训练,得到神经网络的种子模型,其中,该第一目标数据位于第一时间窗口内,该种子模型为该神经网络的初始化模型;第二获取单元,用于获取在该第一时间窗口对应的时间之后产生的第一新增数据,并将该第一新增数据和该第一待处理数据合并为第二待处理数据;第二迭代单元,用于通过该第一待处理数据中的第二目标数据对该种子模型进行第二预设次数的迭代训练,得到该神经网络的第一增量模型,其中,该第二目标数据位于第二时间窗口内,该第二时间窗口与该第一时间窗口具有第一预设重叠区域;第一发布单元,用于将该第一增量模型进行线上发布。
在第二方面的一种可能的实现方式中,该第二时间窗口的右边界契合当前时间。
在第二方面的一种可能的实现方式中,该装置还包括:
第一确定单元,用于在将该第一增量模型进行线上发布之后,根据第一时间和该第二时间窗口确定第三时间窗口,其中,该第三时间窗口与该第二时间窗口具有第二预设重叠区域;
第三获取单元,用于获取在该第二时间窗口对应的时间之后产生的第二新增数据,并将该第二新增数据和该第二待处理数据合并为第三待处理数据;
第三迭代单元,用于通过该第三待处理数据中的第三目标数据对该第一增量模型进行第三预设次数的迭代训练,得到该神经网络的第二增量模型,其中,该第三目标数据位于该第三时间窗口内;
第二发布单元,用于将该第二增量模型进行线上发布。
在第二方面的一种可能的实现方式中,该第三时间窗口的右边界契合该第一时间。
在第二方面的一种可能的实现方式中,该第一确定单元包括:
判断模块,用于判断是否有用于推送新模型的指示信息,其中,该新模型包括该第二增量模型;
确定模块,用于在判断出有该指示信息时,将该第一时间确定为该第三时间窗口的右边界,滑动该第二时间窗口至该第三时间窗口的右边界,并将该第三时间窗口的右边界向前推移该第三时间窗口的长度,得到该第三时间窗口的左边界,根据该第三时间窗口的右边界和该第三时间窗口的左边界确定该第三时间窗口。
在第二方面的一种可能的实现方式中,该装置还包括:
判断单元,用于在将该第一增量模型进行线上发布之后,按照预设周期判断该第一增量模型中是否存在失效数据,其中,该失效数据为停止推送的第一待处理数据;
清除单元,用于在按照该预设周期判断出该第一增量模型中存在该失效数据,从该第一增量模型中清除该失效数据,得到更新增量模型;
第三发布单元,用于将该更新增量模型进行线上发布。
在第二方面的一种可能的实现方式中,该清除单元包括:
扩大模块,用于将该第二时间窗口扩大预设倍数,得到第四时间窗口;
获取模块,用于获取该第一增量模型中的第二待处理数据,将该第二待处理数据作为该失效数据,其中,该第二待处理数据不在该第四时间窗口内;
清除模块,用于从该第一增量模型中清除该失效数据,得到该更新增量模型。
在第二方面的一种可能的实现方式中,该装置还包括:
第二确定单元,用于根据第二时间和第四时间窗口确定第五时间窗口,其中,该第五时间窗口与该第四时间窗口具有第三预设重叠区域;
第四获取单元,用于获取在该第四时间窗口对应的时间之后产生的第三新增数据,并将该第三新增数据和该第二待处理数据合并为第四待处理数据;
第四迭代单元,用于通过该第四待处理数据中的第四目标数据对该更新增量模型进行第四预设次数的迭代训练,得到该神经网络的第三增量模型,其中,该第四目标数据位于该第五时间窗口内;
第四发布单元,用于将该第三增量模型进行线上发布。
在第二方面的一种可能的实现方式中,该第五时间窗口的右边界契合该第二时间。
在第二方面的一种可能的实现方式中,该装置还包括:
拟合单元,用于通过该第一增量模型对历史数据进行拟合,得到拟合结果,其中,该历史数据为处理过的待处理数据;
携带单元,用于通过该第一增量模型携带该拟合结果。
在第二方面的一种可能的实现方式中,该第一迭代单元包括:
处理模块,用于在冷启动状态下,对该神经网络的各层参数进行随机初始化处理,得到初始化参数,其中,该冷启动状态为对该神经网络进行首次处理时的状态;
迭代模块,用于通过该第一目标数据和该初始化参数,对该神经网络进行该第一预设次数的迭代训练,得到该神经网络的种子模型。
在第二方面的一种可能的实现方式中,该对该神经网络的各层参数进行随机初始化处理,包括但不限于以下方法之一:
对该神经网络的各层参数分别进行按某常数初始化处理;
对该神经网络的各层参数进行平均分布随机初始化处理;
对该神经网络的各层参数进行高斯分布随机初始化处理;
对该神经网络的各层参数进行Xavier初始化处理。
在第二方面的一种可能的实现方式中,该装置应用于预设场景下,该预设场景包括但不限于以下之一:
媒体文件的CTR预估场景;
图像识别模型的训练场景;
语音识别模型的训练场景;
自然语言理解模型的训练场景。
在第二方面的一种可能的实现方式中,该第二预设次数小于或等于该第一预设次数。
在第二方面的一种可能的实现方式中,该第三预设次数小于或等于该第一预设次数。
在第二方面的一种可能的实现方式中,该第四预设次数小于或等于该第一预设次数。
第二方面中各个部分可能的实现方式的有益效果,参见第一方面中与之对应的方法的有益效果。
第三方面,本申请实施例提供了一种数据处理终端,所述终端包括处理器以及存储器:
所述存储器用于存储程序代码,并将所述程序代码传输给所述处理器;
所述处理器用于根据所述程序代码中的指令执行权利要求1-16任一项所述的数据处理方法。
第四方面,本申请实施例提供了一种存储介质,其特征在于,所述存储介质用于存储程序代码,所述程序代码用于执行权利要求1-16任一项所述的数据处理方法。
第五方面,本申请实施例提供了一种包括指令的计算机程序产品,其特征在于,当其在计算机上运行时,使得所述计算机执行权利要求1-16任一项所述的数据处理方法。
第六方面,本申请实施例提供了一种数据处理方法,包括:
数据处理设备获取输入至神经网络的第一待处理数据,其中,该神经网络为待更新的模型;
该数据处理设备通过该第一待处理数据中的第一目标数据对该神经网络进行第一预设次数的迭代训练,得到该神经网络的种子模型,其中,该第一目标数据位于第一时间窗口内,该种子模型为该神经网络的初始化模型;
该数据处理设备获取在该第一时间窗口对应的时间之后产生的第一新增数据,并将该第一新增数据和该第一待处理数据合并为第二待处理数据;
该数据处理设备通过该第二待处理数据中的第二目标数据对该种子模型进行第二预设次数的迭代训练,得到该神经网络的第一增量模型,其中,该第二目标数据位于第二时间窗口内,该第二时间窗口与该第一时间窗口具有第一预设重叠区域;
该数据处理设备将该第一增量模型进行线上发布。
在第六方面的一种可能的实现方式中,该第二时间窗口的右边界契合当前时间。
在第六方面的一种可能的实现方式中,在将该第一增量模型进行线上发布之后,该方法还包括:
该数据处理设备根据第一时间和该第二时间窗口确定第三时间窗口,其中,该第三时间窗口与该第二时间窗口具有第二预设重叠区域;
该数据处理设备获取在该第二时间窗口对应的时间之后产生的第二新增数据,并将该第二新增数据和该第二待处理数据合并为第三待处理数据;
该数据处理设备通过该第三待处理数据中的第三目标数据对该第一增量模型进行第三预设次数的迭代训练,得到该神经网络的第二增量模型,其中,该第三目标数据位于该第三时间窗口内;
该数据处理设备将该第二增量模型进行线上发布。
在第六方面的一种可能的实现方式中,该第三时间窗口的右边界契合该第一时间。
在第六方面的一种可能的实现方式中,该数据处理设备根据第一时间和该第二时间窗口确定第三时间窗口,包括:
该数据处理设备判断是否有用于推送新模型的指示信息,其中,该新模型包括该第二增量模型;
如果判断出有该指示信息,则该数据处理设备将该第一时间确定为该第三时间窗口的右边界;
该数据处理设备滑动该第二时间窗口至该第三时间窗口的右边界,并将该第三时间窗 口的右边界向前推移该第三时间窗口的长度,得到该第三时间窗口的左边界;
该数据处理设备根据该第三时间窗口的右边界和该第三时间窗口的左边界确定该第三时间窗口。
在第六方面的一种可能的实现方式中,在该数据处理设备将该第一增量模型进行线上发布之后,该方法还包括:
该数据处理设备按照预设周期判断该第一增量模型中是否存在失效数据,其中,该失效数据为停止推送的第一待处理数据;
如果按照该预设周期判断出该第一增量模型中存在该失效数据,则该数据处理设备从该第一增量模型中清除该失效数据,得到更新增量模型;
该数据处理设备将该更新增量模型进行线上发布。
在第六方面的一种可能的实现方式中,该数据处理设备从该第一增量模型中清除该失效数据,得到该更新增量模型,包括:
该数据处理设备将该第二时间窗口扩大预设倍数,得到第四时间窗口;
该数据处理设备获取该第一增量模型中的第二待处理数据,将该第二待处理数据作为该失效数据,其中,该第二待处理数据不在该第四时间窗口内;从该第一增量模型中清除该失效数据,得到该更新增量模型。
在第六方面的一种可能的实现方式中,在该数据处理设备推送该更新增量模型上线之后,该方法还包括:
该数据处理设备根据第二时间和第四时间窗口确定第五时间窗口,其中,该第五时间窗口与该第四时间窗口具有第三预设重叠区域;
该数据处理设备获取在该第四时间窗口对应的时间之后产生的第三新增数据,并将该第三新增数据和该第二待处理数据合并为第四待处理数据;
该数据处理设备通过该第四待处理数据中的第四目标数据对该更新增量模型进行第四预设次数的迭代训练,得到该神经网络的第三增量模型,其中,该第四目标数据位于该第五时间窗口内;
该数据处理设备将该第三增量模型进行线上发布。
在第六方面的一种可能的实现方式中,该第五时间窗口的右边界契合该第二时间。
在第六方面的一种可能的实现方式中,在该数据处理设备通过该第二目标数据对该种子模型进行第二预设次数的迭代训练,得到该神经网络的第一增量模型之后,该方法还包括:
该数据处理设备通过该第一增量模型对历史数据进行拟合,得到拟合结果,其中,该历史数据为处理过的待处理数据;
该数据处理设备通过该第一增量模型携带该拟合结果。
在第六方面的一种可能的实现方式中,该数据处理设备通过该第一待处理数据中的第 一目标数据对该神经网络进行第一预设次数的迭代训练,包括:
在冷启动状态下,该数据处理设备对该神经网络的各层参数进行随机初始化处理,得到初始化参数,其中,该冷启动状态为对该神经网络进行首次处理时的状态;
该数据处理设备通过该第一目标数据和该初始化参数,对该神经网络进行该第一预设次数的迭代训练,得到该神经网络的种子模型。
在第六方面的一种可能的实现方式中,该数据处理设备对该神经网络的各层参数进行随机初始化处理,包括但不限于以下方法之一:
对该神经网络的各层参数分别进行按某常数初始化处理;
该数据处理设备对该神经网络的各层参数进行平均分布随机初始化处理;
该数据处理设备对该神经网络的各层参数进行高斯分布随机初始化处理;
该数据处理设备对该神经网络的各层参数进行Xavier初始化处理。
在第六方面的一种可能的实现方式中,该方法应用于预设场景下,该预设场景包括以下之一:
媒体文件的CTR预估场景;
图像识别模型的训练场景;
语音识别模型的训练场景;
自然语言理解模型的训练场景。
在第六方面的一种可能的实现方式中,该第二预设次数小于或等于该第一预设次数。
在第六方面的一种可能的实现方式中,该第三预设次数小于或等于该第一预设次数。
在第六方面的一种可能的实现方式中,该第四预设次数小于或等于该第一预设次数。
第六方面中各个部分可能的实现方式的有益效果,参见第一方面中与之对应的方法的有益效果。
在本申请实施例中,获取输入至神经网络的第一待处理数据,其中,神经网络为待更新的模型;通过第一待处理数据中位于第一时间窗口内的第一目标数据对神经网络进行第一预设次数的迭代训练,得到神经网络的种子模型,其中,种子模型为神经网络的初始化模型;获取在第一时间窗口对应的时间之后产生的第一新增数据,并将第一新增数据和第一待处理数据合并为第二待处理数据;通过第二待处理数据中位于第二时间窗口内的第二目标数据对种子模型进行第二预设次数的迭代训练,得到神经网络的第一增量模型,其中,第二时间窗口与第一时间窗口具有第一预设重叠区域;将第一增量模型进行线上发布的方式。这样,对于数据处理的模型的更新训练,在产生新增数据后,不需要从头开始训练模型,而是直接在种子模型的基础上,利用包括了新增数据的目标数据对种子模型进行预设次数的迭代训练,得到神经网络的增量模型,并将增量模型进行线上发布,从而达到了对增量模型进行更新、发布的目的,进而实现了快速更新数据处理模型的技术效果,故解决了数据处理的模型不能快速更新的问题。
附图说明
图1所示为根据本申请实施例的数据处理方法的硬件环境的示意图;
图2所示为根据本申请实施例的数据处理方法的一种流程图;
图3所示为根据本申请实施例的数据处理方法的另一种流程图;
图4所示为根据本申请实施例的根据第一时间和第二时间窗口确定第三时间窗口的方法的流程图;
图5所示为根据本申请实施例的数据处理方法的另一种流程图;
图6所示为根据本申请实施例的从第一增量模型中清除失效数据的方法的流程图;
图7所示为根据本申请实施例的数据处理方法的另一种流程图;
图8所示为根据本申请实施例的数据处理方法的另一种流程图;
图9是所示为根据本申请实施例的通过第一待处理数据中位于第一时间窗口内的第一目标数据对神经网络进行第一预设次数的迭代训练的方法的流程图;
图10所示为根据本申请实施例的深度神经网络的全连接结构的示意图;
图11所示为根据本申请实施例的数据处理方法的另一种流程图;
图12所示为根据本申请实施例的定期清除失效键的示意图;
图13所示为根据本申请实施例的数据处理装置的一种示意图;
图14所示为根据本申请实施例的另一种数据处理装置的另一种示意图;
图15所示为根据本申请实施例的另一种数据处理装置的另一种示意图;
图16所示为根据本申请实施例的另一种数据处理装置的另一种示意图;
图17所示为根据本申请实施例的另一种数据处理装置的另一种示意图;
图18所示为根据本申请实施例的一种终端的结构框图。
具体实施方式
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本申请保护的范围。
需要说明的是,本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
为解决传统数据处理方式中,数据处理的模型不能快速更新的问题,需要考虑一种有 效的数据处理方法。故此,本申请实施例提供了一种数据处理方法及装置,以希望可以达到对增量模型进行更新的目的,并实现快速更新数据处理的模型的技术效果,从而解决数据处理的模型不能快速更新的问题。
在本申请实施例中,数据处理的模型可以通过学习来拟合历史曝光数据,且具有在未来一段时间内对数据点击的点击率进行预估的作用,比如,数据处理中的广告点击率预估模型,具有在未来一段的时间内预估广告点击率的作用。
因此,本申请实施例所提供的数据处理方法可以应用于预设场景下,在该预设场景中,点击流数据的产生极为迅猛,每天可以产生大量的曝光数据,比如,在媒体文件的点击通过率(Click-Through-Rate,简称为CTR)预估场景下,每天会有大量的用户通过点击不同的媒体文件,进行文件查阅,又比如,在互联网广告场景下,每天产生大量广告曝光数据,由于广告曝光数据包含了广告内容、用户内容以及时间等上下文特征,故广告曝光数据是具有价值的标注数据,其中,可以通过用户是否点击一数据判断该数据是否为标注数据。
一方面,由于用户行为和互联网上数据处理的素材是时刻变化的,相应地,用于预估点击率的模型需要快速更新,另一方面,由于要求点击率预估模型通过拟合海量的历史数据,以学习用户点击行为模式的不变特性,因此,对于数据处理的模型的更新训练,如果每次都丢弃之前训练好的模型,而对模型从头开始训练,将是十分浪费的,例如,如果已经训练得到了足够拟合上一批历史数据(记作D)的模型M,经过一段时间后则要对这段时间内产生的新数据D’进行学习,在需要训练得到新模型(既有对数据D又有对数据D’的拟合)的需求中,完全丢弃这个模型M是非常浪费的。
故此,本申请实施例中,可以采用增量更新方法训练数据处理的模型,比如,采用增量更新方法训练广告点击率预估模型。这样,对于数据处理的模型的更新训练,不需要对模型从头开始训练,而是在需要训练得到新模型时,采用增量更新方法训练数据处理的模型,从而达到对增量模型进行更新的目的,进而实现快速更新数据处理的模型的技术效果。
举例说明,本申请实施例可以应用到如图1所示的硬件环境中。图1是根据本申请实施例的数据处理方法的硬件环境的示意图,在该硬件环境中,至少包括服务器101和终端102。如图1所示,服务器101可以通过网络与终端102进行通信连接,其中,该网络可以为广域网、城域网或局域网,当然,还可以是其它类型的网络,这里对于网络的类型不进行任何限定。
在该硬件环境中,该终端102可以理解为用户终端,该用户终端可以为智能手机、平板电脑、电子书阅读器、动态影像专家压缩标准音频层面3(Moving Picture Experts Group Audio Layer III,简称为MP3)播放器、动态影像专家压缩标准音频层面4(Moving Picture Experts Group Audio Layer IV,简称为MP4)播放器、膝上型便携计算机和台式计算机等等。
需要说明的是,本申请实施例的数据处理方法可以由服务器101来执行,也可以由终端102来执行,还可以是由服务器101和终端102共同执行,其中,当终端102执行本申请实施例的数据处理方法时,也可以是由安装在其上的客户端来执行。在这里不对本申请 实施例的执行主体进行任何限定,只要是具有数据处理能力的数据处理设备均可。
实施例1
接下来,结合图2来说明本申请实施例如何实现数据处理。
图2是根据本申请实施例的一种数据处理方法的流程图。如图2所示,该数据处理方法可以包括以下步骤:
S201,获取输入至神经网络的第一待处理数据,其中,神经网络为待更新的模型。
神经网络中输入的第一待处理数据可以为训练数据,由于该训练数据中包括了曝光日志,因此,该第一待处理数据中至少可以包括独热编码(One-Hot Encoding)向量,其中,该独热编码向量是根据曝光日志中的用户特征和数据的特征组合经过离散化处理后得到的。
例如,在媒体文件的CTR预估场景下,当该CTR预估场景为互联网广告场景时,深度神经网络输入的第一待处理数据可以包括独热编码向量,该独热编码向量是根据每条广告曝光日志中的用户特征和广告特征组合经过离散化处理后得到的,且适用于广告点击率预估场景的深度学习。
在该实施例中,独热编码作为一种对属性类分段特征的处理方法,对于每一个特征而言,如果该特征有M个可能值,那么该特征经过独热编码处理后,就会变成M个(0-1)二元特征。由于这些二元特征互斥,每次只可以有一个二元特征被激活,其中,若被激活则可能值为1,若未被激活则可能值为0,因此,经过独热编码处理后,数据会变成稀疏的。
该神经网络为待更新的模型,例如该神经网络可以为待更新的深度神经网络。深度神经网络由神经元组成,具体地,该深度神经网络可以由具有两个隐藏层的多层感知器(Multi-Layer Perceptron,简称为MLP)神经网络的神经元连接组成。由于深度神经网络包括了某输入向量中的非零元,使得在神经网络训练的每一次反向传播计算中,均需要神经元参与,因此,深度神经网络比一般的神经网络更为复杂。
S202,通过第一待处理数据中的第一目标数据对神经网络进行第一预设次数的迭代训练,得到神经网络的种子模型,其中,该第一目标数据位于第一时间窗口内,该种子模型为该神经网络的初始化模型。
在获取输入至神经网络的第一待处理数据之后,可以对数据处理的模型进行初始化,进一步地,可以对数据处理的模型进行随机初始化。
在冷启动状态下,以当前时间倒溯,可以确定出第一时间窗口,该第一时间窗口也即滑动数据窗口,为冷启动训练时的固定数据窗口。其中,冷启动状态为对神经网络进行首次处理时的状态,为一种软件启动状态,比如,可以为故障恢复之后的处理状态。
具体地,第一目标数据的时间跨度可以为(当前时间减去第一时间窗口对应的时间,当前时间),通过第一待处理数据中位于第一时间窗口内的第一目标数据,可以对神经网络进行第一预设次数的迭代训练,从而得到神经网络的种子模型,其中,该第一预设次数为通过该第一目标数据对神经网络进行迭代的迭代次数,且每一次迭代训练都有学习步长。
该种子模型为神经网络的初始化模型,暂时不进行线上发布,并且,该种子模型也为用于启动模型增量更新训练的首个模型,可以通过冷启动、随机初始化,使用一定时间窗 口数据,进行多轮迭代训练得到。当然,除了上述实现方式以外,还可以通过使用第一时间窗口内的点击曝光数据训练模型一个迭代,得到神经网络的种子模型。
S203,获取在第一时间窗口对应的时间之后产生的第一新增数据,并将第一新增数据和第一待处理数据合并为第二待处理数据。
在通过第一目标数据对神经网络进行第一预设次数的迭代训练,得到神经网络的种子模型之后,随着时间的推移,若在第一时间窗口对应的时间之后产生第一新增数据,则可以获取该第一新增数据,并将第一新增数据和第一待处理数据合并得到第二待处理数据,该第二待处理数据为接下来处理的数据对象。
S204,通过第二待处理数据中位于第二时间窗口内的第二目标数据对种子模型进行第二预设次数的迭代训练,得到神经网络的第一增量模型,其中,第二时间窗口与第一时间窗口具有第一预设重叠区域,第二预设次数小于等于第一预设次数。
在通过第一目标数据对神经网络进行第一预设次数的迭代训练,得到神经网络的种子模型之后,对种子模型以增量更新的方式训练新的模型,也即,对种子模型进行一次增量更新训练。
在本实施例中,可以通过第一时间窗口得到第二时间窗口,例如,可以基于种子模型,通过滑动第一时间窗口,使滑动后的第一时间窗口的右边界契合当前时间,此时,可以将该滑动后的第一时间窗口的右边界作为第二时间窗口的右边界,即第二时间窗口的右边界可以契合当前时间。然后,获取第二时间窗口的长度,接着,将第二时间窗口的右边界向前推移第二时间窗口的长度,得到第二时间窗口的左边界。在得到第二时间窗口的左、右边界后,即可得到第二时间窗口。
在得到第二时间窗口之后,可以通过第二时间窗口内的第二目标数据训练模型第二预设次数迭代,得到第一增量模型,该第一增量模型可以在推送上线时预估数据的点击率,其中,每一次迭代训练都有学习步长。在一种实施方式中,该第二预设次数可以小于或等于第一预设次数。当然,除了上述实现方式以外,可选地,还可以使用第二时间窗口内的广告点击曝光数据训练模型第二预设次数迭代,得到第一增量模型,该第一增量模型可以在推送上线时预估广告点击率。
需要说明的是,在本申请实施例中,第二时间窗口的长度与第一时间窗口的长度可以相同,也可以不同,在这里不对第二时间窗口的长度做任何限定。
例如,当上述第一时间窗口的时间长度与第二时间窗口的长度相同时。假设第一时间窗口的长度与第二时间窗口的长度都为23小时,第一时间窗口的左边界为一天的00:00,第一时间窗口的右边界为当天的23:00,且当前时间为23:10。由于第一时间窗口的右边界和当前时间相差10分钟,因此,需要将第一时间窗口向右滑动10分钟,得到第二时间窗口的左边界为当天的00:10,第二时间窗口的右边界为当天的23:10(也即,当前时间),从而实现根据当前时间和第一时间窗口确定第二时间窗口的目的。
例如,当上述第一时间窗口的时间长度与第二时间窗口的长度不同时。假设第一时间窗口的长度为23小时,第一时间窗口的左边界为一天的00:00,第一时间窗口的右边界为当天的23:00,第二时间窗口的长度为22小时,且当前时间为23:10。由于第一时间窗口的 右边界和当前时间相差10分钟,因此,需要将第一时间窗口的右边界向右滑动10分钟,得到第二时间窗口的右边界为当天的23:10(也即,当前时间),第二时间窗口的左边界为第二时间窗口的右边界向前推移22小时,也即,第二时间窗口的左边界为当天的01:10,从而实现根据当前时间和第一时间窗口确定第二时间窗口的目的。
S205,将第一增量模型进行线上发布。
在通过第二目标数据对种子模型进行第二预设次数的迭代训练,得到神经网络的第一增量模型之后,将第一增量模型进行线上发布,也即,将第一增量模型推送上线,用于预估数据的点击率,直至下次新模型推送。
需要说明的是,第一增量模型在更新训练的过程中,应适当减少模型学习步长,以避免一些训练好的权重离开最优点。因此,在本实施例一种可能的实现方式中,学习步长应小于等于种子模型训练阶段最后一个迭代所用的学习步长。
由于对数据处理的模型采用增量更新训练的方式,并且每次需要训练的迭代次数小于或等于固定数据窗口所需的迭代次数,因此大大加快了线上模型的更新速度,能更快地反应用户行为变化和新数据上线的影响。另外,由于模型可以记忆更持久的用户信息和数据信息,因此,对于数据长期投放的行为和用户点击行为拟合更加准确。
需要说明的是,当增量模型以成百上千的数量增加时,深度神经网络具备更强的表达能力,对数据非线性特征的拟合能力更强,对增量模型的多个权重的处理能力更强,从而可以更准确地预估CTR,进而可以提升预估广告点击率的能力,上述技术方案优选适用于对深度神经网络中的第一待处理数据进行处理的方法。
通过上述S201至S205,可以实现通过获取输入至神经网络的第一待处理数据,其中,神经网络为待更新的模型;通过第一待处理数据中位于第一时间窗口内的第一目标数据对神经网络进行第一预设次数的迭代训练,得到神经网络的种子模型,其中,种子模型为神经网络的初始化模型;获取在第一时间窗口对应的时间之后产生的第一新增数据,并将第一新增数据和第一待处理数据合并为第二待处理数据;通过第二待处理数据中位于第二时间窗口内的第二目标数据对种子模型进行第二预设次数的迭代训练,得到神经网络的第一增量模型,其中,第二时间窗口与第一时间窗口具有第一预设重叠区域。在一种实施方式中,第二预设次数可以小于或等于第一预设次数;将第一增量模型进行线上发布,从而可以解决数据处理的模型不能快速更新的问题,进而达到了快速更新数据处理的模型的技术效果。
上述实施例得到神经网络的种子模型以及第一增量模型后,为避免模型从头训练带来的时间开销,达到快速更新数据处理中的模型的目的,作为一种可选的实施例,在将第一增量模型进行线上发布之后,根据第一时间和第二时间窗口确定第三时间窗口,通过第三待处理数据中位于第三时间窗口内的第三目标数据对第一增量模型进行第三预设次数的迭代训练,得到神经网络的第二增量模型,将第二增量模型进行线上发布。接下来,将结合图3对该实施方式进行具体说明。
图3是根据本申请实施例的另一种数据处理方法的流程图。如图3所示,该数据处理方法还包括以下步骤:
S301,根据第一时间和第二时间窗口确定第三时间窗口。
在本申请上述S301提供的技术方案中,在将第一增量模型进行线上发布之后,根据第一时间和第二时间窗口确定第三时间窗口,其中,第三时间窗口与第二时间窗口具有第二预设重叠区域。
具体地,在将第一增量模型进行线上发布之后,对数据处理中的模型进行第二次增量更新训练。基于第一增量模型,滑动第二时间窗口,使滑动后的第二时间窗口的右边界契合第一时间,并以第一时间确定为第三时间窗口的右边界,即第三时间窗口的右边界契合第一时间,从而得到第三时间窗口,该第三时间窗口与第二时间窗口具有时间上的重叠区域。需要强调的是,第一时间可以为任意时间,当然,也可以理解为第二增量更新训练时所对应的当前时间。
需要说明的是,本申请实施例中,根据第一时间和第二时间窗口确定第三时间窗口的具体实现方式将在后面进行详细说明。
S302,获取在第二时间窗口对应的时间之后产生的第二新增数据,并将第二新增数据和第二待处理数据合并为第三待处理数据。
在本申请上述S302提供的技术方案中,随着时间的推移,在第二时间窗口对应的时间之后产生第二新增数据,获取第二新增数据,并将第二新增数据和第二待处理数据合并为第三待处理数据,该第三待处理数据为接下来处理的数据对象。
S303,通过第三待处理数据中位于第三时间窗口内的第三目标数据对第一增量模型进行第三预设次数的迭代训练,得到神经网络的第二增量模型,其中,第三目标数据位于所述第三时间窗口内。
在本申请上述S303提供的技术方案中,在根据第一时间和第二时间窗口确定第三时间窗口之后,对第一增量模型以增量更新的方式训练新的模型,也即,对第一增量模型进行一次增量更新训练。通过第三时间窗口内的第三目标数据训练模型第三预设次数迭代,得到第二增量模型,该第二增量模型可以在推送上线时预估数据的点击率,其中,每一次迭代训练都有学习步长。在一种实施方式中,该第三预设次数可以小于或等于第一预设次数。当然,除了上述实现方式以外,可选地,还可以使用第三时间窗口内的广告点击曝光数据训练模型第三预设次数迭代,得到第二增量模型,该第二增量模型可以在推送上线时预估广告点击率。
该实施例可以用于基于海量数据训练用于广告点击率预估的深度学习模型时,避免模型从头训练带来的时间开销,达到了模型快速更新的目的。
S304,将第二增量模型进行线上发布。
在通过第三目标数据对种子模型进行第三预设次数的迭代训练,得到神经网络的第二增量模型之后,将第二增量模型进行线上发布,也即,将第二增量模型推送上线,用于预估数据的点击率,直至下次新模型推送。
需要说明的是,第二增量模型在更新训练的过程中,应适当减少模型学习步长,以避免一些训练好的权重离开最优点。因此,在本实施例一种可能的实现方式中,学习步长应小于等于种子模型训练阶段最后一个迭代所用的学习步长。
由于对于数据处理的模型的更新训练,在产生第二新增数据后,不需要对模型从头开始训练,而是将第二新增数据和所述第二待处理数据合并为第三待处理数据,接着利用第三待处理数据中的第三目标数据对第一增量模型进行第三预设次数的迭代训练,得到神经网络的第二增量模型,并且每次需要训练的迭代次数小于或等于固定数据窗口所需的迭代次数,因此大大加快了线上模型的更新速度,能更快地反应用户行为变化和新数据上线的影响。另外,由于模型可以记忆更持久的用户信息和数据信息,因此,对于数据长期投放的行为和用户点击行为拟合更加准确。
该实施例通过在将第一增量模型进行线上发布之后,根据第一时间和第二时间窗口确定第三时间窗口,其中,第三时间窗口与第二时间窗口具有第二预设重叠区域;获取在第二时间窗口对应的时间之后产生的第二新增数据,并将第二新增数据和第二待处理数据合并为第三待处理数据;通过第三待处理数据中位于第三时间窗口内的第三目标数据对第一增量模型进行第三预设次数的迭代训练,得到神经网络的第二增量模型;将第二增量模型进行线上发布,实现了对数据处理中的模型的更新,达到了快速更新数据处理中的模型的效果。
作为一种可选的实施例,S301中的“根据第一时间和第二时间窗口确定第三时间窗口”的步骤,可以包括:在判断出有用于推送新模型的指示信息的情况下,将第一时间确定为第三时间窗口的右边界,滑动第二时间窗口至第三时间窗口的右边界,并将第三时间窗口的右边界向前推移第三时间窗口的长度,得到第三时间窗口的左边界,根据第三时间窗口的右边界和第三时间窗口的左边界确定第三时间窗口。
接下来,结合图4来说明本申请实施例中如何根据第一时间和第二时间窗口确定第三时间窗口。
图4是根据本申请实施例的一种根据第一时间和第二时间窗口确定第三时间窗口的方法的流程图。如图4所示,该一种根据第一时间和第二时间窗口确定第三时间窗口的方法包括以下步骤:
S401,判断是否有用于推送新模型的指示信息,其中,新模型包括第二增量模型。
在将第一增量模型进行线上发布之后,需要对是否有用于推送新模型的指示信息进行判断,其中,该新模型包括第二增量模型,即需要判断是否有用于推送第二增量模型的指示信息。
S402,将第一时间确定为第三时间窗口的右边界,滑动第二时间窗口至第三时间窗口的右边界,并将第三时间窗口的右边界向前推移第三时间窗口的长度,得到第三时间窗口的左边界,根据第三时间窗口的右边界和第三时间窗口的左边界确定第三时间窗口。
在本申请上述S402提供的技术方案中,如果通过S401判断出有用于推送新模型的指示信息,则可以将第一时间确定为第三时间窗口的右边界,具体地,可以通过滑动第二时间窗口至第一时间,使滑动后的第二时间窗口的右边界契合第一时间,从而得到第三时间窗口的右边界。接着,将第三时间窗口的右边界向前推移第三时间窗口的长度,便可以得到该第三时间窗口的左边界,从而可以根据第三时间窗口的右边界和第三时间窗口的左边界确定出第三时间窗口。
具体地,在通过S401判断是否有用于推送新模型的指示信息之后,如果判断出有指示信息,则对数据处理的模型进行第二次增量更新训练。基于第一增量模型,可以滑动第二时间窗口,使滑动后的第二时间窗口的右边界契合第一时间,该滑动后的第二时间窗口的右边界即为第三时间窗口的右边界。然后,获取第三时间窗口的长度,接着,将第三时间窗口的右边界向前推移第三时间窗口的长度,得到第三时间窗口的左边界。在得到第三时间窗口的左、右边界后,即可根据第三时间窗口的右边界和左边界确定第三时间窗口。
需要说明的是,在本申请实施例中,第三时间窗口的长度与第二时间窗口的长度可以相同,也可以不同,在这里不对第三时间窗口的长度做任何限定。
例如,当上述第二时间窗口的时间长度与第三时间窗口的长度相同时。假设第二时间窗口的长度与第三时间窗口的长度都为23小时,第二时间窗口的左边界为一天的00:00,第二时间窗口的右边界为当天的23:00,且第一时间为23:10。由于第二时间窗口的右边界和第一时间相差10分钟,因此,需要将第二时间窗口向右滑动10分钟,得到第三时间窗口的左边界为当天的00:10,第三时间窗口的右边界为当天的23:10(也即,第一时间),从而实现根据第一时间和第二时间窗口确定第三时间窗口的目的。
例如,当上述第二时间窗口的时间长度与第三时间窗口的长度不同时。假设第二时间窗口的长度为23小时,第二时间窗口的左边界为一天的00:00,第二时间窗口的右边界为当天的23:00,第三时间窗口的长度为22小时,且第一时间为23:10。由于第二时间窗口的右边界和第一时间相差10分钟,因此,需要将第二时间窗口的右边界向右滑动10分钟,得到第三时间窗口的右边界为当天的23:10(也即,第一时间),第三时间窗口的左边界为第三时间窗口的右边界向前推移22小时,也即,第三时间窗口的左边界为当天的01:10,从而实现根据第一时间和第二时间窗口确定第三时间窗口的目的。
该实施例通过判断是否有用于推送新模型的指示信息,其中,新模型包括第二增量模型;如果判断出有指示信息,将第一时间确定为第三时间窗口的右边界,滑动第二时间窗口至第三时间窗口的右边界,将第三时间窗口的右边界向前推移第三时间窗口的长度,得到第三时间窗口的左边界,根据第三时间窗口的右边界和第三时间窗口的左边界确定第三时间窗口,实现了根据第一时间和第二时间窗口确定第三时间窗口的目的。
由于通过训练得到了神经网络的种子模型之后,每次均以增量更新的方法来训练新模型,这样,会导致随着时间的推移,更新的增量将不断积累,使得模型尺寸不断膨胀,占用较大的存储空间。并且,在数据的应用场景中,每个数据都有一定的生命期,在数据投放的时间超过预定的投放时间时,数据将下架停止投放,此类数据将成为失效数据,此后再去预估下架的数据是毫无意义的。
故此,在本申请的一种可选的实施例中,在将第一增量模型进行线上发布之后,可以按照预设周期在判断出第一增量模型中存在失效数据的情况下,从第一增量模型中清除失效数据,得到更新增量模型,并将更新增量模型进行线上发布。接下来,将结合图5对该实施方式进行具体说明。
图5是根据本申请实施例的另一种数据处理方法的流程图。如图5所示,该数据处理方法还包括以下步骤:
S501,按照预设周期判断第一增量模型中是否存在失效数据。
在本申请上述S501提供的技术方案中,在将第一增量模型进行线上发布之后,按照预设周期判断第一增量模型中是否存在失效数据,其中,失效数据为停止推送的第一待处理数据。
由于定期从模型中清除失效数据,可以定期从模型中清除失效数据的键值。因此,对于第一增量模型而言,在将第一增量模型进行线上发布之后,可以按照预设周期判断第一增量模型中是否存在上述失效数据。
S502,从第一增量模型中清除失效数据,得到更新增量模型。
在本申请上述S502提供的技术方案中,如果按照预设周期判断出第一增量模型中存在失效数据,则从第一增量模型中清除失效数据,得到更新增量模型。
在按照预设周期判断第一增量模型中是否存在失效数据之后,如果按照预设周期判断第一增量模型存在失效数据,也即,第一增量模型中的数据随着时间的推移,下架停止投放,则从第一增量模型中清除下架停止投放的数据,得到不存在失效数据的更新增量模型,从而使模型保持合理的大小,避免模型的尺寸不断膨胀,且投放毫无意义的数据。
S503,将更新增量模型进行线上发布。
在从第一增量模型中清除失效数据,得到不存在失效数据的更新增量模型之后,将该更新增量模型进行上线推送,预估数据的点击率。
该实施例在将第一增量模型进行线上发布之后,按照预设周期判断第一增量模型中是否存在失效数据,其中,失效数据可以为停止推送的第一待处理数据。如果按照预设周期判断出第一增量模型中存在失效数据,则从第一增量模型中清除失效数据,得到不存在失效数据的更新增量模型,接着,将该更新增量模型进行线上发布,从而使模型保持合理的大小,避免模型的尺寸不断膨胀,且投放毫无意义的数据,进而实现了快速更新数据处理的模型的技术效果。
作为一种可选的实施例,S502中的“从第一增量模型中清除失效数据,得到更新增量模型”的步骤,可以包括:获取第一增量模型中不在通过将第二时间窗口扩大预设倍数得到的第四时间窗口内的第二待处理数据,将第一增量模型中不在第四时间窗口内的第二待处理数据作为失效数据;从第一增量模型中清除失效数据,得到更新增量模型。
接下来,结合图6来说明本申请实施例中如何从第一增量模型中清除失效数据,得到更新增量模型。
图6是根据本申请实施例的一种从第一增量模型中清除失效数据的方法的流程图。如图6所示,该从第一增量模型中清除失效数据,得到更新增量模型的方法包括以下步骤:
S601,将第二时间窗口扩大预设倍数,得到第四时间窗口。
在将第一增量模型进行线上发布之后,如果按照预设周期判断出第一增量模型中存在失效数据,则将第二时间窗口按照时间拉长的预设倍数进行扩大,得到第四时间窗口。并以第四时间窗口为屏障,也就是说,以第四时间窗口的边界作为判断数据是否为失效数据的界限,若数据处于第四时间窗口内,则可以认为该数据并非失效数据,若数据并不处于第四时间窗口内,则可以认为该数据为失效数据。
S602,获取第一增量模型中的第二待处理数据,将该第二待处理数据作为所述失效数据,其中,第二待处理数据不在第四时间窗口内。
在将第二时间窗口扩大预设倍数,得到第四时间窗口之后,由于不处于第四时间窗口内的数据,可以认为该数据为失效数据。因此,可以获取第一增量模型中不在第四时间窗口内的第二待处理数据,并将该第二待处理数据作为第一增量模型中的失效数据。也就是说,可以获取第一增量模型中不在该第四时间窗口内的特征,并可以将该特征作为第一增量模型中的失效数据,其中,该第一增量模型中不在第四时间窗口内的特征可以为神经网络的神经元代表。
S603,从第一增量模型中清除失效数据,得到更新增量模型。
在获取第一增量模型中不在第四时间窗口内的第二待处理数据之后,可以将该第二待处理数据作为第一增量模型中的失效数据。接着,从第一增量模型中清除该第二待处理数据(即失效数据),得到更新增量模型,也即,清除第一增量模型中不在第四时间窗口内的特征,得到更新增量模型。
上述清除失效数据的方法同样适用于从第二增量模型中清除失效数据的方法,以及在后续模型训练的过程中,对后续产生的新模型中的失效数据进行清除的方法,此处不再赘述。
该实施例通过将第二时间窗口扩大预设倍数,得到第四时间窗口;获取第一增量模型中不在第四时间窗口内的第二待处理数据,其中,将第一增量模型中不在第四时间窗口内的第二待处理数据作为失效数据;从第一增量模型中清除失效数据,得到更新增量模型,实现了从第一增量模型中清除失效数据,得到更新增量模型的目的,从而使模型保持合理的大小,进而达到了快速更新数据处理的模型的技术效果。
作为一种可选的实施例,在推送更新增量模型上线之后,可以根据第二时间和第四时间窗口确定第五时间窗口,并根据第五时间窗口内的第四待处理数据对更新增量模型进行第四预设次数的迭代训练,得到神经网络的第三增量模型,并将第三增量模型进行线上发布。接下来,将结合图7对该实施方式进行具体说明。
图7是根据本申请实施例的另一种数据处理方法的流程图。如图7所示,该数据处理方法还包括以下步骤:
S701,根据第二时间和第四时间窗口确定第五时间窗口。
在本申请上述S701提供的技术方案中,在推送更新增量模型上线之后,可以根据第二时间和第四时间窗口确定第五时间窗口,其中,第五时间窗口与第四时间窗口具有第三预设重叠区域。
在推送更新增量模型上线之后,可以对更新增量模型进行增量更新训练。首先,根据第二时间和第四时间窗口确定第五时间窗口,该第五时间窗口和第四时间窗口具有第三预设重叠区域。具体而言,可以将第二时间确定为第五时间窗口的右边界,即第五时间窗口的右边界可以契合第二时间。具体地,可以通过滑动第四时间窗口至第二时间,使滑动后的第四时间窗口的右边界契合第二时间,从而得到第五时间窗口的右边界。接着,将第五时间窗口的右边界向前推移第五时间窗口的长度,便可以得到该第五时间窗口的左边界, 从而可以根据第五时间窗口的右边界和第五时间窗口的左边界确定出第五时间窗口。需要强调的是,第二时间可以为任意时间,当然,也可以理解为第三增量更新训练时所对应的当前时间。
S702,获取在第四时间窗口对应的时间之后产生的第三新增数据,并将第三新增数据和第二待处理数据合并为第四待处理数据。
在本申请上述S702提供的技术方案中,随着时间的推移,在第四时间窗口对应的时间之后产生第三新增数据,获取第三新增数据,并将第三新增数据和第一待处理数据合并为第四待处理数据,可以将该第四待处理数据作为接下来处理的数据对象。
S703,通过第四待处理数据中位于第五时间窗口内的第四目标数据对更新增量模型进行第四预设次数的迭代训练,得到神经网络的第三增量模型。
在本申请上述S703提供的技术方案中,根据第五时间窗口内的第四目标数据对更新增量模型进行第四预设次数的迭代训练,得到神经网络的第三增量模型。
在根据第二时间和第四时间窗口确定第五时间窗口之后,确定第四待处理数据中位于第五时间窗口内的第四目标数据,通过第四目标数据对更新增量模型进行第四预设次数的迭代训练。其中,该第四目标数据可以为广告点击曝光数据,即可以通过广告点击曝光数据对更新增量模型进行第四预设次数的迭代。在一种实施方式中,该第四预设次数可以小于或等于第一预设次数。这样,可以大大加快了线上模型的更新速度,能更快地反应用户的行为变化和新广告上线的影响。
S704,将第三增量模型进行线上发布。
在通过第四待处理数据中位于第五时间窗口内的第四目标数据对更新增量模型进行第四预设次数的迭代训练,得到神经网络的第三增量模型之后,对第三增量模型进行推送上线,用于预估对数据的点击率,可以预估对广告的点击率。
由于第三增量模型中存在停止推送的第一待处理数据,也即,第三增量模型中存在失效数据,并且,随着时间的推移,模型将不断累积新增数据,使得模型尺寸不断膨胀,因此,为了维持模型合理的大小,需要对第三增量模型中的失效数据也进行清除。在一种实施方式中,从第一增量模型中清除失效数据的方法的同样适用于从第三增量模型中清除失效数据的方法,即对模型中的无效数据进行清除的方法同样可以采取上述从第一增量模型中清除失效数据的方法,此处不再赘述。
该实施例通过在推送更新增量模型上线之后,根据第二时间和第四时间窗口确定第五时间窗口,其中,第五时间窗口与第四时间窗口具有第三预设重叠区域;通过第四待处理数据中位于第五时间窗口内的第四目标数据对更新增量模型进行第四预设次数的迭代训练,得到神经网络的第三增量模型;将第三增量模型进行线上发布,达到了快速更新数据处理的模型的技术效果。
作为一种可选的实施例,在通过第二时间窗口内的第一待处理数据对种子模型进行第二预设次数的迭代训练,得到神经网络的第一增量模型之后,可以通过第一增量模型对历史数据进行拟合,得到拟合结果,通过第一增量模型携带拟合结果。接下来,将结合图8对该实施方式进行具体说明。
图8是根据本申请实施例的另一种数据处理方法的流程图。如图8所示,该数据处理方法还包括以下步骤:
S801,通过第一增量模型对历史数据进行拟合,得到拟合结果。
在本申请上述S801提供的技术方案中,在通过第二时间窗口内的第一待处理数据对种子模型进行第二预设次数的迭代训练,得到神经网络的第一增量模型之后,通过第一增量模型对历史数据进行拟合,得到拟合结果,其中,该历史数据可以为处理过的待处理数据。
在通过第二时间窗口内的第一待处理数据对种子模型进行第二预设次数的迭代训练,得到神经网络的第一增量模型之后,获取所有第一增量模型中的历史数据,接着,通过第一增量模型对历史数据进行拟合,得到拟合结果,从而可以获取对历史数据的拟合状态。例如,当该历史数据是历史广告数据时,可以通过学习拟合广告历史曝光数据,使得拟合结果具有在未来一段时间内预测广告点击率的作用。
S802,通过第一增量模型携带拟合结果。
通过第一增量模型对历史数据进行拟合,得到拟合结果之后,通过第一增量模型携带拟合结果。通过模型增量式训练使得模型中永远携带有对所有历史数据的拟合状态,相较于基于一定数据全量训练的模型,该通过模型增量式训练的模型对于用户行为和数据信息的认知更加泛化,因此该通过模型增量式训练的模型对于数据的点击率拟合预估更加准确。
该实施例通过第二时间窗口内的第一待处理数据对种子模型进行第二预设次数的迭代训练,得到神经网络的第一增量模型之后,通过第一增量模型对历史数据进行拟合,得到拟合结果,其中,历史数据为处理过的待处理数据;通过第一增量模型携带拟合结果,实现了模型增量式训练使得模型中永远携带有对所有历史数据的拟合状态,达到了提高拟合预估准确性的效果。
作为一种可选的实施例,S202中的“通过第一待处理数据中位于第一时间窗口内的第一目标数据对神经网络进行第一预设次数的迭代训练”的步骤可以包括:在冷启动状态下,对神经网络的各层参数进行随机初始化处理,得到初始化参数,其中,冷启动状态为对神经网络进行首次处理时的状态;接着,通过第一待处理数据中位于第一时间窗口内的第一目标数据和初始化参数对神经网络进行第一预设次数的迭代训练,得到神经网络的种子模型。接下来,将结合图9对该实施方式进行具体说明。
图9是根据本申请实施例的一种通过第一待处理数据中位于第一时间窗口内的第一目标数据对神经网络进行第一预设次数的迭代训练的方法的流程图。如图9所示,该方法包括以下步骤:
S901,在冷启动状态下,对神经网络的各层参数进行随机初始化处理,得到初始化参数。
其中,冷启动状态为对神经网络进行首次处理时的状态,为一种软件启动状态,比如,可以为在故障恢复之后的处理状态。
由于神经网络具有多层,因此,为了获取神经网络各层参数,需对各层参数进行随机初始化处理,比如可以采用平均分布随机初始化方法、高斯分布随机初始化方法、Xavier初始化方法等对神经网络的各层参数进行初始化处理,得到初始化参数。
S902,通过第一待处理数据中位于第一时间窗口内的第一目标数据和初始化参数对神经网络进行第一预设次数的迭代训练,从而得到神经网络的种子模型。
在图像分类领域,使用深度卷积神经网络训练图像分类模型时,在有标注的训练数据量较少时,往往在采用以ImageNet公开数据集训练基准1000分类模型A后,保留所有卷积层,重新初始化全连接层和设置分类目标,再使用自己的数据来训练出符合自己领域分类需求的模型。
一次全量的模型训练需要在随机初始化的模型基础上,使用充分的训练数据经过多轮迭代得到充分拟合数据的收敛模型,该收敛模型可以用于对数据进行处理。
该实施例通过在冷启动状态下,对神经网络的各层参数进行随机初始化处理,得到初始化参数;通过第一待处理数据中位于第一时间窗口内的第一目标数据和初始化参数对神经网络进行第一预设次数的迭代训练,得到神经网络的种子模型,从而实现了通过第一待处理数据中位于第一时间窗口内的第一目标数据对神经网络进行第一预设次数的迭代训练的目的,进而为达到了快速更新数据处理的模型的技术效果提供了基础。
作为一种可选的实施例,对神经网络的各层参数进行随机初始化处理可以包括但不限于以下方法之一:对该神经网络的各层参数分别进行按某常数初始化处理;对神经网络的各层参数进行平均分布随机初始化处理;对神经网络的各层参数进行高斯分布随机初始化处理;对神经网络的各层参数进行Xavier初始化处理。
作为一种可选的实施例,上述数据处理方法可以应用于预设场景下,该预设场景可以包括以下场景之一:媒体文件的CTR预估场景;图像识别模型的训练场景;语音识别模型的训练场景;自然语言理解模型的训练场景。
该实施例从两个方面考虑,一方面是否可以从旧模型中接力训练而避免从头学习;另一方面是否可以利用旧模型对历史数据的拟合能力,使得模型保持对所有知识的记忆,如果数据处理中的模型一直保持接力训练,则理论上任何历史数据都被模型学习过,而并非像基于特定数据集的冷启动全量训练一样,只对该特定数据集具有拟合能力。本申请实施例的功能特性为提升数据点击率预估的准确性,从而提升数据点击率和收入;性能特性为提升模型的训练效率,通过减少模型推送间隔和提高模型质量的方式,达到了快速反应用户和数据变化的目的。
需要说明的是,在该实施例的增量模型的更新方法中,在得到种子模型之后,后续在每一次模型的更新过程中,总是基于上次模型进行迭代训练得到新的增量模型,并将新的增量模型推送上线,如此不断进行下去,同时依据数据的特点定期从模型中删除失效数据以保持模型的规模和精度,上述增量模型包括但不限于上述第一增量模型、第二增量模型和第三增量模型。
实施例2
下面结合优选的实施例对本申请的技术方案进行说明,具体以深度神经网络模型的增量更新方法为例,以媒体文件的CTR预估场景进行说明。
当增量模型以成百上千的数量增加时,深度神经网络具备更强的表达能力,对数据非线性特征的拟合能力更强,对增量模型的多个权重的处理能力更强,从而可以更准确地预 估CTR,进而可以提升预估广告点击率的能力。
该实施例的深度神经网络结构,是多层感知器MLP,它的基本特征是:网络中每个神经元模型包含一个可微的非线性激活函数;深度神经网络中包括一个或多个隐藏在输入和输出神经节点之间的层;深度神经网络展示出高度的连接性,其强度是由深度神经网络的突触权值决定的。可选地,训练MLP的常用的算法是反向传播算法(Back Propagation,简称为BP)。
当媒体文件为广告时,点击率预估为预估一个用户点击一个广告的概率,因此有pCTR=f(user,ad)。其中,pCTR为用户点击一个广告的概率(Click-Through Rate Prediction),user为用户特征,ad为广告特征。广告点击率预估是对广告曝光的效果的预测,是评价广告对用户吸引力的重要指标,直接影响在按点击计费模式下的广告投放收入。当广告曝光的数据量一定时,则有:收入=CTR*CPC,其中,CPC(Cost Per Click),表示每点击成本,为互联网广告领域的一种常见定价形式,为广告每次点击所产生的费用。
影响某一用户对于某一广告点击率的因素主要来源于用户特征和广告特征,不同用户即使对同一广告进行点击也存在巨大的区别;不同的广告的投放位置、展现形式影响用户的点击行为,不同的广告素材内容也能影响同一用户的点击行为。在基于特征的广告点击率预估实践中,逻辑回归模型是工业界长期使用来预测广告点击率模型的一种模型:
Figure PCTCN2017105813-appb-000001
其中,xi为用于描述用户特征和广告特征的向量;wi为对应于xi的每个特征的向量,表示xi中每个特征的权重,由于它能够根据特征的取值来决定pCTR,wi也被称为模型。
在数据处理中,模型训练的过程可以使用机器学习算法,通过拟合海量广告的曝光历史数据来学习,以确定wi向量的合理取值。由于逻辑规模模型的代价函数是凸函数,因此训练逻辑归回模型快速、简单,在线预测效果好。
该实施例可以应用于广告点击率预估中,是一种广告点击率预估模型训练方法。功能特性为提升广告点击率预估的准确性,从而提升了广告点击率和广告收入;性能特性为提升模型训练效率,通过减少模型推送间隔和提高模型质量的方式,达到快速反应用户和广告行为变化的目的。
在互联网广告场景下,点击流数据的产生极为迅猛,每天产生大量的广告曝光数据。广告曝光数据由于包含了广告内容、用户内容,以及时间等上下文特征,是有价值的标注数据(以点击与否作为标注)。广告点击率预估模型可以通过学习拟合广告历史曝光数据,具有在未来一段时间内预测广告点击率的能力。一方面,广告点击率预估模型需要快速更新,这是因为用户行为和广告素材是时刻变化的;另一方面,要求广告点击率预估模型拟合海量历史数据以学习用户点击广告行为模式的不变特性。因此对于广告点击率预估模型的更新训练,若每次丢弃之前模型从头训练,将是十分浪费的。而根据迁移学习可知,根据模型学习到的知识是可以保留、迁移的,因此本技术方案采用增量更新方法训练广告点击率预估模型,下面对增量更新方法训练广告点击率预估模型进行介绍:
图10是根据本申请实施例的一种深度神经网络的全连接结构的示意图。如图10所示,该深度神经网络为2个隐藏层的MLP神经网络的神经元连接,比一般的神经网络更复杂。 该深度神经网络的输入是将训练数据中每条广告曝光日志中用户特征和广告特征组合离散化后的独热编码(One-Hot Encoding)向量,输出为点击率预估。该深度神经网络包括了由于某输入向量中非零元使得深度神经网络训练中一次反向传播计算中需要参与的神经元,如图10中的斜划线神经元。该深度神经网络适用于广告CTR预估场景的深度学习模型(Deep Neural Networks,简称为DNN)。
图11是根据本申请实施例的另一种数据处理方法的流程图。如图11所示,该数据处理方法包括以下步骤:
步骤1:训练种子模型。
在冷启动状态下,通过初始化模型M,对模型M各层参数使用随机初始化方法;以当前时间倒溯,确定数据窗口T0,则数据窗口T0内数据时间跨度为[当前时间-T0,当前时间);使用数据窗口T0内广告点击曝光数据训练模型I个迭代,训练得到种子模型M0,对种子模型暂不推送上线。
在一种实施方式中,该实施例中的训练种子模型所描述的步骤,对初始化模型的随机初始化方法可以为平均分布随机初始化方法、高斯分布随机初始化方法、Xavier初始化方法等。
步骤2:增量更新模型。
第1次增量更新训练:基于种子模型M0,滑动数据窗口T0,使数据窗口T0的右边界契合当前时间,得到滑动数据窗口T1;使用滑动数据窗口T1内广告点击曝光数据训练模型i个迭代,其中i<<I。
训练得到模型M1,推送模型M1上线,用于预估广告点击率,直至下次新模型推送。
第2次增量更新训练:
第2次增量更新训练:基于上一模型M1,滑动数据窗口T1,使数据窗口T1的右边界契合当前时间,得到滑动数据窗口T2;使用滑动数据窗口T2内广告点击曝光数据训练模型i个迭代,其中i<<I。
训练得到模型M2,推送模型M2上线,用于预估广告点击率,直至下次新模型推送。
以此类推,第n次增量更新训练:基于上一模型Mn-1,滑动数据窗口Tn-1,使数据窗口Tn-1的右边界契合当前时间,得到滑动数据窗口Tn;使用滑动数据窗口Tn内广告点击曝光数据训练模型i个迭代,其中i<<I。
训练得到模型Mn,推送模型Mn上线用于预估广告点击率,直至下次新模型推送。
模型在增量更新训练阶段,应适当减少模型学习步长,学习步长应小于或等于种子模型训练阶段最后1个迭代所用学习步长,以避免训练好的权重离开最优点。
需要说明的是,该实施例在增量更新训练模型所描述步骤,所用学习迭代数为可调配的,不应以不同的学习迭代数作为新的创意。
步骤3:定期清除失效键。
由于在训练种子模型之后,每次以增量更新步骤训练新模型,随时间的推移模型将不断累积使得模型尺寸不断膨胀。而互联网广告场景的特点是,每条广告具有一定的生命期t,超过预定投放时间后,广告将下架停止投放,于是此后再去预估这一类停止投放的广告 将是毫无意义的。
设立定期从模型中清除失效键的步骤,从而维持模型保持合理的大小,保持学习投放中的广告。
图12是根据本申请实施例的一种定期清除失效键的示意图。如图12所示,对于某次增量更新模型Mn,以数据窗口Tn按时间拉长x倍得到Tn’为屏障,清除模型Mn不在此数据窗口内的特征(神经元代表),也即,清除无效key所代表的输入层神经元及连接关系,得到模型Mn’,在下次(第n+1次)增量更新训练中,以Mn’代替Mn作为基准模型。
本技术方案的适用领域除了在广告CTR预估场景外,对于图像识别模型训练、语音识别模型训练、自然语言理解模型训练等场景,也是适用的、可移植的。
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本申请所必须的。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。
实施例3
根据本申请实施例,还提供了一种用于实施上述数据处理方法的数据处理装置。图13是根据本申请实施例的一种数据处理装置的示意图。如图13所示,该数据处理装置可以包括:第一获取单元10、第一迭代单元20、第二获取单元30、第二迭代单元40和第一发布单元50。
第一获取单元10,用于获取输入至神经网络的第一待处理数据,其中,神经网络为待更新的模型。
第一迭代单元20,用于通过第一待处理数据中的第一目标数据对神经网络进行第一预设次数的迭代训练,得到神经网络的种子模型,其中,所述第一目标数据位于第一时间窗口内,种子模型为神经网络的初始化模型。
第二获取单元30,用于获取在第一时间窗口对应的时间之后产生的第一新增数据,并将第一新增数据和第一待处理数据合并为第二待处理数据。
第二迭代单元40,用于通过第二待处理数据中的第二目标数据对种子模型进行第二预设次数的迭代训练,得到神经网络的第一增量模型,其中,第二目标数据位于第二时间窗口内,第二时间窗口与第一时间窗口具有第一预设重叠区域。在一种实施方式中,第二时间窗口的右边界契合当前时间,且第二预设次数小于或等于第一预设次数。
第一发布单元50,用于将第一增量模型进行线上发布。
图14是根据本申请实施例的另一种数据处理装置的示意图。如图14所示,该数据处理装置可以包括:第一获取单元10、第一迭代单元20、第二获取单元30、第二迭代单元40和第一发布单元50。该数据处理装置还包括:第一确定单元60、第三获取单元70、第三迭代单元80和第二发布单元90。
需要说明的是,该实施例的第一获取单元10、第一迭代单元20、第二获取单元30、第二迭代单元40和第一发布单元50与图13所示实施例的数据处理装置中的作用相同。此处不再赘述。
第一确定单元60,用于在将第一增量模型进行线上发布图推之后,根据第一时间和第二时间窗口确定第三时间窗口,其中,第三时间窗口与第二时间窗口具有第二预设重叠区域。在一种实施方式中,第三时间窗口的右边界契合第一时间。
第三获取单元70,用于获取在第二时间窗口对应的时间之后产生的第二新增数据,并将第二新增数据和第二待处理数据合并为第三待处理数据。
第三迭代单元80,用于通过第三待处理数据中的第三目标数据对第一增量模型进行第三预设次数的迭代训练,得到神经网络的第二增量模型,其中,第三目标数据位于第三时间窗口内。在一种实施方式中,第三预设次数小于或等于第一预设次数。
第二发布单元90,用于将第二增量模型进行线上发布。
图15是根据本申请实施例的另一种数据处理装置的示意图。如图15所示,该数据处理装置可以包括:第一获取单元10、第一迭代单元20、第二获取单元30、第二迭代单元40、第一发布单元50、第一确定单元60、第三获取单元70、第三迭代单元80和第二发布单元90。其中,第一确定单元60包括:判断模块61和确定模块62。
需要说明的是,该实施例中的第一获取单元10、第一迭代单元20、第二获取单元30、第二迭代单元40、第一发布单元50、确定单元60、第三获取单元70、第三迭代单元80和第二发布单元90与图14所示实施例的数据处理装置中的作用相同,此处不再赘述。
判断模块61,用于判断是否有用于推送新模型的指示信息,其中,新模型包括第二增量模型。
确定模块62,用于在判断出有指示信息时,将第一时间确定为第三时间窗口的右边界,滑动第二时间窗口至第三时间窗口的右边界,将第三时间窗口的右边界向前推移第三时间窗口的长度,得到第三时间窗口的左边界,根据第三时间窗口的右边界和第三时间窗口的左边界确定第三时间窗口。
图16是根据本申请实施例的另一种数据处理装置的示意图。如图16所示,该数据处理装置可以包括:第一获取单元10、第一迭代单元20、第二获取单元30、第二迭代单元40和第一发布单元50。该数据处理装置还包括:判断单元100、清除单元110和第三发布单元120。
需要说明的是,该实施例的第一获取单元10、第一迭代单元20、第二获取单元30、第二迭代单元40和第一发布单元50与图13所示实施例的数据处理装置中的作用相同,此 处不再赘述。
判断单元100,用于在将第一增量模型进行线上发布之后,按照预设周期判断第一增量模型中是否存在失效数据,其中,失效数据为停止推送的第一待处理数据。
清除单元110,用于在按照预设周期判断出第一增量模型中存在失效数据,从第一增量模型中清除失效数据,得到更新增量模型。
第三发布单元120,用于将更新增量模型进行线上发布。
图17是根据本申请实施例的另一种数据处理装置的示意图。如图17所示,该数据处理装置可以包括:第一获取单元10、第一迭代单元20、第二获取单元30、第二迭代单元40、第一发布单元50、判断单元100、清除单元110和第三发布单元120。其中,清除单元110包括:扩大模块111、获取模块112和清除模块113。
需要说明的是,该实施例的第一获取单元10、第一迭代单元20、第二迭代单元40、第一发布单元50、判断单元100、清除单元110和第三发布单元120与图16所示实施例的数据处理装置中的作用相同,此处不再赘述。
扩大模块111,用于将第二时间窗口扩大预设倍数,得到第四时间窗口。
获取模块112,用于获取第一增量模型中的第二待处理数据,将第二待处理数据作为所述失效数据,其中,第二待处理数据不在第四时间窗口内。
清除模块113,用于从第一增量模型中清除失效数据,得到更新增量模型。
在一种实施方式中,该数据处理装置还包括:第二确定单元、第四获取单元、第四迭代单元和第四发布单元。
其中,第一确定单元,用于在推送更新增量模型上线之后,根据第二时间和第四时间窗口确定第五时间窗口,其中,第五时间窗口与第四时间窗口具有第三预设重叠区域。
第四获取单元,用于获取在第四时间窗口对应的时间之后产生的第三新增数据,并将第三新增数据和第二待处理数据合并为第四待处理数据。
第四迭代单元,用于通过第四待处理数据中的第四目标数据对更新增量模型进行第四预设次数的迭代训练,得到神经网络的第三增量模型,其中,第四目标数据位于第五时间窗口内;在一种实施例中,第四预设次数小于等于第一预设次数,第五时间窗口的右边界契合第二时间。
第四发布单元,用于将第三增量模型进行线上发布。
在一种实施方式中,该数据处理装置还包括:拟合单元和携带单元。其中,拟合单元用于在通过第二时间窗口内的第一待处理数据对种子模型进行第二预设次数的迭代训练,得到神经网络的第一增量模型之后,通过第一增量模型对历史数据进行拟合,得到拟合结果,其中,历史数据为处理过的待处理数据。
携带单元,用于通过第一增量模型携带拟合结果。
在一种实施方式中,该数据处理装置还包括:第一迭代单元20包括:处理模块和迭代模块。其中,处理模块,用于在冷启动状态下,对神经网络的各层参数进行随机初始化处理,得到初始化参数,其中,冷启动状态为对神经网络进行首次处理时的状态。
迭代模块,用于通过第一待处理数据中位于第一时间窗口内的第一目标数据和初始化 参数对神经网络进行第一预设次数的迭代训练,得到神经网络的种子模型。
在一种实施方式中,上述处理模块用于对神经网络的各层参数进行随机初始化处理包括但不限于以下方法之一:对该神经网络的各层参数分别进行按某常数初始化处理;对神经网络的各层参数进行平均分布随机初始化处理;对神经网络的各层参数进行高斯分布随机初始化处理;对神经网络的各层参数进行Xavier初始化处理。
在一种实施方式中,上述预设场景可以包括以下之一:媒体文件的CTR预估场景;图像识别模型的训练场景;语音识别模型的训练场景;自然语言理解模型的训练场景
需要说明的是,该实施例中的第一获取单元10可以用于执行本申请实施例1中的S201,该实施例中的第一迭代单元20可以用于执行本申请实施例1中的S202,通过该实施例中的第二获取单元30可以用于执行本申请实施例中的S203;该实施例中的第二迭代单元40可以用于执行本申请实施例1中的S204,该实施例中第一发布单元50可以用于执行本申请实施例1中的S205。
此处需要说明的是,上述单元和模块与对应的步骤所实现的示例和应用场景相同,但不限于上述实施例1所公开的内容。需要说明的是,上述模块作为装置的一部分可以运行在如图1所示的硬件环境中,可以通过软件实现,也可以通过硬件实现,其中,硬件环境包括网络环境。
该实施例通过第一获取单元10获取输入至神经网络的第一待处理数据,其中,神经网络为待更新的模型;通过第一迭代单元20通过第一待处理数据中位于第一时间窗口内的第一目标数据对神经网络进行第一预设次数的迭代训练,得到神经网络的种子模型,其中,种子模型为神经网络的初始化模型,通过第二获取单元30获取在第一时间窗口对应的时间之后产生的第一新增数据,并将第一新增数据和第一待处理数据合并为第二待处理数据;第二迭代单元40通过第一待处理数据中位于第二时间窗口内的第二目标数据对种子模型进行第二预设次数的迭代训练,得到神经网络的第一增量模型,其中,第二时间窗口与第一时间窗口具有第一预设重叠区域,通过第一发布单元50将第一增量模型进行线上发布,从而解决了数据处理的模型不能快速更新的问题的技术问题,进而达到了快速更新数据处理的模型的技术效果。
实施例4
根据本申请实施例,还提供了一种用于实施上述数据处理方法的服务器或终端。
图18是根据本申请实施例的一种终端的结构框图。如图18所示,该终端可以包括:一个或多个(图中仅示出一个)处理器181、存储器183、以及传输装置185,如图18所示,该终端还可以包括输入输出设备187。
其中,存储器183可用于存储软件程序以及模块,如本申请实施例中的数据处理方法和装置对应的程序指令/模块,处理器181通过运行存储在存储器183内的软件程序以及模块,从而执行各种功能应用以及数据处理,即实现上述的数据处理方法。存储器183可包括高速随机存储器,还可以包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器183可进一步包括相对于处理器181远程设置的存储器,这些远程存储器可以通过网络连接至终端。上述网络的实例包括但不 限于互联网、企业内部网、局域网、移动通信网及其组合。
上述的传输装置185用于经由一个网络接收或者发送数据,还可以用于处理器与存储器之间的数据传输。上述的网络具体实例可包括有线网络及无线网络。在一个实例中,传输装置185包括一个网络适配器(Network Interface Controller,NIC),其可通过网线与其他网络设备与路由器相连从而可与互联网或局域网进行通讯。在一个实例中,传输装置185为射频(Radio Frequency,RF)模块,其用于通过无线方式与互联网进行通讯。
其中,具体地,存储器183用于存储应用程序。
处理器181可以通过传输装置185调用存储器183存储的应用程序,以执行下述步骤:
获取输入至神经网络的第一待处理数据,其中,神经网络为待更新的模型;
通过第一待处理数据中的第一目标数据对神经网络进行第一预设次数的迭代训练,得到神经网络的种子模型,其中,第一目标数据位于第一时间窗口内,种子模型为神经网络的初始化模型;
获取在第一时间窗口对应的时间之后产生的第一新增数据,并将第一新增数据和第一待处理数据合并为第二待处理数据;
通过第二待处理数据中的第二目标数据对种子模型进行第二预设次数的迭代训练,得到神经网络的第一增量模型,其中,第二目标数据位于第二时间窗口内,第二时间窗口与第一时间窗口具有第一预设重叠区域;
将第一增量模型进行线上发布。
处理器181还用于执行下述步骤:在将第一增量模型进行线上发布之后,根据第一时间和第二时间窗口确定第三时间窗口,其中,第三时间窗口与第二时间窗口具有第二预设重叠区域;获取在第二时间窗口对应的时间之后产生的第二新增数据,并将第二新增数据和第二待处理数据合并为第三待处理数据;通过第三待处理数据中的第三目标数据对第一增量模型进行第三预设次数的迭代训练,得到神经网络的第二增量模型,其中,第三目标数据位于第三时间窗口内;将第二增量模型进行线上发布。
处理器181还用于执行下述步骤:判断是否有用于推送新模型的指示信息,其中,新模型包括第二增量模型;如果判断出有指示信息,将第一时间确定为第三时间窗口的右边界,滑动第二时间窗口至第三时间窗口的右边界,将第三时间窗口的右边界向前推移第三时间窗口的长度,得到第三时间窗口的左边界,根据第三时间窗口的右边界和第三时间窗口的左边界确定第三时间窗口。
处理器181还用于执行下述步骤:在将第一增量模型进行线上发布之后,按照预设周期判断第一增量模型中是否存在失效数据,其中,失效数据为停止推送的第一待处理数据;如果按照预设周期判断出第一增量模型中存在失效数据,则从第一增量模型中清除失效数据,得到更新增量模型;将更新增量模型进行线上发布。
处理器181还用于执行下述步骤:将第二时间窗口扩大预设倍数,得到第四时间窗口;获取第一增量模型中的第二待处理数据,将第二待处理数据作为失效数据,其中,第二待处理数据不在第四时间窗口内;从第一增量模型中清除失效数据,得到更新增量模型。
处理器181还用于执行下述步骤:在推送更新增量模型上线之后,根据第二时间和第 四时间窗口确定第五时间窗口,其中,第五时间窗口与第四时间窗口具有第三预设重叠区域;获取在第四时间窗口对应的时间之后产生的第三新增数据,并将第三新增数据和第二待处理数据合并为第四待处理数据;通过第四待处理数据中的第四目标数据对更新增量模型进行第四预设次数的迭代训练,得到神经网络的第三增量模型,其中,第四目标数据位于第五时间窗口内;将第三增量模型进行线上发布。
处理器181还用于执行下述步骤:在通过第二时间窗口内的第一待处理数据对种子模型进行第二预设次数的迭代训练,得到神经网络的第一增量模型之后,通过第一增量模型对历史数据进行拟合,得到拟合结果,其中,历史数据为处理过的待处理数据;通过第一增量模型携带拟合结果。
处理器181还用于执行下述步骤:在冷启动状态下,对神经网络的各层参数进行随机初始化处理,得到初始化参数,其中,冷启动状态为对神经网络进行首次处理时的状态;通过第一目标数据和初始化参数对神经网络进行第一预设次数的迭代训练,得到神经网络的种子模型。
采用本申请实施例,提供了一种数据处理的方案。通过获取输入至神经网络的第一待处理数据,其中,神经网络为待更新的模型;通过第一待处理数据中位于第一时间窗口内的第一目标数据对神经网络进行第一预设次数的迭代训练,得到神经网络的种子模型,其中,种子模型为神经网络的初始化模型;获取在第一时间窗口对应的时间之后产生的第一新增数据,并将第一新增数据和第一待处理数据合并为第二待处理数据;通过第二待处理数据中位于第二时间窗口内的第二目标数据对种子模型进行第二预设次数的迭代训练,得到神经网络的第一增量模型,其中,第二时间窗口与第一时间窗口具有第一预设重叠区域;将第一增量模型进行线上发布的方式,达到了对增量模型进行更新、发布的目的,从而实现了快速更新数据处理的模型的技术效果,进而解决数据处理的模型不能快速更新的问题的技术问题。
在一种实施方式中,本实施例中的具体示例可以参考上述实施例中所描述的示例,本实施例在此不再赘述。
本领域普通技术人员可以理解,图18所示的结构仅为示意,终端可以是智能手机(如Android手机、iOS手机等)、平板电脑、掌上电脑以及移动互联网设备(Mobile Internet Devices,MID)、PAD等终端设备。图18其并不对上述电子装置的结构造成限定。例如,终端还可包括比图18中所示更多或者更少的组件(如网络接口、显示装置等),或者具有与图18所示不同的配置。
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令终端设备相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质可以包括:闪存盘、只读存储器(Read-Only Memory,ROM)、随机存取器(Random Access Memory,RAM)、磁盘或光盘等。
实施例5
本申请的实施例还提供了一种存储介质。在一种实施方式中,在本实施例中,上述存储介质可以用于执行数据处理方法的程序代码。
在一种实施方式中,上述存储介质可以位于上述实施例所示的网络中的多个网络设备中的至少一个网络设备上。
在一种实施方式中,存储介质被设置为存储用于执行以下步骤的程序代码:
获取输入至神经网络的第一待处理数据,其中,第一目标数据位于第一时间窗口内,神经网络为待更新的模型;
通过第一待处理数据中的第一目标数据对神经网络进行第一预设次数的迭代训练,得到神经网络的种子模型,其中,种子模型为神经网络的初始化模型;
获取在第一时间窗口对应的时间之后产生的第一新增数据,并将第一新增数据和第一待处理数据合并为第二待处理数据;
通过第二待处理数据中的第二目标数据对种子模型进行第二预设次数的迭代训练,得到神经网络的第一增量模型,其中,第二目标数据位于第二时间窗口内,第二时间窗口与第一时间窗口具有第一预设重叠区域;
将第一增量模型进行线上发布。
在一种实施方式中,存储介质还被设置为存储用于执行以下步骤的程序代码:在将第一增量模型进行线上发布之后,根据第一时间和第二时间窗口确定第三时间窗口,其中,第三时间窗口与第二时间窗口具有第二预设重叠区域;获取在第二时间窗口对应的时间之后产生的第二新增数据,并将第二新增数据和第二待处理数据合并为第三待处理数据;通过第三待处理数据中的第三目标数据对第一增量模型进行第三预设次数的迭代训练,得到神经网络的第二增量模型,其中,第三目标数据位于第三时间窗口内;将第二增量模型进行线上发布。
在一种实施方式中,存储介质还被设置为存储用于执行以下步骤的程序代码:判断是否有用于推送新模型的指示信息,其中,新模型包括第二增量模型;如果判断出有指示信息,则将第一时间确定为第三时间窗口的右边界,滑动第二时间窗口至第三时间窗口的右边界,将第三时间窗口的右边界向前推移第三时间窗口的长度,得到第三时间窗口的左边界,根据第三时间窗口的右边界和第三时间窗口的左边界确定第三时间窗口。
在一种实施方式中,存储介质还被设置为存储用于执行以下步骤的程序代码:在将第一增量模型进行线上发布之后,按照预设周期判断第一增量模型中是否存在失效数据,其中,失效数据为停止推送的第一待处理数据;如果按照预设周期判断出第一增量模型中存在失效数据,则从第一增量模型中清除失效数据,得到更新增量模型;将更新增量模型进行线上发布。
在一种实施方式中,存储介质还被设置为存储用于执行以下步骤的程序代码:将第二时间窗口扩大预设倍数,得到第四时间窗口;获取第一增量模型中的第二待处理数据,将第二待处理数据作为失效数据,其中,第二待处理数据不在第四时间窗口内;从第一增量模型中清除失效数据,得到更新增量模型。
在一种实施方式中,存储介质还被设置为存储用于执行以下步骤的程序代码:在推送更新增量模型上线之后,根据第二时间和第四时间窗口确定第五时间窗口,其中,第五时间窗口与第四时间窗口具有第三预设重叠区域;获取在第四时间窗口对应的时间之后产生 的第三新增数据,并将第三新增数据和第二待处理数据合并为第四待处理数据;通过第四待处理数据中的第四目标数据对更新增量模型进行第四预设次数的迭代训练,得到神经网络的第三增量模型,其中,所述第四目标数据位于所述第五时间窗口内;将第三增量模型进行线上发布。
在一种实施方式中,存储介质还被设置为存储用于执行以下步骤的程序代码:在通过第二时间窗口内的第一待处理数据对种子模型进行第二预设次数的迭代训练,得到神经网络的第一增量模型之后,通过第一增量模型对历史数据进行拟合,得到拟合结果,其中,历史数据为处理过的待处理数据;通过第一增量模型携带拟合结果。
在一种实施方式中,存储介质还被设置为存储用于执行以下步骤的程序代码:在冷启动状态下,对神经网络的各层参数进行随机初始化处理,得到初始化参数,其中,冷启动状态为对神经网络进行首次处理时的状态;通过第一目标数据和初始化参数对神经网络进行第一预设次数的迭代训练,得到神经网络的种子模型。
在一种实施方式中,本实施例中的具体示例可以参考上述实施例中所描述的示例,本实施例在此不再赘述。
在一种实施方式中,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。
实施例6
本申请实施例还提供一种包括指令的计算机程序产品,当其在计算机上运行时,使得计算机执行前述各个实施例所述的数据处理方法中的任意一种实施方式。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
上述实施例中的集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在上述计算机可读取的存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在存储介质中,包括若干指令用以使得一台或多台计算机设备(可为个人计算机、服务器或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。
在本申请的上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。
在本申请所提供的几个实施例中,应该理解到,所揭露的客户端,可通过其它的方式实现。其中,以上所描述的装置实施例仅仅是示意性的,例如所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,单元或模块的间接耦合或通信连接,可以是电性或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络 单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
以上所述仅是本申请的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本申请的保护范围。

Claims (31)

  1. 一种数据处理方法,包括:
    获取输入至神经网络的第一待处理数据,其中,所述神经网络为待更新的模型;
    通过所述第一待处理数据中的第一目标数据对所述神经网络进行第一预设次数的迭代训练,得到所述神经网络的种子模型,其中,所述第一目标数据位于第一时间窗口内,所述种子模型为所述神经网络的初始化模型;
    获取在所述第一时间窗口对应的时间之后产生的第一新增数据,并将所述第一新增数据和所述第一待处理数据合并为第二待处理数据;
    通过所述第二待处理数据中的第二目标数据对所述种子模型进行第二预设次数的迭代训练,得到所述神经网络的第一增量模型,其中,所述第二目标数据位于第二时间窗口内,所述第二时间窗口与所述第一时间窗口具有第一预设重叠区域;
    将所述第一增量模型进行线上发布。
  2. 根据权利要求1所述的方法,所述第二时间窗口的右边界契合当前时间。
  3. 根据权利要求1所述的方法,在将所述第一增量模型进行线上发布之后,所述方法还包括:
    根据第一时间和所述第二时间窗口确定第三时间窗口,其中,所述第三时间窗口与所述第二时间窗口具有第二预设重叠区域;
    获取在所述第二时间窗口对应的时间之后产生的第二新增数据,并将所述第二新增数据和所述第二待处理数据合并为第三待处理数据;
    通过所述第三待处理数据中的第三目标数据对所述第一增量模型进行第三预设次数的迭代训练,得到所述神经网络的第二增量模型,其中,所述第三目标数据位于所述第三时间窗口内;
    将所述第二增量模型进行线上发布。
  4. 根据权利要求3所述的方法,所述第三时间窗口的右边界契合所述第一时间。
  5. 根据权利要求3所述的方法,所述根据第一时间和所述第二时间窗口确定第三时间窗口,包括:
    判断是否有用于推送新模型的指示信息,其中,所述新模型包括所述第二增量模型;
    如果判断出有所述指示信息,则将所述第一时间确定为所述第三时间窗口的右边界;
    滑动所述第二时间窗口至所述第三时间窗口的右边界,并将所述第三时间窗口的右边界向前推移所述第三时间窗口的长度,得到所述第三时间窗口的左边界;
    根据所述第三时间窗口的右边界和所述第三时间窗口的左边界确定所述第三时间窗口。
  6. 根据权利要求1所述的方法,在将所述第一增量模型进行线上发布之后,所述方法还包括:
    按照预设周期判断所述第一增量模型中是否存在失效数据,其中,所述失效数据为停止推送的第一待处理数据;
    如果按照所述预设周期判断出所述第一增量模型中存在所述失效数据,则从所述第一增量模型中清除所述失效数据,得到更新增量模型;
    将所述更新增量模型进行线上发布。
  7. 根据权利要求6所述的方法,所述从所述第一增量模型中清除所述失效数据,得到所述更新增量模型,包括:
    将所述第二时间窗口扩大预设倍数,得到第四时间窗口;
    获取所述第一增量模型中的第二待处理数据,将所述第二待处理数据作为所述失效数据,其中,所述第二待处理数据不在所述第四时间窗口内;从所述第一增量模型中清除所述失效数据,得到所述更新增量模型。
  8. 根据权利要求7所述的方法,在推送所述更新增量模型上线之后,所述方法还包括:
    根据第二时间和第四时间窗口确定第五时间窗口,其中,所述第五时间窗口与所述第四时间窗口具有第三预设重叠区域;
    获取在所述第四时间窗口对应的时间之后产生的第三新增数据,并将所述第三新增数据和所述第二待处理数据合并为第四待处理数据;
    通过所述第四待处理数据中的第四目标数据对所述更新增量模型进行第四预设次数的迭代训练,得到所述神经网络的第三增量模型,其中,所述第四目标数据位于所述第五时间窗口内;
    将所述第三增量模型进行线上发布。
  9. 根据权利要求8所述的方法,所述第五时间窗口的右边界契合所述第二时间。
  10. 根据权利要求1所述的方法,在通过所述第二目标数据对所述种子模型进行第二预设次数的迭代训练,得到所述神经网络的第一增量模型之后,所述方法还包括:
    通过所述第一增量模型对历史数据进行拟合,得到拟合结果,其中,所述历史数据为处理过的待处理数据;
    通过所述第一增量模型携带所述拟合结果。
  11. 根据权利要求1所述的方法,所述通过所述第一待处理数据中的第一目标数据对所述神经网络进行第一预设次数的迭代训练,包括:
    在冷启动状态下,对所述神经网络的各层参数进行随机初始化处理,得到初始化参数,其中,所述冷启动状态为对所述神经网络进行首次处理时的状态;
    通过所述第一目标数据和所述初始化参数,对所述神经网络进行所述第一预设次数的迭代训练,得到所述神经网络的种子模型。
  12. 根据权利要求11所述的方法,所述对所述神经网络的各层参数进行随机初始化处理,包括以下之一:
    对所述神经网络的各层参数分别进行按某常数初始化处理;
    对所述神经网络的各层参数进行平均分布随机初始化处理;
    对所述神经网络的各层参数进行高斯分布随机初始化处理;
    对所述神经网络的各层参数进行Xavier初始化处理。
  13. 根据权利要求1所述的方法,所述方法应用于预设场景下,所述预设场景包括以下之一:
    媒体文件的CTR预估场景;
    图像识别模型的训练场景;
    语音识别模型的训练场景;
    自然语言理解模型的训练场景。
  14. 根据权利要求1-13所述的方法,所述第二预设次数小于或等于所述第一预设次数。
  15. 根据权利要求3-5所述的方法,所述第三预设次数小于或等于所述第一预设次数。
  16. 根据权利要求8-9所述的方法,所述第四预设次数小于或等于所述第一预设次数。
  17. 一种数据处理设备,所述设备包括处理器以及存储器:
    所述存储器用于存储程序代码,并将所述程序代码传输给所述处理器;
    所述处理器用于根据所述程序代码中的指令执行:获取输入至神经网络的第一待处理数据,其中,所述神经网络为待更新的模型;
    通过所述第一待处理数据中的第一目标数据对所述神经网络进行第一预设次数的迭代训练,得到所述神经网络的种子模型,其中,所述第一目标数据位于第一时间窗口内,所述种子模型为所述神经网络的初始化模型;
    获取在所述第一时间窗口对应的时间之后产生的第一新增数据,并将所述第一新增数据和所述第一待处理数据合并为第二待处理数据;
    通过所述第二待处理数据中的第二目标数据对所述种子模型进行第二预设次数的迭代训练,得到所述神经网络的第一增量模型,其中,所述第二目标数据位于第二时间窗口内,所述第二时间窗口与所述第一时间窗口具有第一预设重叠区域;
    将所述第一增量模型进行线上发布。
  18. 根据权利要求17所述的设备,所述第二时间窗口的右边界契合当前时间。
  19. 根据权利要求17所述的设备,所述处理器还用于根据所述程序代码中的指令执行:
    在将所述第一增量模型进行线上发布之后,根据第一时间和所述第二时间窗口确定第三时间窗口,其中,所述第三时间窗口与所述第二时间窗口具有第二预设重叠区域;
    获取在所述第二时间窗口对应的时间之后产生的第二新增数据,并将所述第二新增数据和所述第二待处理数据合并为第三待处理数据;
    通过所述第三待处理数据中的第三目标数据对所述第一增量模型进行第三预设次数的 迭代训练,得到所述神经网络的第二增量模型,其中,所述第三目标数据位于所述第三时间窗口内;
    将所述第二增量模型进行线上发布。
  20. 根据权利要求19所述的设备,所述第三时间窗口的右边界契合所述第一时间。
  21. 根据权利要求19所述的设备,所述处理器还用于根据所述程序代码中的指令执行:
    判断是否有用于推送新模型的指示信息,其中,所述新模型包括所述第二增量模型;
    在判断出有所述指示信息时,将所述第一时间确定为所述第三时间窗口的右边界,滑动所述第二时间窗口至所述第三时间窗口的右边界,并将所述第三时间窗口的右边界向前推移所述第三时间窗口的长度,得到所述第三时间窗口的左边界,根据所述第三时间窗口的右边界和所述第三时间窗口的左边界确定所述第三时间窗口。
  22. 根据权利要求17所述的设备,所述处理器还用于根据所述程序代码中的指令执行:
    在将所述第一增量模型进行线上发布之后,按照预设周期判断所述第一增量模型中是否存在失效数据,其中,所述失效数据为停止推送的第一待处理数据;
    在按照所述预设周期判断出所述第一增量模型中存在所述失效数据,从所述第一增量模型中清除所述失效数据,得到更新增量模型;
    将所述更新增量模型进行线上发布。
  23. 根据权利要求22所述的设备,所述处理器还用于根据所述程序代码中的指令执行:
    将所述第二时间窗口扩大预设倍数,得到第四时间窗口;
    获取所述第一增量模型中的第二待处理数据,将所述第二待处理数据作为所述失效数据,其中,所述第二待处理数据不在所述第四时间窗口内;
    从所述第一增量模型中清除所述失效数据,得到所述更新增量模型。
  24. 根据权利要求23所述的设备,所述处理器还用于根据所述程序代码中的指令执行:
    根据第二时间和第四时间窗口确定第五时间窗口,其中,所述第五时间窗口与所述第四时间窗口具有第三预设重叠区域;
    获取在所述第四时间窗口对应的时间之后产生的第三新增数据,并将所述第三新增数据和所述第二待处理数据合并为第四待处理数据;
    通过所述第四待处理数据中的第四目标数据对所述更新增量模型进行第四预设次数的迭代训练,得到所述神经网络的第三增量模型,其中,所述第四目标数据位于所述第五时间窗口内;
    将所述第三增量模型进行线上发布。
  25. 根据权利要求24所述的设备,所述第五时间窗口的右边界契合所述第二时间。
  26. 根据权利要求17所述的设备,所述处理器还用于根据所述程序代码中的指令执行:
    通过所述第一增量模型对历史数据进行拟合,得到拟合结果,其中,所述历史数据为处理过的待处理数据;
    通过所述第一增量模型携带所述拟合结果。
  27. 根据权利要求17所述的设备,所述处理器还用于根据所述程序代码中的指令执行:
    在冷启动状态下,对所述神经网络的各层参数进行随机初始化处理,得到初始化参数,其中,所述冷启动状态为对所述神经网络进行首次处理时的状态;
    通过所述第一目标数据和所述初始化参数,对所述神经网络进行所述第一预设次数的迭代训练,得到所述神经网络的种子模型。
  28. 根据权利要求27所述的设备,所述处理器对所述神经网络的各层参数进行随机初始化处理,包括以下之一:
    对所述神经网络的各层参数进行平均分布随机初始化处理;
    对所述神经网络的各层参数进行高斯分布随机初始化处理;
    对所述神经网络的各层参数进行Xavier初始化处理。
  29. 根据权利要求17所述的设备,所述设备应用于预设场景下,所述预设场景包括以下之一:
    媒体文件的CTR预估场景;
    图像识别模型的训练场景;
    语音识别模型的训练场景;
    自然语言理解模型的训练场景。
  30. 一种存储介质,其特征在于,所述存储介质用于存储程序代码,所述程序代码用于执行权利要求1-16任一项所述的数据处理方法。
  31. 一种数据处理方法,应用于数据处理设备,所述数据处理设备执行权利要求1-16任意一项所述的方法。
PCT/CN2017/105813 2016-10-14 2017-10-12 数据处理方法和装置 WO2018068742A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US16/026,784 US11151451B2 (en) 2016-10-14 2018-07-03 Data processing method and apparatus for training incremental model of neural network

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610900390.7 2016-10-14
CN201610900390.7A CN107527091B (zh) 2016-10-14 2016-10-14 数据处理方法和装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/026,784 Continuation US11151451B2 (en) 2016-10-14 2018-07-03 Data processing method and apparatus for training incremental model of neural network

Publications (1)

Publication Number Publication Date
WO2018068742A1 true WO2018068742A1 (zh) 2018-04-19

Family

ID=60748503

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/105813 WO2018068742A1 (zh) 2016-10-14 2017-10-12 数据处理方法和装置

Country Status (3)

Country Link
US (1) US11151451B2 (zh)
CN (1) CN107527091B (zh)
WO (1) WO2018068742A1 (zh)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110888668A (zh) * 2018-09-07 2020-03-17 腾讯科技(北京)有限公司 一种模型更新的系统、方法、装置、终端设备和介质
CN111768243A (zh) * 2020-06-30 2020-10-13 创新奇智(上海)科技有限公司 销量预测方法、预测模型构建方法、装置、设备及介质
CN113139563A (zh) * 2020-01-19 2021-07-20 深圳云天励飞技术有限公司 一种图像分类模型的优化方法及装置
CN116823407A (zh) * 2023-08-29 2023-09-29 北京国电通网络技术有限公司 产品信息推送方法、装置、电子设备和计算机可读介质
CN116910006A (zh) * 2023-07-24 2023-10-20 深圳市盛弘新能源设备有限公司 基于新能源电池的数据压缩存储处理方法及系统

Families Citing this family (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10650045B2 (en) * 2016-02-05 2020-05-12 Sas Institute Inc. Staged training of neural networks for improved time series prediction performance
US10642896B2 (en) 2016-02-05 2020-05-05 Sas Institute Inc. Handling of data sets during execution of task routines of multiple languages
US10795935B2 (en) 2016-02-05 2020-10-06 Sas Institute Inc. Automated generation of job flow definitions
US10650046B2 (en) 2016-02-05 2020-05-12 Sas Institute Inc. Many task computing with distributed file system
USD898059S1 (en) 2017-02-06 2020-10-06 Sas Institute Inc. Display screen or portion thereof with graphical user interface
USD898060S1 (en) 2017-06-05 2020-10-06 Sas Institute Inc. Display screen or portion thereof with graphical user interface
CN110708469B (zh) * 2018-07-10 2021-03-19 北京地平线机器人技术研发有限公司 用于适配曝光参数的方法和装置以及相应的相机曝光系统
CN109615060B (zh) * 2018-11-27 2023-06-30 深圳前海微众银行股份有限公司 Ctr预估方法、装置及计算机可读存储介质
CN109886415A (zh) * 2019-01-07 2019-06-14 鲁班嫡系机器人(深圳)有限公司 数据处理方法、装置、计算机设备和存储介质
CN111856362A (zh) * 2019-04-24 2020-10-30 深圳先进技术研究院 磁共振成像方法、装置、系统及存储介质
US11620518B2 (en) * 2019-05-13 2023-04-04 Nec Corporation Landmark-based classification model updating
CN110288093A (zh) * 2019-06-06 2019-09-27 博彦科技股份有限公司 数据处理方法、装置、存储介质及处理器
CN110610500A (zh) * 2019-09-06 2019-12-24 北京信息科技大学 基于动态语义特征的新闻视频自适应拆条方法
US11488014B2 (en) * 2019-10-22 2022-11-01 International Business Machines Corporation Automated selection of unannotated data for annotation based on features generated during training
CN113098916B (zh) * 2019-12-23 2023-11-14 中国移动通信集团辽宁有限公司 基于网络行为数据的信息推送方法及装置
CN111239137B (zh) * 2020-01-09 2021-09-10 江南大学 基于迁移学习与自适应深度卷积神经网络的谷物质量检测方法
CN111311014B (zh) * 2020-02-27 2024-04-12 广州酷旅旅行社有限公司 业务数据处理方法、装置、计算机设备和存储介质
CN111881950B (zh) * 2020-07-10 2024-05-21 交控科技股份有限公司 道岔转辙机电流时间序列的特征表示方法及装置
US11710148B2 (en) 2021-01-31 2023-07-25 Walmart Apollo, Llc Deep learning-based revenue-per-click prediction model framework
CN112860303B (zh) * 2021-02-07 2023-07-04 济南大学 一种模型增量更新的方法及系统
CN112766501A (zh) * 2021-02-26 2021-05-07 上海商汤智能科技有限公司 增量训练方法和相关产品
CN113206757B (zh) * 2021-04-25 2022-04-19 烽火通信科技股份有限公司 流式同步网管配置全量数据和增量数据的方法及电子设备
CN116029770B (zh) * 2022-12-26 2023-10-20 中国科学技术大学 广告创意智能化推送方法、系统、设备与存储介质
CN116996546A (zh) * 2023-07-06 2023-11-03 九科信息技术(深圳)有限公司 物联网设备的控制方法、装置、设备及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060224532A1 (en) * 2005-03-09 2006-10-05 Case Western Reserve University Iterative feature weighting with neural networks
CN103489034A (zh) * 2013-10-12 2014-01-01 山东省科学院海洋仪器仪表研究所 预测与诊断在线海流监测数据的方法和装置
CN104598552A (zh) * 2014-12-31 2015-05-06 大连钜正科技有限公司 一种支持增量式更新的大数据特征学习的方法
CN105095964A (zh) * 2015-08-17 2015-11-25 杭州朗和科技有限公司 一种数据处理方法和装置
CN105279556A (zh) * 2015-11-05 2016-01-27 国家卫星海洋应用中心 一种浒苔检测方法和装置

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8595154B2 (en) * 2011-01-26 2013-11-26 Google Inc. Dynamic predictive modeling platform
CN104765728B (zh) * 2014-01-08 2017-07-18 富士通株式会社 训练神经网络的方法和装置以及确定稀疏特征向量的方法
KR101646461B1 (ko) * 2015-04-22 2016-08-12 강원대학교산학협력단 딥 러닝을 이용한 한국어 의존 구문 분석 방법
CN105138963A (zh) * 2015-07-31 2015-12-09 小米科技有限责任公司 图片场景判定方法、装置以及服务器
CN105183720B (zh) * 2015-08-05 2019-07-09 百度在线网络技术(北京)有限公司 基于rnn模型的机器翻译方法和装置
CN106021364B (zh) * 2016-05-10 2017-12-12 百度在线网络技术(北京)有限公司 图片搜索相关性预测模型的建立、图片搜索方法和装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060224532A1 (en) * 2005-03-09 2006-10-05 Case Western Reserve University Iterative feature weighting with neural networks
CN103489034A (zh) * 2013-10-12 2014-01-01 山东省科学院海洋仪器仪表研究所 预测与诊断在线海流监测数据的方法和装置
CN104598552A (zh) * 2014-12-31 2015-05-06 大连钜正科技有限公司 一种支持增量式更新的大数据特征学习的方法
CN105095964A (zh) * 2015-08-17 2015-11-25 杭州朗和科技有限公司 一种数据处理方法和装置
CN105279556A (zh) * 2015-11-05 2016-01-27 国家卫星海洋应用中心 一种浒苔检测方法和装置

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110888668A (zh) * 2018-09-07 2020-03-17 腾讯科技(北京)有限公司 一种模型更新的系统、方法、装置、终端设备和介质
CN110888668B (zh) * 2018-09-07 2024-04-16 腾讯科技(北京)有限公司 一种模型更新的系统、方法、装置、终端设备和介质
CN113139563A (zh) * 2020-01-19 2021-07-20 深圳云天励飞技术有限公司 一种图像分类模型的优化方法及装置
CN113139563B (zh) * 2020-01-19 2024-05-03 深圳云天励飞技术有限公司 一种图像分类模型的优化方法及装置
CN111768243A (zh) * 2020-06-30 2020-10-13 创新奇智(上海)科技有限公司 销量预测方法、预测模型构建方法、装置、设备及介质
CN116910006A (zh) * 2023-07-24 2023-10-20 深圳市盛弘新能源设备有限公司 基于新能源电池的数据压缩存储处理方法及系统
CN116910006B (zh) * 2023-07-24 2024-03-29 深圳市盛弘新能源设备有限公司 基于新能源电池的数据压缩存储处理方法及系统
CN116823407A (zh) * 2023-08-29 2023-09-29 北京国电通网络技术有限公司 产品信息推送方法、装置、电子设备和计算机可读介质
CN116823407B (zh) * 2023-08-29 2024-01-12 北京国电通网络技术有限公司 产品信息推送方法、装置、电子设备和计算机可读介质

Also Published As

Publication number Publication date
CN107527091A (zh) 2017-12-29
CN107527091B (zh) 2021-05-25
US11151451B2 (en) 2021-10-19
US20180314944A1 (en) 2018-11-01

Similar Documents

Publication Publication Date Title
WO2018068742A1 (zh) 数据处理方法和装置
US11816272B2 (en) Identifying touchpoint contribution utilizing a touchpoint attribution attention neural network
Zhou et al. Deep interest evolution network for click-through rate prediction
US10873782B2 (en) Generating user embedding representations that capture a history of changes to user trait data
US10783361B2 (en) Predictive analysis of target behaviors utilizing RNN-based user embeddings
CN110651280B (zh) 投影神经网络
US10860858B2 (en) Utilizing a trained multi-modal combination model for content and text-based evaluation and distribution of digital video content to client devices
CN111080400B (zh) 一种基于门控图卷积网络的商品推荐方法及系统、存储介质
US11514515B2 (en) Generating synthetic data using reject inference processes for modifying lead scoring models
US11109083B2 (en) Utilizing a deep generative model with task embedding for personalized targeting of digital content through multiple channels across client devices
US11288709B2 (en) Training and utilizing multi-phase learning models to provide digital content to client devices in a real-time digital bidding environment
US20150269609A1 (en) Clickstream Purchase Prediction Using Hidden Markov Models
US20160210658A1 (en) Determining touchpoint attributions in a segmented media campaign
US8190537B1 (en) Feature selection for large scale models
US20150242447A1 (en) Identifying effective crowdsource contributors and high quality contributions
US20140279739A1 (en) Resolving and merging duplicate records using machine learning
US11461634B2 (en) Generating homogenous user embedding representations from heterogeneous user interaction data using a neural network
CN107463580A (zh) 训练点击率预估模型方法和装置、点击率预估方法和装置
US20120253945A1 (en) Bid traffic estimation
CN111047009B (zh) 事件触发概率预估模型训练方法及事件触发概率预估方法
Han et al. Optimizing ranking algorithm in recommender system via deep reinforcement learning
US20220108334A1 (en) Inferring unobserved event probabilities
Geng et al. Comparison lift: Bandit-based experimentation system for online advertising
CN113610610A (zh) 基于图神经网络和评论相似度的会话推荐方法和系统
Shen et al. From 0.5 million to 2.5 million: Efficiently scaling up real-time bidding

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: 17860952

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17860952

Country of ref document: EP

Kind code of ref document: A1