CN115618134A - Method for determining displayed article, model training method, device, equipment and medium - Google Patents

Method for determining displayed article, model training method, device, equipment and medium Download PDF

Info

Publication number
CN115618134A
CN115618134A CN202211153715.1A CN202211153715A CN115618134A CN 115618134 A CN115618134 A CN 115618134A CN 202211153715 A CN202211153715 A CN 202211153715A CN 115618134 A CN115618134 A CN 115618134A
Authority
CN
China
Prior art keywords
data
prediction
click rate
submodel
rate
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202211153715.1A
Other languages
Chinese (zh)
Inventor
刘聪聪
赵夕炜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Wodong Tianjun Information Technology Co Ltd
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 Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Wodong Tianjun Information Technology Co Ltd
Priority to CN202211153715.1A priority Critical patent/CN115618134A/en
Publication of CN115618134A publication Critical patent/CN115618134A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9538Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9537Spatial or temporal dependent retrieval, e.g. spatiotemporal queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Economics (AREA)
  • Software Systems (AREA)
  • Human Resources & Organizations (AREA)
  • Tourism & Hospitality (AREA)
  • Artificial Intelligence (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Development Economics (AREA)
  • General Business, Economics & Management (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Game Theory and Decision Science (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the invention provides a method for determining displayed articles and a model training method, a device, equipment and a medium, wherein at least one group of data to be processed can be determined by obtaining high-speed streaming data which is associated with a target user and is within a preset time length before the current time and at least one article to be displayed corresponding to an article display request, and then the target click rate corresponding to each article to be displayed is obtained by performing prediction processing on at least one group of data to be processed through a characteristic extraction submodel and at least one prediction submodel in a click rate prediction model and a weight distribution submodel for dynamically distributing accuracy weight to the prediction submodel, so that click rate prediction based on data flow distribution changing along with time is realized, the predicted click rate has timeliness, and the dynamically adjusted click rate prediction model can quickly adapt to concept drift in streaming data, thereby further improving timeliness and improving prediction accuracy.

Description

Method for determining displayed article, model training method, device, equipment and medium
Technical Field
The embodiment of the invention relates to the technical field of artificial intelligence, in particular to a method for determining displayed articles, a model training method, a device, equipment and a medium.
Background
Click Through Rate (CTR) prediction models based on deep learning have been widely used, for example, in scenarios where probability of triggering an item is present. The existing click rate prediction model is mostly applied to serve high-speed streaming data generated by massive users. However, the model cannot adapt to the change of data flow distribution along with the change of time, namely when the model is deployed on a terminal, the problem that data cannot be effectively processed exists. Based on the problems, incremental learning and ensemble learning modes are provided to train the corresponding model, so that the model can be deployed on the terminal equipment.
When the present invention is implemented based on the above-described embodiments, the inventors have found that the following problems occur:
when the incremental learning method is used for training to obtain a model and is applied, the problem of unbalanced stability and timeliness exists, and the data processing effect is poor; in an Ensemble Learning (Ensemble Learning) mode, since model training is difficult to converge when the number of network layers is too deep, it is difficult to train and obtain a model deployed on a terminal device, and accordingly, even if the model is deployed on the terminal device, the processing effect is not good.
Disclosure of Invention
The embodiment of the invention provides a method for determining displayed articles, a model training method, a device, equipment and a medium, and aims to solve the problems that the click rate prediction result is not time-efficient and the accuracy of the prediction result is low.
In a first aspect, an embodiment of the present invention provides a method for determining a displayed item, where the method includes:
acquiring high-speed streaming data which is associated with a target user and is within a preset time length before the current time, and at least one to-be-displayed article corresponding to the article display request;
determining at least one group of data to be processed according to the high-speed streaming data and the article associated data of each article to be displayed; the number of the groups of the data to be processed is the same as the number of the articles to be displayed;
predicting the at least one group of data to be processed based on a click rate prediction model to obtain target click rates corresponding to the articles to be displayed; the click rate prediction model comprises a feature extraction submodel, at least one prediction submodel and a weight distribution submodel for dynamically distributing accuracy rate weight to the at least one prediction submodel;
and determining and displaying the target display article based on the target click rates.
In a second aspect, an embodiment of the present invention further provides a method for training a click-through rate prediction model, where the click-through rate prediction model includes a feature extraction submodel, at least one prediction submodel, and a weight assignment submodel, and the method includes:
acquiring a plurality of groups of data to be trained in a current time slice; the time slice is determined according to a preset time division rule, and the data to be trained comprises high-speed streaming data of each user in the current time slice, user characteristic data, article association data of displayed articles and the real click rate of each user on the corresponding displayed articles;
inputting the characteristic sequences to be trained of the data to be trained extracted based on the characteristic extraction submodel into the at least one prediction submodel respectively to obtain a prediction probability matrix comprising at least one prediction click rate; wherein each predicted click rate corresponds to a respective predictor model;
determining the output click rate of the data to be trained based on the prediction probability matrix and the current accuracy rate weight matrix which is recorded in the weight distribution submodel and corresponds to the at least one prediction submodel;
determining a loss value to be used based on the output click rate and the real click rate of the data to be trained, and performing parameter correction on the at least one prediction sub-model and the feature extraction sub-model based on the loss value to be used;
and after processing of each group of data to be trained in the current time slice is finished, performing parameter correction on each sub-model in the click rate prediction model based on the loss value to be used of each group of data to be trained.
In a third aspect, an embodiment of the present invention further provides an apparatus for determining a displayed item, where the apparatus includes:
the data acquisition module is used for acquiring high-speed streaming data which is associated with a target user and is within a preset time length before the current time and at least one to-be-displayed article corresponding to the article display request;
the data processing module is used for determining at least one group of data to be processed according to the high-speed streaming data and the article associated data of each article to be displayed; the number of the groups of the data to be processed is the same as the number of the articles to be displayed;
the click rate prediction module is used for predicting and processing the at least one group of data to be processed based on the click rate prediction model to obtain target click rates corresponding to the articles to be displayed; the click rate prediction model comprises a feature extraction submodel, at least one prediction submodel and a weight distribution submodel for dynamically distributing accuracy rate weight to the at least one prediction submodel;
and the target display module is used for determining and displaying the target display articles based on the target click rates.
In a fourth aspect, an embodiment of the present invention further provides a training apparatus for a click rate prediction model, where the click rate prediction model includes a feature extraction submodel, at least one prediction submodel, and a weight assignment submodel, and the apparatus includes:
the data acquisition module is used for acquiring a plurality of groups of data to be trained in the current time slice; the time slice is determined according to a preset time division rule, and the data to be trained comprises high-speed streaming data of each user in the current time slice, user characteristic data, article association data of displayed articles and the real click rate of each user on the corresponding displayed articles;
the matrix prediction module is used for respectively inputting the characteristic sequences to be trained of the data to be trained extracted based on the characteristic extraction submodel into the at least one prediction submodel to obtain a prediction probability matrix comprising at least one prediction click rate; wherein each predicted click rate corresponds to a respective predictor model;
the click rate prediction module is used for determining the output click rate of the data to be trained based on the prediction probability matrix and a current accuracy rate weight matrix which is recorded in the weight distribution submodel and corresponds to the at least one prediction submodel;
the loss calculation module is used for determining a loss value to be used based on the output click rate and the real click rate of the data to be trained so as to carry out parameter correction on the at least one prediction submodel and the feature extraction submodel based on the loss value to be used;
and the parameter correction module is used for performing parameter correction on each sub-model in the click rate prediction model based on the to-be-used loss value of each group of data to be trained after each group of data to be trained in the current time slice is processed.
In a fifth aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
one or more processors;
a storage device to store one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a method for determining a displayed item or a method for training a click-through rate prediction model according to any one of the embodiments of the present invention.
In a sixth aspect, embodiments of the present invention further provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform the method for determining a displayed item or the training method for a click rate prediction model according to any one of the embodiments of the present invention.
According to the technical scheme of the embodiment of the invention, at least one group of data to be processed can be determined by acquiring the high-speed streaming data which is associated with the target user and is within the preset time before the current time and at least one article to be displayed corresponding to the article display request, and then the click rate of each article can be predicted by combining the high-speed streaming data within the preset time before the current time through the characteristic extraction submodel, the at least one prediction submodel and the weight distribution submodel for dynamically distributing the accuracy weight in the click rate prediction model, so that the click rate prediction based on the data flow distribution changing along with time is realized, the predicted click rate has timeliness, the problem that the click rate prediction result does not have the accuracy in the prior art is solved, the click rate of each article is predicted through the dynamically distributed accuracy weight in the weight distribution submodel, the click rate prediction model based on the real-time dynamic adjustment is realized, the concept of the dynamically adjusted click rate prediction model can be quickly adapted to the streaming data prediction, and the click rate prediction accuracy of the article is further improved.
Drawings
In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, a brief description is given below of the drawings used in describing the embodiments. It is clear that the described figures are only figures of a part of the embodiments of the invention to be described, not all figures, and that for a person skilled in the art, without inventive effort, other figures can also be derived from them.
Fig. 1 is a schematic flowchart of a method for determining a displayed item according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of another method for determining a displayed item according to an embodiment of the present invention;
fig. 3A is a schematic flowchart of a method for training a click rate prediction model according to an embodiment of the present invention;
FIG. 3B is a schematic diagram of a training process of a click rate prediction model according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating another method for training a click-through rate prediction model according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of an apparatus for determining a displayed object according to an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of a training apparatus for a click rate prediction model according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not to be construed as limiting the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Before the technical solution is introduced, an application scenario may be exemplarily described. The method for determining the displayed articles provided by the embodiment can be applied to any scene needing article pushing, and the specific recommended content can be determined by combining with specific training data. For example, the method is applied to a software pushing scene, and predicts the probability that each software to be recommended is clicked by a user according to a click rate prediction model so as to display the software downloaded by the recommended user according to the predicted click rate; or, the method can also be applied to an article pushing scene, and the probability that each article to be recommended is clicked by the user is predicted according to the click rate prediction model so as to display the articles read by the recommended user according to the predicted click rate; or, the method can also be applied to an article pushing scene, the probability that each article to be recommended is clicked by the user is predicted according to the click rate prediction model, and products obtained by the recommending user are displayed according to the predicted click rate.
Fig. 1 is a schematic flow chart of a method for determining a displayed article according to an embodiment of the present invention, which may be applied to a situation where a trigger probability of each article to be displayed is predicted and a corresponding article is displayed, where the method may be executed by a device for determining a displayed article, the device may be implemented in a form of software and/or hardware, the hardware may be an electronic device such as a server, and the electronic device may execute the method for determining a displayed article provided in the present technical solution to display a target displayed article for a user.
As shown in fig. 1, the method includes:
s110, obtaining high-speed streaming data which are associated with the target user and are within a preset time length before the current time, and at least one to-be-displayed article corresponding to the article display request.
Wherein the target user may be a user for whom the target display item currently needs to be determined. For example, the target user may be the user who initiated the item display request. The high-speed streaming data may be streaming data generated over a period of time, the high-speed streaming data includes, but is not limited to, presentation record data of a target user and browsing record data of the target user, and the high-speed streaming data may further include user characteristic data.
In this embodiment, high-speed streaming data associated with a target user within a preset duration before a current time may be acquired, where the current time may be a time when an article display request is acquired; the preset time duration may be a preset time duration for extracting historical high-speed streaming data. For example, high-speed streaming data associated with the target user within ten minutes before the current time may be acquired.
In particular, high-speed streaming data generated by each user can be stored in a streaming database in real time. Further, high-speed streaming data associated with the target user may be located in the streaming database based on the user identification corresponding to the target user.
In this embodiment, the article display request is generated based on at least one of the following ways: generating an article display request corresponding to the search word based on the search word input in the search box; and when detecting that the current article display page is refreshed, generating an article display request. The search terms input in the search box can be actively input by the target user; or automatically determining according to the historical browsing record of the target user, for example, determining the article type of which the actual browsing amount exceeds the preset browsing amount threshold according to the historical browsing record of the target user, and filling the keyword corresponding to the article type in the search box according to the article type. But also search terms entered based on audio information.
Specifically, the user may generate an article display request by executing a preset trigger operation on the terminal device, for example, by clicking the search article control and editing the search term, and clicking the search term to confirm that the article display request may be generated, and when the article display page is refreshed, the article displayed in the display interface needs to be updated, and then the article display request is triggered. By the method, the article display request is determined based on the search terms or the refreshed page, so that the article display request is generated in a variety, and the user experience is improved. Of course, the manner of generating the item display request is not limited to the above embodiment, and for example, the item display request associated with the item may be generated when the detail information page of the item is detected to be triggered, or the item display request may be generated when the preset page is detected to be browsed.
The embodiment can also acquire at least one article to be displayed corresponding to the article display request.
The at least one to-be-displayed item corresponding to the item display request may specifically be a candidate displayed item corresponding to the item request.
The obtaining of the at least one article to be displayed corresponding to the article display request may be: determining the article type corresponding to the article display request; and screening at least one article to be displayed corresponding to the article type in the article information base according to the article type.
All articles corresponding to the article types can be determined in the article information base according to the article types, and then at least one article to be displayed is randomly determined in all the articles, or at least one article to be displayed is selected from all the articles according to the historical click rate of each article.
S120, determining at least one group of data to be processed according to the high-speed streaming data and the article associated data of each article to be displayed; the number of the groups of the data to be processed is the same as the number of the articles to be displayed.
The item-related data may be data describing item information of an item to be displayed, for example, the item-related data includes, but is not limited to, an item type, an item name, and historical processing data. Illustratively, the historical processing data may include historical click volume, historical click time, and historical processing volume, and optionally, sold volume, among other data.
Specifically, the high-speed streaming data and the article-related data of the article to be displayed may be combined for each article to be displayed, so as to obtain the to-be-processed data corresponding to the article to be displayed.
In this embodiment, the determining at least one set of data to be processed according to the high-speed streaming data and the article-related data of each article to be displayed includes: determining target characteristic data corresponding to a target user according to the user characteristic data corresponding to the target user and the high-speed streaming data; and aiming at each article to be displayed, determining the data to be processed corresponding to the current article to be displayed according to the target characteristic data, the article type, the article name and the historical processing data of the current article to be displayed.
The user characteristic data may be data describing user basic characteristics of the target user, such as constructed user portrait data. Specifically, the user feature data may be combined with the high-speed streaming data to obtain target feature data corresponding to the target user.
Further, for each article to be displayed, the target characteristic data is combined with the article type, the article name and the historical processing data of the article to be displayed to obtain the data to be processed corresponding to the article to be displayed.
In the above exemplary embodiment, the target feature data corresponding to the target user is determined through the user feature data and the high-speed streaming data, and then for each article to be displayed, the to-be-processed data corresponding to the article to be displayed is determined according to the target feature data and the article-related data of the article to be displayed, so that the to-be-processed data needing to be input to the click rate prediction model is determined through the high-speed streaming data related to the target user and the article-related data related to the article to be displayed, thereby realizing the click rate prediction based on the high-speed streaming data of the user and the article features, and ensuring the accuracy of the predicted click rate.
S130, predicting and processing at least one group of data to be processed based on the click rate prediction model to obtain target click rates corresponding to the articles to be displayed; the click rate prediction model comprises a feature extraction submodel, at least one prediction submodel and a weight distribution submodel for dynamically distributing accuracy rate weight to the at least one prediction submodel.
The feature extraction submodel may be a backbone network in the click rate prediction model, and is used for extracting a feature sequence corresponding to the data to be processed. Optionally, the feature extraction sub-model may employ a deep cross network or a deep interest network. The feature extraction sub-module can output a sub-model of the feature sequence corresponding to the data to be processed. And the predictor module processes the characteristic sequence to obtain the probability of triggering the article corresponding to the characteristic sequence. In the present embodiment, each predictor model may employ each expert network in the MoE (mixed of Experts) model. The number of the predictor models can be one or more, and each predictor model can output the click rate predicted by the predictor model according to the input feature sequence. It should also be noted that the model parameters of each predictor model are different.
The predictor sub-model may employ a deep neural network, such as a multilayer perceptron (MLP) network. The predictor model may employ an MLP network that uses sigmoid functions as activation functions. The weight assignment submodel may be used to dynamically assign an accuracy weight to each predictor submodel. For example, the weight assignment submodel may update the accuracy weight corresponding to each predictor submodel according to the incremental high-speed streaming data, or update the accuracy weight corresponding to each predictor submodel according to the incremental high-speed streaming data and the historical high-speed streaming data.
The accuracy weight may be used to describe the accuracy of the predicted click rate output by the predictor model, and specifically, the accuracy weight may reflect a ratio of the predicted click rate output by the predictor model to the target click rate.
Specifically, after each predictor model determines the predicted click rate corresponding to the article to be displayed, the click rate prediction model can calculate the target click rate corresponding to the article to be displayed according to the predicted click rate output by each predictor model and the current accuracy rate weight corresponding to each predictor model of the weight distribution submodel. The current accuracy rate weight of the weight distribution submodel can be obtained by the previous training of the weight distribution submodel.
It should be noted that, in the click rate prediction model in this embodiment, each time, a group of data to be processed may be subjected to prediction processing, and the target click rate of the article to be displayed corresponding to the data to be processed is predicted. That is, if the number of the to-be-processed data groups is multiple, each group of the to-be-processed data may be sequentially input to the click rate prediction model, so as to obtain the target click rate corresponding to each to-be-displayed item. For example, if the number of the to-be-displayed items is 100 and the number of the to-be-processed data groups is 100, the 100 groups of to-be-processed data may be respectively input to the click rate prediction model, so that the click rate prediction model performs 100 prediction processes to obtain the target click rate corresponding to each to-be-displayed item.
And S140, determining and displaying the target display articles based on the target click rates.
Specifically, after the target click rate corresponding to each article to be displayed is determined, the target displayed article can be screened out from the articles to be displayed according to each target click rate; alternatively, the target display item is selected from other alternative display items.
Optionally, the determining and displaying the target display item based on each target click rate includes: determining a preset number of target display articles from the articles to be displayed and displaying the target display articles according to the target click rate of the articles to be displayed; or displaying the to-be-displayed articles on the display interface in a sequence from high to low according to the target click rate.
Determining and displaying a preset number of target display articles from the articles to be displayed, wherein the specific steps are as follows: determining the articles to be screened, of which the target click rate exceeds a preset click rate threshold value, from the articles to be displayed, and further determining a preset number of target displayed articles from the articles to be screened; or sequencing the objects to be displayed according to the target click rate from high to low, and determining the preset number of target displayed objects according to the sequencing result.
The advantage of adopting above-mentioned mode show corresponding article of waiting to show lies in: so that the display modes of the articles have diversity and the conversion rate of the articles can be further improved.
It should be noted that, in this embodiment, the current item display page may be updated based on the target displayed item, so as to display the target displayed item in the current item display page in an emphasized manner. Or, the target display article may be displayed in a preset area in the current article display page, so that the target display article is displayed for the user while the original display article in the current article display page is kept. Or, a new display page can be rendered on the current article display page, the target display article is displayed in the rendered display page, and the rendered display page can be displayed in superposition with the current article display page, so that the original display article and the target display article in the current article display page can be simultaneously displayed, the display effect of the original display article is prevented from being influenced, meanwhile, a user can conveniently compare the original display article and the target display article, and the user experience is improved.
According to the technical scheme, at least one group of data to be processed can be determined by obtaining high-speed streaming data which are associated with a target user and are within a preset time length before the current time and at least one article to be displayed corresponding to an article display request, then, by means of a feature extraction submodel, at least one prediction submodel and a weight distribution submodel which dynamically distributes accuracy weight for the prediction submodel in a click rate prediction model, prediction processing is carried out on at least one group of data to be processed to obtain the target click rate corresponding to each article to be displayed, the click rate of each article is predicted by combining the high-speed streaming data within the preset time length before the current time, then click rate prediction based on data flow distribution changing along with time is achieved, the predicted click rate has timeliness, the problem that the result of click rate prediction in the prior art does not have timeliness is solved, the click rate prediction of each article is predicted by means of the dynamically distributed accuracy weight in the weight distribution submodel, click rate prediction based on real-time dynamic adjustment is achieved, concept in the streaming data can be quickly adapted to the click rate prediction model, and the accuracy of the click rate prediction is further improved.
Fig. 2 is a schematic flow chart of another method for determining displayed items according to an embodiment of the present invention, and on the basis of the foregoing embodiment, a process of determining a target click rate corresponding to each to-be-displayed item according to a click rate prediction model is exemplarily described, and specific implementation manners thereof may refer to detailed explanations of the present technical solution. The technical terms that are the same as or corresponding to the above embodiments are not repeated herein.
As shown in fig. 2, the method includes:
s210, obtaining high-speed streaming data which are associated with the target user and are within a preset time length before the current time, and at least one to-be-displayed article corresponding to the article display request.
S220, determining at least one group of data to be processed according to the high-speed streaming data and the article related data of each article to be displayed; the number of the groups of the data to be processed is the same as the number of the articles to be displayed.
And S230, aiming at each group of data to be processed, inputting the current data to be processed into the feature extraction submodel to obtain a feature sequence corresponding to the current data to be processed.
Specifically, each group of data to be processed may be sequentially input to the click rate prediction model, so that the click rate prediction model obtains a feature sequence corresponding to the current data to be processed through the feature extraction submodel. The characteristic sequence corresponding to the data to be processed may include a user characteristic of the target user, a click behavior characteristic of the target user, and an article characteristic of an article to be displayed corresponding to the data to be processed.
In an alternative embodiment, it is considered that, if the number of the high-speed streaming data in the preset time period before the current time is large, if the data to be processed including the high-speed streaming data is directly input to the feature extraction submodel, the processing speed of the feature extraction submodel may be reduced, or the prediction speed of each prediction submodel is reduced by making the feature data amount of the feature sequence large. Therefore, the embodiment can also divide the data to be processed to divide the data to be processed into a plurality of sub data to be processed, so as to improve the processing speed of the feature extraction sub model and each prediction sub model.
That is, the step of inputting the current data to be processed into the feature extraction submodel to obtain the feature sequence corresponding to the current data to be processed may be: dividing the data to be processed into a plurality of subdata to be processed according to the generation time stamp of the data to be processed and the preset data processing amount; and inputting the current sub data to be processed into the feature extraction submodel aiming at each sub data to be processed to obtain a feature sequence corresponding to the current sub data to be processed.
Specifically, the data processing amount may be a maximum data amount that is set in advance and that can be input to the feature extraction submodel. According to the data processing amount and the time stamp of the data to be processed, a group of data to be processed may be divided into a plurality of sub data to be processed, for example, the data to be processed within 25 minutes may be divided into a sub data to be processed of 10 minutes, and a sub data to be processed of 5 minutes.
Furthermore, each subdata to be processed is respectively input into the feature extraction submodel, and a feature sequence which is output by the feature extraction submodel and corresponds to the subdata to be processed currently is obtained. Based on the mode, the data to be processed can be divided into a plurality of sub data to be processed, the characteristic data amount in the characteristic sequence is reduced, and the processing speed of the characteristic extraction sub model and each prediction sub model is further improved.
And S240, respectively inputting the characteristic sequences into at least one prediction submodel to obtain the predicted click rate corresponding to the characteristic sequences.
Further, after the feature sequences corresponding to the current data to be processed are obtained, the click rate prediction model may input the feature sequences to all the prediction submodels, so that all the prediction submodels predict the feature sequences, respectively, to obtain the predicted click rates corresponding to the feature sequences, where the number of the predicted click rates is equal to the number of the prediction submodels, that is, each prediction submodel outputs one predicted click rate.
And S250, determining a target click rate corresponding to the current data to be processed based on the accuracy rate weight and the corresponding predicted click rate which are stored in the weight distribution submodel and correspond to each prediction submodel.
The accuracy rate weight is dynamically updated by the weight distribution submodel according to the predicted click rate and the corresponding real click rate of the data to be trained, and the data to be trained comprises high-speed streaming data and article associated data of displayed articles.
Specifically, the high-speed streaming data in the data to be trained may be high-speed streaming data of each user in a preset time slice, and the article-related data for displaying an article in the data to be trained may be article-related data for displaying an article for the user in the preset time slice. In other words, the weight distribution submodel may adjust the accuracy weight corresponding to each predictor model according to the predicted click rate of the to-be-trained data of each predictor model and the real click rate of each displayed item, and store each adjusted accuracy weight. Wherein, the real click rate can reflect whether the displayed article is clicked by the user.
For example, the determining a target click rate corresponding to the current data to be processed based on the accuracy rate weight of each predictor model and the corresponding predicted click rate includes: determining the product of each accuracy rate weight and the corresponding predicted click rate to obtain each click rate to be accumulated; and obtaining the target click rate corresponding to the current data to be processed by performing accumulation processing on each click rate to be accumulated.
Specifically, for each predictor model, the accuracy weight corresponding to the predictor model is multiplied by the predicted click rate corresponding to the predictor model to obtain the click rate to be accumulated corresponding to the predictor model, and after the click rate to be accumulated corresponding to each predictor model is determined, all the click rates to be accumulated are added to obtain the target click rate. By the method, the click rate prediction based on the accuracy weight is realized, and the prediction precision of the item click rate is improved.
In a specific implementation manner, the method provided in this embodiment may further include: and deploying the click rate prediction model on each distributed node in the distributed system, so that when an article display request is received, the corresponding data to be processed is subjected to prediction processing based on the click rate prediction model, or when the data to be trained is received, the accuracy rate weight of the corresponding prediction submodel is dynamically updated based on the processing result of the data to be trained of each prediction submodel.
Specifically, a click rate prediction model may be deployed in advance on a plurality of distributed nodes in the distributed system; furthermore, when a large number of article display requests are received, each distributed node can be scheduled to respond to each article display request according to a load balancing scheduling algorithm, and compared with a mode of deploying a click rate prediction model on a single server, the method can reduce the cost of the single server and improve the response speed of the article display requests.
Or when the data to be trained are received, the prediction submodels in the click rate prediction models deployed on the distributed nodes can determine the prediction click rate of each displayed article in the data to be trained, and further the output click rate of each displayed article is calculated according to each accuracy rate weight and each prediction click rate stored in the weight distribution submodel, and further the weight distribution submodel can adjust the stored accuracy rate weight of each prediction submodel according to the output click rate of each displayed article and the real click rate of each displayed article. Of course, if the accuracy weight of the predictor model is updated by the distributed node, each updated accuracy weight can be synchronized to other distributed nodes.
In the embodiment, the click rate prediction model is deployed on each distributed node in the distributed system, so that each article display request can be responded to through each distributed node, the response speed of the article display request is improved, and the server jam is avoided when a single server responds to all the requests; or, the data to be trained can be processed through each distributed node, so that the updating speed of the accuracy rate weight of the prediction sub-model is increased, and the updating timeliness of the click rate prediction model is further increased.
And S260, determining and displaying the target display articles based on the click rate of each target.
According to the technical scheme, the characteristic sequence corresponding to the current data to be processed is obtained through the characteristic extraction submodel, the predicted click rate corresponding to the characteristic sequence is obtained through at least one prediction submodel, the target click rate of the object to be displayed corresponding to the current data to be processed is determined according to the predicted click rate of the weight distribution submodel based on the data to be trained and the corresponding real click rate dynamically updated accuracy rate weights and the predicted click rates, the accuracy rate weights are dynamically distributed to the prediction submodels, the dynamically updated click rate prediction model can rapidly adapt to the concept drift in the streaming data, the click rate prediction precision is further improved, and the accuracy of the displayed object is further improved.
It should be noted that, in this embodiment, before performing prediction processing on at least one set of to-be-processed data, the accuracy rate weight of each predictor model may be dynamically updated, so as to improve the prediction accuracy on each current set of to-be-processed data. Or after at least one group of data to be processed is subjected to prediction processing, the accuracy rate weight of each predictor model is dynamically updated so as to improve the prediction accuracy of each next group of data to be processed.
Illustratively, before or after the at least one set of the data to be processed is processed based on the click-through rate prediction model, the method further comprises: inputting the data to be trained in the target time slice associated with the current moment and the corresponding real click rate into a click rate prediction model to obtain the predicted click rate of each prediction submodel on the data to be trained, and enabling a weight distribution submodel to update the accuracy rate weight of each prediction submodel according to each predicted click rate and the corresponding real click rate so as to determine the target click rate of each article to be displayed based on the updated accuracy rate weight when an article display request is received; wherein the target time slice is determined based on a preset time division rule.
Wherein the target time slice associated with the current time instant may be a time slice prior to the current time instant; for example, the target time slice associated with the current time may be the first 60 minutes of the current time. Specifically, the target time slice associated with the current time may be determined according to a preset time division rule, and the preset time division rule may include a length of the target time slice and/or an interval between the target time slice and the current time.
Specifically, the data to be trained in the target time slice and the real click rate of each displayed article in the data to be trained can be input into the click rate prediction model, so that each prediction submodel in the click rate prediction model outputs the predicted click rate of each displayed article in the data to be trained, further, the output click rate can be calculated according to each predicted click rate and each accuracy rate weight, and the weight distribution submodel adjusts each accuracy rate weight based on the output click rate and the real click rate, so that when an article display request is received, the target click rate of each displayed article is determined based on the updated accuracy rate weight.
In the above exemplary embodiment, before or after at least one set of data to be processed is predicted by the click rate prediction model, the data to be trained in the target time slice associated with the current time and the corresponding real click rate are input to the click rate prediction model, so that the weight distribution submodel updates the accuracy weight of each prediction submodel according to the predicted click rate of each prediction submodel on the data to be trained and the corresponding real click rate, thereby realizing dynamic real-time adjustment of the click rate prediction model, further enabling the click rate prediction model to adapt to the concept drift in the stream data, improving the item click rate prediction accuracy of the click rate prediction model, and further improving the accuracy of displaying the item.
Before describing the training method of the click rate prediction model provided in this embodiment, an exemplary description may be given to an application scenario. The training method of the click rate prediction model provided by the embodiment can be suitable for training a software click rate prediction model, an article click rate prediction model, a product click rate prediction model and the like. Specifically, the model structure of the click-through rate prediction model may include a feature extraction submodel, at least one prediction submodel, and a weight assignment submodel. The output end of the feature extraction submodel can be connected with the input end of each predictor submodel to transmit a feature sequence to each predictor submodel; the output of each predictor model may be connected to the input of a weight assignment sub-model to transmit the predicted click-through rate to the weight assignment sub-model, which in turn causes the weight assignment sub-model to update the recorded accuracy weight according to the predicted click-through rate.
The click rate prediction model provided by the embodiment realizes the decoupling of the update of the accuracy weight and the training of the prediction network, and not only can the click rate prediction model be quickly converged, but also the accuracy weight in the click rate prediction model obtained by training can be dynamically changed by decoupling the accuracy weight and the training network, so that the accuracy of model prediction is guaranteed.
Fig. 3A is a schematic flowchart of a method for training a click rate prediction model according to an embodiment of the present invention, where the embodiment is applicable to training a model for predicting a probability that an exposed article is clicked by a user, or updating a model obtained by training based on historical training data, and the method may be executed by a training apparatus for a click rate prediction model, where the training apparatus may be implemented in the form of software and/or hardware, and the hardware may be an electronic device such as a server, and the electronic device may execute the method for training a click rate prediction model according to the present technical solution to obtain the click rate prediction model, where the obtained click rate prediction model includes a feature extraction sub-model, at least one prediction sub-model, and a weight assignment sub-model.
As shown in fig. 3A, the method includes:
s310, acquiring a plurality of groups of data to be trained in the current time slice; the time slice is determined according to a preset time division rule, and the data to be trained comprises high-speed streaming data of each user in the current time slice, user characteristic data, article association data of the displayed articles and the real click rate of each user on the corresponding displayed articles.
In this embodiment, the current time slice may be a time slice used to partition data currently participating in training. Each time slice can be determined according to a preset time division rule; for example, the preset time division rule may be to divide a time slice which is located before the current time and has a distance from the current time as a preset time distance.
The embodiment can acquire user characteristic data, historical browsing data, historical display data and other data of each user, and determine multiple groups of data to be trained according to the acquired data. Specifically, each displayed article corresponds to a group of data to be trained, and the data to be trained includes high-speed streaming data of each user in a current time slice, user characteristic data, article association data of the displayed article, and a real click rate of each user on the displayed article. The real click rate may reflect whether the user clicks on the displayed item, for example, 0 indicates that the user does not click on the displayed item, and 1 indicates that the user has clicked on the displayed item.
Considering that if the time length of the current time slice is longer, the data volume in each group of data to be trained in the current time slice is also increased, in order to ensure the model training efficiency and the training precision, when the data volume in each group of data to be trained in the current time slice is larger, the current time slice can be divided into finer time slices so as to divide each group of data to be trained in the current time slice into data to be trained with smaller data volume, thereby reducing the data volume in the data to be trained.
In a specific embodiment, the acquiring multiple sets of data to be trained in a current time slice includes: acquiring high-speed streaming data of at least one user on corresponding displayed articles, the real click rate of the displayed articles and article associated data of the displayed articles in the current time slice, and taking the data as original data; the article related data comprises article types, article names and processing amount data; dividing the original data into a plurality of groups of data to be trained according to the generation time stamp of each data in the original data and the preset data processing amount; and each group of data to be trained comprises article association data corresponding to the displayed articles.
The processing amount data may describe, among other things, the number of times the history of the item was processed, e.g., the amount purchased, the amount downloaded, the amount read, etc. The data processing amount may be a maximum data amount in a set of data to be trained set in advance.
Namely, in the current time slice, the high-speed streaming data of each user on the corresponding displayed article, the real click rate of each user on the displayed article, the article type, the article name and the processing amount data of the displayed article can be obtained and used as the original data of the corresponding displayed article; further, the original data can be divided into a plurality of groups of data to be trained according to the generation time stamp of the data and the preset data processing amount. It should be noted that each divided group of data to be trained needs to include item-related data corresponding to a displayed item.
Illustratively, the original data is high-speed streaming data of each user to the article A, the real click rate of the article A and article association data of the article A within 60 minutes; according to the size of the original data and the preset data processing amount, the original data are determined to be divided into 100 groups, and at the moment, the original data can be divided into 100 groups of data to be trained according to the generation time stamp of the data.
In the above embodiment, the high-speed streaming data, the real click rate, the article type of the displayed article, the article name and the processing amount data of each user on the corresponding displayed article in the current time slice are obtained as the raw data, and the raw data is divided into a plurality of groups of data to be trained through the data generation timestamp and the data processing amount, so as to ensure that the data amount in each generated group of data to be trained does not exceed the preset data processing amount, thereby improving the training speed of the model.
S320, respectively inputting the characteristic sequences to be trained of the data to be trained extracted based on the characteristic extraction submodel into at least one prediction submodel to obtain a prediction probability matrix comprising at least one prediction click rate; wherein each predicted click rate corresponds to a respective predictor model.
Specifically, after acquiring a plurality of groups of data to be trained in the current time slice, each group of data to be trained may be input to the feature extraction submodel, so that the feature extraction submodel performs feature extraction on each group of data to be trained, and outputs a sequence of features to be trained corresponding to each group of data to be trained. The characteristic sequence to be trained can be user characteristics, article characteristics and behavior characteristics corresponding to the data to be trained.
For example, referring to fig. 3B, fig. 3B is a schematic diagram of a training process of a click-through rate prediction model according to an embodiment of the present invention, wherein,
Figure BDA0003857447020000211
is the stream data of the length of T,
Figure BDA0003857447020000212
representing the data to be trained corresponding to the current time slice t,
Figure BDA0003857447020000213
x t,i high-speed streaming data representing the user of the ith display item at the current time slice t and item-related data, y t,i ∈{0,1},y t,i Representing the true click rate of the user for the ith display item at the current time slice t.
In FIG. 3B, the feature extraction sub-model may be the backbone network of the click-through rate prediction model for extracting x t,i To be trained feature sequence e t,i . The backbone network may be a deep crossover network or a deep interest network depending on the feature sequence that needs to be generated.
Further, in this embodiment, the feature sequence to be trained of the data to be trained output by the feature extraction submodel is respectively input into each prediction submodel, so that each prediction submodel performs prediction processing on the feature sequence to be trained, and outputs a predicted click rate corresponding to the feature sequence to be trained. Specifically, the prediction probability matrix may be configured according to the predicted click rate output by each predictor model.
For example, referring to fig. 3B, each predictor model may correspond to each expert network, and the feature sequence e to be trained t,i Will be input into each Expert network, each of which may be an MLP network Expert with a sigmoid activation function (k) Each expert network uses embedded e t,i And outputs their own predicted Click Rate, i.e., pCTR (predictive Click-Through Rate, a posteriori Click Rate predicted value). Such as:
Figure BDA0003857447020000221
wherein the content of the first and second substances,
Figure BDA0003857447020000222
and the predicted click rate output by the kth predictor model is shown.
Therefore, the prediction probability matrix formed by the predicted click rates of all the predictor models can be expressed by the following formula:
Figure BDA0003857447020000223
where m represents the number of predictor models in the click-through-rate prediction model.
In an alternative embodiment, as shown in fig. 3B, the click-through rate prediction model may be composed of two modules, i.e., a main module and a weight update module; specifically, the feature extraction submodel and each prediction submodel are used as a main module of the click rate prediction model, and the weight distribution submodel is used as a weight updating module independent of the main module.
S330, determining the output click rate of the data to be trained based on the prediction probability matrix and the current accuracy rate weight matrix which is recorded in the weight distribution submodel and corresponds to at least one prediction submodel.
The current accuracy rate weight matrix recorded in the weight distribution submodel and corresponding to at least one predictor submodel may be a preset initial weight matrix or an accuracy rate weight matrix obtained by training according to historical training data. For example, if the current training is the initial training, the current accuracy rate weight matrix recorded in the weight assignment sub-model may be a preset initial weight matrix; if the current training is not the initial training, the current accuracy weight matrix recorded in the weight distribution submodel may be the accuracy weight matrix obtained by the last training.
In this embodiment, in order to enable the click-through rate prediction model to better adapt to the concept drift stream data, the click-through rate prediction model may perform repeated training according to incremental data to be trained (i.e., each set of data to be trained corresponding to the current time slice), so that in each training process, the current accuracy weight matrix recorded in the weight assignment sub-model may be the accuracy weight matrix obtained by the last training.
It should be noted that, in the manner of repeatedly training the data to be trained based on the increment on the basis of the model trained last time, the model can be updated based on not only the time-varying current data, but also the historical data. Therefore, the method for training the model of the embodiment can ensure the stability of the model while ensuring that the model adapts to the drift of the concept of the stream data.
Specifically, a current accuracy weight matrix recorded in the weight assignment submodel may be obtained, and further, the output click rate of the data to be trained is calculated according to the prediction probability matrix and the current accuracy weight matrix. The output click rate may be the probability that the displayed item is clicked after being displayed, which is predicted by the click rate prediction model.
Illustratively, the determining the output click rate of the data to be trained based on the prediction probability matrix and the current accuracy rate weight matrix corresponding to at least one prediction submodel recorded in the weight assignment submodel comprises: multiplying the predicted click rate of the same prediction submodel by the corresponding accuracy rate weight and then performing accumulation processing to obtain the output click rate of the data to be trained; and the current accuracy weight matrix comprises the accuracy weights corresponding to the predictor models.
That is, for each predictor model, multiplying the predicted click rate probability of the predictor model in the predicted probability matrix by the current accuracy weight of the predictor model in the current accuracy weight matrix; further, the multiplication results corresponding to all the predictor models are accumulated to obtain the output click rate of the data to be trained. By the method, the data to be trained, which currently participates in training, can be predicted based on the accuracy weight matrix of the previous training, so that the accuracy weight matrix is updated according to the current prediction result, and the prediction precision of the click rate prediction model is improved.
Referring to FIG. 3B, the weight assignment submodel may record a current accuracy weight matrix w corresponding to at least one predictor submodel t Sending the data to a main module, and the main module according to the current accuracy rate weight matrix w t And a prediction probability matrix
Figure BDA0003857447020000241
And calculating the output click rate. E.g. data x to be trained t,i The corresponding output click rate is given by:
Figure BDA0003857447020000242
wherein the content of the first and second substances,
Figure BDA0003857447020000243
for data x to be trained t,i A corresponding output click rate;
Figure BDA0003857447020000244
the current accuracy rate weight corresponding to the kth predictor model;
Figure BDA0003857447020000245
for the predicted point corresponding to the kth predictor modelThe hit rate.
S340, determining a loss value to be used based on the output click rate and the real click rate of the data to be trained, and performing parameter correction on at least one prediction sub-model and at least one feature extraction sub-model based on the loss value to be used.
Specifically, the output click rate is a predicted value output by the click rate prediction model and aiming at the data to be trained, and the real click rate is a label corresponding to the data to be trained; and calculating a loss function according to the output click rate and the real click rate to obtain a to-be-used loss value. Wherein the loss function can be a logistic loss function such as a mean square error loss function, an L1 norm loss function, a cross entropy loss function, or a 2-class.
In the present embodiment, the purpose of calculating the loss to be used is to: and adjusting at least one prediction submodel and the parameters of the characteristic extraction submodel in the click rate prediction model through calculating the loss values to be used corresponding to each group of data to be trained respectively until the click rate prediction model converges.
Illustratively, the loss value to be used corresponding to the data to be trained can be directly calculated according to the real click rate and the output click rate corresponding to the data to be trained; or, the loss value to be used corresponding to the data to be trained can be calculated according to each predicted click rate and the real click rate corresponding to the data to be trained.
For example, the determining a loss to use value based on the output click rate and the real click rate of the data to be trained includes: aiming at each predictor model, determining an intermediate loss value corresponding to the current predictor model based on the logarithm of the predicted click rate, the real click rate and a preset value of the current predictor model; and determining the loss value to be used based on the intermediate loss value of each predictor model.
And calculating a corresponding intermediate loss value for each predictor model, and accumulating all intermediate loss values to obtain a loss value to be used. Specifically, the process of calculating the intermediate loss value according to the logarithm of the predicted click rate, the actual click rate, and the preset value may adopt any loss function calculation method, and exemplarily, the process of calculating the intermediate loss value is described by taking a cross entropy loss function as an example.
That is, the median loss value corresponding to the current predictor model is determined based on the logarithm of the predicted click rate, the true click rate, and the preset value of the current predictor model, and may be: determining a first loss value based on the logarithm of the predicted click rate and the real click rate of the current prediction submodel; determining a second loss value based on a preset numerical value and the real click rate; determining the logarithm of the difference value between the preset numerical value and the predicted click rate, and determining a third loss value; determining an intermediate loss value corresponding to a current predictor model based on the first loss value, the second loss value, and the third loss value.
The first loss value is determined based on the logarithm of the predicted click rate and the actual click rate, and may be obtained by multiplying the logarithm of the predicted click rate and the actual click rate. Determining a second loss value based on the preset numerical value and the real click rate, wherein a difference value between the preset numerical value and the real click rate is used as the second loss value; wherein the preset value may be 1. And determining a logarithm of the difference between the preset value and the predicted click rate, and determining a third loss value, wherein the logarithm of the difference between the preset value and the predicted click rate is used as the third loss value. The intermediate loss value corresponding to the current predictor model is determined based on the first loss value, the second loss value, and the third loss value, and the intermediate loss value may be obtained by multiplying the second loss value by the third loss value and accumulating the result of the multiplication with the first loss value.
Specifically, the process of calculating the median loss value can be seen in the following formula:
Figure BDA0003857447020000261
wherein the content of the first and second substances,
Figure BDA0003857447020000262
for the intermediate loss value, y, corresponding to the kth predictor model t,i For a true clickThe ratio of the total weight of the particles,
Figure BDA0003857447020000263
the predicted click rate for the kth predictor model. Wherein the content of the first and second substances,
Figure BDA0003857447020000264
is the first loss value, 1-y t,i In order to obtain the second value of the loss,
Figure BDA0003857447020000265
is the third loss value.
In the process, the loss value to be used is determined according to the first loss value, the second loss value and the third loss value by respectively calculating the first loss value, the second loss value and the third loss value, so that the calculation of the loss result of each predictor model is realized, the adjustment of the parameters of the feature extraction submodel and each predictor model according to the loss result of each predictor model can be realized, and the output precision of the predictor models is ensured.
Further, after obtaining the intermediate loss values of the prediction submodels, the loss value to be used may be determined according to each intermediate loss value. For example, the accumulated value of all the intermediate loss values may be used as the loss value to be used, or the average value of all the intermediate loss values may be used as the loss value to be used.
It should be noted that, in this embodiment, the purpose of determining the intermediate loss value of each predictor model, and then determining the loss value to be used according to each intermediate loss value is to: the prediction error of each predictor model can be determined, and then the parameters of the predictor models are adjusted according to the prediction error of each predictor model, so that the prediction accuracy of the predictor models is improved.
And S350, after processing of each group of data to be trained in the current time slice is finished, performing parameter correction on each sub-model in the click rate prediction model based on the loss value to be used of each group of data to be trained.
Specifically, after processing of each group of data to be trained in the current time slice is completed, that is, after the output prediction rate corresponding to each group of data to be trained is predicted, a loss value to be used corresponding to each group of data to be trained can be determined for each group of data to be trained, and then parameter correction is performed on each submodel in the click rate prediction model based on each loss value to be used until the calculated loss value to be used corresponding to each group of data to be trained meets the convergence condition.
The parameter correction of each submodel in the click rate prediction model may be performed on a parameter in at least one of each predictor model, the feature extraction submodel, and the weight assignment submodel.
Specifically, the parameter correction of each sub-model in the click rate prediction model based on the to-be-used loss value of each group of to-be-trained data may be: and obtaining a total loss value corresponding to the current time slice by performing accumulation processing on the to-be-used loss values of each group of to-be-trained data, and performing parameter correction on the feature extraction submodel, at least one prediction submodel and the weight distribution submodel in the click rate prediction model based on the total loss value.
That is, the loss values to be used of all the data to be trained in the current time slice are accumulated to obtain a total loss value corresponding to the current time slice, and the model parameters in the feature extraction submodel, each prediction submodel and the weight assignment submodel are reversely adjusted according to the total loss value. Illustratively, the total loss value is calculated as follows:
Figure BDA0003857447020000281
wherein the content of the first and second substances,
Figure BDA0003857447020000282
for the total loss value corresponding to the current time slice t,
Figure BDA0003857447020000283
loss value to be used, N, for the ith data to be trained t Indicating correspondence of current time slice tNumber of sets of data to be trained.
In the above embodiment, the total loss value corresponding to the current time slice is obtained by performing the accumulation processing on the to-be-used loss values of each set of to-be-trained data, and the purpose is to: the characteristic extraction submodel, each prediction submodel and the weight distribution submodel in the click rate prediction model can be subjected to parameter correction based on the total loss value, and the output precision of the click rate prediction model is further improved.
It should be noted that, in this embodiment, after the loss value to be used of each group of data to be trained is determined, parameter correction may be performed on each predictor model and each feature extraction submodel according to the loss value to be used until the loss value to be used of each group of data to be trained satisfies the convergence condition; further, calculating a total loss value according to each to-be-used loss value when the convergence condition is met, and continuously performing parameter correction on each prediction sub-model, each characteristic sub-model and each weight distribution sub-model according to the total loss value until the total loss value meets the convergence condition. The parameter correction is performed on the weight assignment submodel, which may be updating a current accuracy weight matrix recorded in the weight assignment submodel.
In other words, the click rate prediction model may be subjected to two parameter corrections, respectively, based on the loss value to be used, the first parameter correction being a correction for the predictor model and the feature extraction submodel, and the second parameter correction being a correction for the predictor model, the feature extraction submodel, and the weight assignment submodel. The advantages of such an arrangement are: the prediction accuracy of the click rate prediction model obtained by training is greatly improved.
According to the technical scheme of the embodiment, a plurality of groups of data to be trained in a current time slice are obtained, a characteristic sequence to be trained of the data to be trained is determined according to a characteristic extraction submodel, a prediction probability matrix is obtained according to a prediction submodel, the output click rate of the data to be trained is determined through the prediction probability matrix and a current accuracy rate weight matrix recorded in a weight distribution submodel, a loss value to be used is determined according to the output click rate and a real click rate, parameter correction is performed on each prediction submodel and the characteristic extraction submodel through the loss value to be used, the first correction of the prediction submodel and the characteristic extraction submodel is realized, the prediction precision of the click rate prediction model is improved, and after each group of data to be trained is processed, parameter correction is performed on each prediction submodel, the characteristic extraction submodel and the weight distribution submodel according to be used, the second correction of each submodel is realized, and the prediction precision of the click rate prediction model is further improved.
In addition, the method provided by the embodiment can realize updating and training of the trained click rate prediction model based on the incremental data, so that the click rate prediction model can better adapt to concept drift stream data, the prediction stability of the click rate prediction model is ensured, the timeliness of the click rate prediction model is improved, the prediction result of the click rate prediction model has timeliness, the prediction precision of the click rate prediction model is further improved, and the problem that the click rate prediction result does not have timeliness in the prior art is solved. Moreover, by decoupling the updating of the accuracy weight from the training of the prediction submodel, the click rate prediction model can be rapidly converged, the accuracy weight in the click rate prediction model obtained through training can be dynamically changed, the timeliness of the click rate prediction model is further improved, the timeliness of the prediction result of the click rate prediction model is further improved, and the prediction precision of the click rate is improved.
It should be noted that the conventional incremental learning method cannot solve the stability-stability rule balance. A slow update may achieve stability but may reduce the timeliness of the model. While a fast adjustment of large step size may help the model keep up with the concept drift, but may reduce its robustness. Compared with the prior art, the training method provided by the embodiment can ensure the stability of the model while realizing the quick update of the model.
And, the existing expert hybrid MoE model is a typical deep ensemble learning structure. In the existing MoE model, all expert networks share the same backbone Network to extract input representations, and a Gate Network (Gate Network) is designed to determine the aggregate weight output by each expert, although the MoE model is improved in various applications, the teaching MoE is easy to encounter dead Gate problem, so that the model is collapsed to a certain expert module, and the performance of the model is degraded. In order to solve the problem, the weight assignment submodel and the main module are decoupled, parameter correction is performed through the prediction click rate based on the posterior of the prediction submodel, and model parameters are prevented from being updated through low-efficiency back propagation of iterative gradient reduction.
Fig. 4 is a schematic flow chart of another training method for a click rate prediction model according to an embodiment of the present invention, and on the basis of the foregoing embodiment, a step of processing a prediction probability matrix and a true click rate according to a weight assignment sub-model is added to determine a next accuracy weight matrix corresponding to each prediction sub-model, so as to implement dynamic assignment of accuracy weights for each prediction sub-model, and a specific implementation manner thereof may refer to detailed explanation of the present technical solution. The technical terms that are the same as or corresponding to the above embodiments are not repeated herein.
As shown in fig. 4, the method includes:
s410, acquiring a plurality of groups of data to be trained in the current time slice; the time slice is determined according to a preset time division rule, and the data to be trained comprises high-speed streaming data of each user in the current time slice, user characteristic data, article association data of the displayed articles and the real click rate of each user on the corresponding displayed articles.
S420, respectively inputting the characteristic sequences to be trained of the data to be trained extracted based on the characteristic extraction submodel into at least one prediction submodel to obtain a prediction probability matrix comprising at least one prediction click rate; wherein each predicted click rate corresponds to a respective predictor model.
S430, determining the output click rate of the data to be trained based on the prediction probability matrix and the current accuracy rate weight matrix which is recorded in the weight distribution submodel and corresponds to at least one prediction submodel.
S440, determining a loss value to be used based on the output click rate and the real click rate of the data to be trained, and performing parameter correction on at least one prediction sub-model and at least one feature extraction sub-model based on the loss value to be used.
S450, after processing of each group of data to be trained in the current time slice is completed, parameter correction is carried out on each sub-model in the click rate prediction model based on the loss value to be used of each group of data to be trained.
And S460, processing the prediction probability matrix and the real click rate based on the weight distribution submodel, and determining a next accuracy rate weight matrix corresponding to each prediction submodel, so that when each prediction submodel outputs the prediction probability matrix corresponding to the next data to be trained, the output click rate is determined based on the accuracy rate weight matrix and the prediction probability matrix.
The prediction probability matrix can be input into the weight distribution submodel, and further the weight distribution submodel calculates the output click rate according to the recorded current accuracy rate weight matrix.
Specifically, after the weight distribution submodel obtains the output click rate, a loss function can be calculated through the output click rate and the real click rate, and a next accuracy rate weight matrix corresponding to each prediction submodel is determined according to the calculation result of the loss function.
It should be noted that the next accuracy rate weight matrix determined by the weight assignment submodel is used for determining the target click rate when the article display request is obtained; or when the data to be trained in the next time slice is acquired, determining the output click rate corresponding to the data to be trained. Referring to fig. 3B, the predicted probability matrix and the real click rate are input to the weight distribution sub-model, so that the weight distribution sub-model determines the next accuracy weight matrix, that is, the current accuracy weight matrix is updated.
For example, the predicted probability matrix and the real click rate are processed based on the weight assignment submodels, and the next accuracy weight matrix corresponding to each predicted submodel is determined, which may be: calculating the square error corresponding to the current time slice according to the prediction probability matrix, the prediction click rate and the real click rate; determining historical attenuated square errors according to the square errors corresponding to the historical time slices and the square errors corresponding to the current time slice; and (4) calculating an optimal accuracy rate weight matrix by using the minimization of the historical attenuation square error as a target function, and taking the optimal distribution weight matrix as a next accuracy rate weight matrix.
Specifically, the process of calculating the square error corresponding to the current time slice can be referred to as the following formula:
Figure BDA0003857447020000321
wherein e is t Indicating the squared error for the current time slice,
Figure BDA0003857447020000322
to output click rate, y t Is the true click rate. Further, the historical attenuated square error may be calculated according to the square error corresponding to each historical time slice and the square error corresponding to the current time slice, such as:
Figure BDA0003857447020000323
wherein the content of the first and second substances,
Figure BDA0003857447020000324
and the attenuation factor is smaller, and the square error corresponding to the considered historical time slice is smaller.
Further, the historical attenuation square error is minimized to be used as an objective function, and the optimal accuracy rate weight matrix when the historical attenuation square error is minimized is calculated and used as the next accuracy rate weight matrix. Wherein the objective function may be as follows:
Figure BDA0003857447020000325
by mixing
Figure BDA0003857447020000326
To w t The above formula can be further converted to obtain:
Figure BDA0003857447020000327
wherein the content of the first and second substances,
Figure BDA0003857447020000328
based on the above process, the next accuracy weight matrix can be calculated. However, considering that the above calculation process requires storing y for each historical time slice τ
Figure BDA0003857447020000329
Which in turn increases the memory overhead of the system. Therefore, the embodiment may further provide a weight updating method based on the target recurrence function, and the next accuracy weight matrix may be calculated directly based on the real click rate, the output click rate, and the current accuracy weight matrix of the current time slice through the stored recurrence relation without storing the real click rate and the output click rate of each historical time slice.
Specifically, the processing of the prediction probability matrix and the true click rate based on the weight assignment submodel to determine the next accuracy weight matrix corresponding to each prediction submodel may be: and processing the prediction probability matrix, the real click rate and the current accuracy rate weight matrix based on a target recurrence function set in the weight distribution submodel, and determining a next accuracy rate weight matrix corresponding to each prediction submodel.
The target recurrence function may be a function describing a recurrence relation between a current accuracy rate weight matrix and a next accuracy rate weight matrix. The target recursive function may be obtained by converting the target function in a recursive manner.
Exemplarily, the processing the prediction probability matrix, the real click rate and the current accuracy weight matrix based on the target recurrence function set in the weight assignment submodel to determine the next accuracy weight matrix corresponding to each prediction submodel includes: determining a first intermediate value according to the prediction probability matrix and the transpose of the prediction probability matrix; determining a second intermediate value according to the prediction probability matrix and the current accuracy rate weight matrix; and determining a next accuracy weight matrix corresponding to each predictor model according to the real click rate, the first intermediate value, the second intermediate value and the current accuracy weight matrix.
Wherein, determining the first intermediate value according to the prediction probability matrix and the transpose of the prediction probability matrix may be: performing product processing on the prediction probability matrix and the transpose of the prediction probability matrix to obtain a matrix change value, and updating the current gradient matrix according to the matrix change value and the current gradient matrix recorded in the weight distribution submodel; and determining a first intermediate value according to the updated current gradient matrix and the transposition of the prediction probability matrix. For example, the current gradient matrix is represented by:
Figure BDA0003857447020000331
in the formula (I), the compound is shown in the specification,
Figure BDA0003857447020000332
is a matrix of varying values, R t-1 The current gradient matrix recorded in the submodel is assigned to the weights, λ being the attenuation factor. Further, the first intermediate value may be a product of an inverse matrix of the updated current gradient matrix and a transpose of the prediction probability matrix, such as:
Figure BDA0003857447020000341
wherein, g t Is a first intermediate value.
Further, the second intermediate value may be a product of the prediction probability matrix and the current accuracy weight matrix. Determining a next accuracy weight matrix corresponding to each predictor model according to the real click rate, the first intermediate value, the second intermediate value and the current accuracy weight matrix, wherein the determination may be: and subtracting the second intermediate value from the real click rate, multiplying the subtracted result by the first intermediate value to obtain a reference adjustment value, and accumulating the reference adjustment value and the current accuracy rate weight matrix to obtain a next accuracy rate weight matrix. Reference is made to the following formula:
Figure BDA0003857447020000342
wherein, w t+1 Is the next accuracy weight matrix, w t For the current accuracy weight matrix, g t Is a first intermediate value, which is,
Figure BDA0003857447020000343
is the second intermediate value.
The process of determining the next accuracy weight matrix is illustrated with reference to the following steps:
step 1, performing product processing on the prediction probability matrix and the transpose of the prediction probability matrix to obtain a matrix change value, updating the current gradient matrix according to the matrix change value and the current gradient matrix recorded in the weight distribution submodel, namely updating the current gradient matrix
Figure BDA0003857447020000344
Step 2, determining a first intermediate value according to the updated current gradient matrix and the transposition of the prediction probability matrix, namely
Figure BDA0003857447020000345
Step 3, determining a next accuracy rate weight matrix corresponding to each predictor model according to the real click rate, the first intermediate value, the second intermediate value and the current accuracy rate weight matrix, namely determining the next accuracy rate weight matrix corresponding to each predictor model
Figure BDA0003857447020000346
Figure BDA0003857447020000347
In the above embodiment, the first intermediate value and the second intermediate value are respectively calculated by using a target recurrence function, and then the next accuracy weight matrix is calculated according to the first intermediate value, the second intermediate value, the real click rate and the current accuracy weight matrix, so that the weight update based on the recurrence mode is realized, information such as the output click rate of each historical time slice does not need to be stored, in addition, the historical accuracy weight matrix can be reversely calculated according to the recurrence mode, and the weight distribution submodel only needs to record the current accuracy weight matrix each time, thereby greatly reducing the overhead.
It should be noted that, in the conventional gradient descent method, the model convergence speed is slow, and the historical data cannot be cached and reused in the existing online click-through rate prediction application. Compared with the prior art, the next accuracy weight matrix is determined through the target recurrence function, the accuracy weights of all the prediction submodels are updated, the storage cost can be reduced, and the convergence speed of the models can be improved.
According to the technical scheme of the embodiment, the prediction probability matrix and the real click rate are processed according to the weight distribution submodel, the next accuracy rate weight matrix corresponding to each prediction submodel is determined, and when each prediction submodel outputs the prediction probability matrix corresponding to the next data to be trained, the output click rate is determined based on the accuracy rate weight matrix and the prediction probability matrix, so that the update of the accuracy rate weight of each prediction submodel is realized, the click rate prediction model is more suitable for the concept drift in click rate prediction, and the output accuracy of the click rate prediction model is further improved.
Fig. 5 is a schematic structural diagram of an apparatus for determining a display item according to an embodiment of the present invention, as shown in fig. 5, the apparatus includes: a data acquisition module 510, a data processing module 520, a click-through rate prediction module 530, and a target presentation module 540.
A data obtaining module 510, configured to obtain high-speed streaming data associated with a target user within a preset time length before a current time and at least one to-be-displayed item corresponding to an item display request;
a data processing module 520, configured to determine at least one set of data to be processed according to the high-speed streaming data and the article-related data of each article to be displayed; the number of the groups of the data to be processed is the same as the number of the articles to be displayed;
the click rate prediction module 530 is configured to perform prediction processing on the at least one group of data to be processed based on a click rate prediction model to obtain a target click rate corresponding to each article to be displayed; the click rate prediction model comprises a feature extraction submodel, at least one prediction submodel and a weight distribution submodel for dynamically distributing accuracy rate weight to the at least one prediction submodel;
and the target display module 540 is configured to determine and display the target display item based on each target click rate.
On the basis of the above embodiment, the article display request may be generated based on at least one of the following ways: generating an article display request corresponding to a search word input in a search box based on the search word; and when the current article display page is detected to be refreshed, generating the article display request.
On the basis of the foregoing embodiment, the data processing module 520 is specifically configured to:
determining target characteristic data corresponding to the target user according to the user characteristic data corresponding to the target user and the high-speed streaming data; and aiming at each article to be displayed, determining the data to be processed corresponding to the article to be displayed according to the target characteristic data, the article type, the article name and the historical processing data of the article to be displayed.
On the basis of the above embodiment, the click rate prediction module 530 includes a feature extraction unit, a first prediction unit, and a second prediction unit, wherein;
the feature extraction unit is used for inputting the current data to be processed to the feature extraction submodel aiming at each group of data to be processed to obtain a feature sequence corresponding to the current data to be processed;
the first prediction unit is used for respectively inputting the characteristic sequences into the at least one prediction submodel to obtain the predicted click rate corresponding to the characteristic sequences;
the second prediction unit is used for determining a target click rate corresponding to the current data to be processed based on the accuracy rate weight and the corresponding predicted click rate which are stored in the weight distribution submodel and correspond to each prediction submodel;
the accuracy rate weight is dynamically updated by the weight distribution submodel according to the predicted click rate and the corresponding real click rate of the data to be trained, and the data to be trained comprises high-speed streaming data and article associated data of displayed articles.
On the basis of the foregoing embodiment, the second prediction unit is specifically configured to: determining the product of each accuracy rate weight and the corresponding predicted click rate to obtain each click rate to be accumulated; and obtaining the target click rate corresponding to the current data to be processed by carrying out accumulation processing on each click rate to be accumulated.
On the basis of the foregoing embodiment, the object display module 540 is specifically configured to:
determining a preset number of target display articles from the articles to be displayed and displaying the target display articles according to the target click rate of the articles to be displayed; or displaying the to-be-displayed articles on the display interface in a sequence from high to low according to the target click rate.
On the basis of the above embodiment, the apparatus further includes a node deployment module, where the node deployment module is configured to deploy the click rate prediction model on each distributed node in the distributed system, so as to perform prediction processing on corresponding to-be-processed data based on the click rate prediction model when receiving an article display request, or dynamically update the accuracy weight of the corresponding prediction submodel based on a processing result of each prediction submodel on the to-be-trained data when receiving the to-be-trained data.
On the basis of the above embodiment, the apparatus further includes a weight updating module, configured to input, before or after the at least one set of data to be processed is predicted based on the click rate prediction model, data to be trained and a corresponding true click rate in a target time slice associated with a current time into the click rate prediction model to obtain a predicted click rate of each prediction submodel on the data to be trained, and enable the weight assignment submodel to update an accuracy weight of each prediction submodel according to each predicted click rate and the corresponding true click rate, so as to determine a target click rate of each article to be displayed based on the updated accuracy weight when an article display request is received; wherein the target time slice is determined based on a preset time division rule.
The apparatus for determining a displayed article according to this embodiment may determine at least one set of data to be processed by obtaining high-speed streaming data associated with a target user within a preset time period before a current time and at least one article to be displayed corresponding to an article display request, and further predict click rates of the articles by combining the high-speed streaming data within the preset time period before the current time through a feature extraction submodel, at least one prediction submodel and a weight assignment submodel for dynamically assigning an accuracy weight to the prediction submodel in a click rate prediction model, so that the predicted click rates have timeliness, a problem that the click rate prediction result does not have timeliness in the prior art is solved, and the click rates of the articles are predicted by combining the high-speed streaming data within the preset time period before the current time, so that click rate prediction based on data flow distribution that changes with time is implemented, click rate prediction based on the dynamic adjustment of the click rate prediction model in real time is implemented, a concept of the dynamic adjustment of the click rate prediction model can be quickly adapted to the streaming data prediction, and the click rate prediction accuracy of the click rate prediction of the article is further improved.
The device for determining the displayed article provided by the embodiment of the invention can execute the method for determining the displayed article provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
It should be noted that, the units and modules included in the apparatus are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the embodiment of the invention.
Fig. 6 is a schematic structural diagram of a training apparatus for a click rate prediction model according to an embodiment of the present invention, where the click rate prediction model includes a feature extraction submodel, at least one prediction submodel, and a weight assignment submodel, and as shown in fig. 6, the apparatus includes: a data acquisition module 610, a matrix prediction module 620, a click rate prediction module 630, a loss calculation module 640, and a parameter correction module 650.
A data obtaining module 610, configured to obtain multiple sets of data to be trained in a current time slice; the time slice is determined according to a preset time division rule, and the data to be trained comprise high-speed streaming data of each user in the current time slice, user characteristic data, article association data of displayed articles and the real click rate of each user on the corresponding displayed articles;
a matrix prediction module 620, configured to input the to-be-trained feature sequences of the to-be-trained data extracted based on the feature extraction submodel into the at least one prediction submodel, respectively, so as to obtain a prediction probability matrix including at least one predicted click rate; wherein each predicted click rate corresponds to a respective predictor model;
a click rate prediction module 630, configured to determine an output click rate of the data to be trained based on the prediction probability matrix and a current accuracy rate weight matrix corresponding to the at least one prediction submodel recorded in the weight assignment submodel;
a loss calculation module 640, configured to determine a loss value to be used based on the output click rate and a real click rate of the data to be trained, so as to perform parameter correction on the at least one prediction sub-model and the feature extraction sub-model based on the loss value to be used;
and the parameter correction module 650 is configured to perform parameter correction on each sub-model in the click rate prediction model based on the to-be-used loss value of each group of data to be trained after each group of data to be trained in the current time slice is processed.
On the basis of the foregoing embodiment, the data obtaining module 610 is specifically configured to:
acquiring high-speed streaming data of at least one user on corresponding displayed articles, the real click rate of the displayed articles and article association data of the displayed articles in the current time slice, and taking the high-speed streaming data, the real click rate of the displayed articles and the article association data as original data; wherein the article related data comprises article types, article names and processing capacity data; dividing the original data into a plurality of groups of data to be trained according to the generation time stamp of each data in the original data and the preset data processing amount; and each group of data to be trained comprises article association data corresponding to the displayed articles.
On the basis of the foregoing embodiment, the click rate prediction module 630 is specifically configured to:
multiplying the predicted click rate of the same prediction submodel by the corresponding accuracy rate weight and then performing accumulation processing to obtain the output click rate of the data to be trained; and the current accuracy weight matrix comprises the accuracy weights corresponding to the predictor models.
On the basis of the above embodiment, the loss calculating module 640 includes a first calculating unit and a second calculating unit, wherein;
the first calculation unit is used for determining an intermediate loss value corresponding to the current prediction submodel based on the logarithm of the prediction click rate of the current prediction submodel, the real click rate and a preset value aiming at each prediction submodel;
and the second calculation unit is used for determining the loss value to be used based on the intermediate loss value of each predictor model.
On the basis of the foregoing embodiment, the first calculating unit is specifically configured to:
determining a first loss value based on the logarithm of the predicted click rate of the current prediction submodel and the real click rate; determining a second loss value based on a preset numerical value and the real click rate; determining the logarithm of the difference value between the preset numerical value and the predicted click rate, and determining a third loss value; determining an intermediate loss value corresponding to a current predictor model based on the first loss value, the second loss value, and the third loss value.
On the basis of the foregoing embodiment, the parameter correction module 650 is further configured to perform accumulation processing on to-be-used loss values of each group of to-be-trained data to obtain a total loss value corresponding to the current time slice, and perform parameter correction on a feature extraction submodel, at least one prediction submodel, and a weight assignment submodel in the click rate prediction model based on the total loss value.
On the basis of the above embodiment, the apparatus further includes a weight updating module, where the weight updating module is configured to process the prediction probability matrix and the true click rate based on the weight distribution submodel, determine a next accuracy weight matrix corresponding to each prediction submodel, and determine an output click rate based on the accuracy weight matrix and the prediction probability matrix when each prediction submodel outputs a prediction probability matrix corresponding to next data to be trained.
On the basis of the above embodiment, the weight update module includes a recurrence update unit, and the recurrence update unit is configured to process the prediction probability matrix, the real click rate, and the current accuracy weight matrix based on a target recurrence function set in the weight assignment submodel, and determine a next accuracy weight matrix corresponding to each prediction submodel.
On the basis of the foregoing embodiment, the recursive update unit is specifically configured to:
determining a first intermediate value according to the prediction probability matrix and the transpose of the prediction probability matrix; determining a second intermediate value according to the prediction probability matrix and the current accuracy rate weight matrix; and determining a next accuracy weight matrix corresponding to each predictor model according to the real click rate, the first intermediate value, the second intermediate value and the current accuracy weight matrix.
According to the training device of the click rate prediction model, a plurality of groups of data to be trained in a current time slice are obtained, a characteristic sequence to be trained of the data to be trained is determined according to a characteristic extraction submodel, a prediction probability matrix is further obtained according to the prediction submodel, the output click rate of the data to be trained is determined through the prediction probability matrix and a current accuracy rate weight matrix recorded in a weight distribution submodel, a loss value to be used is determined according to the output click rate and the real click rate, parameter correction is carried out on each prediction submodel and the characteristic extraction submodel through the loss value to be used, the first correction of the prediction submodel and the characteristic extraction submodel is achieved, the prediction precision of the click rate prediction model is improved, and after each group of data to be trained is processed, parameter correction is carried out on each prediction submodel, the characteristic extraction submodel and the weight distribution submodel according to be used loss values, secondary correction of each submodel is achieved, and the prediction precision of the click rate prediction model is further improved. In addition, the trained click rate prediction model can be updated and trained on the basis of incremental data, so that the click rate prediction model can better adapt to the concept drift flow data, the prediction stability of the click rate prediction model is ensured, the timeliness of the click rate prediction model is improved, the prediction result of the click rate prediction model has timeliness, the prediction precision of the click rate prediction model is further improved, and the problem that the click rate prediction result in the prior art does not have timeliness is solved. Moreover, by decoupling the updating of the accuracy weight from the training of the predictor model, the click rate prediction model can be quickly converged, the accuracy weight in the click rate prediction model obtained by training can be dynamically changed, the timeliness of the click rate prediction model is further improved, the timeliness of the prediction result of the click rate prediction model is further improved, and the prediction precision of the click rate is improved.
Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention. FIG. 7 illustrates a block diagram of an exemplary electronic device 70 suitable for use in implementing embodiments of the present invention. The electronic device 70 shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 7, electronic device 70 is embodied in the form of a general purpose computing device. The components of the electronic device 70 may include, but are not limited to: one or more processors or processing units 701, a system memory 702, and a bus 703 that couples various system components including the system memory 702 and the processing unit 701.
Bus 703 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Electronic device 70 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by electronic device 70 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 702 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 704 and/or cache memory 705. The electronic device 70 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, the storage system 706 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 7 and commonly referred to as a "hard drive"). Although not shown in FIG. 7, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 703 via one or more data media interfaces. Memory 702 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 708 having a set (at least one) of program modules 707 may be stored, for example, in memory 702, such program modules 707 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. The program modules 707 generally perform the functions and/or methodologies of the described embodiments of the invention.
The electronic device 70 may also communicate with one or more external devices 709 (e.g., keyboard, pointing device, display 710, etc.), with one or more devices that enable a user to interact with the electronic device 70, and/or with any devices (e.g., network card, modem, etc.) that enable the electronic device 70 to communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 711. Also, the electronic device 70 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 712. As shown, the network adapter 712 communicates with the other modules of the electronic device 70 over a bus 703. It should be appreciated that although not shown in FIG. 7, other hardware and/or software modules may be used in conjunction with electronic device 70, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 701 executes programs stored in the system memory 702 to perform various functional applications and data processing, such as implementing a method for determining a displayed item or a training method for a click rate prediction model provided by an embodiment of the present invention.
Embodiments of the present invention also provide a storage medium containing computer-executable instructions that, when executed by a computer processor, perform a method of determining a displayed item.
The method comprises the following steps:
acquiring high-speed streaming data which is associated with a target user and is within a preset time length before the current time, and at least one to-be-displayed article corresponding to the article display request;
determining at least one group of data to be processed according to the high-speed streaming data and the article associated data of each article to be displayed; the number of the groups of the data to be processed is the same as the number of the articles to be displayed;
predicting the at least one group of data to be processed based on a click rate prediction model to obtain target click rates corresponding to the articles to be displayed; the click rate prediction model comprises a feature extraction submodel, at least one prediction submodel and a weight distribution submodel for dynamically distributing accuracy rate weight to the at least one prediction submodel;
and determining and displaying the target display article based on the target click rates.
Alternatively, the computer executable instructions, when executed by a computer processor, are for performing a training method of a click-through rate prediction model, the click-through rate prediction model comprising a feature extraction submodel, at least one prediction submodel, and a weight assignment submodel.
The method comprises the following steps:
acquiring a plurality of groups of data to be trained in a current time slice; the time slice is determined according to a preset time division rule, and the data to be trained comprises high-speed streaming data of each user in the current time slice, user characteristic data, article association data of displayed articles and the real click rate of each user on the corresponding displayed articles;
respectively inputting the characteristic sequences to be trained of the data to be trained extracted based on the characteristic extraction submodel into the at least one prediction submodel to obtain a prediction probability matrix comprising at least one prediction click rate; wherein each predicted click rate corresponds to a respective predictor model;
determining the output click rate of the data to be trained based on the prediction probability matrix and the current accuracy rate weight matrix which is recorded in the weight distribution submodel and corresponds to the at least one prediction submodel;
determining a loss value to be used based on the output click rate and the real click rate of the data to be trained, and performing parameter correction on the at least one prediction sub-model and the feature extraction sub-model based on the loss value to be used;
and after processing of each group of data to be trained in the current time slice is finished, performing parameter correction on each sub-model in the click rate prediction model based on the loss value to be used of each group of data to be trained.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for embodiments of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in some detail by the above embodiments, the invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the invention, and the scope of the invention is determined by the scope of the appended claims.

Claims (21)

1. A method of determining an item for display, comprising:
acquiring high-speed streaming data which is associated with a target user and is within a preset time length before the current time, and at least one to-be-displayed article corresponding to the article display request;
determining at least one group of data to be processed according to the high-speed streaming data and the article associated data of each article to be displayed; the number of the groups of the data to be processed is the same as the number of the articles to be displayed;
predicting the at least one group of data to be processed based on a click rate prediction model to obtain target click rates corresponding to the articles to be displayed; the click rate prediction model comprises a feature extraction submodel, at least one prediction submodel and a weight distribution submodel for dynamically distributing accuracy rate weight to the at least one prediction submodel;
and determining and displaying the target display article based on the target click rates.
2. The method of claim 1, wherein the item display request is generated based on at least one of:
generating an article display request corresponding to a search word input in a search box based on the search word;
and when detecting that the current article display page is refreshed, generating the article display request.
3. The method of claim 1, wherein determining at least one set of data to be processed based on the high-speed streaming data and item-related data for each item to be displayed comprises:
determining target characteristic data corresponding to the target user according to the user characteristic data corresponding to the target user and the high-speed streaming data;
and aiming at each article to be displayed, determining the data to be processed corresponding to the article to be displayed according to the target characteristic data, the article type, the article name and the historical processing data of the article to be displayed.
4. The method according to claim 1, wherein the predicting the at least one set of data to be processed based on the click-through rate prediction model to obtain the target click-through rate corresponding to each article to be displayed comprises:
for each group of data to be processed, inputting the current data to be processed into the feature extraction submodel to obtain a feature sequence corresponding to the current data to be processed;
inputting the characteristic sequences into the at least one prediction submodel respectively to obtain the prediction click rates corresponding to the characteristic sequences;
determining a target click rate corresponding to the current data to be processed based on the accuracy rate weight corresponding to each prediction submodel and the corresponding prediction click rate stored in the weight distribution submodel;
the accuracy rate weight is dynamically updated by the weight distribution submodel according to the predicted click rate and the corresponding real click rate of the data to be trained, and the data to be trained comprises high-speed streaming data and article associated data of displayed articles.
5. The method of claim 4, wherein determining the target click rate corresponding to the current data to be processed based on the accuracy rate weight of each predictor model and the corresponding predicted click rate comprises:
determining the product of each accuracy rate weight and the corresponding predicted click rate to obtain each click rate to be accumulated;
and obtaining the target click rate corresponding to the current data to be processed by carrying out accumulation processing on each click rate to be accumulated.
6. The method of claim 1, wherein determining and presenting target presentation items based on the respective target click rates comprises:
determining a preset number of target display articles from the articles to be displayed and displaying the target display articles according to the target click rate of the articles to be displayed; or the like, or, alternatively,
and displaying the articles to be displayed on the display interface in the sequence from high to low according to the target click rate.
7. The method of claim 1, further comprising:
and deploying the click rate prediction model on each distributed node in the distributed system, so that when an article display request is received, the corresponding data to be processed is subjected to prediction processing based on the click rate prediction model, or when the data to be trained is received, the accuracy rate weight of the corresponding prediction submodel is dynamically updated based on the processing result of each prediction submodel on the data to be trained.
8. The method of claim 1, further comprising, before or after the predictive processing of the at least one set of to-be-processed data based on the click-through rate prediction model:
inputting the data to be trained in the target time slice associated with the current moment and the corresponding real click rate into the click rate prediction model to obtain the predicted click rate of each prediction submodel on the data to be trained, and enabling the weight distribution submodel to update the accuracy rate weight of each prediction submodel according to each predicted click rate and the corresponding real click rate so as to determine the target click rate of each article to be displayed based on the updated accuracy rate weight when an article display request is received;
wherein the target time slice is determined based on a preset time division rule.
9. A training method of a click rate prediction model is characterized in that the click rate prediction model comprises a feature extraction submodel, at least one prediction submodel and a weight distribution submodel, and the method comprises the following steps:
acquiring a plurality of groups of data to be trained in a current time slice; the time slice is determined according to a preset time division rule, and the data to be trained comprises high-speed streaming data of each user in the current time slice, user characteristic data, article association data of displayed articles and the real click rate of each user on the corresponding displayed articles;
inputting the characteristic sequences to be trained of the data to be trained extracted based on the characteristic extraction submodel into the at least one prediction submodel respectively to obtain a prediction probability matrix comprising at least one prediction click rate; wherein each predicted click rate corresponds to a respective predictor model;
determining the output click rate of the data to be trained based on the prediction probability matrix and the current accuracy rate weight matrix which is recorded in the weight distribution submodel and corresponds to the at least one prediction submodel;
determining a loss value to be used based on the output click rate and the real click rate of the data to be trained, and performing parameter correction on the at least one prediction sub-model and the feature extraction sub-model based on the loss value to be used;
and after processing of each group of data to be trained in the current time slice is finished, performing parameter correction on each sub-model in the click rate prediction model based on the loss value to be used of each group of data to be trained.
10. The method of claim 9, wherein the obtaining the plurality of sets of data to be trained in the current time slice comprises:
acquiring high-speed streaming data of at least one user on corresponding displayed articles, the real click rate of the displayed articles and article associated data of the displayed articles in the current time slice, and taking the data as original data; wherein the article related data comprises article types, article names and processing capacity data;
dividing the original data into a plurality of groups of data to be trained according to the generation time stamp of each data in the original data and the preset data processing amount;
and each group of data to be trained comprises article association data corresponding to the displayed articles.
11. The method of claim 9, wherein determining the output click-through rate of the data to be trained based on the predictive probability matrix and a current accuracy rate weight matrix corresponding to the at least one predictive sub-model recorded in the weight assignment sub-model comprises:
multiplying the predicted click rate of the same prediction submodel by the corresponding accuracy rate weight and then performing accumulation processing to obtain the output click rate of the data to be trained;
and the current accuracy weight matrix comprises the accuracy weights corresponding to the predictor models.
12. The method of claim 9, wherein determining a loss-to-use value based on the output click rate and a true click rate of the data to be trained comprises:
aiming at each predictor model, determining a middle loss value corresponding to the current predictor model based on the logarithm of the predicted click rate of the current predictor model, the real click rate and a preset value;
and determining the loss value to be used based on the intermediate loss value of each predictor model.
13. The method of claim 12, wherein determining the median loss value corresponding to the current predictor model based on the logarithm of the predicted click-through rate, the true click-through rate, and a preset value of the current predictor model comprises:
determining a first loss value based on the logarithm of the predicted click rate of the current prediction submodel and the real click rate;
determining a second loss value based on a preset numerical value and the real click rate;
determining the logarithm of the difference value between the preset numerical value and the predicted click rate, and determining a third loss value;
determining an intermediate loss value corresponding to a current predictor model based on the first loss value, the second loss value, and the third loss value.
14. The method of claim 10, wherein the performing parameter corrections on each sub-model in the click-through rate prediction model based on the loss-to-use values of each set of data to be trained comprises:
and obtaining a total loss value corresponding to the current time slice by performing accumulation processing on the to-be-used loss values of each group of to-be-trained data, and performing parameter correction on a feature extraction submodel, at least one prediction submodel and a weight distribution submodel in the click rate prediction model based on the total loss value.
15. The method of claim 9, further comprising:
and processing the prediction probability matrix and the real click rate based on the weight distribution submodel, determining a next accuracy rate weight matrix corresponding to each prediction submodel, and determining the output click rate based on the accuracy rate weight matrix and the prediction probability matrix when each prediction submodel outputs the prediction probability matrix corresponding to the next data to be trained.
16. The method of claim 15, wherein the processing the prediction probability matrix and the true click-through rate based on the weight assignment submodel to determine a next accuracy weight matrix corresponding to each prediction submodel comprises:
and processing the prediction probability matrix, the real click rate and the current accuracy rate weight matrix based on a target recurrence function set in the weight distribution submodel, and determining a next accuracy rate weight matrix corresponding to each prediction submodel.
17. The method of claim 16, wherein the processing the prediction probability matrix, the true click-through rate, and the current accuracy weight matrix based on a target recurrence function set in the weight assignment submodel to determine a next accuracy weight matrix corresponding to each prediction submodel comprises:
determining a first intermediate value according to the prediction probability matrix and the transpose of the prediction probability matrix;
determining a second intermediate value according to the prediction probability matrix and the current accuracy rate weight matrix;
and determining a next accuracy weight matrix corresponding to each predictor model according to the real click rate, the first intermediate value, the second intermediate value and the current accuracy weight matrix.
18. An apparatus for determining displayed items, comprising:
the data acquisition module is used for acquiring high-speed streaming data which is associated with a target user and is within a preset time length before the current time and at least one to-be-displayed article corresponding to the article display request;
the data processing module is used for determining at least one group of data to be processed according to the high-speed streaming data and the article associated data of each article to be displayed; the number of the groups of the data to be processed is the same as the number of the articles to be displayed;
the click rate prediction module is used for predicting and processing the at least one group of data to be processed based on the click rate prediction model to obtain target click rates corresponding to the articles to be displayed; the click rate prediction model comprises a feature extraction submodel, at least one prediction submodel and a weight distribution submodel for dynamically distributing accuracy rate weight to the at least one prediction submodel;
and the target display module is used for determining and displaying the target display articles based on the target click rates.
19. A training device for a click rate prediction model is characterized in that the click rate prediction model comprises a feature extraction submodel, at least one prediction submodel and a weight distribution submodel, and the device comprises:
the data acquisition module is used for acquiring a plurality of groups of data to be trained in the current time slice; the time slice is determined according to a preset time division rule, and the data to be trained comprises high-speed streaming data of each user in the current time slice, user characteristic data, article association data of displayed articles and the real click rate of each user on the corresponding displayed articles;
the matrix prediction module is used for respectively inputting the characteristic sequences to be trained of the data to be trained extracted based on the characteristic extraction submodel into the at least one prediction submodel to obtain a prediction probability matrix comprising at least one prediction click rate; wherein each predicted click rate corresponds to a respective predictor model;
the click rate prediction module is used for determining the output click rate of the data to be trained based on the prediction probability matrix and a current accuracy rate weight matrix which is recorded in the weight distribution submodel and corresponds to the at least one prediction submodel;
the loss calculation module is used for determining a loss value to be used based on the output click rate and the real click rate of the data to be trained so as to carry out parameter correction on the at least one prediction submodel and the feature extraction submodel based on the loss value to be used;
and the parameter correction module is used for performing parameter correction on each sub-model in the click rate prediction model based on the to-be-used loss value of each group of data to be trained after each group of data to be trained in the current time slice is processed.
20. An electronic device, characterized in that the electronic device comprises:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a method of determining a displayed item as recited in any of claims 1-8 or a method of training a click rate prediction model as recited in any of claims 9-17.
21. A storage medium containing computer executable instructions for performing a method of determining a displayed item as claimed in any one of claims 1 to 8 or a method of training a click-rate prediction model as claimed in any one of claims 9 to 17 when executed by a computer processor.
CN202211153715.1A 2022-09-21 2022-09-21 Method for determining displayed article, model training method, device, equipment and medium Pending CN115618134A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211153715.1A CN115618134A (en) 2022-09-21 2022-09-21 Method for determining displayed article, model training method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211153715.1A CN115618134A (en) 2022-09-21 2022-09-21 Method for determining displayed article, model training method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN115618134A true CN115618134A (en) 2023-01-17

Family

ID=84859063

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211153715.1A Pending CN115618134A (en) 2022-09-21 2022-09-21 Method for determining displayed article, model training method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN115618134A (en)

Similar Documents

Publication Publication Date Title
WO2022037337A1 (en) Distributed training method and apparatus for machine learning model, and computer device
CN111046286B (en) Object recommendation method and device and computer storage medium
CN112541124B (en) Method, apparatus, device, medium and program product for generating a multitasking model
WO2020160252A1 (en) Task-aware neural network architecture search
CN109961041B (en) Video identification method and device and storage medium
CN107766573B (en) Commodity recommendation method, commodity recommendation device, commodity recommendation equipment and storage medium based on data processing
JP2007317068A (en) Recommending device and recommending system
US11334758B2 (en) Method and apparatus of data processing using multiple types of non-linear combination processing
CN113536097B (en) Recommendation method and device based on automatic feature grouping
US11823058B2 (en) Data valuation using reinforcement learning
CN109389424B (en) Flow distribution method and device, electronic equipment and storage medium
CN113778691B (en) Task migration decision method, device and system
CN113743971A (en) Data processing method and device
CN114417058A (en) Video material screening method and device, computer equipment and storage medium
CN116029391A (en) Model training method, prediction method and device based on federal learning
CN110298615B (en) Method, apparatus, medium, and computing device for selecting items in a warehouse
US10313457B2 (en) Collaborative filtering in directed graph
US20210304025A1 (en) Dynamic quality of service management for deep learning training communication
CN110378486B (en) Network embedding method and device, electronic equipment and storage medium
CN112218114A (en) Video cache control method, device and computer readable storage medium
WO2023087933A1 (en) Content recommendation method and apparatus, device, storage medium, and program product
CN115618134A (en) Method for determining displayed article, model training method, device, equipment and medium
CN112905885B (en) Method, apparatus, device, medium and program product for recommending resources to user
CN115048425A (en) Data screening method and device based on reinforcement learning
CN114217933A (en) Multi-task scheduling method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination