CN114819146A - Recommendation model training method, display content determining method, device and medium - Google Patents

Recommendation model training method, display content determining method, device and medium Download PDF

Info

Publication number
CN114819146A
CN114819146A CN202210509093.5A CN202210509093A CN114819146A CN 114819146 A CN114819146 A CN 114819146A CN 202210509093 A CN202210509093 A CN 202210509093A CN 114819146 A CN114819146 A CN 114819146A
Authority
CN
China
Prior art keywords
model
trained
hidden layer
feature
shared
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
CN202210509093.5A
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 Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet 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 Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202210509093.5A priority Critical patent/CN114819146A/en
Publication of CN114819146A publication Critical patent/CN114819146A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0241Advertisements
    • G06Q30/0251Targeted advertisements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0241Advertisements
    • G06Q30/0277Online advertisement

Abstract

The present disclosure relates to the field of computer technologies, and in particular, to a recommendation model training method, a display content determination method, a recommendation model training apparatus, a display content determination apparatus, a computer-readable storage medium, and an electronic device, including: the method comprises the steps of inputting sample data into a first model to be trained, a second model to be trained and a shared model to obtain hidden layer characteristics output by hidden layers of the models, carrying out fusion processing on the hidden layer characteristics of the first model to be trained and the hidden layer characteristics of the shared model to obtain first prediction mutual information, carrying out training according to the first prediction mutual information and actual mutual information, carrying out fusion processing on the hidden layer characteristics of the second model to be trained and the hidden layer characteristics of the shared model to obtain second prediction mutual information, and carrying out training according to the second prediction mutual information and the actual mutual information. Through the technical scheme of the embodiment of the disclosure, the problem of poor consistency of two models with task correlation can be solved.

Description

Recommendation model training method, display content determining method, device and medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a recommendation model training method, a display content determining method, a recommendation model training apparatus, a display content determining apparatus, a computer-readable storage medium, and an electronic device.
Background
With the rapid development of the internet, the coverage of internet advertisements is wider and wider. In the prior art, for a certain advertisement space, advertisements matching with a user can be screened out from a plurality of advertisements by an advertisement delivery engine and displayed. Generally, the step of screening advertisements may include: the method comprises the steps of orientation, recall, rough ranking, fine ranking and the like, wherein in each step, advertisements related to the steps can be screened through a screening model so as to screen out advertisements needing to be displayed from a plurality of advertisements.
However, in the prior art, screening models are trained aiming at different screening steps, and there is no correlation between the screening models and no ability of mutual learning. For example, the advertisement to be filtered can be output in the rough filtering model, and the advertisement to be filtered cannot be output in the recalling filtering model. That is, in the prior art, the consistency among the screening models is poor, and the accuracy of the advertisement to be displayed obtained through the screening models is also poor.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present disclosure, and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
An object of the present disclosure is to provide a recommendation model training method, a recommendation model training apparatus, a presentation content determining method, a presentation content determining apparatus, a computer-readable storage medium, an electronic device, and a computer program product, which can solve the problem that consistency of two models having a task correlation is poor.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows, or in part will be obvious from the description, or may be learned by practice of the disclosure.
According to a first aspect of the present disclosure, there is provided a recommendation model training method, including: acquiring sample data; the sample data comprises sample content, a sample user and interaction information of the sample content and the sample user; inputting sample data into a first model to be trained, a second model to be trained and a shared model to obtain hidden layer characteristics output by hidden layers of the first model to be trained, the second model to be trained and the shared model; the first model to be trained and the second model to be trained have a task correlation relationship; the task correlation relation is that a first model to be trained is screened, and then a screened result is screened through a second model to be trained; the shared model is used for learning the common characteristics of the first model to be trained and the second model to be trained; fusing the hidden layer characteristics of the first model to be trained and the hidden layer characteristics of the shared model to obtain first prediction mutual information of the first model to be trained, and training the first model to be trained according to the first prediction mutual information and actual mutual information in sample data to obtain a first recommended model; and performing fusion processing on the hidden layer characteristics of the second model to be trained and the hidden layer characteristics of the shared model to obtain second prediction mutual information of the first model to be trained, and training the second model to be trained according to the second prediction mutual information and actual mutual information in the sample data to obtain a second recommended model.
Optionally, based on the foregoing scheme, the step of performing fusion processing on the hidden layer feature of the first model to be trained and the hidden layer feature of the shared model to obtain the first prediction interaction information of the first model to be trained includes: fusing the hidden layer features of the first model to be trained and the hidden layer features of the shared model to obtain first fusion features; and determining first prediction interaction information of the first model to be trained according to the first fusion characteristics.
Optionally, based on the foregoing scheme, the step of performing fusion processing on the hidden layer feature of the first model to be trained and the hidden layer feature of the shared model to obtain a first fusion feature includes: determining fusion weights corresponding to hidden layer features of a first model to be trained and hidden layer features of a shared model according to sample data; and obtaining a first fusion characteristic according to the fusion weight corresponding to the hidden layer characteristic of the first model to be trained, the fusion weight corresponding to the hidden layer characteristic of the shared model and the hidden layer characteristic of the shared model.
Optionally, based on the foregoing scheme, the step of performing fusion processing on the hidden layer feature of the first model to be trained and the hidden layer feature of the shared model to obtain a first fusion feature includes: obtaining the current fusion characteristic of the current hidden layer of the first model to be trained aiming at the first model to be trained according to the previous fusion characteristic of the previous hidden layer of the first model to be trained and the previous fusion characteristic of the shared model on the same layer; obtaining the current fusion characteristic of the shared model according to the previous fusion characteristic of the first model to be trained, the previous fusion characteristic of the shared model on the same layer and the previous fusion characteristic of the second model to be trained; and obtaining a first fusion characteristic according to the current fusion characteristic of the first model to be trained and the current fusion characteristic of the shared model.
Optionally, based on the foregoing scheme, the first model to be trained includes a first sub-training model and a second sub-training model, and the step of performing fusion processing on the hidden layer feature of the first model to be trained and the hidden layer feature of the shared model to obtain a first fusion feature includes: obtaining a first fusion sub-feature corresponding to the first training sub-model according to the hidden layer feature of the first training sub-model and the hidden layer feature of the shared model; obtaining a second fusion sub-feature corresponding to the second training sub-model according to the hidden layer feature of the second training sub-model and the hidden layer feature of the shared model; and obtaining a first fusion characteristic according to the first fusion sub-characteristic corresponding to the first training sub-model and the second fusion sub-characteristic corresponding to the second training sub-model.
Optionally, based on the foregoing scheme, the step of training the first model to be trained according to the first prediction mutual information and the actual mutual information in the sample data includes: determining a first loss function of the first model to be trained according to the first prediction mutual information of the first model to be trained and the actual mutual information of the sample data; and updating the neural network parameters in the first model to be trained according to the first loss function of the first model to be trained to obtain a first recommended model.
Optionally, based on the foregoing scheme, the first model to be trained includes a first sub-training model and a second sub-training model, and the step of determining the first loss function of the first model to be trained through the first prediction interaction information of the first model to be trained and the actual interaction information of the sample data includes: inputting sample data into a first sub-training model to obtain first sub-prediction interactive information, and determining a first loss sub-function of the first sub-training model according to the first sub-prediction interactive information; inputting the sample data into a second sub-training model to obtain second sub-prediction interactive information, and determining a second loss sub-function of the second sub-training model according to the second sub-prediction interactive information; and determining a first loss function of the first model to be trained according to the first sub-loss function of the first training sub-model and the second sub-loss function of the second training sub-model.
Optionally, based on the foregoing scheme, the step of updating the neural network parameter in the first model to be trained according to the first loss function of the first model to be trained to obtain the first recommended model includes: determining a second loss function of a second model to be trained through second prediction mutual information of the second model to be trained; determining an overall loss function according to the first loss function and the second loss function; and updating the neural network parameters in the first model to be trained according to the overall loss function so as to train the first model to be trained to obtain a first recommended model.
Optionally, the step of determining the overall loss function according to the first loss function and the second loss function includes: acquiring a first loss weight corresponding to the first loss function and a second loss weight corresponding to the second loss function; and determining the overall loss function according to the first loss weight, the first loss function, the second loss weight and the second loss function.
Optionally, the step of obtaining a first loss weight corresponding to the first loss function and a second loss weight corresponding to the second loss function includes: and obtaining a first loss weight corresponding to the first loss function and a second loss weight corresponding to the second loss function in an uncertain loss mode.
According to a second aspect of the present disclosure, there is provided a display content determining method, the method including: the method comprises the steps of obtaining a plurality of display contents and relevant information corresponding to the display contents, and inputting the relevant information corresponding to the display contents into a first recommendation model to obtain a plurality of first screening display contents; wherein, the relevant information corresponding to the display content comprises the display content, the display user and the interactive information between the display content and the display user, and the first recommendation model is obtained by the recommendation model training method according to any one of claims 1 to 10; inputting the first screening display contents into a second recommendation model to obtain second screening display contents; wherein the second recommendation model is obtained by a recommendation model training method according to any of claims 1-10; and determining the display content to be displayed according to the second screening display contents.
According to a third aspect of the present disclosure, there is provided a recommendation model training apparatus, the apparatus including: a sample data acquisition unit configured to perform acquisition of sample data; the sample data comprises sample content, a sample user and interaction information of the sample content and the sample user; the system comprises a sample data input unit, a data processing unit and a data processing unit, wherein the sample data input unit is configured to input sample data into a first model to be trained, a second model to be trained and a shared model to obtain hidden layer characteristics output by hidden layers of the first model to be trained, the second model to be trained and the shared model; the first model to be trained and the second model to be trained have a task correlation relationship; the task correlation relation is that a first model to be trained is screened, and then a screened result is screened through a second model to be trained; the shared model is used for learning the common characteristics of the first model to be trained and the second model to be trained; the first recommendation model training unit is configured to perform fusion processing on hidden layer features of a first model to be trained and hidden layer features of a shared model to obtain first prediction interaction information of the first model to be trained, and train the first model to be trained according to the first prediction interaction information and actual interaction information in sample data to obtain a first recommendation model; and the second recommendation model training unit is configured to perform fusion processing on the hidden layer features of the second model to be trained and the hidden layer features of the shared model to obtain second prediction interaction information of the first model to be trained, and train the second model to be trained according to the second prediction interaction information and actual interaction information in the sample data to obtain a second recommendation model.
According to a fourth aspect of the present disclosure, there is provided a presentation content determining apparatus, the apparatus comprising: the first screening content acquisition unit is configured to acquire a plurality of display contents and relevant information corresponding to the display contents, and input the relevant information corresponding to the display contents into the first recommendation model to obtain a plurality of first screening display contents; the method comprises the steps that the relevant information corresponding to the display content comprises the display content, a display user and interactive information of the display content and the display user, and the first recommendation model is obtained by any recommendation model training method; a second screening content obtaining unit configured to perform input of the plurality of first screening display contents into a second recommendation model to obtain a plurality of second screening display contents; the second recommendation model is obtained by the recommendation model training method of any item; and the display content determining unit is configured to determine the display content to be displayed according to the plurality of second screening display contents.
According to a fifth aspect of the present disclosure, there is provided a computer-readable storage medium on which a computer program is stored, the program, when executed by a processor, implementing the recommendation model training method of the first aspect and the exposure determination method of the second aspect as in the above embodiments.
According to a sixth aspect of the present disclosure, there is provided an electronic device comprising:
a processor; and
a memory for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the recommendation model training method of the first aspect and the presentation content determination method of the second aspect as in the embodiments described above.
According to a seventh aspect of the present disclosure, there is provided a computer program product comprising: the computer program/instructions when executed by a processor implement the recommendation model training method of any one of the above or the exposure determination method of claim 11.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
in the recommended model training method provided by an embodiment of the present disclosure, sample data may be obtained, the sample data is input into a first model to be trained, a second model to be trained, and a shared model, hidden layer features output by hidden layers of the first model to be trained, the second model to be trained, and the shared model are obtained, the hidden layer features of the first model to be trained and the hidden layer features of the shared model are fused to obtain first predicted mutual information of the first model to be trained, the first model to be trained is trained according to the first predicted mutual information and actual mutual information in the sample data to obtain a first recommended model, the hidden layer features of the second model to be trained and the hidden layer features of the shared model are fused to obtain second predicted mutual information of the first model to be trained, the second model to be trained is trained according to the second predicted mutual information and actual mutual information in the sample data, and obtaining a second recommendation model.
According to the embodiment of the disclosure, sample data can be obtained, the sample data is input into the first model to be trained, the second model to be trained and the shared model, hidden layer characteristics output by hidden layers of the first model to be trained, the second model to be trained and the shared model are obtained, the hidden layer characteristics of the first model to be trained and the hidden layer characteristics of the shared model are fused to obtain first prediction interaction information, the first model to be trained is trained according to the first prediction interaction information and actual interaction information to obtain a first recommended model, and the second recommended model is similar. On one hand, the characteristics of the first model to be trained/the second model to be trained and the shared model can be fused, so that the first model to be trained and the second model to be trained have correlation, and the consistency of the first model to be trained and the second model to be trained is improved; on the other hand, when the model is trained, the characteristics of the model with the task correlation relation are considered, so that the screening accuracy can be higher when the display content is screened, and the conversion rate of the display content is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty. In the drawings:
FIG. 1 schematically illustrates a schematic diagram of an exemplary system architecture of a recommendation model training method in an exemplary embodiment of the disclosure;
FIG. 2 schematically illustrates a flow chart of a recommendation model training method in an exemplary embodiment of the disclosure;
FIG. 3 schematically illustrates a flow chart referring to determining first predicted mutual information of a first model to be trained based on a first fused feature in an exemplary embodiment of the present disclosure;
fig. 4 schematically illustrates a flowchart of obtaining a first fusion feature according to a fusion weight corresponding to a hidden layer feature of a first model to be trained, a hidden layer feature of the first model to be trained, a fusion weight corresponding to a hidden layer feature of a shared model, and a hidden layer feature of the shared model in an exemplary embodiment of the present disclosure;
FIG. 5 schematically illustrates a schematic diagram of a gating structure in an exemplary embodiment of the present disclosure;
FIG. 6 schematically illustrates a flowchart for obtaining a first fused feature according to a current fused feature of a first model to be trained and a current fused feature of a shared model in an exemplary embodiment of the present disclosure;
fig. 7 schematically illustrates a flowchart of obtaining a first fused feature according to a first fused sub-feature corresponding to a first training sub-model and a second fused sub-feature corresponding to a second training sub-model in an exemplary embodiment of the present disclosure;
FIG. 8 is a flow chart schematically illustrating updating of neural network parameters in a first model to be trained according to a first loss function of the first model to be trained to obtain a first recommended model in an exemplary embodiment of the present disclosure;
FIG. 9 schematically illustrates a flowchart of determining a first loss function corresponding to a first model to be trained according to a first sub-loss function corresponding to a first training sub-model and a second sub-loss function corresponding to a second training sub-model in an exemplary embodiment of the present disclosure;
FIG. 10 is a flow chart schematically illustrating updating neural network parameters in a first model to be trained according to an overall loss function to train the first model to be trained to obtain a first recommended model in an exemplary embodiment of the present disclosure;
FIG. 11 schematically illustrates a flow chart for determining an overall loss function based on a first loss weight, a first loss function, a second loss weight, and a second loss function in an exemplary embodiment of the disclosure;
FIG. 12 schematically illustrates a schematic diagram of joint training in an exemplary embodiment of the disclosure;
fig. 13 schematically illustrates a flow chart for determining presentations to be displayed based on a plurality of second filtered presentations in an exemplary embodiment of the disclosure;
FIG. 14 is a schematic diagram illustrating a composition of a recommendation model training apparatus in an exemplary embodiment of the present disclosure;
fig. 15 schematically illustrates a composition diagram of a presentation determination apparatus in an exemplary embodiment of the present disclosure;
fig. 16 schematically shows a structural diagram of a computer system suitable for an electronic device used to implement an exemplary embodiment of the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known structures, methods, devices, implementations, materials, or operations are not shown or described in detail to avoid obscuring aspects of the disclosure.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. That is, these functional entities may be implemented in the form of software, or in one or more software-hardened modules, or in different networks and/or processor devices and/or microcontroller devices.
FIG. 1 shows a schematic diagram of an exemplary system architecture to which a recommendation model training method of an embodiment of the present disclosure may be applied.
As shown in fig. 1, the system architecture 1000 may include one or more of terminal devices 1001, 1002, 1003, a network 1004, and a server 1005. The network 1004 is used to provide a medium for communication links between the terminal devices 1001, 1002, 1003 and the server 1005. Network 1004 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation. For example, the server 1005 may be a server cluster composed of a plurality of servers.
A user may use the terminal devices 1001, 1002, 1003 to interact with a server 1005 via a network 1004 to receive or transmit messages or the like. The terminal devices 1001, 1002, 1003 may be various electronic devices having a display screen, including but not limited to smart phones, tablet computers, portable computers, desktop computers, and the like. In addition, the server 1005 may be a server that provides various services.
In an embodiment, an execution subject of the recommended model training method of the present disclosure may be a server 1005, where the server 1005 may obtain sample data sent by the terminal devices 1001, 1002, and 1003, input the sample data into the first model to be trained, the second model to be trained, and the shared model, obtain hidden layer features output by hidden layers of the first model to be trained, the second model to be trained, and the shared model, perform fusion processing on the hidden layer features of the first model to be trained and the hidden layer features of the shared model, obtain first predicted interaction information of the first model to be trained, train the first model to be trained according to the first predicted interaction information and actual interaction information in the sample data, obtain a first recommended model, perform fusion processing on the hidden layer features of the second model to be trained and the hidden layer features of the shared model, obtain second predicted interaction information of the first model to be trained, and training the second model to be trained according to the second prediction interaction information and the actual interaction information in the sample data to obtain a second recommendation model so as to complete the training process of the recommendation model. In addition, the recommended model training method disclosed by the disclosure can be further executed through the terminal devices 1001, 1002, 1003 and the like, so as to realize a process of training the first model to be trained according to the first prediction mutual information and the actual mutual information in the sample data, and training the second model to be trained according to the second prediction mutual information and the actual mutual information in the sample data.
In addition, the implementation process of the recommendation model training method of the present disclosure may also be implemented by the terminal devices 1001, 1002, 1003 and the server 1005 together. For example, the terminal device 1001, 1002, 1003 may acquire sample data; wherein, the sample data comprises sample content, sample users and interaction information of the sample content and the sample users, the sample data is input into a first model to be trained, a second model to be trained and a shared model to obtain hidden layer characteristics output by hidden layers of the first model to be trained, the second model to be trained and the shared model, the obtained hidden layer characteristics are sent to a server 1005, so that the server 1005 can perform fusion processing on the hidden layer characteristics of the first model to be trained and the hidden layer characteristics of the shared model to obtain first prediction interaction information of the first model to be trained, the first model to be trained is trained according to the first prediction interaction information and actual interaction information in the sample data to obtain a first recommended model, the hidden layer characteristics of the second model to be trained and the hidden layer characteristics of the shared model are subjected to fusion processing to obtain second prediction interaction information of the first model to be trained, and training the second model to be trained according to the second prediction interaction information and the actual interaction information in the sample data to obtain a second recommendation model. .
With the rapid development of the internet, the coverage of internet advertisements is wider and wider. In the prior art, for a certain advertisement space, advertisements matching with a user can be screened out from a plurality of advertisements by an advertisement delivery engine and displayed. Generally, the step of screening advertisements may include: the method comprises the steps of orientation, recall, rough ranking, fine ranking and the like, wherein in each step, advertisements related to the steps can be screened through a screening model so as to screen out advertisements needing to be displayed from a plurality of advertisements.
Specifically, in the prior art, in the targeted screening, the advertisements may be screened according to user preferences, in the recall screening, the advertisements may be screened according to user tags, advertisement tags, user similarity and advertisement similarity, in the rough screening, the advertisements may be screened according to Click Through Rate (CTR), Conversion Rate (CVR), revenue per thousand presentations (eCPM), and the like, and in the fine screening, the advertisements may be screened according to the Click Through Rate, Conversion Rate, and advertisement revenue per thousand presentations, and the like.
However, in the prior art, screening models are trained aiming at different screening steps, and there is no correlation between the screening models and no ability of mutual learning. For example, the advertisement to be filtered can be output in the rough filtering model, and the advertisement to be filtered cannot be output in the recalling filtering model. That is, in the prior art, the consistency among the screening models is poor, and the accuracy of the advertisement to be displayed obtained through the screening models is also poor.
Specifically, in the training process of the screening model at the front step, some fine-grained information may be lost, so that in the screening model at the back step, more accurate screening cannot be performed according to the fine-grained information.
According to the method for training the recommendation model provided in the exemplary embodiment, sample data can be acquired; wherein the sample data comprises sample content, a sample user and interactive information of the sample content and the sample user, the sample data is input into a first model to be trained, a second model to be trained and a shared model to obtain hidden layer characteristics output by hidden layers of the first model to be trained, the second model to be trained and the shared model, the hidden layer characteristics of the first model to be trained and the hidden layer characteristics of the shared model are fused to obtain first prediction interactive information of the first model to be trained, the first model to be trained is trained according to the first prediction interactive information and actual interactive information in the sample data to obtain a first recommended model, the hidden layer characteristics of the second model to be trained and the hidden layer characteristics of the shared model are fused to obtain second prediction interactive information of the first model to be trained, the second model to be trained is trained according to the second prediction interactive information and the actual interactive information in the sample data, and obtaining a second recommendation model.
As shown in fig. 2, the recommended model training method may include the following steps S210 to S260:
step S210, sample data is obtained; the sample data comprises sample content, a sample user and interaction information of the sample content and the sample user;
step S220, inputting sample data into the first model to be trained, the second model to be trained and the shared model to obtain hidden layer characteristics output by hidden layers of the first model to be trained, the second model to be trained and the shared model respectively; the first model to be trained and the second model to be trained have a task correlation relationship; the task correlation relation is that a first model to be trained is screened, and then a screened result is screened through a second model to be trained; the shared model is used for learning the common characteristics of the first model to be trained and the second model to be trained;
step S230, fusing the hidden layer characteristics of the first model to be trained and the hidden layer characteristics of the shared model to obtain first prediction interaction information of the first model to be trained, and training the first model to be trained according to the first prediction interaction information and actual interaction information in sample data to obtain a first recommended model;
step S240, fusing the hidden layer characteristics of the second model to be trained and the hidden layer characteristics of the shared model to obtain second prediction mutual information of the first model to be trained, and training the second model to be trained according to the second prediction mutual information and actual mutual information in sample data to obtain a second recommended model.
According to the embodiment of the disclosure, sample data can be obtained, the sample data is input into the first model to be trained, the second model to be trained and the shared model, hidden layer characteristics output by hidden layers of the first model to be trained, the second model to be trained and the shared model are obtained, the hidden layer characteristics of the first model to be trained and the hidden layer characteristics of the shared model are fused to obtain first prediction interaction information, the first model to be trained is trained according to the first prediction interaction information and actual interaction information to obtain a first recommended model, and the second recommended model is similar. On one hand, the characteristics of the first model to be trained/the second model to be trained and the shared model can be fused, so that the first model to be trained and the second model to be trained have correlation, and the consistency of the first model to be trained and the second model to be trained is improved; on the other hand, because the characteristics of the model with the task correlation relation are considered when the model is trained, the screening accuracy can be higher when the display contents are screened, and the conversion rate of the display contents is improved.
Hereinafter, the steps S210 to S260 of the joint training in the present exemplary embodiment will be described in more detail with reference to the drawings and the exemplary embodiment.
Step S210, sample data is obtained; the sample data comprises sample content, a sample user and interaction information of the sample content and the sample user;
in an example embodiment of the present disclosure, sample data may be acquired. Specifically, the sample data may include advertisements, home page recommended content, and the like. The display form of the sample data can include characters, patterns, videos or combination of the characters, the patterns and the videos. It should be noted that the present disclosure does not specifically limit the sample data display format. Specifically, the sample data includes sample content, a sample user, and interaction information between the sample content and the sample user, which is information that can be used to indicate characteristics of the sample data. For example, sample users may include user attribute characteristics such as age, gender, territory, and the like; the interaction information of the sample content and the sample user can comprise user behavior characteristics, such as historical browsing records and the like; sample content may include presentation content text/voice information, such as words in the presentation content, or words in a brief description of the presentation content; the presentation content related information may also include image information, e.g., an image in the presentation content.
It should be noted that, the present disclosure is not limited to the sample content, the sample user, and the specific type of the interaction information between the sample content and the sample user.
In an example embodiment of the present disclosure, sample data and interaction information corresponding to the sample data, including sample content, a sample user, and the sample content and the sample user, may be acquired. Specifically, the sample data and the interaction information, including the sample content, the sample user, and the sample content and the sample user, corresponding to the sample data may be stored in a sample database, and when the scheme of the present disclosure is required to perform recommendation model training, the sample data and the interaction information, including the sample content, the sample user, and the sample content and the sample user, corresponding to the sample data may be acquired from the sample database. Or, the sample data and the interaction information corresponding to the sample data, including the sample content, the sample user, and the sample content and the sample user, may be obtained in real time.
It should be noted that the specific manner of obtaining the sample data and the sample content corresponding to the sample data, the sample user, and the interaction information between the sample content and the sample user is not particularly limited.
In an example embodiment of the present disclosure, after the sample data and the interaction information, including the sample content, the sample user, and the sample content and the sample user, corresponding to the sample data are obtained through the above steps, the sample data and the interaction information, including the sample content, the sample user, and the sample content and the sample user, corresponding to the sample data may be converted into a sample data feature vector. Specifically, the existing vector conversion method can be adopted to convert the relevant information of the display content into the sample data feature vector.
Further, for different types of sample data and the sample content and sample user interaction information corresponding to the sample data, different vector conversion methods may be used to convert the sample data and the sample content and sample user interaction information corresponding to the sample data into sample data feature vectors.
For example, for image information, a vector transformation model based on a Convolutional Neural Network (CNN) may be adopted to transform sample data and interaction information corresponding to the sample data, including sample content, sample users, and the sample content and the sample users, into a sample data feature vector; for another example, for text/voice information, a vector conversion model based on a pre-trained language Representation model (BERT) may be adopted to convert sample data and interaction information corresponding to the sample data, including sample content, sample users, and sample content and sample users, into sample data feature vectors; for another example, for the interaction information, a vector transformation model based on a Graph Neural Network (GNN) may be adopted to transform the sample data and the interaction information corresponding to the sample data, including the sample content, the sample user, and the sample content and the sample user, into a sample data feature vector.
It should be noted that, the present disclosure does not make any special limitation on the sample data and the specific manner of converting the sample data and the interactive information corresponding to the sample data, including the sample content, the sample user, and the sample content and the sample user, into the sample data feature vector.
Step S220, inputting sample data into the first model to be trained, the second model to be trained and the shared model to obtain hidden layer characteristics output by hidden layers of the first model to be trained, the second model to be trained and the shared model respectively; the first model to be trained and the second model to be trained have a task correlation relationship; the task correlation relation is that a first model to be trained is screened, and then a screened result is screened through a second model to be trained; the shared model is used for learning the common characteristics of the first model to be trained and the second model to be trained;
in an example embodiment of the present disclosure, after the sample data is obtained through the above steps, the sample data may be input into the first model to be trained, the second model to be trained, and the shared model. Specifically, when the first model to be trained and the second model to be trained are trained in the scheme of the present disclosure, the first model to be trained and the second model to be trained need to be jointly trained. Specifically, the display content feature vector input in the shared model is sample data, and the sample data input in the first model to be trained or the second model to be trained is all sample data or partial sample data.
It should be noted that, the present disclosure does not make any special limitation on the specific sample data input in the first model to be trained and the second model to be trained.
The first model to be trained and the second model to be trained have a task correlation relationship; the task correlation relation is that a first model to be trained is screened, and then a screened result is screened through a second model to be trained; the shared model is used for learning the common features of the first model to be trained and the second model to be trained. Specifically, the task correlation relationship means that a correlation relationship exists between tasks to be executed by the first model to be trained and the second model to be trained. For example, the first model to be trained recommends display content according to the click rate, the second model to be trained recommends display content according to the duration of the display content, and the first model to be trained is recommended first, and then the second model to be trained is recommended, namely the first model to be trained and the second model to be trained have a task correlation at the moment; if the first model to be trained is a recall model, the displayed content is screened according to the user labels, the advertisement labels, the user similarity, the advertisement similarity and the like, the second model to be trained is a rough model, the displayed content is screened according to the click rate, the conversion rate and the advertisement income displayed every thousand times, the model to be trained is firstly screened according to the recall model, and then the model to be trained is screened according to the rough model, namely the first model to be trained and the second model to be trained have a task correlation at the moment.
It should be noted that, the present disclosure does not make any special limitation on the specific form of the task correlation between the first model to be trained and the second model to be trained.
In addition, the first model to be trained and the second model to be trained in the present disclosure do not consider the order of use when used after training is completed. For example, according to the scheme of the disclosure, a first model to be trained may be trained as a first recommendation model, a second model to be trained may be trained as a second recommendation model, and when the first recommendation model and the second recommendation model are used, the first recommendation model may be used first, and then the second recommendation model may be used; alternatively, the second recommendation model may be used first, followed by the first recommendation model; alternatively, the first recommendation model and the second recommendation model may be used simultaneously.
It should be noted that, in the present disclosure, the order of using the first recommendation model and the second recommendation model is not particularly limited.
Step S230, fusing the hidden layer characteristics of the first model to be trained and the hidden layer characteristics of the shared model to obtain first prediction interaction information of the first model to be trained, and training the first model to be trained according to the first prediction interaction information and actual interaction information in sample data to obtain a first recommended model;
in an example embodiment of the present disclosure, after the sample data is input into the first model to be trained, the second model to be trained, and the shared model through the above steps, the hidden layer feature of the first model to be trained and the hidden layer feature of the shared model may be subjected to fusion processing, so as to obtain the first prediction interaction information of the first model to be trained. Specifically, the hidden layer calculation result of the first model to be trained is obtained by calculating the sample data input into the first model to be trained through the hidden layer in the first model to be trained, and the hidden layer calculation result of the shared model is obtained by calculating the sample data input into the shared model through the hidden layer in the shared model. The hidden layer in the first model to be trained or the hidden layer in the shared model is a hidden layer in a neural network structure, and may include a convolutional layer, a pooling layer, an excitation layer, a full-link layer, and the like.
It should be noted that, the disclosure does not make any special limitation on the specific structures of the hidden layer of the first model to be trained and the hidden layer of the shared model.
In an example embodiment of the present disclosure, after the hidden layer feature of the first model to be trained and the hidden layer feature of the shared model are fused through the above steps, the first prediction interaction information of the first model to be trained may be obtained. Specifically, the first prediction interaction information may be used to indicate a prediction value corresponding to the sample data.
In an example embodiment of the present disclosure, after the first prediction mutual information of the first model to be trained is obtained through the above steps, the first model to be trained may be trained according to the first prediction mutual information and actual mutual information in sample data. Specifically, the predicted value obtained through the above steps may be compared with the true value corresponding to the sample data, and the first model to be trained may be trained according to the comparison result.
For example, the true value corresponding to the sample data is whether a certain display content wins, that is, whether the display content is finally displayed, whether the display content wins can be predicted through the first model to be trained to obtain first prediction interactive information, and the first prediction interactive information is compared with the true value, so that the first model to be trained is trained.
Step S240, fusing the hidden layer characteristics of the second model to be trained and the hidden layer characteristics of the shared model to obtain second prediction mutual information of the first model to be trained, and training the second model to be trained according to the second prediction mutual information and actual mutual information in sample data to obtain a second recommended model.
In an example embodiment of the present disclosure, after the sample data is input into the first model to be trained, the second model to be trained, and the shared model through the above steps, the hidden layer feature of the second model to be trained and the hidden layer feature of the shared model may be subjected to fusion processing, so as to obtain second prediction interaction information of the second model to be trained. Specifically, sample data input into the second model to be trained can be calculated through the hidden layer in the second model to be trained to obtain a hidden layer calculation result of the second model to be trained, and then the sample data input into the shared model can be calculated through the hidden layer in the shared model to obtain a hidden layer calculation result of the shared model. The hidden layer in the first model to be trained or the hidden layer in the shared model is a hidden layer in a neural network structure, and may include a convolutional layer, a pooling layer, an excitation layer, a full-link layer, and the like.
It should be noted that, the specific structures of the hidden layer of the second model to be trained and the hidden layer of the shared model are not particularly limited in this disclosure.
In an example embodiment of the present disclosure, after the hidden layer feature of the second model to be trained and the hidden layer feature of the shared model are fused through the above steps, second prediction interaction information of the second model to be trained may be obtained. Specifically, the second prediction interaction information may be used to indicate a prediction value corresponding to the sample data.
In an example embodiment of the present disclosure, after the second prediction mutual information of the second model to be trained is obtained through the above steps, the second model to be trained may be trained according to the second prediction mutual information and the actual mutual information in the sample data. Specifically, the predicted value obtained through the above steps may be compared with the true value corresponding to the sample data, and the second model to be trained may be trained according to the comparison result.
For example, the true value corresponding to the sample data is whether a certain display content wins, that is, whether the display content is displayed at last, the second prediction interaction information can be obtained by predicting whether the display content wins through the second model to be trained, and the second prediction interaction information is compared with the true value, so as to train the second model to be trained.
In an example embodiment of the present disclosure, a hidden layer feature of a first model to be trained and a hidden layer feature of a shared model may be fused to obtain a first fusion feature, and first prediction interaction information of the first model to be trained is determined with reference to the first fusion feature. Referring to fig. 3, referring to the first prediction mutual information for determining the first model to be trained according to the first fusion feature, the method may include the following steps S310 to S320:
step S310, fusing the hidden layer characteristics of the first model to be trained and the hidden layer characteristics of the shared model to obtain first fusion characteristics;
step S320, determining first prediction interaction information of the first model to be trained according to the first fusion feature.
In an example embodiment of the present disclosure, a hidden layer feature of a first model to be trained and a hidden layer feature of a shared model may be fused to obtain a first fused feature. Specifically, the hidden layer calculation result of the first model to be trained and the hidden layer calculation result of the shared model may be fused to obtain the first fusion feature.
For example, when fusion is performed, the hidden layer feature of the first model to be trained and the hidden layer feature of the shared model may be fused in a dot-product manner to obtain a first fusion feature.
It should be noted that, in the present disclosure, a specific manner of obtaining the first fusion feature by performing fusion processing on the hidden layer feature of the first model to be trained and the hidden layer feature of the shared model is not particularly limited.
In an example embodiment of the present disclosure, after the first fused feature is obtained through the above steps, the first prediction mutual information of the first model to be trained may be determined according to the first fused feature. Specifically, the first fusion feature of the first model to be trained may be predicted to obtain first prediction mutual information of the first model to be trained.
For example, the sample data is the display content, the actual interactive information in the sample data is that the display content needs to be displayed, and at this time, the first fusion feature may be predicted by the first model to be trained to obtain the first predicted interactive information of the first model to be trained (whether the display content needs to be displayed is predicted).
It should be noted that, the present disclosure does not make any special limitation on the specific manner of determining the first prediction interaction information of the first model to be trained according to the first fusion feature.
Through the steps S310 to S320, the hidden layer feature of the first model to be trained and the hidden layer feature of the shared model may be fused to obtain a first fusion feature, and the first prediction interaction information of the first model to be trained is determined according to the first fusion feature.
In an example embodiment of the present disclosure, a fusion weight corresponding to a hidden layer feature of a first model to be trained and a fusion weight corresponding to a hidden layer feature of a shared model may be determined according to sample data, and a first fusion feature is obtained according to the fusion weight corresponding to the hidden layer feature of the first model to be trained, the fusion weight corresponding to the hidden layer feature of the shared model, and the hidden layer feature of the shared model. Referring to fig. 4, obtaining a first fusion feature according to the fusion weight corresponding to the hidden layer feature of the first model to be trained, the fusion weight corresponding to the hidden layer feature of the shared model, and the hidden layer feature of the shared model may include the following steps S410 to S420:
step S410, determining fusion weight corresponding to hidden layer features of the first model to be trained and fusion weight corresponding to hidden layer features of the shared model according to sample data;
step S420, obtaining a first fusion feature according to the fusion weight corresponding to the hidden layer feature of the first model to be trained, the fusion weight corresponding to the hidden layer feature of the shared model, and the hidden layer feature of the shared model.
In an example embodiment of the present disclosure, after obtaining hidden layer features output by hidden layers of the first model to be trained, the second model to be trained, and the shared model through the above steps, a fusion weight corresponding to the hidden layer feature of the first model to be trained and a fusion weight corresponding to the hidden layer feature of the shared model may be determined according to sample data.
The method comprises the steps of inputting sample data into a first model to be trained, a second model to be trained and a shared model, wherein the first model to be trained, the second model to be trained and the shared model comprise hidden layer features of the first model to be trained and hidden layer features of the shared model. At this time, the hidden layer feature of the first model to be trained and the hidden layer feature of the shared model may be fused to obtain a first fused feature.
For example, the hidden layer feature of the first model to be trained is vector1, and the hidden layer feature of the shared model is vector2, at this time, the hidden layer feature of the first model to be trained and the hidden layer feature of the shared model may be fused to obtain a first fusion feature, and vector1 and vector2 are fused to obtain a first fusion feature.
Specifically, when the hidden layer feature of the first model to be trained and the hidden layer feature of the shared model are fused to obtain the first fusion feature, the fusion may be performed in a dot-product manner.
It should be noted that, in the present disclosure, a specific manner of fusing the hidden layer feature of the first model to be trained and the hidden layer feature of the shared model to obtain the first fused feature is not particularly limited.
Specifically, the hidden layer features corresponding to the first model to be trained and the shared model can be obtained through the steps, and the fusion weight corresponding to the hidden layer feature of the first model to be trained and the fusion weight corresponding to the hidden layer feature of the shared model can be obtained. Specifically, the fusion weight corresponding to the hidden layer feature of the first model to be trained and the fusion weight corresponding to the hidden layer feature of the shared model may be obtained through sample data training, where the fusion weight corresponding to the hidden layer feature of the first model to be trained may be used to indicate the fusion weight of the hidden layer feature of the first model to be trained when the hidden layer feature of the first model to be trained is fused with the shared model, and the fusion weight corresponding to the hidden layer feature of the shared model may be used to indicate the fusion weight of the hidden layer feature of the shared model when the hidden layer feature of the shared model is fused with the shared model.
It should be noted that, the present disclosure does not make any special limitation on the specific manner of obtaining the fusion weight corresponding to the hidden layer feature of the first model to be trained and the fusion weight corresponding to the hidden layer feature of the shared model through sample data training.
In an example embodiment of the present disclosure, after obtaining the fusion weight corresponding to the hidden layer feature of the first model to be trained and the fusion weight corresponding to the hidden layer feature of the shared model through sample data training through the above steps, the first fusion feature may be obtained according to the fusion weight corresponding to the hidden layer feature of the first model to be trained, the fusion weight corresponding to the hidden layer feature of the shared model, and the hidden layer feature of the shared model. Specifically, the hidden layer features of the first model to be trained and the hidden layer features of the shared model may be configured with corresponding fusion weights for calculation to obtain the first fusion features.
In an example embodiment of the present disclosure, the hidden layer feature of the first model to be trained and the hidden layer feature of the shared model may be fused into a first fused feature by a Gate control structure (Gate). As shown in fig. 5, sample data may be input into a gate control structure, processed and output to a full connection layer, and then fusion weights (w1, w2) corresponding to hidden layer features of a first model to be trained and hidden layer features of a shared model are determined by a SOFTMAX function (normalized exponential function), and at this time, after the hidden layer features of the first model to be trained and the hidden layer features (vector 1, vector 2) of the shared model are obtained, a first fusion feature may be obtained according to the fusion weights corresponding to the hidden layer features of the first model to be trained, the fusion weights corresponding to the hidden layer features of the shared model, and the hidden layer features of the shared model.
It should be noted that the present disclosure does not make any special limitation on the specific manner of obtaining the first fusion feature according to the fusion weight corresponding to the hidden layer feature of the first model to be trained, the fusion weight corresponding to the hidden layer feature of the shared model, and the hidden layer feature of the shared model.
Through the steps S410 to S420, a fusion weight corresponding to the hidden layer feature of the first model to be trained and a fusion weight corresponding to the hidden layer feature of the shared model may be determined according to the sample data, and the first fusion feature may be obtained according to the fusion weight corresponding to the hidden layer feature of the first model to be trained, the fusion weight corresponding to the hidden layer feature of the shared model, and the hidden layer feature of the shared model.
In an example embodiment of the present disclosure, for a first model to be trained, a current fusion feature of a current hidden layer of the first model to be trained may be obtained according to a previous fusion feature of a previous hidden layer of the first model to be trained and a previous fusion feature of a shared model on the same layer, a current fusion feature of the shared model may be obtained according to the previous fusion feature of the first model to be trained, the previous fusion feature of the shared model on the same layer, and the previous fusion feature of the second model to be trained, and the first fusion feature may be obtained according to the current fusion feature of the first model to be trained and the current fusion feature of the shared model. Referring to fig. 6, obtaining a first fusion feature according to the current fusion feature of the first model to be trained and the current fusion feature of the shared model may include the following steps S610 to S620:
step S610, obtaining the current fusion characteristic of the current hidden layer of the first model to be trained according to the previous fusion characteristic of the previous hidden layer of the first model to be trained and the previous fusion characteristic of the shared model on the same layer aiming at the first model to be trained;
in an example embodiment of the present disclosure, a current fusion feature of a current hidden layer of a first model to be trained may be obtained for the first model to be trained according to a previous fusion feature of a previous hidden layer of the first model to be trained and a previous fusion feature of a shared model of a same layer. Specifically, the first model to be trained may include a plurality of hidden layers, the previous fusion feature may be obtained through calculation of a previous hidden layer of the first model to be trained, the shared model may include a plurality of hidden layers, the previous fusion feature may be obtained through calculation of a previous hidden layer of the shared model, and the current fusion feature of the current hidden layer of the first model to be trained is obtained by the previous fusion feature of the previous hidden layer of the first model to be trained and the previous fusion feature of the shared model on the same layer. For example, the current fusion feature of the current hidden layer of the first model to be trained can be obtained by the way of dot multiplication between the previous fusion feature of the previous hidden layer of the first model to be trained and the previous fusion feature of the shared model on the same layer.
It should be noted that, in the present disclosure, a specific manner of obtaining the current fusion feature of the current hidden layer of the first model to be trained from the previous fusion feature of the previous hidden layer of the first model to be trained and the previous fusion feature of the shared model on the same layer is not particularly limited.
Step S620, obtaining the current fusion characteristic of the shared model according to the previous fusion characteristic of the first model to be trained, the previous fusion characteristic of the shared model on the same layer and the previous fusion characteristic of the second model to be trained;
in an example embodiment of the present disclosure, after the current fusion feature of the current hidden layer of the first model to be trained is obtained through the above steps, the current fusion feature of the shared model may be obtained according to the previous fusion feature of the first model to be trained, the previous fusion feature of the shared model on the same layer, and the previous fusion feature of the second model to be trained. Specifically, the current fusion feature of the shared model can be obtained by determining the previous fusion feature of the first model to be trained, the previous fusion feature of the shared model on the same layer, and the previous fusion feature of the second model to be trained through the current hidden layer of the first model to be trained. Specifically, the shared model may include multiple hidden layers, the previous fusion feature may be calculated through a previous hidden layer of the shared model, and the current fusion feature of the shared model is obtained through the previous fusion feature of the shared model on the same layer and the previous fusion feature of the second model to be trained. For example, the previous fusion feature of the first model to be trained, the previous fusion feature of the shared model on the same layer, and the previous fusion feature of the second model to be trained may be fused in a point-by-point manner, so as to obtain the current fusion feature of the shared model.
It should be noted that, the present disclosure is not limited in particular to a specific manner of obtaining the current fusion feature of the shared model according to the previous fusion feature of the first model to be trained, the previous fusion feature of the shared model on the same layer, and the previous fusion feature of the second model to be trained.
Step S630, a first fusion feature is obtained according to the current fusion feature of the first model to be trained and the current fusion feature of the shared model.
In an example embodiment of the present disclosure, after the current fusion feature of the current hidden layer of the first model to be trained and the current fusion feature of the shared model are obtained through the above steps, the first fusion feature may be obtained according to the current fusion feature of the first model to be trained and the current fusion feature of the shared model. Specifically, the first model to be trained includes a plurality of hidden layers, and the current fusion features of the current hidden layer of the first model to be trained and the current fusion features of the shared model can be fused through the current hidden layer to obtain the first fusion features. For example, the first fusion feature obtained by the current fusion feature of the first model to be trained and the current fusion feature of the shared model may be subjected to fusion processing in a point-by-point manner, so as to obtain the first fusion feature.
It should be noted that, the present disclosure is not limited specifically to the specific manner of obtaining the first fusion feature according to the current fusion feature of the first model to be trained and the current fusion feature of the shared model.
Through the steps S610 to S630, for the first model to be trained, the current fusion feature of the current hidden layer of the first model to be trained can be obtained according to the previous fusion feature of the previous hidden layer of the first model to be trained and the previous fusion feature of the shared model on the same layer, the current fusion feature of the shared model can be obtained according to the previous fusion feature of the first model to be trained, the previous fusion feature of the shared model on the same layer, and the previous fusion feature of the second model to be trained, and the first fusion feature can be obtained according to the current fusion feature of the first model to be trained and the current fusion feature of the shared model.
In an example embodiment of the present disclosure, a first fused sub-feature corresponding to the first training sub-model may be obtained according to a hidden layer feature of the first training sub-model and a hidden layer feature of the shared model, a second fused sub-feature corresponding to the second training sub-model may be obtained according to a hidden layer feature of the second training sub-model and a hidden layer feature of the shared model, and the first fused feature may be obtained according to the first fused sub-feature corresponding to the first training sub-model and the second fused sub-feature corresponding to the second training sub-model. Referring to fig. 7, obtaining the first fused feature according to the first fused sub-feature corresponding to the first training sub-model and the second fused sub-feature corresponding to the second training sub-model may include the following steps S710 to S730:
step S710, obtaining a first fusion sub-feature corresponding to the first training sub-model according to the hidden layer feature of the first training sub-model and the hidden layer feature of the shared model;
s720, obtaining a second fusion sub-feature corresponding to the second training sub-model according to the hidden layer feature of the second training sub-model and the hidden layer feature of the shared model;
in an example embodiment of the present disclosure, after the hidden layer feature of the first model to be trained and the hidden layer feature of the shared model are obtained through the above steps, a first fused sub-feature corresponding to the first training sub-model may be obtained according to the hidden layer feature of the first training sub-model and the hidden layer feature of the shared model, and a second fused sub-feature corresponding to the second training sub-model may be obtained according to the hidden layer feature of the second training sub-model and the hidden layer feature of the shared model. The first model to be trained may include a first sub-training model and a second sub-training model.
During training, the hidden layer characteristics of the first sub-training model can be obtained through hidden layer calculation of the first sub-training model, the hidden layer characteristics of the shared model can be obtained through hidden layer calculation of the shared model, and the hidden layer characteristics of the first sub-training model and the hidden layer characteristics of the shared model are subjected to fusion processing to obtain first fusion sub-characteristics corresponding to the first training sub-model.
Specifically, when the hidden layer feature of the first sub-training model and the hidden layer feature of the shared model are fused to obtain a first fused sub-feature corresponding to the first training sub-model, the hidden layer feature of the first training sub-model and the hidden layer feature of the shared model may be fused in a dot-product manner to obtain the first fused sub-feature corresponding to the first training sub-model.
In an example embodiment of the disclosure, during training, the hidden layer feature of the second sub-training model may be obtained through hidden layer calculation of the second sub-training model, and a second fused sub-feature corresponding to the second training sub-model is obtained according to fusion processing of the hidden layer feature of the second training sub-model and the hidden layer feature of the shared model.
Specifically, when the hidden layer feature of the second training sub-model and the hidden layer feature of the shared model are subjected to fusion processing to obtain a second fusion sub-feature corresponding to the second training sub-model, the hidden layer feature of the second training sub-model and the hidden layer feature of the shared model may be subjected to fusion processing in a dot-product manner to obtain a second fusion sub-feature corresponding to the second training sub-model.
Wherein the first sub-training model and the second sub-training model may comprise models based on a network structure in the prior art. For example, the first and second sub-training models may be models based on a DNN (Deep Neural Networks) network structure, or the first and second sub-training models may be models based on an R-drop (regular Neural Networks) network structure.
It should be noted that the network structures of the first sub-training model and the second sub-training model are not particularly limited in this disclosure.
And step S730, obtaining a first fusion characteristic according to the first fusion characteristic corresponding to the first training sub-model and the second fusion characteristic corresponding to the second training sub-model.
In an example embodiment of the present disclosure, after the first fused sub-feature corresponding to the first training sub-model and the second fused sub-feature corresponding to the second training sub-model are obtained through the above steps, the first fused feature may be obtained according to the first fused sub-feature corresponding to the first training sub-model and the second fused sub-feature corresponding to the second training sub-model. Specifically, a point multiplication mode may be adopted to perform fusion processing according to a first fusion sub-feature corresponding to the first training sub-model and a second fusion sub-feature corresponding to the second training sub-model, so as to obtain a first fusion feature.
In addition, the present disclosure does not specifically limit the specific manner of obtaining the first fusion feature according to the first fusion sub-feature corresponding to the first training sub-model and the second fusion sub-feature corresponding to the second training sub-model.
Through the steps S710 to S730, a first fusion sub-feature corresponding to the first training sub-model is obtained according to the hidden layer feature of the first training sub-model and the hidden layer feature of the shared model, a second fusion sub-feature corresponding to the second training sub-model is obtained according to the hidden layer feature of the second training sub-model and the hidden layer feature of the shared model, and the first fusion feature is obtained according to the first fusion sub-feature corresponding to the first training sub-model and the second fusion sub-feature corresponding to the second training sub-model.
In an example embodiment of the present disclosure, the first model to be trained includes a first sub-model to be trained and a second sub-model to be trained, the second model to be trained includes a first sub-model to be trained and a second sub-model to be trained, and two sub-training models in the first model to be trained and two sub-training models in the second model to be trained are in a double-tower structure.
In an example embodiment of the disclosure, a first loss function of the first model to be trained may be determined by using first predicted interaction information of the first model to be trained and actual interaction information of sample data, and a neural network parameter in the first model to be trained is updated according to the first loss function of the first model to be trained, so as to obtain a first recommended model. Referring to fig. 8, updating the neural network parameters in the first model to be trained according to the first loss function of the first model to be trained to obtain the first recommended model may include the following steps S810 to S820:
step S810, determining a first loss function of the first model to be trained through first prediction mutual information of the first model to be trained and actual mutual information of sample data;
step S820, updating the neural network parameters in the first model to be trained according to the first loss function of the first model to be trained, so as to obtain a first recommended model.
In an example embodiment of the present disclosure, after the first prediction mutual information of the first model to be trained is obtained through the above steps, the first loss function of the first model to be trained may be determined through the first prediction mutual information of the first model to be trained and the actual mutual information of the sample data. Specifically, the first prediction mutual information of the first model to be trained may be compared with the actual mutual information of the sample data, the prediction difference between the first prediction mutual information of the first model to be trained and the actual mutual information of the sample data is calculated, and the first loss function of the first model to be trained is determined according to the prediction difference.
For example, the sample data is display content, the actual interaction information corresponding to the sample data is display content that needs to be displayed, and at this time, the actual interaction information of the sample data is compared with the first prediction interaction information to obtain a first loss function corresponding to the first model to be trained.
It should be noted that, the present disclosure is not limited specifically to the specific manner of determining the first loss function of the first model to be trained through the first predicted mutual information of the first model to be trained and the actual mutual information of the sample data.
In an example embodiment of the present disclosure, after the first loss function of the first model to be trained is obtained through the above steps, the first model to be trained may be trained through the first loss function of the first model to be trained. For example, the neural network parameters in the first model to be trained may be trained through a back propagation algorithm, and at the end of training, the first recommended model (obtained by training the first model to be trained) is obtained.
It should be noted that, the present disclosure is not limited specifically to the manner of updating the neural network parameters in the first model to be trained according to the first loss function of the first model to be trained to obtain the first recommended model.
Through the steps S810 to S820, a first loss function of the first model to be trained may be determined according to the first prediction interaction information of the first model to be trained and the actual interaction information of the sample data, and the neural network parameter in the first model to be trained is updated according to the first loss function of the first model to be trained, so as to obtain the first recommendation model.
In an example embodiment of the present disclosure, sample data may be input into a first sub-training model to obtain first sub-prediction interaction information, a first loss sub-function of the first sub-training model is determined according to the first sub-prediction interaction information, the sample data is input into a second sub-training model to obtain second sub-prediction interaction information, a second loss sub-function of the second sub-training model is determined according to the second sub-prediction interaction information, and a first loss function corresponding to the first model to be trained is determined according to a first sub-loss function corresponding to the first training sub-model and a second sub-loss function corresponding to the second training sub-model. Referring to fig. 9, determining a first loss function corresponding to the first model to be trained according to the first sub-loss function corresponding to the first training sub-model and the second sub-loss function corresponding to the second training sub-model may include the following steps S910 to S930:
step S910, inputting sample data into a first sub-training model to obtain first sub-prediction interactive information, and determining a first loss sub-function of the first sub-training model according to the first sub-prediction interactive information;
in an example embodiment of the present disclosure, sample data may be input into the first sub-training model to obtain first sub-prediction interaction information, and a first loss sub-function of the first sub-training model is determined according to the first sub-prediction interaction information. Specifically, sample data can be input into the first sub-training model for prediction to obtain first sub-prediction interaction information, the first sub-prediction interaction information is compared with actual interaction information in the sample data to obtain a prediction difference between the first sub-prediction interaction information and the actual interaction information in the sample data, and a first sub-loss function corresponding to the first training sub-model is determined according to the prediction difference.
It should be noted that, in the present disclosure, a specific manner of inputting sample data into the first sub-training model to obtain the first sub-prediction interaction information, and determining the first loss sub-function of the first sub-training model through the first sub-prediction interaction information is not particularly limited.
Step S920, inputting sample data into a second sub-training model to obtain second sub-prediction interactive information, and determining a second loss sub-function of the second sub-training model according to the second sub-prediction interactive information;
in an example embodiment of the present disclosure, the sample data may be input into the second sub-training model to obtain second sub-prediction mutual information, and a second loss sub-function of the second sub-training model is determined according to the second sub-prediction mutual information. Specifically, the sample data may be input into the second sub-training model for prediction to obtain second sub-prediction mutual information, the second sub-prediction mutual information is compared with actual mutual information in the sample data to obtain a prediction difference between the second sub-prediction mutual information and the actual mutual information in the sample data, and a second sub-loss function corresponding to the second training sub-model is determined according to the prediction difference.
It should be noted that, in the present disclosure, a specific manner in which the sample data is input into the second sub-training model to obtain the second sub-prediction mutual information, and the second loss sub-function of the second sub-training model is determined by the second sub-prediction mutual information is not particularly limited.
Step S930, determining a first loss function of the first model to be trained according to a first sub-loss function corresponding to the first training sub-model and a second sub-loss function of the second training sub-model.
In an example embodiment of the present disclosure, after the first loss sub-function of the first sub-training model and the second loss sub-function of the second sub-training model are obtained through the above steps, the first loss function of the first model to be trained may be determined according to the first loss sub-function of the first training sub-model and the second loss sub-function of the second training sub-model. Specifically, a first loss function of the first model to be trained may be obtained by adding a first loss sub-function of the first training sub-model and a second loss sub-function of the second training sub-model.
Further, loss weights may be respectively given to a first sub-loss function of the first training sub-model and a second sub-loss function of the second training sub-model, and a first loss function corresponding to the first model to be trained is obtained according to the first sub-loss function of the first training sub-model, the loss weight corresponding to the first sub-loss function, the second sub-loss function of the second training sub-model, and the loss weight corresponding to the second sub-loss function.
It should be noted that, in the present disclosure, a specific manner of determining the first loss function of the first model to be trained according to the first sub-loss function corresponding to the first training sub-model and the second sub-loss function of the second training sub-model is not particularly limited.
Through the steps S910 to S930, sample data may be input into the first sub-training model to obtain first sub-prediction mutual information, a first loss sub-function of the first sub-training model is determined according to the first sub-prediction mutual information, sample data is input into the second sub-training model to obtain second sub-prediction mutual information, a second loss sub-function of the second sub-training model is determined according to the second sub-prediction mutual information, and a first loss function corresponding to the first model to be trained is determined according to the first sub-loss function corresponding to the first training sub-model and the second sub-loss function corresponding to the second training sub-model.
In an example embodiment of the disclosure, a second loss function of a second model to be trained may be determined through second prediction interaction information of the second model to be trained, an overall loss function is determined according to the first loss function and the second loss function, and a neural network parameter in the first model to be trained is updated according to the overall loss function, so as to train the first model to be trained to obtain a first recommended model. Referring to fig. 10, updating the neural network parameters in the first model to be trained according to the global loss function to train the first model to be trained to obtain the first recommended model may include the following steps S1010 to S1020:
step S1010, determining a second loss function of a second model to be trained through second prediction interaction information of the second model to be trained;
in an example embodiment of the disclosure, a second loss function of a second model to be trained may be determined through second prediction interaction information of the second model to be trained, an overall loss function is determined according to the first loss function and the second loss function, and a neural network parameter in the first model to be trained is updated according to the overall loss function, so as to train the first model to be trained to obtain a first recommended model. Specifically, the sample data may be input into a second model to be trained, second prediction mutual information is obtained through the second model to be trained, the second prediction mutual information is compared with actual mutual information in the sample data, a prediction difference between the second prediction mutual information and the actual mutual information in the sample data is obtained, and a second loss function of the second model to be trained is determined according to the prediction difference.
Step S1020, determining an overall loss function according to the first loss function and the second loss function;
in an example embodiment of the present disclosure, after the second loss function of the second model to be trained is obtained through the above steps, the overall loss function may be determined according to the first loss function and the second loss function. Specifically, the overall loss function may be obtained by adding a first loss function of the first model to be trained and a second loss function of the second model to be trained, or weights may be respectively given to the first loss function of the first model to be trained and the second loss function of the second model to be trained.
It should be noted that the present disclosure is directed to determining the overall loss function according to the first loss function and the second loss function.
Step S1030, updating the neural network parameters in the first model to be trained according to the overall loss function to train the first model to be trained to obtain a first recommended model.
In an example embodiment of the present disclosure, after the overall loss function is obtained through the above steps, the overall loss function may be determined according to the first loss function and the second loss function. Specifically, the first model to be trained may be trained through the global loss function. For example, the neural network parameters in the first model to be trained may be trained through a back propagation algorithm, and at the end of training, the first recommended model (obtained by training the first model to be trained) is obtained.
It should be noted that, in the present disclosure, the method of updating the neural network parameters in the first model to be trained according to the whole loss function to obtain the first recommended model by training the first model to be trained is not particularly limited.
Through the steps S1010 to S1030, a second loss function of the second model to be trained can be determined according to the second prediction interaction information of the second model to be trained, an overall loss function is determined according to the first loss function and the second loss function, and the neural network parameters in the first model to be trained are updated according to the overall loss function, so as to train the first model to be trained to obtain the first recommended model.
In an example embodiment of the present disclosure, cross entropy loss may be employed for the first loss function and the second loss function, or a KL divergence loss function may also be used, or a focal loss (focal loss) may also be used. The focusing loss function can weight samples with low confidence coefficient, so that negative effects of the samples on training are eliminated, and the training effect is improved. Specifically, the expression of the focus loss is as follows, wherein L ft For focus loss, y' is the output of the activation function, α is the balance factor, γ is the weighting factor:
Figure BDA0003637226110000231
the training mode of the second model to be trained mentioned in this disclosure is the same as that of the first model to be trained, and is not described herein again.
In an example embodiment of the present disclosure, a first loss weight corresponding to the first loss function and a second loss weight corresponding to the second loss function may be obtained, and the overall loss function may be determined according to the first loss weight, the first loss function, the second loss weight, and the second loss function. Referring to fig. 11, determining the overall loss function according to the first loss weight, the first loss function, the second loss weight, and the second loss function may include the following steps S1110 to S1120:
step S1110, obtaining a first loss weight corresponding to the first loss function and a second loss weight corresponding to the second loss function;
in an example embodiment of the present disclosure, after determining the first loss function corresponding to the first training model and the second loss function corresponding to the second training model through the above steps, a first loss weight corresponding to the first loss function and a second loss weight corresponding to the second loss function may be obtained. Specifically, a first loss weight corresponding to the first loss function and a second loss weight corresponding to the second loss function may be manually set, or the first loss weight corresponding to the first loss function and the second loss weight corresponding to the second loss function may be determined by machine learning.
In the present disclosure, a manner of obtaining the first loss weight corresponding to the first loss function and the second loss weight corresponding to the second loss function is not particularly limited.
In step S1120, an overall loss function is determined according to the first loss weight, the first loss function, the second loss weight, and the second loss function.
In an example embodiment of the present disclosure, after the first loss weight corresponding to the first loss function and the second loss weight corresponding to the second loss function are obtained through the above steps, the first loss weight may be configured for the first loss function, and the second loss weight may be configured for the second loss function, and the two may be added to obtain the overall loss function.
For example, the first loss function is loss1, the second loss function is loss2, the first loss weight corresponding to the first loss function is w1, and the second loss weight corresponding to the second loss function is w2, where the overall loss function is w1loss1 · w2loss 2.
In the present disclosure, a specific mode of determining the overall loss function from the first loss weight, the first loss function, the second loss weight, and the second loss function is not particularly limited.
In an example embodiment of the present disclosure, the first loss weight corresponding to the first loss function and the second loss weight corresponding to the second loss function may also be obtained in an unreliable loss manner.
For example, the first loss weight corresponding to the first loss function and the second loss weight corresponding to the second loss function may be automatically learned in an uncertain weighted loss manner. The expressions for determining the first loss weight corresponding to the first loss function and the second loss weight corresponding to the second loss function by the uncertain weight loss method are as follows, wherein σ is 1 Is the variance, sigma, of the task corresponding to the first model to be trained 2 Is the variance, L, of the task corresponding to the second model to be trained 1 (W) is a first loss function, L, corresponding to the first model to be trained 2 (W) is a second loss function corresponding to the second model to be trained, L is an overall loss function, when the loss of one task is increased, the weight is reduced, and when the loss of one task is reduced, the weight is increased:
Figure BDA0003637226110000251
through the above steps S1110 to S1120, a first loss weight corresponding to the first loss function and a second loss weight corresponding to the second loss function can be obtained, and the overall loss function can be determined from the first loss weight, the first loss function, the second loss weight, and the second loss function.
In an example embodiment of the present disclosure, the first model to be trained includes a first sub-model to be trained and a second sub-model to be trained, the second model to be trained includes a first sub-model to be trained and a second sub-model to be trained, and two sub-training models in the first model to be trained and two sub-training models in the second model to be trained are in a double-tower structure.
As shown in fig. 12, sample data may be obtained, and the feature vector of the display content is input into the first model to be trained, the second model to be trained, and the shared model, and the sample data may be processed in hidden layers of the first model to be trained, the second model to be trained, and the shared model, where a number in the figure may be used to indicate a dimension of the processed sample data, and after respective hidden layers of the first model to be trained, the second model to be trained, and the shared model are calculated, hidden layer features of the first model to be trained (including hidden layer features corresponding to sub-training models in the first model to be trained, i.e., 256 in the first model to be trained), hidden layer features of the shared model (i.e., 256 in the shared model to be trained), and hidden layer features of the second model to be trained (including hidden layer features corresponding to sub-training models in the second model to be trained, i.e., 256 in the second model to be trained) are obtained, at this time, the hidden layer feature of the first model to be trained and the hidden layer feature of the shared model may be fused by a gate structure (gate mode) to obtain the hidden layer feature of the first model to be trained (i.e. 128 in the first model to be trained), the hidden layer feature of the first model to be trained and the hidden layer feature of the shared model may be obtained by the gate structure (gate mode) (i.e. 128 in the shared model), the hidden layer feature of the second model to be trained and the hidden layer feature of the shared model may be determined by the gate structure (gate mode) (i.e. 128 in the first model to be trained), and so on, multiple sets of hidden layer features may be calculated to determine the first fusion feature corresponding to the first model to be trained, wherein the first sub-loss function of the first model to be trained is delivery _ loss1, the second sub-loss function of the second model to be trained of the first model to be trained is delivery _ loss2, and obtaining a loss function weight w1 of the first sub-loss function and a loss function weight w2 of the second sub-loss function, and determining a first loss function corresponding to the first model to be trained as follows according to the loss function weights of the first sub-loss function and the second sub-loss function:
L1(W)=w1*delivery_loss1+w2*delivery_loss2
determining a second fusion characteristic corresponding to the second model to be trained in a point multiplication mode, determining a second loss function of the second model to be trained as delivery _ loss3 according to second prediction mutual information of the second model to be trained and actual mutual information of sample data, and determining an overall loss function in an uncertain weight loss mode on the basis that:
Figure BDA0003637226110000261
it should be noted that, in the embodiment of the present disclosure, dimensions of sample data processed in hidden layers of the first model to be trained, the second model to be trained, and the shared model may be different, and when sample data needs to be fused, the sample data processed in the hidden layers of the first model to be trained, the second model to be trained, and the shared model may be processed into the same dimension.
It should be noted that, the number of the sub-training models in the model to be trained and the number of the models to be trained for performing the joint training are not particularly limited in the present disclosure.
In an example embodiment of the present disclosure, a plurality of display contents and related information corresponding to the display contents may be obtained, the related information corresponding to the display contents is input into a first recommendation model to obtain a plurality of first screening display contents, and the plurality of first screening display contents is input into a second recommendation model to obtain a plurality of second screening display contents, where the second recommendation model is obtained by any one of the recommendation model training methods described above, and the display contents to be displayed are determined according to the plurality of second screening display contents. Referring to fig. 13, determining the presentation content to be displayed according to the plurality of second filtering presentation contents may include the following steps S1310 to S1330:
step 1310, obtaining a plurality of display contents and related information corresponding to the display contents, and inputting the related information corresponding to the display contents into a first recommendation model to obtain a plurality of first screening display contents; the method comprises the steps that relevant information corresponding to display content comprises the display content, a display user and interactive information of the display content and the display user, and a first recommendation model is obtained through any one recommendation model training method;
step S1320, inputting the plurality of first screening display contents into a second recommendation model to obtain a plurality of second screening display contents; the second recommendation model is obtained by the recommendation model training method of any item;
in step S1330, the display content to be displayed is determined according to the plurality of second screening display contents.
In an example embodiment of the present disclosure, the method may be applied to a scenario in which a user needs to be recommended to present content when the user browses a web page or the like. Specifically, a plurality of display contents and display content related information may be obtained in the display content pool, and the display content related information is input into a first recommendation model to obtain a plurality of first screened display contents, where the first recommendation model is obtained by the recommendation model training method described in the above embodiment. By way of example, the first recommendation model may include a network model for implementing recall tasks.
And inputting the obtained first screening display content into a second recommendation model, wherein the second recommendation model is obtained by the recommendation model training method described in the embodiment. By way of example, the first recommendation model may include a network model for implementing a squashing task.
In an example embodiment of the present disclosure, after the plurality of second screening presentation contents are obtained through the above steps, the presentation contents to be displayed to the user may be determined according to the plurality of second screening presentation contents. For example, a plurality of second screened presentations may be determined as the presentations to be displayed, or screening may be continued on the basis of the second screened presentations to obtain the presentations to be displayed.
It should be noted that, in the present disclosure, a specific manner of determining the display content to be displayed according to the plurality of second screening display contents is not particularly limited.
Through the steps S1310 to S1330, a plurality of display contents and related information corresponding to the display contents may be obtained, the related information corresponding to the display contents is input into the first recommendation model to obtain a plurality of first screening display contents, and the plurality of first screening display contents is input into the second recommendation model to obtain a plurality of second screening display contents, where the second recommendation model is obtained by any one of the recommendation model training methods described above, and the display contents to be displayed are determined according to the plurality of second screening display contents.
According to the embodiment of the disclosure, sample data can be obtained, the sample data is input into the first model to be trained, the second model to be trained and the shared model, hidden layer characteristics output by hidden layers of the first model to be trained, the second model to be trained and the shared model are obtained, the hidden layer characteristics of the first model to be trained and the hidden layer characteristics of the shared model are fused to obtain first prediction interaction information, the first model to be trained is trained according to the first prediction interaction information and actual interaction information to obtain a first recommended model, and the second recommended model is similar. On one hand, the characteristics of the first model to be trained/the second model to be trained and the shared model can be fused, so that the first model to be trained and the second model to be trained have correlation, and the consistency of the first model to be trained and the second model to be trained is improved; on the other hand, when the model is trained, the characteristics of the model with the task correlation relation are considered, so that the screening accuracy can be higher when the display content is screened, and the conversion rate of the display content is improved.
It is noted that the above-mentioned figures are merely schematic illustrations of processes involved in methods according to exemplary embodiments of the present disclosure, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
In addition, in an exemplary embodiment of the present disclosure, a recommendation model training apparatus is also provided. Referring to fig. 14, a recommendation model training apparatus 1400 includes: a sample data acquisition unit 1410, a sample data input unit 1420, a first recommendation model training unit 1430, and a second recommendation model training unit 1440.
The device comprises a sample data acquisition unit, a data acquisition unit and a data acquisition unit, wherein the sample data acquisition unit is configured to acquire sample data; the sample data comprises sample content, a sample user and interaction information of the sample content and the sample user; the sample data input unit is configured to input sample data into the first model to be trained, the second model to be trained and the shared model to obtain hidden layer characteristics output by hidden layers of the first model to be trained, the second model to be trained and the shared model; the first model to be trained and the second model to be trained have a task correlation relationship; the task correlation relation is that a first model to be trained is screened, and then a screened result is screened through a second model to be trained; the shared model is used for learning the common characteristics of the first model to be trained and the second model to be trained; the first recommendation model training unit is configured to perform fusion processing on the hidden layer features of the first model to be trained and the hidden layer features of the shared model to obtain first prediction interaction information of the first model to be trained, and train the first model to be trained according to the first prediction interaction information and actual interaction information in sample data to obtain a first recommendation model; and the second recommendation model training unit is configured to perform fusion processing on the hidden layer features of the second model to be trained and the hidden layer features of the shared model to obtain second prediction interaction information of the first model to be trained, and train the second model to be trained according to the second prediction interaction information and actual interaction information in the sample data to obtain a second recommendation model.
In an exemplary embodiment of the present disclosure, based on the foregoing scheme, the hidden layer feature of the first model to be trained and the hidden layer feature of the shared model are fused to obtain the first prediction interaction information of the first model to be trained, and the recommended model training apparatus further includes: the first fusion feature acquisition unit is used for carrying out fusion processing on the hidden layer features of the first model to be trained and the hidden layer features of the shared model to obtain first fusion features; the prediction interactive information obtaining unit is configured to determine first prediction interactive information of the first model to be trained according to the first fusion characteristic.
In an exemplary embodiment of the present disclosure, based on the foregoing scheme, a hidden layer feature of a first model to be trained and a hidden layer feature of a shared model are fused to obtain a first fused feature, and the recommended model training apparatus further includes: the fusion weight obtaining unit is configured to determine fusion weights corresponding to hidden layer features of the first model to be trained and the hidden layer features of the shared model according to the sample data; and the second fusion feature acquisition unit is configured to perform fusion weighting corresponding to the hidden layer feature of the first model to be trained, the fusion weighting corresponding to the hidden layer feature of the shared model and the hidden layer feature of the shared model to obtain the first fusion feature.
In an exemplary embodiment of the present disclosure, based on the foregoing scheme, a hidden layer feature of a first model to be trained and a hidden layer feature of a shared model are fused to obtain a first fused feature, and the recommended model training apparatus further includes: the first current fusion feature acquisition unit is configured to execute obtaining of a current fusion feature of a current hidden layer of the first model to be trained according to a previous fusion feature of a previous hidden layer of the first model to be trained and a previous fusion feature of a shared model on the same layer aiming at the first model to be trained; the second current fusion feature acquisition unit is configured to obtain the current fusion feature of the shared model according to the previous fusion feature of the first model to be trained, the previous fusion feature of the shared model on the same layer and the previous fusion feature of the second model to be trained; and the third fusion feature acquisition unit is configured to obtain the first fusion feature according to the current fusion feature of the first model to be trained and the current fusion feature of the shared model.
In an exemplary embodiment of the disclosure, based on the foregoing scheme, the first model to be trained includes a first sub-training model and a second sub-training model, and the hidden layer feature of the first model to be trained and the hidden layer feature of the shared model are fused to obtain a first fusion feature, and the recommended model training apparatus further includes: the first fusion sub-feature acquisition unit is configured to obtain a first fusion sub-feature corresponding to the first training sub-model according to the hidden layer feature of the first training sub-model and the hidden layer feature of the shared model; the second fused sub-feature acquisition unit is configured to execute the second fused sub-feature corresponding to the second training sub-model according to the hidden layer feature of the second training sub-model and the hidden layer feature of the shared model; and the fourth fusion feature acquisition unit is configured to obtain the first fusion feature according to the first fusion sub-feature corresponding to the first training sub-model and the second fusion sub-feature corresponding to the second training sub-model.
In an exemplary embodiment of the present disclosure, based on the foregoing scheme, the first model to be trained is trained according to the first predicted interaction information and the actual interaction information in the sample data, and the recommended model training apparatus further includes: the first recommendation model training unit is configured to determine a first loss function of the first model to be trained through first prediction mutual information of the first model to be trained and actual mutual information of sample data; the first training unit is configured to update the neural network parameters in the first model to be trained according to a first loss function of the first model to be trained to obtain a first recommended model.
In an exemplary embodiment of the present disclosure, based on the foregoing scheme, the first model to be trained includes a first sub-training model and a second sub-training model, and a first loss function of the first model to be trained is determined according to the first prediction interaction information of the first model to be trained and the actual interaction information of the sample data, and the recommended model training apparatus further includes: the first loss sub-function determining unit is configured to input sample data into a first sub-training model to obtain first sub-prediction interactive information, and determine a first loss sub-function of the first sub-training model according to the first sub-prediction interactive information; the second loss sub-function determining unit is configured to input sample data into a second sub-training model to obtain second sub-prediction interactive information, and determine a second loss sub-function of the second sub-training model according to the second sub-prediction interactive information; and the second recommended model training unit is configured to determine a first loss function corresponding to the first model to be trained according to a first sub-loss function corresponding to the first training sub-model and a second sub-loss function corresponding to the second training sub-model.
In an exemplary embodiment of the present disclosure, based on the foregoing scheme, the neural network parameters in the first model to be trained are updated according to a first loss function of the first model to be trained to obtain a first recommended model, and the recommended model training apparatus further includes: a third loss function determination unit configured to perform determining a second loss function of the second model to be trained through second prediction interaction information of the second model to be trained; a first overall loss function determination unit configured to perform determining an overall loss function from the first loss function and the second loss function; and the second training unit is configured to update the neural network parameters in the first model to be trained according to the overall loss function so as to train the first model to be trained to obtain a first recommended model.
In an exemplary embodiment of the disclosure, based on the foregoing scheme, the overall loss function is determined according to the first loss function and the second loss function, and the recommendation model training apparatus further includes: a loss weight acquisition unit configured to perform acquisition of a first loss weight corresponding to the first loss function and a second loss weight corresponding to the second loss function; a second overall loss function determination unit configured to perform a determination of an overall loss function from the first loss weight, the first loss function, the second loss weight, the second loss function.
Since each functional module of the recommendation model training apparatus in the exemplary embodiment of the present disclosure corresponds to a step of the exemplary embodiment of the recommendation model training method, please refer to the above-mentioned embodiment of the recommendation model training method of the present disclosure for details that are not disclosed in the embodiment of the apparatus of the present disclosure.
In addition, in an exemplary embodiment of the present disclosure, a presentation content determination apparatus is also provided. Referring to fig. 15, a presentation content determining apparatus 1500 includes: a first filtering content obtaining unit 1510, a second filtering content obtaining unit 1520, and a display content determining unit 1530.
The first screening content acquisition unit is configured to acquire a plurality of display contents and relevant information corresponding to the display contents, and input the relevant information corresponding to the display contents into the first recommendation model to obtain a plurality of first screening display contents; the method comprises the steps that the relevant information corresponding to the display content comprises the display content, a display user and interactive information of the display content and the display user, and the first recommendation model is obtained by any recommendation model training method; a second screening content obtaining unit configured to perform input of the plurality of first screening display contents into a second recommendation model to obtain a plurality of second screening display contents; the second recommendation model is obtained by the recommendation model training method of any item; and the display content determining unit is configured to determine the display content to be displayed according to the plurality of second screening display contents.
For details that are not disclosed in the embodiments of the apparatus of the present disclosure, please refer to the embodiments of the method for determining display contents described above for the details that are not disclosed in the embodiments of the apparatus of the present disclosure.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
In addition, in an exemplary embodiment of the present disclosure, an electronic device capable of implementing the recommendation model training method or the presentation content determination method is also provided.
As will be appreciated by one skilled in the art, aspects of the present disclosure may be embodied as a system, method or program product. Accordingly, various aspects of the present disclosure may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
An electronic device 1600 according to such an embodiment of the disclosure is described below with reference to fig. 16. The electronic device 1600 shown in fig. 16 is only an example and should not bring any limitations to the functionality and scope of use of the embodiments of the present disclosure.
As shown in fig. 16, electronic device 1600 is in the form of a general purpose computing device. Components of electronic device 1600 may include, but are not limited to: the at least one processing unit 1610, the at least one memory unit 1620, the bus 1630 connecting different system components (including the memory unit 1620 and the processing unit 1610), and the display unit 1640.
Where the memory unit stores program code, the program code may be executed by the processing unit 1610 to cause the processing unit 1610 to perform steps according to various exemplary embodiments of the present disclosure described in the above-mentioned "exemplary methods" section of this specification. For example, the processing unit 1610 may perform step S210 as shown in fig. 2, acquiring sample data; the sample data comprises sample content, a sample user and interaction information of the sample content and the sample user; step S220, inputting sample data into the first model to be trained, the second model to be trained and the shared model to obtain hidden layer characteristics output by hidden layers of the first model to be trained, the second model to be trained and the shared model respectively; the first model to be trained and the second model to be trained have a task correlation relationship; the task correlation relation is that screening is carried out through a first model to be trained, and then screening is carried out on the screened result through a second model to be trained; the shared model is used for learning the common characteristics of the first model to be trained and the second model to be trained; step S230, fusing the hidden layer characteristics of the first model to be trained and the hidden layer characteristics of the shared model to obtain first prediction interaction information of the first model to be trained, and training the first model to be trained according to the first prediction interaction information and actual interaction information in sample data to obtain a first recommended model; step S240, fusing the hidden layer characteristics of the second model to be trained and the hidden layer characteristics of the shared model to obtain second prediction mutual information of the first model to be trained, and training the second model to be trained according to the second prediction mutual information and actual mutual information in sample data to obtain a second recommended model. Or, step S1210 shown in fig. 12 may be further executed to obtain a plurality of display contents and related information corresponding to the display contents, and input the related information corresponding to the display contents into the first recommendation model to obtain a plurality of first screened display contents; the method comprises the steps that the display content is displayed on a display screen, wherein the related information corresponding to the display content comprises the display content, a display user and interactive information of the display content and the display user, and the first recommendation model is obtained through any one of the recommendation model training methods; step S1220, inputting the plurality of first screening display contents into a second recommendation model to obtain a plurality of second screening display contents; the second recommendation model is obtained by the recommendation model training method of any item; in step S1230, the display content to be displayed is determined according to the plurality of second screening display contents.
As another example, the electronic device may implement the various steps shown in fig. 2 and 12.
The memory unit 1620 may include readable media in the form of volatile memory units, such as a random access memory unit (RAM)1621 and/or a cache memory unit 1622, and may further include a read only memory unit (ROM) 1623.
The storage unit 1620 may also include a program/utility 1624 having a set (at least one) of program modules 1625, such program modules 1625 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 1630 may be any of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 1600 may also communicate with one or more external devices 1670 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 1600, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 1600 to communicate with one or more other computing devices. Such communication may occur through input/output (I/O) interface 1650. Also, the electronic device 1600 can 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 1660. As shown, the network adapter 1660 communicates with the other modules of the electronic device 1600 via the bus 1630. It should be appreciated that although not shown, other hardware and/or software modules may be used in conjunction with electronic device 1600, 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.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
In an exemplary embodiment, a computer-readable storage medium comprising instructions, such as a memory comprising instructions, executable by a processor of an apparatus to perform the above-described method is also provided. Alternatively, the computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In an exemplary embodiment, there is also provided a computer program product comprising a computer program/instructions which, when executed by a processor, implement the recommendation model training method or the presentation content determination method in the above embodiments.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A recommendation model training method, the method comprising:
acquiring sample data; wherein the sample data comprises sample content, a sample user and interaction information of the sample content and the sample user;
inputting the sample data into a first model to be trained, a second model to be trained and a shared model to obtain hidden layer characteristics output by hidden layers of the first model to be trained, the second model to be trained and the shared model; the first model to be trained and the second model to be trained have a task correlation relationship; the task correlation relation is that a first model to be trained is screened, and then a screened result is screened through a second model to be trained; the shared model is used for learning the common characteristics of the first model to be trained and the second model to be trained;
fusing the hidden layer features of the first model to be trained and the hidden layer features of the shared model to obtain first prediction interaction information of the first model to be trained, and training the first model to be trained according to the first prediction interaction information and actual interaction information in the sample data to obtain a first recommended model;
and performing fusion processing on the hidden layer features of the second model to be trained and the hidden layer features of the shared model to obtain second prediction interactive information of the first model to be trained, and training the second model to be trained according to the second prediction interactive information and the actual interactive information in the sample data to obtain a second recommended model.
2. The method according to claim 1, wherein the step of performing fusion processing on the hidden layer feature of the first model to be trained and the hidden layer feature of the shared model to obtain the first prediction interaction information of the first model to be trained comprises:
fusing the hidden layer features of the first model to be trained and the hidden layer features of the shared model to obtain first fused features;
and determining first prediction mutual information of the first model to be trained according to the first fusion characteristic.
3. The method according to claim 2, wherein the step of fusing the hidden layer feature of the first model to be trained and the hidden layer feature of the shared model to obtain a first fused feature comprises:
determining a fusion weight corresponding to the hidden layer feature of the first model to be trained and a fusion weight corresponding to the hidden layer feature of the shared model according to the sample data;
and obtaining a first fusion feature according to the fusion weight corresponding to the hidden layer feature of the first model to be trained, the fusion weight corresponding to the hidden layer feature of the shared model and the hidden layer feature of the shared model.
4. The method according to claim 2, wherein the step of fusing the hidden layer feature of the first model to be trained and the hidden layer feature of the shared model to obtain a first fused feature comprises:
obtaining the current fusion feature of the current hidden layer of the first model to be trained according to the previous fusion feature of the previous hidden layer of the first model to be trained and the previous fusion feature of the shared model on the same layer aiming at the first model to be trained;
obtaining the current fusion characteristic of the shared model according to the previous fusion characteristic of the first model to be trained, the previous fusion characteristic of the shared model on the same layer and the previous fusion characteristic of the second model to be trained;
and obtaining the first fusion feature according to the current fusion feature of the first model to be trained and the current fusion feature of the shared model.
5. A method for determining presentation contents, the method comprising:
obtaining a plurality of display contents and related information corresponding to the display contents, and inputting the related information corresponding to the display contents into a first recommendation model to obtain a plurality of first screening display contents; the method comprises the steps that relevant information corresponding to the display content comprises the display content, a display user and interaction information of the display content and the display user, and the first recommendation model is obtained through the recommendation model training method according to any one of claims 1-10;
inputting the first screening display contents into a second recommendation model to obtain second screening display contents; wherein the second recommendation model is obtained by the recommendation model training method according to any one of claims 1 to 10;
and determining the display content to be displayed according to the second screening display contents.
6. A recommendation model training apparatus, comprising:
a sample data acquisition unit configured to perform acquisition of sample data; wherein the sample data comprises sample content, a sample user and interaction information of the sample content and the sample user;
the sample data input unit is configured to input the sample data into a first model to be trained, a second model to be trained and a shared model to obtain hidden layer characteristics output by hidden layers of the first model to be trained, the second model to be trained and the shared model; the first model to be trained and the second model to be trained have a task correlation relationship; the task correlation relation is that a first model to be trained is screened, and then a screened result is screened through a second model to be trained; the shared model is used for learning the common characteristics of the first model to be trained and the second model to be trained;
the first recommendation model training unit is configured to perform fusion processing on the hidden layer features of the first model to be trained and the hidden layer features of the shared model to obtain first prediction interaction information of the first model to be trained, and train the first model to be trained according to the first prediction interaction information and actual interaction information in the sample data to obtain a first recommendation model;
and the second recommendation model training unit is configured to perform fusion processing on the hidden layer features of the second model to be trained and the hidden layer features of the shared model to obtain second prediction interaction information of the first model to be trained, and train the second model to be trained according to the second prediction interaction information and actual interaction information in the sample data to obtain a second recommendation model.
7. A presentation content determining apparatus, comprising:
the first screening content acquisition unit is configured to acquire a plurality of display contents and related information corresponding to the display contents, and input the related information corresponding to the display contents into a first recommendation model to obtain a plurality of first screening display contents; wherein, the relevant information corresponding to the display content includes the display content, a display user, and the interaction information between the display content and the display user, and the first recommendation model is obtained by the recommendation model training method according to any one of claims 1 to 10;
a second screening content obtaining unit configured to perform input of the plurality of first screening display contents into a second recommendation model to obtain a plurality of second screening display contents; wherein the second recommendation model is obtained by the recommendation model training method according to any one of claims 1 to 10;
and the display content determining unit is configured to determine the display content to be displayed according to the second screening display contents.
8. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the executable instructions to implement the recommendation model training method of any one of claims 1 to 4 or the presentation determination method of claim 5.
9. A computer-readable storage medium in which instructions, when executed by a processor of an electronic device, enable the electronic device to perform the recommendation model training method of any one of claims 1 to 4 or the presentation determination method of claim 5.
10. A computer program product comprising computer programs/instructions, characterized in that the computer programs/instructions, when executed by a processor, implement the recommendation model training method of any one of claims 1 to 4 or the exposure determination method of claim 5.
CN202210509093.5A 2022-05-10 2022-05-10 Recommendation model training method, display content determining method, device and medium Pending CN114819146A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210509093.5A CN114819146A (en) 2022-05-10 2022-05-10 Recommendation model training method, display content determining method, device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210509093.5A CN114819146A (en) 2022-05-10 2022-05-10 Recommendation model training method, display content determining method, device and medium

Publications (1)

Publication Number Publication Date
CN114819146A true CN114819146A (en) 2022-07-29

Family

ID=82513787

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210509093.5A Pending CN114819146A (en) 2022-05-10 2022-05-10 Recommendation model training method, display content determining method, device and medium

Country Status (1)

Country Link
CN (1) CN114819146A (en)

Similar Documents

Publication Publication Date Title
US11120801B2 (en) Generating dialogue responses utilizing an independent context-dependent additive recurrent neural network
US11487832B2 (en) Analyzing web pages to facilitate automatic navigation
US11397772B2 (en) Information search method, apparatus, and system
US10650311B2 (en) Suggesting resources using context hashing
US11734375B2 (en) Automatic navigation of interactive web documents
US11941527B2 (en) Population based training of neural networks
CN111552880B (en) Knowledge graph-based data processing method and device, medium and electronic equipment
EP3896618A1 (en) Method for generating user interactive information processing model and method for processing user interactive information
WO2017197806A1 (en) Method for providing intelligent service, intelligent service system and intelligent terminal based on artificial intelligence
US20170200065A1 (en) Image Captioning with Weak Supervision
US20170200066A1 (en) Semantic Natural Language Vector Space
EP4181026A1 (en) Recommendation model training method and apparatus, recommendation method and apparatus, and computer-readable medium
US10825071B2 (en) Adaptive multi-perceptual similarity detection and resolution
CN114036398B (en) Content recommendation and ranking model training method, device, equipment and storage medium
CN111783873A (en) Incremental naive Bayes model-based user portrait method and device
Rubens et al. Influence-based collaborative active learning
JP2023533723A (en) Evaluate interpretation of search queries
CN113836390A (en) Resource recommendation method and device, computer equipment and storage medium
CN114819146A (en) Recommendation model training method, display content determining method, device and medium
CN114970494A (en) Comment generation method and device, electronic equipment and storage medium
CN111859220A (en) Method and device for displaying information
CN113139115A (en) Information recommendation method, search method, device, client, medium and equipment
JP2020046942A (en) Information processing device, information processing method, and program
US20240028935A1 (en) Context-aware prediction and recommendation
CN116956204A (en) Network structure determining method, data predicting method and device of multi-task model

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