WO2024055228A1 - 一种模型训练方法、广告投放方法、装置及电子设备 - Google Patents

一种模型训练方法、广告投放方法、装置及电子设备 Download PDF

Info

Publication number
WO2024055228A1
WO2024055228A1 PCT/CN2022/118950 CN2022118950W WO2024055228A1 WO 2024055228 A1 WO2024055228 A1 WO 2024055228A1 CN 2022118950 W CN2022118950 W CN 2022118950W WO 2024055228 A1 WO2024055228 A1 WO 2024055228A1
Authority
WO
WIPO (PCT)
Prior art keywords
feature
advertisements
model
contextual
electronic device
Prior art date
Application number
PCT/CN2022/118950
Other languages
English (en)
French (fr)
Inventor
金钊
陈忠富
夏曾华
马中瑞
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2022/118950 priority Critical patent/WO2024055228A1/zh
Publication of WO2024055228A1 publication Critical patent/WO2024055228A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising

Definitions

  • This application relates to the technical field of artificial intelligence (AI), and in particular to a model training method, advertising delivery method, device and electronic equipment.
  • AI artificial intelligence
  • This application provides a model training method, advertising delivery method, device, electronic equipment, server, computer storage medium and computer product, which can improve the effect of advertising delivery.
  • this application provides a model training method, which method includes: obtaining a first sample set, the first sample set includes a first training sample, and the first training sample includes at least one advertising feature of the advertisement and a corresponding feature of the advertisement.
  • At least one contextual feature is processed through the first model to obtain the first feature vector
  • the at least one advertising feature is processed through the second model to obtain the second feature vector
  • the third model is used to The processing results of at least one stage in the first model and the processing results of at least one stage in the second model are processed to obtain a first correlation score.
  • the first correlation score is used to characterize the relationship between at least one contextual feature and at least one advertising feature.
  • the matching degree of Loss train the first model and the second model.
  • contextual features are used to replace user features for model training, thereby reducing the dependence on user features in the subsequent use of the model.
  • a third model is added in the process of training the first model and the second model to realize the interaction modeling between the first model and the second model, thereby realizing the interaction between contextual features and advertising features, making the two related.
  • the performance enhancement improves the representation effect of the final first model and second model.
  • the trained first model can be used to extract contextual features related to the page visited by the user
  • the trained second model can be used to extract features of advertisements.
  • processing at least one advertisement feature through the second model to obtain a second feature vector specifically includes: encoding at least one advertisement feature through the second model to obtain M fifth features.
  • Vector, M ⁇ 1; wherein, in the case of M 1, the M fifth eigenvectors are processed through the second model to obtain the second eigenvector; in the case of M ⁇ 2, the second model is used to process M fifth eigenvectors are spliced to obtain a sixth eigenvector, and the sixth eigenvector is processed through the second model to obtain a second eigenvector.
  • obtaining the loss corresponding to the first training sample according to the first feature vector, the second feature vector, the first correlation score and the sample label of the first training sample specifically includes: according to the first feature vector, the second feature vector and the sample label of the first training sample, the first loss is obtained; according to the first correlation score and the sample label of the first training sample, the second loss is obtained; according to the first loss and the second loss, we get The loss corresponding to the first training sample.
  • obtaining the first loss based on the first feature vector, the second feature vector and the sample label of the first training sample specifically includes: determining the second loss based on the first feature vector and the second feature vector. Correlation score, the second correlation score is used to characterize the matching degree between at least one contextual feature and at least one advertising feature; the first loss is obtained based on the second correlation score and the sample label of the first training sample.
  • the method may further include: training a third model based on the loss corresponding to at least one training sample in the first sample set.
  • the third model is a neural network model, used to assist in calculating the loss corresponding to the training samples in the first sample set during the training of the first model and the second model.
  • the model structure of the third model can be, but is not limited to, deep neural networks (DNN), multi-layer neural network (multi-layer perception, MLP), and deep factorization machine (deep factorization machine, DeepFM).
  • DNN deep neural networks
  • MLP multi-layer neural network
  • DeepFM deep factorization machine
  • Extreme deep factorization machine model extreme deep factorization machine, xDeepFM
  • DCN deep cross network
  • DIN deep interest network
  • this application provides an advertising delivery method, which is applied to electronic equipment with a display screen.
  • the method may include: obtaining the user's access operation to the first page; in response to the access operation, obtaining a first contextual feature related to the first page, wherein the first contextual feature has nothing to do with the user's user profile and/or user behavior; Based on the first context feature, f advertisements are displayed, f ⁇ 1.
  • contextual features are used to replace user features, which reduces the dependence on user features.
  • user features such as user portraits, user behaviors, etc.
  • Relevant contextual features are used to accurately deliver advertisements, which solves the problem of the trade-off between privacy protection of user information and precise advertising delivery.
  • the method may further include: obtaining the user's second access operation to the second page; in response to the second access operation, obtaining a second access operation related to the second page.
  • Context features where the second context feature has nothing to do with the user's user profile and/or user behavior; based on the second context feature, display g advertisements, g ⁇ 1, where at least part of the g advertisements are identical to f advertisements ads are different.
  • the content on the first page is different from the content on the second page. Since the content of the two pages is different, the contextual features corresponding to the two pages are also different, so the ads ultimately displayed are different.
  • displaying advertisements based on contextual features specifically includes: using a first model to process contextual features to obtain a first feature vector, where the first model is a neural network model, and the contextual features are first contextual features. or second context feature; determine the similarity value between the first feature vector and K second feature vectors to obtain K similarity values, each second feature vector is used to characterize an advertisement; from K Q similarity values are screened out from the similarity values, where each of the Q similarity values is greater than the similarity value except the Q similarity values among the K similarity values, 1 ⁇ Q ⁇ K; Display advertisements corresponding to each of Q similarity values.
  • the context feature is the first context feature
  • the advertisements corresponding to each of the Q similarity values are f advertisements.
  • Q similar advertisements are displayed.
  • the advertisements corresponding to each degree value are g advertisements.
  • displaying advertisements based on contextual features specifically includes: sending a first message to the server, where the first message contains contextual features, and the contextual features are the first contextual features or the second contextual features; receiving the The second message includes Q advertisements or advertisement indication information.
  • the advertisement indication information is used to generate Q advertisements.
  • the context feature is the first context feature
  • the Q advertisements are f advertisements.
  • Q advertisements are g advertisements; Q advertisements are displayed.
  • displaying advertisements based on contextual features specifically includes: using a first model to process contextual features to obtain a first feature vector, where the first model is a neural network model, and the contextual features are first contextual features. or the second context feature; sending a first message to the server, the first message containing the first feature vector; receiving the second message sent by the server, the second message including Q advertisements or advertisement indication information, and the advertisement indication information is used to generate Q advertisements, among which, when the contextual feature is the first contextual feature, the Q advertisements are f advertisements, and when the contextual feature is the second contextual feature, the Q advertisements are g advertisements; Q advertisements are displayed.
  • displaying advertisements based on contextual features specifically includes: sending a first message to the server, where the first message contains contextual features, and the first message is used to instruct the server to extract contextual features, and the contextual features are The first context feature or the second context feature; receiving the second message sent by the server, the second message including the first feature vector extracted by the server based on the context feature; determining the similarity between the first feature vector and K second feature vectors degree value to obtain K similarity values, each second feature vector is used to characterize the characteristics of an advertisement; Q similarity values are screened out from the K similarity values, among which, among the Q similarity values Each one is greater than the similarity value except Q similarity values among the K similarity values, 1 ⁇ Q ⁇ K; display the advertisement corresponding to each of the Q similarity values, where, when the context feature is the first context feature When , the advertisements corresponding to each of the Q similarity values are f advertisements. When the contextual feature is the second contextual feature, the advertisements corresponding to each of the Q similarity values are g advertisements.
  • the first contextual feature includes one or more of the following: the identification of the first page, the text on the first page, the identification of the video on the first page, the identification of the picture on the first page, The identification of the audio on the first page, the user's IP region information, access time, the device type of the electronic device, the operator that provides network services for the electronic device, the network type of the electronic device, the system language of the electronic device, and the brand of the electronic device , the model of the electronic device, the scene in which the electronic device needs to display advertisements, the size of the area used to display advertisements in the display interface of the electronic device, and the country where the electronic device is located.
  • the second context feature includes one or more of the following: the identifier of the second page, the text on the second page, the identifier of the video on the second page, the identifier of the picture on the second page, The identification of the audio on the second page, the user's IP region information, access time, the device type of the electronic device, the operator that provides network services for the electronic device, the network type of the electronic device, the system language of the electronic device, and the brand of the electronic device , the model of the electronic device, the scene in which the electronic device needs to display advertisements, the size of the area used to display advertisements in the display interface of the electronic device, and the country where the electronic device is located.
  • this application provides an advertising delivery method, applied to a server.
  • the method includes: receiving a first message sent by an electronic device.
  • the first message includes contextual features related to the page visited by the user on the electronic device.
  • the context has nothing to do with the user's user profile and/or user behavior; in response to the first message, based on the contextual features, obtain R advertisements or information indicating R advertisements, R ⁇ 1; send the second message to the electronic device, The second message is used to instruct the electronic device to display R advertisements.
  • obtaining R advertisements or information indicating the R advertisements specifically includes: using the first model to process the contextual characteristics to obtain the first feature vector, the first model is a neural network model; determine the similarity value between the first feature vector and K second feature vectors to obtain K similarity values.
  • Each second feature vector is used to characterize the characteristics of an advertisement; from K similar Q similarity values are screened out from among the Q similarity values, where each of the Q similarity values is greater than the similarity values other than the Q similarity values among the K similarity values, 1 ⁇ Q ⁇ K;
  • the advertisements corresponding to each of the Q similarity values are used as R advertisements, or the information indicating advertisements corresponding to each of the Q similarity values is used as information indicating R advertisements.
  • the contextual features include one or more of the following: the identifier of the page, the text on the page, the identifier of the video on the page, the identifier of the picture on the page, the identifier of the audio on the page, and the user's IP region Information, access time, device type of electronic device, operator providing network services for electronic device, network type of electronic device, system language of electronic device, brand of electronic device, model of electronic device, display advertising required for electronic device The scene, the size of the area used to display advertisements in the display interface of the electronic device, and the country where the electronic device is located.
  • this application provides a model training device, which includes: an acquisition module and a processing module.
  • the obtaining module is used to obtain a first sample set
  • the first sample set includes a first training sample
  • the first training sample includes at least one advertising feature of the advertisement and at least one contextual feature corresponding to the advertisement.
  • the processing module is configured to process at least one context feature through a first model to obtain a first feature vector, and process at least one advertisement feature through a second model to obtain a second feature vector.
  • the processing module is also configured to process the processing results of at least one stage in the first model and the processing results of at least one stage in the second model through the third model to obtain a first correlation score, where the first correlation score is used to characterize The degree of match between at least one contextual feature and at least one advertising feature.
  • the processing module is also configured to obtain the loss corresponding to the first training sample based on the first feature vector, the second feature vector, the first correlation score and the sample label of the first training sample.
  • the processing module is also used to train the first model and the second model based on the loss corresponding to at least one training sample in the first sample set.
  • the processing module when the processing module obtains the loss corresponding to the first training sample based on the first feature vector, the second feature vector, the first correlation score and the sample label of the first training sample, it is specifically used to: : According to the first feature vector, the second feature vector and the sample label of the first training sample, the first loss is obtained; according to the first correlation score and the sample label of the first training sample, the second loss is obtained; according to the first loss and The second loss is the loss corresponding to the first training sample.
  • the processing module when it obtains the first loss based on the first feature vector, the second feature vector, and the sample label of the first training sample, it is specifically configured to: based on the first feature vector and the second feature vector to determine the second correlation score, which is used to characterize the matching degree between at least one contextual feature and at least one advertising feature; according to the second correlation score and the sample label of the first training sample, the first loss is obtained .
  • the processing module is also used to: train a third model based on the loss corresponding to at least one training sample in the first sample set.
  • the third model is a neural network model, used to assist in calculating the loss corresponding to the training samples in the first sample set during the training of the first model and the second model.
  • the trained first model is used to extract features of contextual features related to the page visited by the user
  • the trained second model is used to extract features of advertisements.
  • the present application provides an advertising placement device that can be deployed on an electronic device with a display screen.
  • the device may include: an acquisition module and a display module.
  • the acquisition module is used to obtain the user's access operation to the first page; and, in response to the access operation, obtain the first context feature related to the first page, wherein the context feature has nothing to do with the user's user portrait and/or user behavior .
  • the display module is used to display f advertisements based on the first context feature, f ⁇ 1.
  • the obtaining module is also used to obtain the user's second access operation to the second page, and, in response to the second access operation, obtain the information related to the second page. Relevant second contextual features, where the second contextual features have nothing to do with the user's user profile and/or user behavior.
  • the display module is also configured to display g advertisements based on the second context feature, g ⁇ 1, wherein at least part of the g advertisements are different from advertisements in the f advertisements.
  • the device further includes: a processing module, configured to use a first model to process context features to obtain a first feature vector, where the first model is a neural network model, and the context feature is a first context feature. or secondary contextual features.
  • the processing module is also used to determine the similarity value between the first feature vector and K second feature vectors to obtain K similarity values. Each second feature vector is used to characterize the characteristics of an advertisement.
  • the processing module is also used to filter out Q similarity values from the K similarity values, wherein each of the Q similarity values is greater than the similarity among the K similarity values except the Q similarity values. Degree value, 1 ⁇ Q ⁇ K.
  • the display module is used to display advertisements corresponding to each of the Q similarity values.
  • the advertisements corresponding to the Q similarity values are f advertisements.
  • the advertisements corresponding to each of the Q similarity values are g advertisements.
  • the device further includes: a communication module, configured to send a first message to the server, where the first message contains context features, and the context features are the first context features or the second context features.
  • the communication module is also configured to receive a second message sent by the server.
  • the second message includes Q advertisements or advertisement indication information.
  • the advertisement indication information is used to generate Q advertisements.
  • Q advertisements are f advertisements
  • Q advertisements are g advertisements.
  • the display module is used to display Q advertisements.
  • the device further includes: a processing module, configured to use a first model to process context features to obtain a first feature vector, where the first model is a neural network model, and the context feature is a first context feature. or secondary contextual features.
  • a communication module configured to send a first message to the server, where the first message contains the first feature vector.
  • the communication module is also configured to receive a second message sent by the server.
  • the second message includes Q advertisements or advertisement indication information.
  • the advertisement indication information is used to generate Q advertisements.
  • Q advertisements are f advertisements
  • Q advertisements are g advertisements.
  • the display module is used to display Q advertisements.
  • the device further includes: a communication module, configured to send a first message to the server, where the first message contains context features, and the first message is used to instruct the server to perform feature extraction on the context features, where the context features are First context feature or second context feature.
  • the communication module is also configured to receive a second message sent by the server, where the second message includes the first feature vector extracted by the server based on the context features.
  • the processing module is used to determine the similarity value between the first feature vector and K second feature vectors to obtain K similarity values, and each second feature vector is used to characterize the characteristics of an advertisement.
  • the processing module is also used to filter out Q similarity values from the K similarity values, wherein each of the Q similarity values is greater than the similarity among the K similarity values except the Q similarity values. Degree value, 1 ⁇ Q ⁇ K.
  • the display module is used to display advertisements corresponding to each of the Q similarity values.
  • the advertisements corresponding to the Q similarity values are f advertisements.
  • the advertisements corresponding to each of the Q similarity values are g advertisements.
  • the first contextual feature includes one or more of the following: the identification of the first page, the text on the first page, the identification of the video on the first page, the identification of the picture on the first page, The identification of the audio on the first page, the user's IP region information, access time, the device type of the electronic device, the operator that provides network services for the electronic device, the network type of the electronic device, the system language of the electronic device, and the brand of the electronic device , the model of the electronic device, the scene in which the electronic device needs to display advertisements, the size of the area used to display advertisements in the display interface of the electronic device, and the country where the electronic device is located.
  • the second context feature includes one or more of the following: the identifier of the second page, the text on the second page, the identifier of the video on the second page, the identifier of the picture on the second page, The identification of the audio on the second page, the user's IP region information, access time, the device type of the electronic device, the operator that provides network services for the electronic device, the network type of the electronic device, the system language of the electronic device, and the brand of the electronic device , the model of the electronic device, the scene in which the electronic device needs to display advertisements, the size of the area used to display advertisements in the display interface of the electronic device, and the country where the electronic device is located.
  • this application provides an advertisement delivery device, which is deployed on a server.
  • the device includes: a communication module and a processing module.
  • the communication module may be configured to receive a first message sent by the electronic device, where the first message includes contextual features related to the page visited by the user on the electronic device, and the contextual features have nothing to do with the user's user profile and/or user behavior.
  • the processing module may be configured to respond to the first message and obtain R advertisements or information indicating the R advertisements based on contextual features, R ⁇ 1.
  • the communication module may also be used to send a second message to the electronic device, where the second message is used to instruct the electronic device to display R advertisements.
  • the processing module when the processing module obtains R advertisements or information indicating the R advertisements based on contextual features, the processing module is specifically configured to: use the first model to process the contextual features to obtain the first features. vector, the first model is a neural network model; determine the similarity value between the first feature vector and K second feature vectors to obtain K similarity values, and each second feature vector is used to characterize an advertisement. ;Select Q similarity values from K similarity values, where each of the Q similarity values is greater than the similarity value except the Q similarity values among the K similarity values, 1 ⁇ Q ⁇ K; use the advertisements corresponding to each of the Q similarity values as R advertisements, or use the information indicating advertisements corresponding to each of the Q similarity values as information indicating R advertisements.
  • the contextual features include one or more of the following: the identifier of the page, the text on the page, the identifier of the video on the page, the identifier of the picture on the page, the identifier of the audio on the page, and the user's IP region Information, access time, device type of electronic device, operator providing network services for electronic device, network type of electronic device, system language of electronic device, brand of electronic device, model of electronic device, display advertising required for electronic device The scene, the size of the area used to display advertisements in the display interface of the electronic device, and the country where the electronic device is located.
  • the present application provides an electronic device, including: a display screen; at least one memory for storing a program; at least one processor for executing the program stored in the memory; wherein, when the program stored in the memory is executed, The processor is configured to execute the method described in the second aspect or any possible implementation manner of the second aspect.
  • this application provides a server, including: at least one memory for storing a program; at least one processor for executing the program stored in the memory; wherein, when the program stored in the memory is executed, the processor is configured to execute The method described in the third aspect or any possible implementation of the third aspect.
  • the present application provides a computer-readable storage medium.
  • the computer-readable storage medium stores a computer program.
  • the computer program When the computer program is run on a processor, it causes the processor to execute the first aspect or any one of the first aspects.
  • the present application provides a computer program product that, when run on a processor, causes the processor to execute the method described in the first aspect or any possible implementation of the first aspect, or, Perform the method described in the second aspect or any possible implementation of the second aspect, or perform the method described in the third aspect or any possible implementation of the third aspect.
  • Figure 1 is a schematic process diagram of an advertising recall solution provided by an embodiment of the present application.
  • Figure 2 is an architectural schematic diagram of a user representation model and an advertisement representation model obtained through training based on the twin tower model provided by an embodiment of the present application;
  • Figure 3 is an architectural schematic diagram of a context representation model and an advertising representation model obtained by training based on the twin tower model provided by an embodiment of the present application;
  • Figure 4 is a schematic process diagram of another advertising recall solution provided by an embodiment of the present application.
  • Figure 5 is a schematic flowchart of a model training method provided by an embodiment of the present application.
  • FIG. 6 is a schematic flowchart of an advertising delivery method provided by an embodiment of the present application.
  • Figure 7 is a schematic diagram of steps for displaying advertisements based on contextual features provided by an embodiment of the present application.
  • Figure 8 is a comparative schematic diagram of advertising delivery for the same user using different mobile phones to browse the same content at the same time according to an embodiment of the present application;
  • Figure 9 is a comparative schematic diagram of advertising targeting different users provided by an embodiment of the present application.
  • Figure 10 is a comparative schematic diagram of advertising delivery for the same user using the same mobile phone to browse different contents at different times provided by an embodiment of the present application;
  • Figure 11 is a schematic structural diagram of a model training device provided by an embodiment of the present application.
  • Figure 12 is a schematic structural diagram of an advertising placement device provided by an embodiment of the present application.
  • Figure 13 is a schematic structural diagram of an advertisement placement device provided by an embodiment of the present application.
  • a and/or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. these three situations.
  • the symbol "/" in this article indicates that the associated object is or, for example, A/B means A or B.
  • first, second, etc. in the description and claims herein are used to distinguish different objects, rather than to describe a specific order of objects.
  • first response message and the second response message are used to distinguish different response messages, but are not used to describe a specific sequence of response messages.
  • multiple refers to two or more, for example, multiple processing units refers to two or more processing units, etc.; multiple Component refers to two or more components, etc.
  • a representation model related to user portraits can be trained based on the characteristic data of user portraits and user behaviors, and the model can be used to recall the ads most relevant to the user to achieve accurate advertising.
  • Deliver In order to complete the advertising representation recall technology based on user portraits, it is generally possible to first train the feature data of the user side and advertising side based on the dual-tower structure (user tower, advertising tower) to obtain the user-side representation model (hereinafter referred to as " User representation model”) and the advertising side representation model (hereinafter referred to as the "advertising representation model"). Then, the user representation model and advertising representation model are used to achieve precise user-oriented advertising.
  • Figure 1 shows an advertisement recall process based on user portraits and user behaviors.
  • the process includes two stages, the offline stage and the online stage.
  • the offline stage uses the advertising representation model to process the set of features of each advertisement (such as title, category, brand, tag, text content, picture content, or video content, etc.) to obtain the feature vector of each advertisement ( Hereinafter referred to as the "advertising side feature vector") set.
  • the user's portrait characteristics such as gender, age, or province, etc.
  • the user's behavioral characteristics such as the category of clicked content, title, etc.
  • the ads to be placed are obtained. For example, after sorting the similarities from large to small, the ads corresponding to the first 5 similarities can be used as the ads to be placed, thereby achieving a collection of ads from the preset Recall the required ads.
  • user A uses a mobile phone to browse the web
  • user A's registration information that user A's user profile is: gender is “male”, age is “18 to 30 years old” and the city where he is located is “city S”
  • the first user behavior determined through the operation behavior of user A is: the category of the browsing content is “cars”, the title is “New energy vehicle prices are reduced” and the browsing time is "8 a.m.”
  • the second user behavior is: the browsing content is If the category is "new energy”, the title is “Research on New Energy Vehicles” and the browsing time is "8:20 am”, then user A can be recommended new energy sources suitable for driving in city S and suitable for men aged 20 to 30 years old. Car advertising.
  • User A’ when User A’s user data (such as user information and/or operation behavior, etc.) is protected, User A’s user portrait and user behavior will not be obtained, resulting in the inability to know what kind of advertisements to recommend to User A. In this case, it is very likely to recommend some advertisements that User A is not interested in, resulting in poor advertising effect.
  • user data such as user information and/or operation behavior, etc.
  • FIG. 2 shows a schematic architectural diagram of a user representation model and an advertising representation model obtained through training based on the twin-tower model.
  • the twin-tower model training device 200 includes a user tower device 210 , an advertising tower device 220 and a twin-tower loss device 230 .
  • the twin-tower model training device 200 can train the user tower device 210 and the advertising tower device 220 .
  • the user tower device 210 will be converted into a user representation model 300 and output by the twin tower model training device 200
  • the advertising tower device 220 will be converted into an advertising representation model 400 and output by the twin tower model training device 200. 200 output.
  • the user tower device 210 includes a feature encoding (embedding) device 211, a feature concatenation (concatenate) device 212 and a main network device 213.
  • the feature encoding device 211 is used to perform feature encoding on each user portrait feature and user behavior feature in the user feature data set, so as to represent sparse original features into dense feature vectors.
  • the feature encoding device 211 may, but is not limited to, use algorithms such as word2vec or item2vec to encode features in the user feature data set.
  • the feature connecting device 212 is used to splice the feature vectors corresponding to different user features encoded by the feature encoding device 211 into one feature vector, and its function can also be understood as performing feature fusion.
  • the main network device 213 is used to control the feature vectors spliced by the feature connection device 212 to perform sufficient feature intersection between different dimensions, so as to obtain more effective feature information.
  • the feature vector output by the main network device 213 can be used to characterize a certain user.
  • the model structure of the main network device 213 can be, but is not limited to, deep neural networks (DNN), multi-layer neural network (multi-layer perception, MLP), deep factorization machine (deep factorization machine, DeepFM). ), extremely deep factorization machine model (extreme deep factorization machine, xDeepFM), deep cross network (deep cross network, DCN), or deep interest network (deep interest network, DIN) and other model structures.
  • DNN deep neural networks
  • MLP multi-layer neural network
  • DeepFM deep factorization machine
  • xDeepFM extremely deep factorization machine model
  • DCN deep cross network
  • DIN deep interest network
  • the advertising tower device 220 includes a feature encoding (embedding) device 221, a feature concatenation (concatenate) device 222 and a main network device 223.
  • the feature encoding device 221 is used to perform feature encoding on each advertisement feature in the advertisement feature data set, so as to represent the sparse original features into dense feature vectors.
  • the feature connecting device 222 is used to splice the feature vectors corresponding to different advertising features encoded by the feature encoding device 221 into one feature vector.
  • the main network device 223 is used to control the feature vectors spliced by the feature connection device 222 to perform sufficient feature intersection between different dimensions, so as to obtain more effective feature information.
  • the feature vector output by the main network device 223 can be used to characterize a certain advertisement.
  • the model structure of the main network device 223 may be, but is not limited to, the same as the main network device 213 .
  • the twin-tower loss device 230 is a loss function in the twin-tower model training device 200. It is mainly based on similarity comparison methods such as cosine similarity to evaluate the training degree of the user tower device 210 and the advertising tower device 220, and is back-propagated to the user tower device. 210 and advertising tower device 220.
  • the model parameters in the user tower device 210 can be continuously adjusted based on the results output by the dual-tower loss device 230, so that the user feature vector representation output by the user tower device 210 is more accurate; at the same time, the model parameters in the advertising tower device 220 can be continuously adjusted based on the results output by the dual-tower loss device 230, so that the advertising feature vector representation output by the advertising tower device 220 is more accurate.
  • the dual-tower model training device 200 can solidify the parameters of the user tower device 210 with the best training effect during the training process to generate a user representation model 300, and output it; at the same time, the parameters of the advertising tower device 220 with the best training effect during the training process can be solidified to generate an advertising representation model 400, and output it.
  • the user representation model 300 is used to represent online user features as feature vectors
  • the advertising representation model 400 is used to represent offline advertising features as feature vectors.
  • the model training process also relies heavily on user characteristics.
  • the user tower device 210 there is no interaction between the user tower device 210 and the advertising tower device 220, which makes the feature association between the user tower device 210 and the advertising tower device 220 depend on the user's behavior toward the advertisement (i.e., user behavior , such as browsing web pages, browsing videos, clicking on ads, paying for purchases, etc.), once the user behavior cannot be obtained, model training will not be possible, or the trained model cannot be used.
  • the loss calculation stage it only relies on the similarity between vectors, and the loss calculation is too simple, making the representation effect of the final model relatively poor.
  • embodiments of the present application provide a model training method that can use contextual features to replace user features, thereby reducing dependence on user features.
  • this method realizes the interaction modeling between the user tower device 210 and the advertising tower device 220 by adding an auxiliary network to the twin-tower model training device 200, thereby realizing the interaction between the contextual features and the advertising features, so as to associate the two.
  • Enhanced performance solves the problem of information interaction of the twin tower features and improves the representation effect of the final model.
  • the context features may include: content context features related to advertisements, and/or environmental context features related to advertisements.
  • the content context feature may refer to the context record of the content contained in the advertisement when the user accesses the advertisement, such as: web page text, identification of web page pictures, identification of video, or identification of audio, etc.
  • environment context characteristics may refer to Environmental context records related to when users access advertisements, such as: Internet protocol (IP) regional information (i.e., where the IP address belongs), access time, device type of electronic device, and operators that provide network services for electronic devices , the network type of the electronic device, the system language of the electronic device, the brand of the electronic device, the model of the electronic device, the scene where the electronic device needs to display advertisements, the size of the area used to display advertisements in the display interface of the electronic device, the location of the electronic device countries etc.
  • IP Internet protocol
  • Figure 3 shows a schematic architectural diagram of a context representation model and an advertising representation model obtained through training based on the twin-tower model.
  • the twin-tower model training device 300 includes a user tower device 310 , an advertising tower device 320 , a twin-tower loss device 330 , an auxiliary network model 340 , and an auxiliary network loss device 350 .
  • the user tower device 310 can refer to the description of the user tower device 210 in Figure 2 above, and replace the user feature data set with the context feature data set. That is, the data required by the user tower device 310 in Figure 3 is context. Characteristics will not be repeated here.
  • the context feature data set shown in Figure 3 may include: content context features related to advertisements, and/or environmental context features related to advertisements.
  • the advertisement feature data set may include: title and classification of advertisements, One or more of brand, label, text content, picture content, or video content, etc.
  • the auxiliary network model 340 is used to implement interaction modeling between the user tower device 310 and the advertising tower device 320, thereby realizing the interaction between contextual features and advertising features, thereby enhancing the correlation between the two.
  • the inputs of the auxiliary network model 310 may be: the output of the user tower device 210 in at least one stage, and the output of the advertising tower device 220 in at least one stage.
  • the input of the auxiliary network model 310 can be the output of the feature encoding devices 311 and 321, the output of the feature connection devices 312 and 322, the output of the main network devices 313 and 323, or the main network device 313
  • the output of a certain network layer in and 323 can be a combination of any of the above methods.
  • the output of the auxiliary network model 340 can be used to characterize the correlation between contextual features and advertising features.
  • the model structure of the auxiliary network model 340 may be, but is not limited to, the same as the model structure of the primary network device 313 or 323.
  • the auxiliary network model 340 may be pre-trained or may be to-be-trained (that is, not trained). The details may be determined according to the actual situation and are not limited here. For example, when pre-training the auxiliary network model 340, the context feature data set and advertisement feature data set can be used as training data to train the auxiliary network model 340.
  • the auxiliary network loss device 350 is another loss function in the dual-tower model training device 300. It mainly evaluates the user tower device 310, the advertising tower device 320 and the auxiliary tower device 310 based on the output results of the auxiliary network model 340 and the sample labels of the preset training samples. The training level of the network model 340 is back propagated to the user tower device 310, the advertising tower device 320 and the auxiliary network model 340.
  • the user tower device 310 can be continuously adjusted based on the results output by the twin-tower loss device 330 and the results output by the auxiliary network loss device 350.
  • Model parameters so that the context feature vector representation output by the user tower device 310 is more accurate; at the same time, the model parameters in the advertising tower device 320 can be continuously adjusted based on the results output by the twin tower loss device 330 and the results output by the auxiliary network loss device 350 , so that the advertising feature vector representation output by the advertising tower device 320 is more accurate.
  • the twin tower model training device 300 can solidify the parameters with the best training effect of the user tower device 310 during the training process to generate the context representation model 500 and output it; at the same time, the advertising tower device 320 can be used during the training process.
  • the parameters with the best training effect are solidified to generate the advertising representation model 600 and output it.
  • the context representation model 500 is used to represent online context features as feature vectors
  • the advertisement representation model 600 is used to represent offline advertisement features as feature vectors.
  • FIG. 4 shows a schematic diagram of using the context representation model 500 and the advertisement representation model 600 for advertisement delivery.
  • the advertising process also includes two stages, namely the offline stage and the online stage.
  • the advertisement representation model 600 is used to process the set of characteristics of each advertisement (such as title, category, brand, label, text content, picture content, or video content, etc.) to obtain the feature vector of each advertisement. (hereinafter referred to as "advertising side feature vectors").
  • the online stage is when the user browses the web page, and with the user's authorization, the contextual features related to the page visited by the user can be obtained; then, the context representation model 500 is used to process the contextual features online in real time to Get the context feature vector.
  • Figure 5 shows a model training method. It can be understood that this method can be executed by any device, device, platform, or device cluster with computing and processing capabilities. As shown in Figure 5, the model training method includes the following steps:
  • the first sample set which includes the first training sample.
  • the first training sample includes at least one advertisement feature of the advertisement and at least one contextual feature corresponding to the advertisement.
  • the first sample set may include at least one training sample.
  • the first sample set may be preset by the user; of course, it may also be a set of training samples collected through the user's operation log on the terminal device (such as a mobile phone, computer, etc.).
  • the operation log may be related to advertising or may not be related to advertising.
  • Each training sample in the first sample set may include at least one advertisement feature of an advertisement and at least one contextual feature corresponding to the advertisement. Different training samples can correspond to different advertisements.
  • the first training sample may include the advertising features of advertisement a and the contextual features corresponding to advertisement a
  • the second training sample may include the advertising features of advertisement b and the contextual features corresponding to advertisement b.
  • each advertising feature can be any one of the title, category, brand, label, text content, picture content, or video content of the advertisement.
  • Each context feature may be a content context feature corresponding to the advertisement, and/or an environmental context feature corresponding to the advertisement.
  • Content context features may include context records of the content contained in the advertisement when the user accesses the advertisement, such as: web page text, web page image identification, video identification, or audio identification, etc.
  • Environmental context features may include contextual records of the environment when the user accesses the advertisement, such as: IP address information, access time, device type of the electronic device, operators that provide network services for the electronic device, network type of the electronic device, electronic device The system language, the brand of the electronic device, the model of the electronic device, the scene in which the electronic device needs to display advertisements, the size of the area used to display advertisements in the display interface of the electronic device, the country where the electronic device is located, etc.
  • the training samples in the first sample set may be positive samples or negative samples, depending on the actual situation.
  • the set of contextual features included in the first sample set can be understood as the contextual feature data set described in Figure 3
  • the set of advertising features included in the first sample set can be understood as the aforementioned Figure 3. Advertising feature dataset described in 3.
  • the context features included in the first training sample can be processed through the first model to obtain the first feature vector
  • the advertising features included in the first training sample can be processed through the second model to obtain the first feature vector.
  • Get the second eigenvector
  • the first model can be understood as the user tower device 310 in the aforementioned Figure 3
  • the second model can be understood as the advertising tower device 320 in the aforementioned Figure 3.
  • the first feature vector can be understood as the result output by the user tower device 310 after the contextual features contained in the first training sample are input into the user tower device 310
  • the second feature vector can be understood as the result of the first training sample.
  • the advertising tower device 320 outputs the result.
  • the contextual features contained in the first training sample can be encoded separately by the first model to obtain N feature vectors.
  • the context feature and the encoded feature vector may have a one-to-one correspondence, or of course may not have a one-to-one correspondence, and the specifics may be determined according to the actual situation.
  • the obtained feature vector can be processed through the first model, such as performing sufficient feature intersection in different dimensions, etc., to obtain the first feature vector.
  • the first model can be used to splice the obtained N feature vectors to splice them into one feature vector, and then the first model can be used to process the spliced feature vectors. For example, perform sufficient feature crossover in different dimensions to obtain the first feature vector.
  • the advertising features contained in the first training sample can be separately encoded by the second model to obtain M feature vectors.
  • the advertising feature and the encoded feature vector may have a one-to-one correspondence, or of course may not have a one-to-one correspondence, and the specifics may be determined according to the actual situation.
  • M ⁇ 2 the obtained M feature vectors can be spliced through the second model first to splice them into one feature vector, and then the feature vectors obtained after splicing are processed through the second model, For example, perform sufficient feature crossover in different dimensions to obtain the second feature vector.
  • S530 Process the processing results of at least one stage in the first model and the processing results of at least one stage in the second model through the third model to obtain a first correlation score.
  • the first correlation score is used to characterize the first training. The degree of matching between the contextual features contained in the sample and the advertising features contained in the first training sample.
  • the processing result of at least one stage in the first model and the processing result of at least one stage in the second model can be processed by the third model to obtain the first correlation score.
  • the first correlation score may be used to characterize the degree of matching between the contextual features included in the first training sample and the advertising features included in the first training sample.
  • the third model can be understood as the auxiliary network device 340 in FIG. 3 .
  • the third model may be a neural network model, which may be used to assist in calculating the loss corresponding to the training samples in the first sample set during the training of the first model and the second model.
  • the processing result of at least one stage in the first model may refer to: the result output by any one or more neural network layers in the first model.
  • the processing result of at least one stage in the first model may refer to: the result output by the feature encoding device 311, the result output by the feature connection device 312, and the main network One or more of the results output by device 313.
  • the processing result of at least one stage in the second model may refer to: the result output by any one or more neural network layers in the second model.
  • the processing result of at least one stage in the second model may refer to: the result output by the feature encoding device 321, the result output by the feature connection device 322, and the main network One or more of the results output by device 323.
  • the sample label of the first training sample can be determined according to the first feature vector, the second feature vector, the first correlation score and the first training sample. , determine the loss corresponding to the first training sample.
  • the first loss may be obtained based on the first feature vector, the second feature vector and the sample label of the first training sample. Then, a second loss is obtained based on the first correlation score and the sample label of the first training sample. Finally, based on the first loss and the second loss, the loss corresponding to the first training sample is obtained.
  • the order in which the first loss and the second loss are obtained can be determined according to the actual situation, and is not limited here.
  • the first feature vector and the second feature vector can be processed based on, but not limited to, algorithms such as cosine similarity to obtain a correlation score between the two.
  • the correlation score can be used to characterize the first training The degree of matching between the contextual features contained in the sample and the advertising features contained in the first training sample. Then, the correlation score and the sample label of the first training sample can be processed through a preset loss function to obtain the first loss.
  • the first loss can be processed by the twin-tower loss device 330 described in FIG. 3 .
  • the first correlation score and the sample label of the first training sample can be processed through a preset loss function to obtain the second loss.
  • the second loss can be processed by the auxiliary network loss device 350 described in FIG. 3 .
  • the loss corresponding to the first training sample can be obtained by adding the first loss and the second loss, or it can be obtained by a weighted average, or it can be obtained by multiplying it.
  • the details can be determined according to the actual situation, and are not limited here.
  • the above description is the processing process for a training sample in the first sample set.
  • S550 can be executed. In some embodiments, S550 can also be executed once every time a loss is obtained, or S550 can be executed once every time a batch (such as 2, 3, etc.) of losses is obtained. The specifics may be determined according to the actual situation, and are not discussed here. Make limitations. At the same time, the loss described in S550 is the loss obtained at this time.
  • the first model and the second model can be trained with the goal of minimizing these losses.
  • the third model can also be trained at the same time.
  • the parameters in the first model and the second model can be updated using, but not limited to, the back propagation algorithm to complete the analysis of the first model and the second model. train.
  • the first model may be used to extract contextual features related to pages visited by the user, and the second model may be used to extract features of advertisements.
  • contextual features are used to replace user features for model training, thereby reducing the dependence on user features in the subsequent use of the model.
  • a third model is added in the process of training the first model and the second model to realize the interaction modeling between the first model and the second model, thereby realizing the interaction between contextual features and advertising features, making the two related.
  • the performance enhancement improves the representation effect of the final first model and second model.
  • the trained first model can be understood as the context representation model 500 depicted in Figure 3
  • the trained second model can be understood as the advertisement representation model 600 depicted in Figure 3 .
  • Figure 6 shows an advertisement delivery method. It can be understood that this method can be executed by any device, device, platform, or device cluster with computing and processing capabilities. Exemplarily, the method may be performed by an electronic device having a display screen. As shown in Figure 6, the advertising delivery method includes the following steps:
  • the electronic device when the user browses a certain page on the electronic device or issues an instruction to access a certain page, the electronic device can obtain the user's access operation to the page.
  • the interface presented by the browser can It is the first page that the user visits.
  • the user's click on the search operation can be understood as an access operation.
  • the user selects a piece of content in the interface presented by the browser and clicks to browse the content.
  • the interface presented by the browser can be the first page visited by the user.
  • the user's operation of clicking to browse related content can be understood as access. operate.
  • the information of the page visited by the user can be actively obtained, and the information can be analyzed to determine the contextual features related to the content of the first page, for example, the page logo, text, video, picture, audio logo on the page, etc.
  • the context information of the environment when the user accesses the first page can also be obtained to obtain contextual features related to the environment of accessing the first page, such as the user's IP region information, Access time, device type of electronic device, operator providing network services for electronic device, network type of electronic device, system language of electronic device, brand of electronic device, model of electronic device, and the scene in which the electronic device needs to display advertisements , one or more of the following: the size of the area used to display advertisements in the display interface of the electronic device, the country where the electronic device is located, etc. For example, different display interfaces on the electronic device can be used to display different content to the user.
  • the contextual features related to the content of the first page and/or the environment in which the first page is accessed have nothing to do with the user's user profile and/or user behavior.
  • the first contextual feature may include contextual features related to the content of the first page, and/or contextual features related to the environment in which the first page is accessed.
  • the first contextual feature has nothing to do with the user's user profile and/or user behavior.
  • f advertisements can be displayed, f ⁇ 1.
  • the context representation model 500 trained in FIG. 3 (hereinafter referred to as the "first model") may be configured in the electronic device.
  • f advertisements are displayed based on the first context feature, which may include:
  • the first context features can be input into the first model obtained through the aforementioned model training, so as to use the first model to process the context features to obtain the first feature vector.
  • S6312. Determine the similarity values between the first feature vector and K second feature vectors to obtain K similarity values.
  • Each second feature vector is used to characterize a feature of an advertisement.
  • the second model obtained through the aforementioned model training may be used in advance to process the characteristics of the K advertisements to be delivered to obtain K second feature vectors.
  • a second feature vector corresponds to an advertisement.
  • Each second feature vector is used to characterize an advertisement.
  • the similarity values between the first feature vector and the K second feature vectors can be determined through algorithms such as cosine similarity to obtain K similarity values.
  • the K similarity values can be sorted, such as from large to small or from small to large. Then, Q larger similarity values are selected from them. Among them, each of the Q similarity values is greater than the similarity values other than the Q similarity values among the K similarity values, 1 ⁇ Q ⁇ K.
  • S6311 to S6313 can be understood as the process of obtaining Q advertisements or obtaining information indicating Q advertisements (that is, obtaining Q advertisement indication information) based on contextual features.
  • the advertisements corresponding to the Q similarity values can be used as the advertisements to be delivered, or the information indicating the advertisements corresponding to the Q similarity values can be used as the user.
  • the number of advertisements that need to be placed is the same as the Q value, and the amount of advertising information that needs to be placed is also the same as the Q value.
  • the number of advertisements that need to be delivered or the amount of advertising information that needs to be delivered can also be expressed by other quantities, such as k, R, g, etc., but these values are all the same as the filtered Q pieces.
  • the Q in the similarity value is the same.
  • the advertisements corresponding to the Q similarity values can be used as the advertisements to be delivered this time, and these advertisements can be displayed so that users can browse the advertisements.
  • the advertisements corresponding to each of the Q similarity values are f advertisements described in S630.
  • f advertisements are displayed based on the first context feature.
  • the aforementioned S6311 to S6313 in Figure 7 can be executed by other devices, such as a server. Taking server execution as an example, at this time, after acquiring the first context feature, the electronic device can send a message containing the first context feature to the server. After the server obtains the message sent by the electronic device, it can execute S6311 to S6313 in Figure 7. After executing S6313, the server may send a message to the electronic device for instructing the electronic device to display advertisements corresponding to the Q similarity values. For example, the message sent by the server to the electronic device may include advertisements corresponding to Q similarity values (i.e., Q advertisements), or advertisement instruction information used to generate Q advertisements.
  • Q advertisements i.e., Q advertisements
  • the electronic device After the electronic device receives the message sent by the server, the electronic device can display the Q advertisements.
  • the advertisement instruction information may include Q advertisement elements, templates, template identifiers, etc.
  • the electronic device may be configured with the first model or may not be configured with the first model, which is not limited here.
  • the advertisement indication information may also be called information for instructing advertisements.
  • the aforementioned S6312 and S6313 in Figure 7 can be executed by other devices, such as a server.
  • the electronic device can send a message containing the first feature vector to the server.
  • the server After the server obtains the message sent by the electronic device, it can execute S6312 and S6313 in Figure 7.
  • the server may send a message to the electronic device for instructing the electronic device to display advertisements corresponding to the Q similarity values.
  • the message sent by the server to the electronic device may include advertisements corresponding to Q similarity values (i.e., Q advertisements), or advertisement instruction information used to generate Q advertisements.
  • the electronic device After the electronic device receives the message sent by the server, the electronic device can display the Q advertisements.
  • the advertisement instruction information may include Q advertisement elements, templates, template identifiers, etc.
  • the first model may be configured in the electronic device.
  • the advertisement indication information may also be called information for instructing advertisements.
  • the aforementioned S6311 in Figure 7 can be executed by other devices, such as a server. Taking server execution as an example, at this time, after acquiring the first context feature, the electronic device can send a message containing the first context feature to the server. The message can be used to instruct the server to perform feature extraction on the first context feature. After the server obtains the message sent by the electronic device, it can execute S6311 in Figure 7. After executing S6311, the server can send a message containing the first feature vector to the electronic device. Afterwards, the electronic device may perform S6312 to S6314 in FIG. 7 .
  • contextual features are used to replace user features, which reduces the dependence on user features.
  • user features such as user portraits, user behaviors, etc.
  • Relevant contextual features are used to accurately deliver advertisements, which solves the problem of the trade-off between privacy protection of user information and precise advertising delivery.
  • the electronic device may also obtain the user's second access operation to the second page. Then, in response to the second access operation, the electronic device can obtain a second contextual feature related to the second page, where the second contextual feature has nothing to do with the user's user portrait and/or user behavior. Finally, the electronic device can obtain the second contextual feature based on the second access operation. Context features, display g advertisements, g ⁇ 1, where at least some of the g advertisements are different from the advertisements in the f advertisements.
  • the second context feature may include the identifier of the second page, the text in the second page, the identifier of the video in the second page, the identifier of the picture in the second page, the identifier of the audio in the second page, and the user's IP.
  • the scene of the advertisement (such as the scene of booting up or using an application, etc.), the size of the area used to display advertisements in the display interface of the electronic device, the country where the electronic device is located, etc.
  • the first page is replaced with the second page
  • the first context feature is replaced with the second context feature
  • g ads can be replaced by f ads, which will not be described again here.
  • the second context feature may include one or more of the following: the identifier of the second page, the text on the second page, the identifier of the video on the second page, the identifier of the picture on the second page, the identifier of the audio on the second page. Identification, user's IP geographical information, access time, type of electronic device used by the user, operator and networking method.
  • user A carries two mobile phones, namely mobile phone 1 and mobile phone 2.
  • the networking method of mobile phone 1 is the 4th generation mobile communication technology (4G)
  • the networking method of mobile phone 2 is the fifth generation mobile communication technology (5G).
  • Mobile phone 1 and mobile phone 2 have different operators, and their manufacturers are also different.
  • the ads recommended to User A can be different.
  • the advertisements recommended to the mobile phone 1 used by user A may be: mid-range pure electric new energy vehicles; the advertisements recommended to the mobile phone 2 used by user A may be: high-end hybrid electric new energy vehicles. Energy vehicles.
  • the advertisement recommendation is based on the contextual features of the pages visited by the user, and the contextual features of the pages visited by both users are the same, the same advertisement can be recommended to both users.
  • user characteristics are used for advertisement recommendation, although the contextual characteristics of the pages visited by the two are the same, because the user characteristics of the two are different, the advertisements recommended to the two are different.
  • FIG 9 when user portraits are turned off, when users from two different regions browse the page, the content context is consistent, but the environmental context related to the page is inconsistent.
  • the ads served can be changed simultaneously.
  • user A browsed pages related to cars at 8:10 a.m.
  • browsed pages related to games at 8:11 a.m. that is, the user switched pages while using the mobile phone.
  • the first advertisement is a game advertisement
  • the second advertisement is a car advertisement. Since User A browsed car-related content at 8:10 am, car-related ads can be placed at this time, that is, Ad 2. Since user A browsed game-related content at 8:11 a.m., a game-related advertisement can be placed at this time, that is, advertisement one.
  • each step in the above embodiment does not mean the order of execution.
  • the execution order of each process should be determined by its function and internal logic, and should not constitute any influence on the implementation process of the embodiment of the present application. limited.
  • each step in the above embodiments may be selectively executed according to actual conditions, may be partially executed, or may be executed in full, which is not limited here.
  • embodiments of the present application also provide a model training device.
  • Figure 11 shows a model training device.
  • the model training device 1100 includes: an acquisition module 1110 and a processing module 1120.
  • the acquisition module 1110 is used to acquire a first sample set, the first sample set includes a first training sample, and the first training sample includes at least one advertisement feature of the advertisement and at least one contextual feature corresponding to the advertisement.
  • the processing module 1120 is configured to process at least one context feature through a first model to obtain a first feature vector, and process at least one advertisement feature through a second model to obtain a second feature vector.
  • the processing module 1120 is also configured to process the processing results of at least one stage in the first model and the processing results of at least one stage in the second model through the third model to obtain a first correlation score, where the first correlation score is used Characterizes the degree of matching between at least one contextual feature and at least one advertising feature.
  • the processing module 1120 is also configured to obtain the loss corresponding to the first training sample based on the first feature vector, the second feature vector, the first correlation score, and the sample label of the first training sample.
  • the processing module 1120 is also configured to train the first model and the second model based on the loss corresponding to at least one training sample in the first sample set.
  • the second model splices M fifth eigenvectors to obtain a sixth eigenvector, and processes the sixth eigenvector through the second model to obtain a second eigenvector.
  • the processing module 1120 when obtaining the loss corresponding to the first training sample according to the first feature vector, the second feature vector, the first correlation score and the sample label of the first training sample, is specifically used to: The first feature vector, the second feature vector and the sample label of the first training sample are used to obtain the first loss; the second loss is obtained based on the first correlation score and the sample label of the first training sample; the first loss and the second loss are obtained Loss, get the loss corresponding to the first training sample.
  • the processing module 1120 when obtaining the first loss based on the first feature vector, the second feature vector, and the sample label of the first training sample, is specifically configured to: based on the first feature vector and the second feature vector, Determine a second correlation score, which is used to characterize the matching degree between at least one contextual feature and at least one advertising feature; obtain a first loss based on the second correlation score and the sample label of the first training sample.
  • the processing module 1120 is also configured to: train a third model based on the loss corresponding to at least one training sample in the first sample set.
  • the trained first model is used for feature extraction of contextual features related to pages visited by the user
  • the trained second model is used for feature extraction of advertisements
  • the third model is a neural network model, used to assist in calculating the loss corresponding to the training samples in the first sample set during the training of the first model and the second model.
  • the above device is used to execute the model training method described in the above embodiment.
  • the corresponding program modules in the device have implementation principles and technical effects similar to those described in the above method.
  • the working process of the device can be referred to the above method. The corresponding process will not be described again here.
  • embodiments of the present application also provide an advertisement delivery device.
  • FIG. 12 shows an advertisement delivery device.
  • the advertisement placement device can be deployed in an electronic device with a display screen.
  • the advertisement delivery device 1200 includes: an acquisition module 1210 and a display module 1220.
  • the acquisition module is used to obtain the user's access operation to the first page; and, in response to the access operation, obtain the first context feature related to the first page, wherein the context feature has nothing to do with the user's user portrait and/or user behavior .
  • the display module 1220 is configured to display f advertisements based on the first context feature, f ⁇ 1.
  • the obtaining module 1210 is also used to obtain the user's second access operation to the second page, and, in response to the second access operation, obtain information related to the second page.
  • the second contextual feature wherein the second contextual feature has nothing to do with the user's user profile and/or user behavior.
  • the display module 1220 is also configured to display g advertisements based on the second context feature, g ⁇ 1, wherein at least some of the g advertisements are different from the advertisements in the f advertisements.
  • the device further includes: a processing module (not shown in the figure), configured to use a first model to process context features to obtain a first feature vector.
  • the first model is a neural network model, and the context features are First context feature or second context feature.
  • the processing module is also used to determine the similarity value between the first feature vector and K second feature vectors to obtain K similarity values. Each second feature vector is used to characterize the characteristics of an advertisement.
  • the processing module is also used to filter out Q similarity values from the K similarity values, wherein each of the Q similarity values is greater than the similarity among the K similarity values except the Q similarity values. Degree value, 1 ⁇ Q ⁇ K.
  • the display module 1220 is used to display advertisements corresponding to each of the Q similarity values.
  • the context feature is the first context feature
  • the advertisements corresponding to the Q similarity values are f advertisements.
  • the advertisements corresponding to each of the Q similarity values are g advertisements.
  • the device further includes: a communication module (not shown in the figure), configured to send a first message to the server, where the first message contains context features, and the context features are the first context features or the second context features.
  • the communication module is also configured to receive a second message sent by the server.
  • the second message includes Q advertisements or advertisement indication information.
  • the advertisement indication information is used to generate Q advertisements.
  • Q advertisements are f advertisements
  • Q advertisements are g advertisements.
  • the display module 1220 is used to display Q advertisements.
  • the device further includes: a processing module (not shown in the figure), configured to use a first model to process context features to obtain a first feature vector.
  • the first model is a neural network model, and the context features are First context feature or second context feature.
  • a communication module configured to send a first message to the server, where the first message contains the first feature vector.
  • the communication module is also configured to receive a second message sent by the server.
  • the second message includes Q advertisements or advertisement indication information.
  • the advertisement indication information is used to generate Q advertisements.
  • Q advertisements are f advertisements
  • Q advertisements are g advertisements.
  • the display module 1220 is used to display Q advertisements.
  • the device further includes: a communication module (not shown in the figure), configured to send a first message to the server, where the first message contains context features, and the first message is used to instruct the server to perform feature extraction on the context features.
  • the context feature is the first context feature or the second context feature.
  • the communication module is also configured to receive a second message sent by the server, where the second message includes the first feature vector extracted by the server based on the contextual features.
  • a processing module (not shown in the figure), used to determine the similarity value between the first feature vector and K second feature vectors to obtain K similarity values, each second feature vector is used to characterize an advertisement Characteristics.
  • the processing module is also used to filter out Q similarity values from the K similarity values, wherein each of the Q similarity values is greater than the similarity among the K similarity values except the Q similarity values. Degree value, 1 ⁇ Q ⁇ K.
  • the display module 1220 is used to display advertisements corresponding to each of the Q similarity values.
  • the advertisements corresponding to the Q similarity values are f advertisements.
  • the advertisements corresponding to each of the Q similarity values are g advertisements.
  • the first contextual feature includes one or more of the following: the identification of the first page, the text in the first page, the identification of the video in the first page, the identification of the picture in the first page, the first page
  • the identification of the audio device, the user's IP region information, access time, the device type of the electronic device, the operator that provides network services for the electronic device, the network type of the electronic device, the system language of the electronic device, the brand of the electronic device, the electronic device The model, the scene in which the electronic device needs to display advertisements, the size of the area used to display advertisements in the display interface of the electronic device, and the country in which the electronic device is located.
  • the second contextual feature includes one or more of the following: the identification of the second page, the text in the second page, the identification of the video in the second page, the identification of the picture in the second page, the identification of the second page.
  • the identification of the audio device, the user's IP region information, access time, the device type of the electronic device, the operator that provides network services for the electronic device, the network type of the electronic device, the system language of the electronic device, the brand of the electronic device, the electronic device The model, the scene in which the electronic device needs to display advertisements, the size of the area used to display advertisements in the display interface of the electronic device, and the country in which the electronic device is located.
  • the above device is used to execute the advertising delivery method described in the above embodiment.
  • the corresponding program modules in the device have implementation principles and technical effects similar to those described in the above method.
  • the working process of the device can be referred to the above method. The corresponding process will not be described again here.
  • embodiments of the present application also provide an advertisement delivery device.
  • Figure 13 shows an advertisement delivery device.
  • the advertisement delivery device can be deployed in the server.
  • the advertisement delivery device 1300 includes: a communication module 1310 and a processing module 1320.
  • the communication module 1310 may be used to receive a first message sent by the electronic device.
  • the first message includes contextual features related to the page visited by the user on the electronic device.
  • the contextual features have nothing to do with the user's user profile and/or user behavior.
  • the processing module 1320 may be configured to, in response to the first message, obtain R advertisements or information indicating R advertisements based on contextual features, R ⁇ 1.
  • the communication module 1310 may also be used to send a second message to the electronic device, where the second message is used to instruct the electronic device to display R advertisements.
  • the processing module 1320 when obtaining R advertisements or information indicating R advertisements based on context features, is specifically configured to: use the first model to process the context features to obtain the first feature vector,
  • the first model is a neural network model; determine the similarity value between the first feature vector and K second feature vectors to obtain K similarity values, and each second feature vector is used to characterize the characteristics of an advertisement; from Q similarity values are screened out from K similarity values, where each of the Q similarity values is greater than the similarity value except the Q similarity values among the K similarity values, 1 ⁇ Q ⁇ K; use the advertisements corresponding to each of the Q similarity values as R advertisements, or use the information indicating advertisements corresponding to each of the Q similarity values as information indicating R advertisements.
  • the contextual features include one or more of the following: identification of the page, text on the page, identification of the video on the page, identification of pictures on the page, identification of audio on the page, user's IP region information, access Time, type of electronic device used by the user, operator and connection method.
  • the above device is used to execute the advertising delivery method described in the above embodiment.
  • the corresponding program modules in the device have implementation principles and technical effects similar to those described in the above method.
  • the working process of the device can be referred to the above method. The corresponding process will not be described again here.
  • the electronic device may include: a display screen; at least one memory for storing programs; and at least one processor for executing the programs stored in the memory. Wherein, when the program stored in the memory is executed, the processor is used to execute the method described in the above embodiment.
  • the electronic device may be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, a server, an ultra-mobile personal computer (UMPC), a netbook, and a cellular phone.
  • UMPC ultra-mobile personal computer
  • PDAs personal digital assistants
  • AR augmented reality
  • VR virtual reality
  • AI artificial intelligence
  • wearable devices wearable devices
  • vehicle-mounted devices smart home equipment and/or smart city equipment.
  • the embodiments of this application do not place special restrictions on the specific types of electronic equipment.
  • the server may include: at least one memory for storing programs; and at least one processor for executing the programs stored in the memory. Wherein, when the program stored in the memory is executed, the processor is used to execute the method described in the above embodiment.
  • the server can be, but is not limited to, a cloud server, a virtual machine, a hardware server, etc.
  • the embodiment of this application does not place any special restrictions on the specific type of the server.
  • embodiments of the present application provide a computer-readable storage medium.
  • the computer-readable storage medium stores a computer program.
  • the computer program When the computer program is run on a processor, it causes the processor to execute the steps in the above embodiments. Methods.
  • embodiments of the present application provide a computer program product, which when the computer program product is run on a processor, causes the processor to execute the methods in the above embodiments.
  • processors in the embodiments of the present application can be a central processing unit (CPU), or other general-purpose processor, digital signal processor (DSP), or application-specific integrated circuit (application specific integrated circuit, ASIC), field programmable gate array (field programmable gate array, FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof.
  • a general-purpose processor can be a microprocessor or any conventional processor.
  • the method steps in the embodiments of the present application can be implemented by hardware or by a processor executing software instructions.
  • Software instructions can be composed of corresponding software modules, and software modules can be stored in random access memory (random access memory, RAM), flash memory, read-only memory (read-only memory, ROM), programmable read-only memory (programmable rom) , PROM), erasable programmable read-only memory (erasable PROM, EPROM), electrically erasable programmable read-only memory (electrically EPROM, EEPROM), register, hard disk, mobile hard disk, CD-ROM or other well-known in the art any other form of storage media.
  • An exemplary storage medium is coupled to the processor such that the processor can read information from the storage medium and write information to the storage medium.
  • the storage medium can also be an integral part of the processor.
  • the processor and storage media may be located in an ASIC.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
  • the computer instructions may be stored in or transmitted over a computer-readable storage medium.
  • the computer instructions may be transmitted from one website, computer, server or data center to another website through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) means. , computer, server or data center for transmission.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains one or more available media integrated.
  • the available media may be magnetic media (eg, floppy disk, hard disk, magnetic tape), optical media (eg, DVD), or semiconductor media (eg, solid state disk (SSD)), etc.

Landscapes

  • Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Development Economics (AREA)
  • Finance (AREA)
  • Economics (AREA)
  • Game Theory and Decision Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Marketing (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Information Transfer Between Computers (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

一种广告投放方法,可以应用于具有显示屏的电子设备。该方法包括:获取用户对第一页面的第一访问操作;响应于第一访问操作,获取与第一页面相关的第一上下文特征,其中,第一上下文特征与用户的用户画像和/或用户行为无关;基于第一上下文特征,显示f个广告,f≥1。由此,通过利用上下文特征替代用户特征,降低了对用户特征的依赖,实现了在无法获取用户画像等特征时,也能进行广告的精准投放。

Description

一种模型训练方法、广告投放方法、装置及电子设备 技术领域
本申请涉及人工智能(artificial intelligence,AI)技术领域,尤其涉及一种模型训练方法、广告投放方法、装置及电子设备。
背景技术
目前,在进行广告投放时,往往是基于用户画像与行为进行投放。但随着用户信息的保护不断增强,越来越难以获取用户的身份标识,导致用户画像无法获取,致使广告投放的效果较差。
发明内容
本申请提供了一种模型训练方法、广告投放方法、装置、电子设备、服务器、计算机存储介质及计算机产品,能够提升广告投放的效果。
第一方面,本申请提供一种模型训练方法,该方法包括:获取第一样本集,第一样本集中包括第一训练样本,第一训练样本包括广告的至少一个广告特征和广告对应的至少一个上下文特征;通过第一模型对至少一个上下文特征进行处理,以得到第一特征向量,以及,通过第二模型对至少一个广告特征进行处理,以得到第二特征向量;通过第三模型对第一模型内至少一个阶段的处理结果和第二模型内至少一个阶段的处理结果进行处理,以得到第一相关性分数,第一相关性分数用于表征至少一个上下文特征和至少一个广告特征间的匹配程度;根据第一特征向量、第二特征向量、第一相关性分数和第一训练样本的样本标签,得到第一训练样本对应的损失;基于第一样本集中至少一个训练样本对应的损失,训练第一模型和第二模型。
由此,通过利用上下文特征替代用户特征进行模型训练,从而降低了后续使用模型过程中对用户特征的依赖。同时,在训练第一模型和第二模型的过程中增加第三模型,实现了第一模型和第二模型之间的交互建模,从而实现了上下文特征与广告特征的交互,使二者关联性增强,提升了最终得到的第一模型和第二模型的表示效果。示例性的,训练后的第一模型可以用于对与用户所访问的页面相关的上下文特征进行特征提取,训练后的第二模型可以用于对广告进行特征提取。
在一种可能的实现方式中,通过第一模型对至少一个上下文特征进行处理,以得到第一特征向量,具体包括:通过第一模型对至少一个上下文特征进行编码,以得到N个第三特征向量,N≥1;其中,在N=1的情况下,通过第一模型对N个第三特征向量进行处理,以得到第一特征向量;在N≥2的情况下,通过第一模型对N个第三特征向量进行拼接,以得到一个第四特征向量,以及,通过第一模型对第四特征向量进行处理,以得到第一特征向量。
在一种可能的实现方式中,通过第二模型对至少一个广告特征进行处理,以得到第二特征向量,具体包括:通过第二模型对至少一个广告特征进行编码,以得到M个第五特征向量,M≥1;其中,在M=1的情况下,通过第二模型对M个第五特征向量进行处理,以得到第二特征向量;在M≥2的情况下,通过第二模型对M个第五特征向量进行拼接,以得到一个第六特征向量,以及,通过第二模型对第六特征向量进行处理,以得到第二特征向量。
在一种可能的实现方式中,根据第一特征向量、第二特征向量、第一相关性分数和第一训练样本的样本标签,得到第一训练样本对应的损失,具体包括:根据第一特征向量、第二特征向量和第一训练样本的样本标签,得到第一损失;根据第一相关性分数和第一训练样本的样本标签,得到第二损失;根据第一损失和第二损失,得到第一训练样本对应的损失。
在一种可能的实现方式中,根据第一特征向量、第二特征向量和第一训练样本的样本标签,得到第一损失,具体包括:根据第一特征向量和第二特征向量,确定第二相关性分数,第二相关性分数用于表征至少一个上下文特征和至少一个广告特征间的匹配程度;根据第二相关性分数和第一训练样本的样本标签,得到第一损失。
在一种可能的实现方式中,该方法还可以包括:基于第一样本集中至少一个训练样本对应的损失,训练第三模型。
在一种可能的实现方式中,第三模型为神经网络模型,用于在训练第一模型和第二模型过程中辅助计算第一样本集中训练样本对应的损失。示例性的,第三模型的模型结构可以但不限于为深度神经网络(deep neural networks,DNN),多层神经网络(multi-layer perception,MLP),深度因子分解机(deep factorization machine,DeepFM),极深度因子分解机模型(extreme deep factorization machine,xDeepFM),深度交叉网络(deep cross network,DCN),或者,深度兴趣网络(deep interest network,DIN)等模型结构。
第二方面,本申请提供一种广告投放方法,应用于具有显示屏的电子设备。该方法可以包括:获取用户对第一页面的访问操作;响应于访问操作,获取与第一页面相关的第一上下文特征,其中,第一上下文特征与用户的用户画像和/或用户行为无关;基于第一上下文特征,显示f个广告,f≥1。
由此,在进行广告投放时,通过利用上下文特征替代用户特征,降低了对用户特征的依赖,实现了在无法获取用户特征(比如用户画像、用户行为等)时,利用与用户所访问的页面相关的上下文特征,进行广告的精准投放,解决了用户信息的隐私保护与广告精准投放之间互相博弈的问题。
在一种可能的实现方式中,在显示f个广告之后,该方法还可以包括:获取用户对第二页面的第二访问操作;响应于第二访问操作,获取与第二页面相关的第二上下文特征,其中,第二上下文特征与用户的用户画像和/或用户行为无关;基于第二上下文特征,显示g个广告,g≥1,其中,g个广告中至少一部分广告与f个广告中的广告不同。示例性的,第一页面中的内容和第二页面中的内容不同。由于两个页面的内容不同,因此这两个页面对应的上下文特征也不同,所以最终显示的广告不同。
在一种可能的实现方式中,基于上下文特征显示广告,具体包括:利用第一模型对上下文特征进行处理,以得到第一特征向量,第一模型为神经网络模型,上下文特征为第一上下文特征或第二上下文特征;确定第一特征向量与K个第二特征向量间的相似度值,以得到K个相似度值,每个第二特征向量均用于表征一个广告的特征;从K个相似度值中筛选出Q个相似度值,其中,Q个相似度值中的每一个均大于K个相似度值中除Q个相似度值之外的相似度值,1≤Q≤K;显示Q个相似度值各自对应的广告,其中,当上下文特征为第一上下文特征时,Q个相似度值各自对应的广告为f个广告,当上下文特征为第二上下文特征时,Q个相似度值各自对应的广告为g个广告。
在一种可能的实现方式中,基于上下文特征显示广告,具体包括:向服务器发送第一消 息,第一消息中包含上下文特征,上下文特征为第一上下文特征或第二上下文特征;接收服务器发送的第二消息,第二消息中包括Q个广告或广告指示信息,广告指示信息用于生成Q个广告,其中,当上下文特征为第一上下文特征时,Q个广告为f个广告,当上下文特征为第二上下文特征时,Q个广告为g个广告;显示Q个广告。
在一种可能的实现方式中,基于上下文特征显示广告,具体包括:利用第一模型对上下文特征进行处理,以得到第一特征向量,第一模型为神经网络模型,上下文特征为第一上下文特征或第二上下文特征;向服务器发送第一消息,第一消息中包含第一特征向量;接收服务器发送的第二消息,第二消息中包括Q个广告或广告指示信息,广告指示信息用于生成Q个广告,其中,当上下文特征为第一上下文特征时,Q个广告为f个广告,当上下文特征为第二上下文特征时,Q个广告为g个广告;显示Q个广告。
在一种可能的实现方式中,基于上下文特征显示广告,具体包括:向服务器发送第一消息,第一消息中包含上下文特征,第一消息用于指示服务器对上下文特征进行特征提取,上下文特征为第一上下文特征或第二上下文特征;接收服务器发送的第二消息,第二消息中包括服务器基于上下文特征提取到的第一特征向量;确定第一特征向量与K个第二特征向量间的相似度值,以得到K个相似度值,每个第二特征向量均用于表征一个广告的特征;从K个相似度值中筛选出Q个相似度值,其中,Q个相似度值中的每一个均大于K个相似度值中除Q个相似度值之外的相似度值,1≤Q≤K;显示Q个相似度值各自对应的广告,其中,当上下文特征为第一上下文特征时,Q个相似度值各自对应的广告为f个广告,当上下文特征为第二上下文特征时,Q个相似度值各自对应的广告为g个广告。
在一种可能的实现方式中,第一上下文特征包括以下一项或多项:第一页面的标识、第一页面中的文字、第一页面中视频的标识、第一页面中图片的标识、第一页面中音频的标识、用户的IP地域信息、访问时间、电子设备的设备类型、为电子设备的提供网络服务的运营商、电子设备的网络类型、电子设备的系统语言、电子设备的品牌、电子设备的型号、电子设备所需展示广告的场景、电子设备的显示界面中用于展示广告的区域的大小、电子设备所在的国家。
在一种可能的实现方式中,第二上下文特征包括以下一项或多项:第二页面的标识、第二页面中的文字、第二页面中视频的标识、第二页面中图片的标识、第二页面中音频的标识、用户的IP地域信息、访问时间、电子设备的设备类型、为电子设备的提供网络服务的运营商、电子设备的网络类型、电子设备的系统语言、电子设备的品牌、电子设备的型号、电子设备所需展示广告的场景、电子设备的显示界面中用于展示广告的区域的大小、电子设备所在的国家。
第三方面,本申请提供一种广告投放方法,应用于服务器,方法包括:接收电子设备发送的第一消息,第一消息中包括与用户在电子设备上所访问的页面相关的上下文特征,上下文特征与用户的用户画像和/或用户行为无关;响应于第一消息,基于上下文特征,得到R个广告或用于指示R个广告的信息,R≥1;向电子设备发送第二消息,第二消息用于指示电子设备显示R个广告。
在一种可能的实现方式中,基于上下文特征,得到R个广告或用于指示R个广告的信息,具体包括:利用第一模型对上下文特征进行处理,以得到第一特征向量,第一模型为神经网络模型;确定第一特征向量与K个第二特征向量间的相似度值,以得到K个相似度值,每个 第二特征向量均用于表征一个广告的特征;从K个相似度值中筛选出Q个相似度值,其中,Q个相似度值中的每一个均大于K个相似度值中除Q个相似度值之外的相似度值,1≤Q≤K;将Q个相似度值各自所对应的广告作为R个广告,或者,将Q个相似度值各自所对应的指示广告的信息作为用于指示R个广告的信息。
在一种可能的实现方式中,上下文特征包括以下一项或多项:页面的标识、页面中的文字、页面中视频的标识、页面中图片的标识、页面中音频的标识、用户的IP地域信息、访问时间、电子设备的设备类型、为电子设备的提供网络服务的运营商、电子设备的网络类型、电子设备的系统语言、电子设备的品牌、电子设备的型号、电子设备所需展示广告的场景、电子设备的显示界面中用于展示广告的区域的大小、电子设备所在的国家。
第四方面,本申请提供一种模型训练装置,该装置包括:获取模块和处理模块。其中,获取模块用于获取第一样本集,第一样本集中包括第一训练样本,第一训练样本包括广告的至少一个广告特征和广告对应的至少一个上下文特征。处理模块用于通过第一模型对至少一个上下文特征进行处理,以得到第一特征向量,以及,通过第二模型对至少一个广告特征进行处理,以得到第二特征向量。处理模块还用于通过第三模型对第一模型内至少一个阶段的处理结果和第二模型内至少一个阶段的处理结果进行处理,以得到第一相关性分数,第一相关性分数用于表征至少一个上下文特征和至少一个广告特征间的匹配程度。处理模块还用于根据第一特征向量、第二特征向量、第一相关性分数和第一训练样本的样本标签,得到第一训练样本对应的损失。处理模块还用于基于第一样本集中至少一个训练样本对应的损失,训练第一模型和第二模型。
在一种可能的实现方式中,处理模块在通过第一模型对至少一个上下文特征进行处理,以得到第一特征向量时,具体用于:通过第一模型对至少一个上下文特征进行编码,以得到N个第三特征向量,N≥1;其中,在N=1的情况下,通过第一模型对N个第三特征向量进行处理,以得到第一特征向量;在N≥2的情况下,通过第一模型对N个第三特征向量进行拼接,以得到一个第四特征向量,以及,通过第一模型对第四特征向量进行处理,以得到第一特征向量。
在一种可能的实现方式中,处理模块在通过第二模型对至少一个广告特征进行处理,以得到第二特征向量时,具体用于:通过第二模型对至少一个广告特征进行编码,以得到M个第五特征向量,M≥1;其中,在M=1的情况下,通过第二模型对M个第五特征向量进行处理,以得到第二特征向量;在M≥2的情况下,通过第二模型对M个第五特征向量进行拼接,以得到一个第六特征向量,以及,通过第二模型对第六特征向量进行处理,以得到第二特征向量。
在一种可能的实现方式中,处理模块在根据第一特征向量、第二特征向量、第一相关性分数和第一训练样本的样本标签,得到第一训练样本对应的损失时,具体用于:根据第一特征向量、第二特征向量和第一训练样本的样本标签,得到第一损失;根据第一相关性分数和第一训练样本的样本标签,得到第二损失;根据第一损失和第二损失,得到第一训练样本对应的损失。
在一种可能的实现方式中,处理模块在根据第一特征向量、第二特征向量和第一训练样本的样本标签,得到第一损失时,具体用于:根据第一特征向量和第二特征向量,确定第二相关性分数,第二相关性分数用于表征至少一个上下文特征和至少一个广告特征间的匹配程 度;根据第二相关性分数和第一训练样本的样本标签,得到第一损失。
在一种可能的实现方式中,处理模块,还用于:基于第一样本集中至少一个训练样本对应的损失,训练第三模型。
在一种可能的实现方式中,第三模型为神经网络模型,用于在训练第一模型和第二模型过程中辅助计算第一样本集中训练样本对应的损失。
在一种可能的实现方式中,训练后的第一模型用于对与用户所访问的页面相关的上下文特征进行特征提取,训练后的第二模型用于对广告进行特征提取。
第五方面,本申请提供一种广告投放装置,可以部署于具有显示屏的电子设备。该装置可以包括:获取模块和显示模块。其中,获取模块用于获取用户对第一页面的访问操作;以及,响应于访问操作,获取与第一页面相关的第一上下文特征,其中,上下文特征与用户的用户画像和/或用户行为无关。显示模块用于基于第一上下文特征,显示f个广告,f≥1。
在一种可能的实现方式中,在显示模块显示f个广告之后,获取模块,还用于获取用户对第二页面的第二访问操作,以及,响应于第二访问操作,获取与第二页面相关的第二上下文特征,其中,第二上下文特征与用户的用户画像和/或用户行为无关。显示模块,还用于基于第二上下文特征,显示g个广告,g≥1,其中,g个广告中至少一部分广告与f个广告中的广告不同。
在一种可能的实现方式中,装置还包括:处理模块,用于利用第一模型对上下文特征进行处理,以得到第一特征向量,第一模型为神经网络模型,上下文特征为第一上下文特征或第二上下文特征。处理模块,还用于确定第一特征向量与K个第二特征向量间的相似度值,以得到K个相似度值,每个第二特征向量均用于表征一个广告的特征。处理模块,还用于从K个相似度值中筛选出Q个相似度值,其中,Q个相似度值中的每一个均大于K个相似度值中除Q个相似度值之外的相似度值,1≤Q≤K。显示模块,用于显示Q个相似度值各自对应的广告,其中,当上下文特征为第一上下文特征时,Q个相似度值各自对应的广告为f个广告,当上下文特征为第二上下文特征时,Q个相似度值各自对应的广告为g个广告。
在一种可能的实现方式中,装置还包括:通信模块,用于向服务器发送第一消息,第一消息中包含上下文特征,上下文特征为第一上下文特征或第二上下文特征。通信模块,还用于接收服务器发送的第二消息,第二消息中包括Q个广告或广告指示信息,广告指示信息用于生成Q个广告,其中,当上下文特征为第一上下文特征时,Q个广告为f个广告,当上下文特征为第二上下文特征时,Q个广告为g个广告。显示模块,用于显示Q个广告。
在一种可能的实现方式中,装置还包括:处理模块,用于利用第一模型对上下文特征进行处理,以得到第一特征向量,第一模型为神经网络模型,上下文特征为第一上下文特征或第二上下文特征。通信模块,用于向服务器发送第一消息,第一消息中包含第一特征向量。通信模块,还用于接收服务器发送的第二消息,第二消息中包括Q个广告或广告指示信息,广告指示信息用于生成Q个广告,其中,当上下文特征为第一上下文特征时,Q个广告为f个广告,当上下文特征为第二上下文特征时,Q个广告为g个广告。显示模块,用于显示Q个广告。
在一种可能的实现方式中,装置还包括:通信模块,用于向服务器发送第一消息,第一消息中包含上下文特征,第一消息用于指示服务器对上下文特征进行特征提取,上下文特征为第一上下文特征或第二上下文特征。通信模块,还用于接收服务器发送的第二消息,第二 消息中包括服务器基于上下文特征提取到的第一特征向量。处理模块,用于确定第一特征向量与K个第二特征向量间的相似度值,以得到K个相似度值,每个第二特征向量均用于表征一个广告的特征。处理模块,还用于从K个相似度值中筛选出Q个相似度值,其中,Q个相似度值中的每一个均大于K个相似度值中除Q个相似度值之外的相似度值,1≤Q≤K。显示模块,用于显示Q个相似度值各自对应的广告,其中,当上下文特征为第一上下文特征时,Q个相似度值各自对应的广告为f个广告,当上下文特征为第二上下文特征时,Q个相似度值各自对应的广告为g个广告。
在一种可能的实现方式中,第一上下文特征包括以下一项或多项:第一页面的标识、第一页面中的文字、第一页面中视频的标识、第一页面中图片的标识、第一页面中音频的标识、用户的IP地域信息、访问时间、电子设备的设备类型、为电子设备的提供网络服务的运营商、电子设备的网络类型、电子设备的系统语言、电子设备的品牌、电子设备的型号、电子设备所需展示广告的场景、电子设备的显示界面中用于展示广告的区域的大小、电子设备所在的国家。
在一种可能的实现方式中,第二上下文特征包括以下一项或多项:第二页面的标识、第二页面中的文字、第二页面中视频的标识、第二页面中图片的标识、第二页面中音频的标识、用户的IP地域信息、访问时间、电子设备的设备类型、为电子设备的提供网络服务的运营商、电子设备的网络类型、电子设备的系统语言、电子设备的品牌、电子设备的型号、电子设备所需展示广告的场景、电子设备的显示界面中用于展示广告的区域的大小、电子设备所在的国家。
第六方面,本申请提供一种广告投放装置,部署于服务器,装置包括:通信模块和处理模块。其中,通信模块可以用于接收电子设备发送的第一消息,第一消息中包括与用户在电子设备上所访问的页面相关的上下文特征,上下文特征与用户的用户画像和/或用户行为无关。处理模块可以用于响应于第一消息,基于上下文特征,得到R个广告或用于指示R个广告的信息,R≥1。通信模块还可以用于向电子设备发送第二消息,第二消息用于指示电子设备显示R个广告。
在一种可能的实现方式中,处理模块在基于上下文特征,得到R个广告或用于指示R个广告的信息时,具体用于:利用第一模型对上下文特征进行处理,以得到第一特征向量,第一模型为神经网络模型;确定第一特征向量与K个第二特征向量间的相似度值,以得到K个相似度值,每个第二特征向量均用于表征一个广告的特征;从K个相似度值中筛选出Q个相似度值,其中,Q个相似度值中的每一个均大于K个相似度值中除Q个相似度值之外的相似度值,1≤Q≤K;将Q个相似度值各自所对应的广告作为R个广告,或者,将Q个相似度值各自所对应的指示广告的信息作为用于指示R个广告的信息。
在一种可能的实现方式中,上下文特征包括以下一项或多项:页面的标识、页面中的文字、页面中视频的标识、页面中图片的标识、页面中音频的标识、用户的IP地域信息、访问时间、电子设备的设备类型、为电子设备的提供网络服务的运营商、电子设备的网络类型、电子设备的系统语言、电子设备的品牌、电子设备的型号、电子设备所需展示广告的场景、电子设备的显示界面中用于展示广告的区域的大小、电子设备所在的国家。
第七方面,本申请提供一种电子设备,包括:显示屏;至少一个存储器,用于存储程序;至少一个处理器,用于执行存储器存储的程序;其中,当存储器存储的程序被执行时, 处理器用于执行第二方面或第二方面的任一种可能的实现方式所描述的方法。
第八方面,本申请提供一种服务器,包括:至少一个存储器,用于存储程序;至少一个处理器,用于执行存储器存储的程序;其中,当存储器存储的程序被执行时,处理器用于执行第三方面或第三方面的任一种可能的实现方式所描述的方法。
第九方面,本申请提供一种计算机可读存储介质,计算机可读存储介质存储有计算机程序,当计算机程序在处理器上运行时,使得处理器执行第一方面或第一方面的任一种可能的实现方式所描述的方法,或者,执行第二方面或第二方面的任一种可能的实现方式所描述的方法,或者,执行第三方面或第三方面的任一种可能的实现方式所描述的方法。
第十方面,本申请提供一种计算机程序产品,当计算机程序产品在处理器上运行时,使得处理器执行第一方面或第一方面的任一种可能的实现方式所描述的方法,或者,执行第二方面或第二方面的任一种可能的实现方式所描述的方法,或者,执行第三方面或第三方面的任一种可能的实现方式所描述的方法。
可以理解的是,上述第三方面至第十方面的有益效果可以参见上述第一方面至第二方面中的相关描述,在此不再赘述。
附图说明
图1是本申请实施例提供的一种广告召回方案的过程示意图;
图2是本申请实施例提供的一种基于双塔模型训练得到用户表示模型和广告表示模型的架构示意图;
图3是本申请实施例提供的一种基于双塔模型训练得到上下文表示模型和广告表示模型的架构示意图;
图4是本申请实施例提供的另一种广告召回方案的过程示意图;
图5是本申请实施例提供的一种模型训练方法的流程示意图;
图6是本申请实施例提供的一种广告投放方法的流程示意图;
图7是本申请实施例提供的一种基于上下文特征显示广告的步骤示意图;
图8是本申请实施例提供的一种针对同一用户使用不同手机在同一时刻浏览相同内容进行广告投放的对比示意图;
图9是本申请实施例提供的一种针对不同用户进行广告投放的对比示意图;
图10是本申请实施例提供的一种针对同一用户使用同一手机在不同时刻浏览不同内容进行广告投放的对比示意图;
图11是本申请实施例提供的一种模型训练装置的结构示意图;
图12是本申请实施例提供的一种广告投放装置的结构示意图;
图13是本申请实施例提供的一种广告投放装置的结构示意图。
具体实施方式
本文中术语“和/或”,是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。本文中符号“/”表示关联对象是或者的关系,例如A/B表示A或者B。
本文中的说明书和权利要求书中的术语“第一”和“第二”等是用于区别不同的对象,而不是用于描述对象的特定顺序。例如,第一响应消息和第二响应消息等是用于区别不同的 响应消息,而不是用于描述响应消息的特定顺序。
在本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。
在本申请实施例的描述中,除非另有说明,“多个”的含义是指两个或者两个以上,例如,多个处理单元是指两个或者两个以上的处理单元等;多个元件是指两个或者两个以上的元件等。
示例性的,为了实现面向用户的精准投放广告,可以基于用户画像与用户行为的特征数据,训练与用户画像有关的表示模型,并利用该模型,召回与用户最相关的广告,实现广告的精准投放。为了完成基于用户画像的广告表示召回技术,一般可以先基于双塔结构(用户塔、广告塔),分别对用户侧和广告侧的特征数据进行训练,以得到用户侧的表示模型(以下简称“用户表示模型”)和广告侧的表示模型(以下简称“广告表示模型”)。然后,在利用用户表示模型和广告表示模型实现面向用户的精准投放广告。
示例性的,图1示出了一种基于用户画像和用户行为的广告召回过程。如图1所示,该过程包括两个阶段,离线阶段和在线阶段。其中,离线阶段,是利用广告表示模型对各个广告的特征(比如:标题,分类,品牌,标签,文字内容,图片内容,或,视频内容等)的集合进行处理,得到各个广告的特征向量(以下简称“广告侧特征向量”)的集合。在线阶段,是在获取到用户画像和用户行为后,确定出用户的画像特征(比如:性别,年龄,或省份等)和用户的行为特征(比如点击的内容的分类、标题等);然后,利用用户表示模型在线实时对用户的画像特征和行为特征进行处理,以得到用户的特征向量(以下简称“用户侧特征向量”)。
在获取到用户侧特征向量后,可以通过余弦相似度等算法,计算用户侧特征向量和各个广告侧特征向量间的相似度,并选取一个或多个相似度较高的广告侧特征向量对应的广告进行投放,即得到待投放的广告,比如:对相似度由大到小排序后,可以将前5个相似度所对应的广告作为待投放的广告,由此实现从预先设定的广告集合中召回所需的广告。
在图1所示的广告召回方案中,必须需要用户画像和/或用户行为,但随着对用户信息的保护不断增强,使得越来越难以获取到用户画像和/或用户行为,致使难以利用用户表示模型进行广告的精准投放,导致广告投放效果较差。例如,当用户A使用手机浏览网页时,若通过用户A的注册信息确定出用户A的用户画像是:性别为“男”、年龄为“18至30岁”和所在城市为“S市”,通过用户A的操作行为确定出的用户行为一是:浏览内容的分类为“汽车”、标题为“新能源汽车降价了”和浏览时间为“上午8点”,用户行为二是:浏览内容的分类为“新能源”、标题为“有关新能源汽车的调研”和浏览时间为“上午8点20分”,则可以向用户A推荐适合在S市且符合20至30岁男性驾驶的新能源汽车的广告。但当用户A的用户数据(比如用户信息和/或操作行为等)受到保护时,将无法获取到用户A的用户画像和用户行为,从而导致无法获知到该向用户A推荐何种广告,在这种情况下很有可能推荐一些用户A不感兴趣的广告,导致广告投放效果较差。
示例性的,图2示出了一种基于双塔模型训练得到用户表示模型和广告表示模型的架构示意图。如图2所示,双塔模型训练装置200中包括用户塔装置210,广告塔装置220和双塔loss装置230。双塔模型训练装置200可以对用户塔装置210和广告塔装置220进行训练。 在双塔模型训练装置200训练完成后,用户塔装置210将转换成用户表示模型300并由双塔模型训练装置200输出,广告塔装置220将转换成广告表示模型400并由双塔模型训练装置200输出。
用户塔装置210中包括特征编码(embedding)装置211,特征连接(concatenate)装置212和主网络装置213。特征编码装置211用于对用户特征数据集中的各个用户画像特征和用户行为特征进行特征编码,以将稀疏的原始特征表示为稠密的特征向量。示例性的,特征编码装置211可以但不限于利用word2vec或item2vec等算法对用户特征数据集中的特征进行进行编码。特征连接装置212用于将特征编码装置211编码得到的各个不同的用户特征所对应的特征向量拼接为一个特征向量,其功能也可以理解是进行特征融合。主网络装置213用于控制特征连接装置212拼接后的特征向量在不同维度之间进行充分的特征交叉,以能够获取到更多的有效特征信息。其中,主网络装置213输出的特征向量可以用于表征某个用户。示例性的,主网络装置213的模型结构可以但不限于为深度神经网络(deep neural networks,DNN),多层神经网络(multi-layer perception,MLP),深度因子分解机(deep factorization machine,DeepFM),极深度因子分解机模型(extreme deep factorization machine,xDeepFM),深度交叉网络(deep cross network,DCN),或者,深度兴趣网络(deep interest network,DIN)等模型结构。
广告塔装置220中包括特征编码(embedding)装置221,特征连接(concatenate)装置222和主网络装置223。特征编码装置221用于对广告特征数据集中的各个广告特征进行特征编码,以将稀疏的原始特征表示为稠密的特征向量。特征连接装置222用于将特征编码装置221编码得到的各个不同的广告特征所对应的特征向量拼接为一个特征向量。主网络装置223用于控制特征连接装置222拼接后的特征向量在不同维度之间进行充分的特征交叉,以能够获取到更多的有效特征信息。其中,主网络装置223输出的特征向量可以用于表征某个广告。示例性的,主网络装置223的模型结构可以但不限于与主网络装置213相同。
双塔loss装置230是双塔模型训练装置200中的损失函数,主要基于余弦相似度等相似度比较方法,评估用户塔装置210和广告塔装置220的训练程度,并反向传播至用户塔装置210和广告塔装置220之中。
在利用双塔模型训练装置200训练用户塔装置210和广告塔装置220的过程中,可以不断基于双塔loss装置230输出的结果调整用户塔装置210中的模型参数,以使用户塔装置210输出的用户特征向量表征更准确;同时,可以不断基于双塔loss装置230输出的结果调整广告塔装置220中的模型参数,以使广告塔装置220输出的广告特征向量表征更准确。在训练完成后,双塔模型训练装置200可以将用户塔装置210在训练过程中训练效果最优的参数固化,以生成用户表示模型300,并输出;同时,可以将广告塔装置220在训练过程中训练效果最优的参数固化,以生成广告表示模型400,并输出。其中,用户表示模型300用于将在线的用户特征表示为特征向量,广告表示模型400用于将离线的广告特征表示为特征向量。
由图2可以看出,在模型训练过程中,也严重依赖用户特征。同时,在模型训练过程中,用户塔装置210和广告塔装置220之间没有交互,这就使得用户塔装置210和广告塔装置220之间的特征关联依赖于用户对广告的行为(即用户行为,比如浏览网页、浏览视频、点击广告、付费购买等),一旦用户行为无法获取,则将无法实现模型训练,或者,无法使用训练完成的模型。另外,在损失计算阶段,仅依赖于向量之间的相似度,损失计算过于单 一,使得最终得到的模型的表示效果相对较差。
有鉴于此,本申请实施例提供了一种模型训练方法,该方法可以利用上下文特征替代用户特征,从而降低了对用户特征的依赖。同时,该方法通过在双塔模型训练装置200中增加辅助网络,实现了用户塔装置210和广告塔装置220之间的交互建模,从而实现了上下文特征与广告特征的交互,使二者关联性增强,解决了双塔特征的信息交互问题,提升了最终得到的模型的表示效果。其中,上下文特征可以包括:与广告相关的内容上下文特征,和/或,与广告相关的环境上下文特征。示例性的,内容上下文特征可以是指用户访问广告时广告中所包含的内容的上下文记录,比如:网页文字,网页图片的标识,视频的标识,或者音频的标识等;环境上下文特征可以是指用户访问广告时相关的环境上下文记录,比如:互联网协议(internet protocol,IP)地域信息(即IP地址的归属地)、访问时间、电子设备的设备类型、为电子设备的提供网络服务的运营商、电子设备的网络类型、电子设备的系统语言、电子设备的品牌、电子设备的型号、电子设备所需展示广告的场景、电子设备的显示界面中用于展示广告的区域的大小、电子设备所在的国家等。
示例性的,图3示出了一种基于双塔模型训练得到上下文表示模型和广告表示模型的架构示意图。如图3所示,双塔模型训练装置300中包括用户塔装置310,广告塔装置320,双塔loss装置330,辅助网络模型340,和,辅助网络loss装置350。其中,用户塔装置310可以参考上述图2中对用户塔装置210的描述,将其中的用户特征数据集替换为上下文特征数据集即可,即图3中用户塔装置310所需的数据为上下文特征,此处不再赘述。广告塔装置320可以参考上述图2中对广告塔装置220的描述,此处不再赘述。双塔loss装置330可以参考上述图2中对双塔loss装置230的描述,此处不再赘述。示例性的,图3中所示的上下文特征数据集中可以包括:与广告相关的内容上下文特征,和/或,与广告相关的环境上下文特征,广告特征数据集中可以包括:广告的标题,分类,品牌,标签,文字内容,图片内容,或,视频内容等中的一项或多项。
辅助网络模型340是用于实现用户塔装置310和广告塔装置320之间的交互建模,从而实现了上下文特征与广告特征的交互,使二者关联性增强。辅助网络模型310的输入可以为:用户塔装置210在至少一个阶段的输出,和,广告塔装置220在至少一个阶段的输出。例如,辅助网络模型310的输入可以为特征编码装置311和321的输出,也可以为特征连接装置312和322的输出,亦可以为主网络装置313和323的输出,还可以是主网络装置313和323中某一网络层的输出,又可以是上述任意几种方式的组合,比如:可以是特征编码装置311的输出和主网络装置323的输出的组合等等,具体可根据实际情况而定,此处不做限定。辅助网络模型340的输出可以用于表征上下文特征与广告特征间的相关性。示例性的,辅助网络模型340的模型结构可以但不限于与主网络装置313或323的模型结构相同。在一些实施例中,辅助网络模型340可以是预先训练完成的,也可以是待训练的(即未进行训练的),具体可根据实际情况而定,此处不做限定。示例性的,在预先训练辅助网络模型340时,可以利用上下文特征数据集合广告特征数据集作为训练数据,以对辅助网络模型340进行训练。
辅助网络loss装置350是双塔模型训练装置300中的另一个损失函数,主要基于辅助网络模型340的输出结果和预先设定训练样本的样本标签,评估用户塔装置310、广告塔装置320和辅助网络模型340的训练程度,并反向传播至用户塔装置310、广告塔装置320和辅助网络模型340之中。
在利用双塔模型训练装置300训练用户塔装置310和广告塔装置320的过程中,可以不断基于双塔loss装置330输出的结果和辅助网络loss装置350输出的结果,调整用户塔装置310中的模型参数,以使用户塔装置310输出的上下文特征向量表征更准确;同时,可以不断基于双塔loss装置330输出的结果和辅助网络loss装置350输出的结果,调整广告塔装置320中的模型参数,以使广告塔装置320输出的广告特征向量表征更准确。在训练完成后,双塔模型训练装置300可以将用户塔装置310在训练过程中训练效果最优的参数固化,以生成上下文表示模型500,并输出;同时,可以将广告塔装置320在训练过程中训练效果最优的参数固化,以生成广告表示模型600,并输出。其中,上下文表示模型500用于将在线的上下文特征表示为特征向量,广告表示模型600用于将离线的广告特征表示为特征向量。
在获取到上下文表示模型500和广告表示模型600后。示例性的,图4示出了一种利用上下文表示模型500和广告表示模型600进行广告投放的示意图。如图4所示,该广告投放过程同样包括两个阶段,即离线阶段和在线阶段。其中,离线阶段,是利用广告表示模型600对各个广告的特征(比如:标题,分类,品牌,标签,文字内容,图片内容,或,视频内容等)的集合进行处理,得到各个广告的特征向量(以下简称“广告侧特征向量”)的集合。在线阶段,是在用户浏览网页的过程中,在经用户授权的情况下,可以获取与用户所访问的页面相关的上下文特征;然后,利用上下文表示模型500在线实时对该上下文特征进行处理,以得到上下文特征向量。在获取到上下文特征向量后,可以通过余弦相似度等算法,计算上下文特征向量和各个广告侧特征向量间的相似度,并选取一个相似度最高的广告侧特征向量对应的广告进行投放,即得到待投放的广告,由此实现在不依赖用户特征的情况下进行精准的广告投放。
接下来,基于图3和4中的内容对本申请实施例提供的一种模型训练方法,以及,一种广告投放方法进行介绍。
示例性的,图5示出了一种模型训练方法。可以理解,该方法可以通过任何具有计算、处理能力的装置、设备、平台、设备集群来执行。如图5所示,该模型训练方法,包括以下步骤:
S510、获取第一样本集,第一样本集中包括第一训练样本,第一训练样本包括广告的至少一个广告特征和广告对应的至少一个上下文特征。
本实施例中,第一样本集中可以包括至少一个训练样本。该第一样本集可以是用户预先设定的;当然,也可以是通过用户在终端设备(比如手机、电脑等)上的操作日志收集到训练样本的集合。示例性的,操作日志可以与广告相关的,也可以与广告无关。其中,第一样本集中的每个训练样本均可以包括一个广告的至少一个广告特征和该广告对应的至少一个上下文特征。不同的训练样本可以与不同的广告对应。例如,第一训练样本可以包括广告a的广告特征和广告a对应的上下文特征,第二训练样本可以包括广告b的广告特征和广告b对应的上下文特征。示例性的,每个广告特征均可以是广告的标题,分类,品牌,标签,文字内容,图片内容,或,视频内容等中的任意一项。每个上下文特征均可以是广告对应的内容上下文特征,和/或,广告对应的环境上下文特征。内容上下文特征可以包括用户访问广告时广告中所包含的内容的上下文记录,比如:网页文字,网页图片的标识,视频的标识,或者音频的标识等。环境上下文特征可以包括用户访问广告时相关的环境的上下文记录,比如:IP地址信息、访问时间、电子设备的设备类型、为电子设备的提供网络服务的运营商、 电子设备的网络类型、电子设备的系统语言、电子设备的品牌、电子设备的型号、电子设备所需展示广告的场景、电子设备的显示界面中用于展示广告的区域的大小、电子设备所在的国家等。在一些实施例中,第一样本集中的训练样本可以是正样本,也可以是负样本,具体可根据实际情况而定。
示例性的,第一样本集中所包含的上下文特征的集合可以理解为是前述图3中所描述的上下文特征数据集,第一样本集中所包含的广告特征的集合可以理解为是前述图3中所描述的广告特征数据集。
S520、通过第一模型对第一训练样本中包含的上下文特征进行处理,以得到第一特征向量,以及,通过第二模型对第一训练样本中包含的广告特征进行处理,以得到第二特征向量。
本实施例中,可以通过第一模型对第一训练样本中包含的上下文特征进行处理,以得到第一特征向量,以及,通过第二模型对第一训练样本中包含的广告特征进行处理,以得到第二特征向量。示例性的,第一模型可以理解为是前述图3中的用户塔装置310,第二模型可以理解为是前述图3中的广告塔装置320。其中,第一特征向量可以理解为是将第一训练样本中包含的上下文特征输入至用户塔装置310中后,用户塔装置310输出的结果;第二特征向量可以理解为是将第一训练样本中包含的广告特征输入至广告塔装置320中后,广告塔装置320输出的结果。
在一些实施例中,可以通过第一模型对第一训练样本中包含的上下文特征分别进行编码,以得到N个特征向量。示例性的,上下文特征与编码得到的特征向量间可以是一一对应的关系,当然也可以不是一一对应的关系,具体可根据实际情况而定。在N=1的情况下,可以通过第一模型对得到的特征向量进行处理,比如在不同维度进行充分的特征交叉等,以得到第一特征向量。在N≥2的情况下,可以先通过第一模型对得到的N个特征向量进行拼接,以将它们拼接为一个特征向量,然后,在通过第一模型对拼接后得到的特征向量进行处理,比如在不同维度进行充分的特征交叉等,以得到第一特征向量。
在一些实施例中,可以通过第二模型对第一训练样本中包含的广告特征分别进行编码,以得到M个特征向量。示例性的,广告特征与编码得到的特征向量间可以是一一对应的关系,当然也可以不是一一对应的关系,具体可根据实际情况而定。在M=1的情况下,可以通过第二模型对得到的特征向量进行处理,比如在不同维度进行充分的特征交叉等,以得到第二特征向量。在M≥2的情况下,可以先通过第二模型对得到的M个特征向量进行拼接,以将它们拼接为一个特征向量,然后,在通过第二模型对拼接后得到的特征向量进行处理,比如在不同维度进行充分的特征交叉等,以得到第二特征向量。
S530、通过第三模型对第一模型内至少一个阶段的处理结果和第二模型内至少一个阶段的处理结果进行处理,以得到第一相关性分数,第一相关性分数用于表征第一训练样本中包含的上下文特征和第一训练样本中包含的广告特征间的匹配程度。
本实施例中,可以通过第三模型对第一模型内至少一个阶段的处理结果和第二模型内至少一个阶段的处理结果进行处理,以得到第一相关性分数。该第一相关性分数可以用于表征第一训练样本中包含的上下文特征和第一训练样本中包含的广告特征间的匹配程度。示例性的,第三模型可以理解为是前述图3中的辅助网络装置340。示例性的,第三模型可以为神经网络模型,其可以用于在训练第一模型和第二模型过程中辅助计算第一样本集中训练样本对应的损失。
在一些实施例中,第一模型内至少一个阶段的处理结果可以是指:第一模型中任意一个或多个神经网络层输出的结果。当第一模型为前述图3中的用户塔装置310时,第一模型内至少一个阶段的处理结果可以是指:特征编码装置311输出的结果,特征连接装置312输出的结果,和,主网络装置313输出的结果中的一项或多项。
在一些实施例中,第二模型内至少一个阶段的处理结果可以是指:第二模型中任意一个或多个神经网络层输出的结果。当第一模型为前述图3中的广告塔装置320时,第二模型内至少一个阶段的处理结果可以是指:特征编码装置321输出的结果,特征连接装置322输出的结果,和,主网络装置323输出的结果中的一项或多项。
S540、根据第一特征向量、第二特征向量、第一相关性分数和第一训练样本的样本标签,得到第一训练样本对应的损失。
本实施例中,在获取到第一特征向量、第二特征向量和第一相关性分数后,可以根据第一特征向量、第二特征向量、第一相关性分数和第一训练样本的样本标签,确定出第一训练样本对应的损失。
在一些实施例中,可以先根据第一特征向量、第二特征向量和第一训练样本的样本标签,得到第一损失。然后,根据第一相关性分数和第一训练样本的样本标签,得到第二损失。最后,在根据第一损失和第二损失,得到第一训练样本对应的损失。其中,获取第一损失和第二损失的顺序可以根据实际情况而定,此处不做限定。
对于第一损失,可以但不限于基于余弦相似度等算法,对第一特征向量和第二特征向量进行处理,以得到两者间的相关性分数,该相关性分数可以用于表征第一训练样本中包含的上下文特征和第一训练样本中包含的广告特征间的匹配程度。接着,可以通过预设的损失函数对该相关性分数和第一训练样本的样本标签进行处理,以得到第一损失。示例性的,第一损失可以通过前述图3中所描述的双塔loss装置330处理得到。
对于第二损失,可以通过预设的损失函数对第一相关性分数和第一训练样本的样本标签进行处理,以得到第二损失。示例性的,第二损失可以通过前述图3中所描述的辅助网络loss装置350处理得到。
对于第一训练样本对应的损失,可以通过第一损失和第二损失相加得到,亦可以是加权平均得到,还可以是相乘得到,具体可根据实际情况而定,此处不做限定。
以上描述的是针对第一样本集中一个训练样本的处理过程。对于第一样本集中其他的训练样本,也可以参考第一训练样本的处理过程,以得到其他各个训练样本对应的损失,此处就不在一一赘述。
在确定出第一样本集中各个训练样本的损失后,可以执行S550。在一些实施例中,也可以每得到一个损失,就执行一次S550,或者每得到一批(比如2个,3个等)损失,就执行一次S550,具体可根据实际情况而定,此处不做限定。同时,这时S550中所描述的损失即为此时获取到的损失。
S550、基于第一样本集中至少一个训练样本对应的损失,训练第一模型和第二模型。
本实施例中,在获取到一个或多个训练样本对应的损失后,可以以最小化这些损失为目标,对第一模型和第二模型进行训练。当然,也可以同时对第三模型进行训练。示例性的,在获取到一个或多个训练样本对应的损失后,可以但不限于利用反向传播算法更新第一模型和第二模型中的参数,以完成对第一模型和第二模型的训练。
在一些实施例中,第一模型可以用于对与用户所访问的页面相关的上下文特征进行特征 提取,第二模型可以用于对广告进行特征提取。
由此,通过利用上下文特征替代用户特征进行模型训练,从而降低了后续使用模型过程中对用户特征的依赖。同时,在训练第一模型和第二模型的过程中增加第三模型,实现了第一模型和第二模型之间的交互建模,从而实现了上下文特征与广告特征的交互,使二者关联性增强,提升了最终得到的第一模型和第二模型的表示效果。
在训练出第一模型和第二模型之后,即可以利用这两个模型进行广告投放。其中,训练完毕的第一模型可以理解为是图3中所描述的上下文表示模型500,训练完毕的第二模型可以理解为是图3中所描述的广告表示模型600。
示例性的,图6示出了一种广告投放方法。可以理解,该方法可以通过任何具有计算、处理能力的装置、设备、平台、设备集群来执行。示例性的,该方法可以由具有显示屏的电子设备执行。如图6所示,该广告投放方法,包括以下步骤:
S610、获取用户对第一页面的访问操作。
本实施例中,当用户在电子设备上浏览某个页面时或者下发访问某个页面的指令后,电子设备即可以获取到用户对该页面的访问操作。
举例来说,以电子设备是手机为例,用户在使用手机过程中,在其使用手机上配置的浏览器时,当用户输入某个关键词,并点击搜索后,浏览器所呈现的界面可以为用户访问的第一页面,此时用户点击搜索的操作可以理解为访问操作。另外,用户在浏览器所呈现的界面中选择一个内容,并点击浏览该内容,之后浏览器所呈现的界面可以为用户访问的第一页面,此时用户点击浏览相关内容的操作可以理解为访问操作。
S620、响应于用户的访问操作,获取与第一页面相关的第一上下文特征,第一上下文特征与用户的用户画像和/或用户行为无关。
本实施例中,在经用户授权的情况下,可以主动获取用户所访问的页面的信息,并对这些信息进行分析,以确定出与该第一页面的内容相关的上下文特征,比如,该页面的标识、页面中的文字、视频、图片、音频的标识等等。和/或,在经用户授权的情况下,也可以获取用户访问该第一页面时的环境的上下文信息,以得到与访问第一页面的环境相关的上下文特征,比如,用户的IP地域信息、访问时间、电子设备的设备类型、为电子设备的提供网络服务的运营商、电子设备的网络类型、电子设备的系统语言、电子设备的品牌、电子设备的型号、电子设备所需展示广告的场景、电子设备的显示界面中用于展示广告的区域的大小、电子设备所在的国家等中的一项或多项。示例性的,电子设备上不同的显示界面可以用于向用户展示不同的内容。本实施例中,与第一页面的内容和/或与访问第一页面的环境相关的上下文特征均与用户的用户画像和/或用户行为无关。示例性的,第一上下文特征可以包括与第一页面的内容相关的上下文特征,和/或,与访问第一页面的环境相关的上下文特征。其中,第一上下文特征与用户的用户画像和/或用户行为无关。
S630、基于第一上下文特征,显示f个广告,f≥1。
本实施例中,在获取到第一上下文特征后,可以显示f个广告,f≥1。
作为一种可能的实现方式,在电子设备中可以配置有前述图3中训练出的上下文表示模型500(以下简称“第一模型”)。此时,如图7所示,基于第一上下文特征显示f个广告,具体可以包括:
S6311、利用第一模型对第一上下文特征进行处理,以得到第一特征向量。
本实施例中,获取到上下文特征后,可以将该第一上下文特征输入至通过前述模型训练 得到的第一模型中,以利用第一模型对上下文特征进行处理,得到第一特征向量。
S6312、确定第一特征向量与K个第二特征向量间的相似度值,以得到K个相似度值,每个第二特征向量均用于表征一个广告的特征。
本实施例中,可以预先利用通过前述模型训练得到的第二模型对待投放的K个广告的特征进行处理,以得到K个第二特征向量。其中,一个第二特征向量与一个广告对应。每个第二特征向量均用于表征一个广告的特征。接着,在获取到第一特征向量后,可以通过余弦相似度等算法,确定出第一特征向量与K个第二特征向量间的相似度值,以得到K个相似度值。
S6313、从K个相似度值中筛选出Q个相似度值,其中,Q个相似度值中的每一个均大于K个相似度值中除Q个相似度值之外的相似度值,1≤Q≤K。
本实施例中,在获取到K个相似度值后,可以对这K个相似度值进行排序,比如由大到小或由小到大等。然后,在从中选取出Q个较大的相似度值。其中,这Q个相似度值中的每一个均大于K个相似度值中除Q个相似度值之外的相似度值,1≤Q≤K。示例性的,Q的值可以但不限于预先设定。举例来说,若Q等于2,K=4,且K个相似度值为:2、4、6、7,则筛选出的相似度值为6和7。示例性的,S6311至S6313可以理解为是:基于上下文特征,得到Q个广告或得到用于指示Q个广告的信息(即得到Q个广告指示信息)的过程。其中,在筛选出Q个相似度值后,可以将这Q个相似度值各自所对应的广告作为所需投放的广告,或者,将Q个相似度值各自所对应的指示广告的信息作为用于指示所需投放的广告的信息。其中,所需投放的广告的数量与Q值相同,所需投放的广告的信息的数量也与Q值相同。示例性的,所需投放的广告的数量或所需投放的广告的信息的数量也可以用其他的数量表示,比如k个、R个、g个等,但这些数值均与筛选出的Q个相似度值中的Q相同。
S6314、显示Q个相似度值各自对应的广告,其中,Q个相似度值各自对应的广告为f个广告。
本实施例中,筛选出Q个相似度值后,可以将这Q个相似度值各自所对应的广告作为此次所需投放的广告,并显示这些广告,以使用户能够浏览到该广告。其中,Q个相似度值各自对应的广告为S630中所描述的f个广告。
由此即实现基于第一上下文特征显示f个广告。
作为另一种可能的实现方式,前述图7中的S6311至S6313可以通过其他的设备执行,比如通过服务器等。以服务器执行为例,此时,电子设备在获取到第一上下文特征后,可以向服务器发送包含有第一上下文特征的消息。服务器获取到电子设备发送的消息后,可以执行图7中的S6311至S6313。服务器在执行完S6313后,可以向电子设备发送用于指示电子设备显示Q个相似度值各自对应的广告的消息。示例性的,服务器向电子设备发送的消息中可以包括Q个相似度值各自对应的广告(即Q个广告),或者,用于生成Q个广告的广告指示信息。当电子设备接收到服务器发送的消息后,电子设备可以显示这Q个广告。示例性的,广告指示信息中可以包括Q个广告的要素、模板、模板的标识等等。在该种实现方式中,电子设备中可以配置有第一模型,也可以未配置有第一模型,此处不做限定。示例性的,广告指示信息也可以称之为为用于指示广告的信息。
作为又一种可能的实现方式,前述图7中的S6312和S6313可以通过其他的设备执行,比如通过服务器等。以服务器执行为例,此时,电子设备在获取到第一特征向量后,可以向服务器发送包含有该第一特征向量的消息。服务器获取到电子设备发送的消息后,可以执行 图7中的S6312和S6313。服务器在执行完S6313后,可以向电子设备发送用于指示电子设备显示Q个相似度值各自对应的广告的消息。示例性的,服务器向电子设备发送的消息中可以包括Q个相似度值各自对应的广告(即Q个广告),或者,用于生成Q个广告的广告指示信息。当电子设备接收到服务器发送的消息后,电子设备可以显示这Q个广告。示例性的,广告指示信息中可以包括Q个广告的要素、模板、模板的标识等等。在该种实现方式中,电子设备中可以配置有第一模型。示例性的,广告指示信息也可以称之为为用于指示广告的信息。
作为再一种可能的实现方式,前述图7中的S6311可以通过其他的设备执行,比如通过服务器等。以服务器执行为例,此时,电子设备在获取到第一上下文特征后,可以向服务器发送包含有第一上下文特征的消息,该消息可以用于指示服务器对第一上下文特征进行特征提取。服务器获取到电子设备发送的消息后,可以执行图7中的S6311。服务器在执行完S6311后,可以向电子设备发送包含有第一特征向量的消息。之后,电子设备可以执行图7中的S6312至S6314。
由此,在进行广告投放时,通过利用上下文特征替代用户特征,降低了对用户特征的依赖,实现了在无法获取用户特征(比如用户画像、用户行为等)时,利用与用户所访问的页面相关的上下文特征,进行广告的精准投放,解决了用户信息的隐私保护与广告精准投放之间互相博弈的问题。
在一些实施例中,在S630之后,当用户在电子设备上进行页面切换时,电子设备还可以获取用户对第二页面的第二访问操作。然后,电子设备可以响应于第二访问操作,获取与第二页面相关的第二上下文特征,其中,第二上下文特征与用户的用户画像和/或用户行为无关、最后,电子设备可以基于第二上下文特征,显示g个广告,g≥1,其中,g个广告中至少一部分广告与f个广告中的广告不同。示例性的,第二上下文特征可以包括第二页面的标识、第二页面中的文字、第二页面中视频的标识、第二页面中图片的标识、第二页面中音频的标识、用户的IP地域信息、访问时间、电子设备的设备类型、为电子设备的提供网络服务的运营商、电子设备的网络类型、电子设备的系统语言、电子设备的品牌、电子设备的型号、电子设备所需展示广告的场景(比如是开机场景还是使用某个应用的场景等)、电子设备的显示界面中用于展示广告的区域的大小、电子设备所在的国家等中的一项或多项。在一些实施例中,在S630之后的执行步骤,可以参见前述图6中的描述,在图6中将第一页面替换为第二页面,将第一上下文特征替换为第二上下文特征,将g个广告替换为f个广告即可,此处不再赘述。另外,对于基于第二上下文特征显示g个广告的过程,可以参见前述基于第一上下文特征显示f个广告的描述,只需将前述的第一上下文特征替换为第二上下文特征,将第一特征向量替换为第二特征向量,将g个广告替换为f个广告即可,此处不再赘述。其中,第二上下文特征可以包括以下一项或多项:第二页面的标识、第二页面中的文字、第二页面中视频的标识、第二页面中图片的标识、第二页面中音频的标识、用户的IP地域信息、访问时间、用户所使用的电子设备的类型、运营商和联网方式。
为便于理解,下面举例进行说明。
如图8所示,用户A携带有两个手机,分别为手机1和手机2。手机1的联网方式为第四代移动通信技术(the 4th generation mobile communication technology,4G),手机2的联网方式为第五代移动通信技术(the 5th generation mobile communication technology,5G)。手机1和手机2的运营商不同,且两者的生产商也不同。在使用本实施例中提供的广告投放方法时,当用户A分别使用手机1和手机2在同一时间浏览同一页面 时,由于在手机1上浏览页面时与页面的内容相关的上下文特征和在手机2上浏览页面时与页面的内容相关的上下文特征相同,当两者的与页面相关的环境上下文不同,因此在用户使用手机1和手机2浏览同一页面时向用户A推荐的广告可以不同。其中,继续参阅图8,向用户A所使用的手机1上推荐的广告可以是:中档的纯电新能源汽车;向用户A所使用的手机2上推荐的广告可以是:高档的混电新能源汽车。
另外,当用户A和用户B使用相同类型的手机,比如两者所使用的手机的联网方式、运营商和生产商均相同等,且在同一时间同一地点访问同一页面时。由于本实施例中是基于用户所访问的页面的上下文特征进行广告推荐,且两者所访问的页面的上下文特征相同,因此可以向两者推荐相同的广告。作为对比,当利用用户特征进行广告推荐时,虽然两者所访问的页面的上下文特征相同,但由于两者的用户特征不同,因此向两者推荐的广告是不同的。此外,如图9所示,在关闭用户画像的情况下,当两个不同地区的用户,浏览的页面的内容上下文一致,但与该页面相关的环境上下文不一致,同时,在广告池里存放有两个广告。通过对这两个用户的所访问的页面的上下文特征进行分析,并与广告池中的广告的特征进行匹配,可以确定出向用户A推荐中档且纯电的新能源汽车的广告,向用户B推荐高档且混电的新能源汽车。
此外,当用户使用同一手机在不同时间浏览不同页面时,由于不同的页面中所包含的内容不同。因此,在用户切换页面时,可以同步更换投放的广告。例如,如图10所示,用户A在上午8:10浏览的是与汽车相关的页面,在上午8:11浏览的是与游戏相关的页面,即用户在使用手机过程中进行了页面切换。在广告池中存放有两个广告,广告一是游戏类广告,广告二是汽车类广告。由于用户A在上午8:10浏览的是与汽车相关的内容,因此可以在此时投放与车相关的广告,即广告二。由于用户A在上午8:11浏览的是与游戏相关的内容,因此可以在此时投放与游戏相关的广告,即广告一。
可以理解的是,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。此外,在一些可能的实现方式中,上述实施例中的各步骤可以根据实际情况选择性执行,可以部分执行,也可以全部执行,此处不做限定。
基于上述实施例中的方法,本申请实施例还提供了一种模型训练装置。
示例性的,图11示出了一种模型训练装置。如图11所示,该模型训练装置1100包括:获取模块1110和处理模块1120。其中,获取模块1110用于获取第一样本集,第一样本集中包括第一训练样本,第一训练样本包括广告的至少一个广告特征和广告对应的至少一个上下文特征。处理模块1120用于通过第一模型对至少一个上下文特征进行处理,以得到第一特征向量,以及,通过第二模型对至少一个广告特征进行处理,以得到第二特征向量。处理模块1120还用于通过第三模型对第一模型内至少一个阶段的处理结果和第二模型内至少一个阶段的处理结果进行处理,以得到第一相关性分数,第一相关性分数用于表征至少一个上下文特征和至少一个广告特征间的匹配程度。处理模块1120还用于根据第一特征向量、第二特征向量、第一相关性分数和第一训练样本的样本标签,得到第一训练样本对应的损失。处理模块1120还用于基于第一样本集中至少一个训练样本对应的损失,训练第一模型和第二模型。
在一些实施例中,处理模块1120在通过第一模型对至少一个上下文特征进行处理,以 得到第一特征向量时,具体用于:通过第一模型对至少一个上下文特征进行编码,以得到N个第三特征向量,N≥1;其中,在N=1的情况下,通过第一模型对N个第三特征向量进行处理,以得到第一特征向量;在N≥2的情况下,通过第一模型对N个第三特征向量进行拼接,以得到一个第四特征向量,以及,通过第一模型对第四特征向量进行处理,以得到第一特征向量。
在一些实施例中,处理模块1120在通过第二模型对至少一个广告特征进行处理,以得到第二特征向量时,具体用于:通过第二模型对至少一个广告特征进行编码,以得到M个第五特征向量,M≥1;其中,在M=1的情况下,通过第二模型对M个第五特征向量进行处理,以得到第二特征向量;在M≥2的情况下,通过第二模型对M个第五特征向量进行拼接,以得到一个第六特征向量,以及,通过第二模型对第六特征向量进行处理,以得到第二特征向量。
在一些实施例中,处理模块1120在根据第一特征向量、第二特征向量、第一相关性分数和第一训练样本的样本标签,得到第一训练样本对应的损失时,具体用于:根据第一特征向量、第二特征向量和第一训练样本的样本标签,得到第一损失;根据第一相关性分数和第一训练样本的样本标签,得到第二损失;根据第一损失和第二损失,得到第一训练样本对应的损失。
在一些实施例中,处理模块1120在根据第一特征向量、第二特征向量和第一训练样本的样本标签,得到第一损失时,具体用于:根据第一特征向量和第二特征向量,确定第二相关性分数,第二相关性分数用于表征至少一个上下文特征和至少一个广告特征间的匹配程度;根据第二相关性分数和第一训练样本的样本标签,得到第一损失。
在一些实施例中,处理模块1120,还用于:基于第一样本集中至少一个训练样本对应的损失,训练第三模型。
在一些实施例中,训练后的第一模型用于对与用户所访问的页面相关的上下文特征进行特征提取,训练后的第二模型用于对广告进行特征提取。
在一些实施例中,第三模型为神经网络模型,用于在训练第一模型和第二模型过程中辅助计算第一样本集中训练样本对应的损失。
应当理解的是,上述装置用于执行上述实施例中描述的模型训练方法,装置中相应的程序模块,其实现原理和技术效果与上述方法中的描述类似,该装置的工作过程可参考上述方法中的对应过程,此处不再赘述。
基于上述实施例中的方法,本申请实施例还提供了一种广告投放装置。
示例性的,图12示出了一种广告投放装置。该广告投放装置可以部署于具有显示屏的电子设备中。如图12所示,该广告投放装置1200包括:获取模块1210和显示模块1220。其中,获取模块用于获取用户对第一页面的访问操作;以及,响应于访问操作,获取与第一页面相关的第一上下文特征,其中,上下文特征与用户的用户画像和/或用户行为无关。显示模块1220用于基于第一上下文特征,显示f个广告,f≥1。
在一些实施例中,在显示模块1220显示f个广告之后,获取模块1210,还用于获取用户对第二页面的第二访问操作,以及,响应于第二访问操作,获取与第二页面相关的第二上下文特征,其中,第二上下文特征与用户的用户画像和/或用户行为无关。显示模块1220,还用于基于第二上下文特征,显示g个广告,g≥1,其中,g个广告中至少一部分广告与f 个广告中的广告不同。
在一些实施例中,装置还包括:处理模块(图中未示出),用于利用第一模型对上下文特征进行处理,以得到第一特征向量,第一模型为神经网络模型,上下文特征为第一上下文特征或第二上下文特征。处理模块,还用于确定第一特征向量与K个第二特征向量间的相似度值,以得到K个相似度值,每个第二特征向量均用于表征一个广告的特征。处理模块,还用于从K个相似度值中筛选出Q个相似度值,其中,Q个相似度值中的每一个均大于K个相似度值中除Q个相似度值之外的相似度值,1≤Q≤K。显示模块1220,用于显示Q个相似度值各自对应的广告,其中,当上下文特征为第一上下文特征时,Q个相似度值各自对应的广告为f个广告,当上下文特征为第二上下文特征时,Q个相似度值各自对应的广告为g个广告。
在一些实施例中,装置还包括:通信模块(图中未示出),用于向服务器发送第一消息,第一消息中包含上下文特征,上下文特征为第一上下文特征或第二上下文特征。通信模块,还用于接收服务器发送的第二消息,第二消息中包括Q个广告或广告指示信息,广告指示信息用于生成Q个广告,其中,当上下文特征为第一上下文特征时,Q个广告为f个广告,当上下文特征为第二上下文特征时,Q个广告为g个广告。显示模块1220,用于显示Q个广告。
在一些实施例中,装置还包括:处理模块(图中未示出),用于利用第一模型对上下文特征进行处理,以得到第一特征向量,第一模型为神经网络模型,上下文特征为第一上下文特征或第二上下文特征。通信模块,用于向服务器发送第一消息,第一消息中包含第一特征向量。通信模块,还用于接收服务器发送的第二消息,第二消息中包括Q个广告或广告指示信息,广告指示信息用于生成Q个广告,其中,当上下文特征为第一上下文特征时,Q个广告为f个广告,当上下文特征为第二上下文特征时,Q个广告为g个广告。显示模块1220,用于显示Q个广告。
在一些实施例中,装置还包括:通信模块(图中未示出),用于向服务器发送第一消息,第一消息中包含上下文特征,第一消息用于指示服务器对上下文特征进行特征提取,上下文特征为第一上下文特征或第二上下文特征。通信模块,还用于接收服务器发送的第二消息,第二消息中包括服务器基于上下文特征提取到的第一特征向量。处理模块(图中未示出),用于确定第一特征向量与K个第二特征向量间的相似度值,以得到K个相似度值,每个第二特征向量均用于表征一个广告的特征。处理模块,还用于从K个相似度值中筛选出Q个相似度值,其中,Q个相似度值中的每一个均大于K个相似度值中除Q个相似度值之外的相似度值,1≤Q≤K。显示模块1220,用于显示Q个相似度值各自对应的广告,其中,当上下文特征为第一上下文特征时,Q个相似度值各自对应的广告为f个广告,当上下文特征为第二上下文特征时,Q个相似度值各自对应的广告为g个广告。
在一些实施例中,第一上下文特征包括以下一项或多项:第一页面的标识、第一页面中的文字、第一页面中视频的标识、第一页面中图片的标识、第一页面中音频的标识、用户的IP地域信息、访问时间、电子设备的设备类型、为电子设备的提供网络服务的运营商、电子设备的网络类型、电子设备的系统语言、电子设备的品牌、电子设备的型号、电子设备所需展示广告的场景、电子设备的显示界面中用于展示广告的区域的大小、电子设备所在的国家。
在一些实施例中,第二上下文特征包括以下一项或多项:第二页面的标识、第二页面中的文字、第二页面中视频的标识、第二页面中图片的标识、第二页面中音频的标识、用户的 IP地域信息、访问时间、电子设备的设备类型、为电子设备的提供网络服务的运营商、电子设备的网络类型、电子设备的系统语言、电子设备的品牌、电子设备的型号、电子设备所需展示广告的场景、电子设备的显示界面中用于展示广告的区域的大小、电子设备所在的国家。
应当理解的是,上述装置用于执行上述实施例中描述的广告投放方法,装置中相应的程序模块,其实现原理和技术效果与上述方法中的描述类似,该装置的工作过程可参考上述方法中的对应过程,此处不再赘述。
基于上述实施例中的方法,本申请实施例还提供了一种广告投放装置。
示例性的,图13示出了一种广告投放装置。该广告投放装置可以部署于服务器中。如图13所示,该广告投放装置1300包括:通信模块1310和处理模块1320。其中,通信模块1310可以用于接收电子设备发送的第一消息,第一消息中包括与用户在电子设备上所访问的页面相关的上下文特征,上下文特征与用户的用户画像和/或用户行为无关。处理模块1320可以用于响应于第一消息,基于上下文特征,得到R个广告或用于指示R个广告的信息,R≥1。通信模块1310还可以用于向电子设备发送第二消息,第二消息用于指示电子设备显示R个广告。
在一些实施例中,处理模块1320在基于上下文特征,得到R个广告或用于指示R个广告的信息时,具体用于:利用第一模型对上下文特征进行处理,以得到第一特征向量,第一模型为神经网络模型;确定第一特征向量与K个第二特征向量间的相似度值,以得到K个相似度值,每个第二特征向量均用于表征一个广告的特征;从K个相似度值中筛选出Q个相似度值,其中,Q个相似度值中的每一个均大于K个相似度值中除Q个相似度值之外的相似度值,1≤Q≤K;将Q个相似度值各自所对应的广告作为R个广告,或者,将Q个相似度值各自所对应的指示广告的信息作为用于指示R个广告的信息。
在一些实施例中,上下文特征包括以下一项或多项:页面的标识、页面中的文字、页面中视频的标识、页面中图片的标识、页面中音频的标识、用户的IP地域信息、访问时间、用户所使用的电子设备的类型、运营商和联网方式。
应当理解的是,上述装置用于执行上述实施例中描述的广告投放方法,装置中相应的程序模块,其实现原理和技术效果与上述方法中的描述类似,该装置的工作过程可参考上述方法中的对应过程,此处不再赘述。
基于上述实施例中的方法,本申请实施例提供了一种电子设备。该电子设备可以包括:显示屏;至少一个存储器,用于存储程序;至少一个处理器,用于执行所述存储器存储的程序。其中,当所述存储器存储的程序被执行时,所述处理器用于执行上述实施例中所描述的方法。示例性的,该电子设备可以为是手机、平板电脑、桌面型计算机、膝上型计算机、手持计算机、笔记本电脑、服务器、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本,以及蜂窝电话、个人数字助理(personal digital assistant,PDA)、增强现实(augmented reality,AR)设备、虚拟现实(virtual reality,VR)设备、人工智能(artificial intelligence,AI)设备、可穿戴式设备、车载设备、智能家居设备和/或智慧城市设备,本申请实施例对该电子设备的具体类型不作特殊限制。
基于上述实施例中的方法,本申请实施例提供了一种服务器。该服务器可以包括:至少一个存储器,用于存储程序;至少一个处理器,用于执行所述存储器存储的程序。其中,当 所述存储器存储的程序被执行时,所述处理器用于执行上述实施例中所描述的方法。示例性的,该服务器可以但不限于为云服务器,虚拟机、硬件服务器,等等。本申请实施例对该服务器的具体类型不作特殊限制。
基于上述实施例中的方法,本申请实施例提供了一种计算机可读存储介质,计算机可读存储介质存储有计算机程序,当计算机程序在处理器上运行时,使得处理器执行上述实施例中的方法。
基于上述实施例中的方法,本申请实施例提供了一种计算机程序产品,当计算机程序产品在处理器上运行时,使得处理器执行上述实施例中的方法。
可以理解的是,本申请的实施例中的处理器可以是中央处理单元(central processing unit,CPU),还可以是其他通用处理器、数字信号处理器(digital signal processor,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现场可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、晶体管逻辑器件,硬件部件或者其任意组合。通用处理器可以是微处理器,也可以是任何常规的处理器。
本申请的实施例中的方法步骤可以通过硬件的方式来实现,也可以由处理器执行软件指令的方式来实现。软件指令可以由相应的软件模块组成,软件模块可以被存放于随机存取存储器(random access memory,RAM)、闪存、只读存储器(read-only memory,ROM)、可编程只读存储器(programmable rom,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)、寄存器、硬盘、移动硬盘、CD-ROM或者本领域熟知的任何其它形式的存储介质中。一种示例性的存储介质耦合至处理器,从而使处理器能够从该存储介质读取信息,且可向该存储介质写入信息。当然,存储介质也可以是处理器的组成部分。处理器和存储介质可以位于ASIC中。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者通过所述计算机可读存储介质进行传输。所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。
可以理解的是,在本申请的实施例中涉及的各种数字编号仅为描述方便进行的区分,并不用来限制本申请的实施例的范围。

Claims (42)

  1. 一种模型训练方法,其特征在于,所述方法包括:
    获取第一样本集,所述第一样本集中包括第一训练样本,所述第一训练样本包括广告的至少一个广告特征和所述广告对应的至少一个上下文特征;
    通过第一模型对所述至少一个上下文特征进行处理,以得到第一特征向量,以及,通过第二模型对所述至少一个广告特征进行处理,以得到第二特征向量;
    通过第三模型对所述第一模型内至少一个阶段的处理结果和所述第二模型内至少一个阶段的处理结果进行处理,以得到第一相关性分数,所述第一相关性分数用于表征所述至少一个上下文特征和所述至少一个广告特征间的匹配程度;
    根据所述第一特征向量、所述第二特征向量、所述第一相关性分数和所述第一训练样本的样本标签,得到所述第一训练样本对应的损失;
    基于所述第一样本集中至少一个训练样本对应的损失,训练所述第一模型和所述第二模型。
  2. 根据权利要求1所述的方法,其特征在于,所述通过第一模型对所述至少一个上下文特征进行处理,以得到第一特征向量,具体包括:
    通过所述第一模型对所述至少一个上下文特征进行编码,以得到N个第三特征向量,N≥1;
    其中,在N=1的情况下,通过所述第一模型对所述N个第三特征向量进行处理,以得到所述第一特征向量;
    在N≥2的情况下,通过所述第一模型对所述N个第三特征向量进行拼接,以得到一个第四特征向量,以及,通过所述第一模型对所述第四特征向量进行处理,以得到所述第一特征向量。
  3. 根据权利要求1或2所述的方法,其特征在于,所述通过第二模型对所述至少一个广告特征进行处理,以得到第二特征向量,具体包括:
    通过所述第二模型对所述至少一个广告特征进行编码,以得到M个第五特征向量,M≥1;
    其中,在M=1的情况下,通过所述第二模型对所述M个第五特征向量进行处理,以得到所述第二特征向量;
    在M≥2的情况下,通过所述第二模型对所述M个第五特征向量进行拼接,以得到一个第六特征向量,以及,通过所述第二模型对所述第六特征向量进行处理,以得到所述第二特征向量。
  4. 根据权利要求1-3任一所述的方法,其特征在于,所述根据所述第一特征向量、所述第二特征向量、所述第一相关性分数和所述第一训练样本的样本标签,得到所述第一训练样本对应的损失,具体包括:
    根据所述第一特征向量、所述第二特征向量和所述第一训练样本的样本标签,得到第一损失;
    根据所述第一相关性分数和所述第一训练样本的样本标签,得到第二损失;
    根据所述第一损失和所述第二损失,得到所述第一训练样本对应的损失。
  5. 根据权利要求4所述的方法,其特征在于,所述根据所述第一特征向量、所述第二特征向量和所述第一训练样本的样本标签,得到第一损失,具体包括:
    根据所述第一特征向量和所述第二特征向量,确定第二相关性分数,所述第二相关性分数用于表征所述至少一个上下文特征和所述至少一个广告特征间的匹配程度;
    根据所述第二相关性分数和所述第一训练样本的样本标签,得到所述第一损失。
  6. 根据权利要求1-5任一所述的方法,其特征在于,所述方法还包括:
    基于所述第一样本集中至少一个训练样本对应的损失,训练所述第三模型。
  7. 根据权利要求1-6任一所述的方法,其特征在于,所述第三模型为神经网络模型,用于在训练所述第一模型和所述第二模型过程中辅助计算所述第一样本集中训练样本对应的损失。
  8. 根据权利要求1-7任一所述的方法,其特征在于,训练后的所述第一模型用于对与用户所访问的页面相关的上下文特征进行特征提取,训练后的所述第二模型用于对广告进行特征提取。
  9. 一种广告投放方法,其特征在于,应用于具有显示屏的电子设备,所述方法包括:
    获取用户对第一页面的第一访问操作;
    响应于所述第一访问操作,获取与所述第一页面相关的第一上下文特征,其中,所述第一上下文特征与所述用户的用户画像和/或用户行为无关;
    基于所述第一上下文特征,显示f个广告,f≥1。
  10. 根据权利要求9所述的方法,其特征在于,在所述显示f个广告之后,所述方法还包括:
    获取用户对第二页面的第二访问操作;
    响应于所述第二访问操作,获取与所述第二页面相关的第二上下文特征,其中,所述第二上下文特征与所述用户的用户画像和/或用户行为无关;
    基于所述第二上下文特征,显示g个广告,g≥1,其中,所述g个广告中至少一部分广告与所述f个广告中的广告不同。
  11. 根据权利要求9或10所述的方法,其特征在于,基于上下文特征显示广告,具体包括:
    利用第一模型对所述上下文特征进行处理,以得到第一特征向量,所述第一模型为神经网络模型,所述上下文特征为所述第一上下文特征或所述第二上下文特征;
    确定所述第一特征向量与K个第二特征向量间的相似度值,以得到K个相似度值,每个所述第二特征向量均用于表征一个广告的特征;
    从所述K个相似度值中筛选出Q个相似度值,其中,所述Q个相似度值中的每一个均大于所述K个相似度值中除所述Q个相似度值之外的相似度值,1≤Q≤K;
    显示所述Q个相似度值各自对应的广告,其中,当所述上下文特征为所述第一上下文特征时,所述Q个相似度值各自对应的广告为所述f个广告,当所述上下文特征为所述第二上下文特征时,所述Q个相似度值各自对应的广告为所述g个广告。
  12. 根据权利要求9或10所述的方法,其特征在于,基于上下文特征显示广告,具体包括:
    向服务器发送第一消息,所述第一消息中包含所述上下文特征,所述上下文特征为所述第一上下文特征或所述第二上下文特征;
    接收所述服务器发送的第二消息,所述第二消息中包括Q个广告或广告指示信息,所述广告指示信息用于生成所述Q个广告,其中,当所述上下文特征为所述第一上下文特征时,所述Q个广告为所述f个广告,当所述上下文特征为所述第二上下文特征时,所述Q个广告为所述g个广告;
    显示所述Q个广告。
  13. 根据权利要求9或10所述的方法,其特征在于,基于上下文特征显示广告,具体包括:
    利用第一模型对所述上下文特征进行处理,以得到第一特征向量,所述第一模型为神经网络模型,所述上下文特征为所述第一上下文特征或所述第二上下文特征;
    向服务器发送第一消息,所述第一消息中包含所述第一特征向量;
    接收所述服务器发送的第二消息,所述第二消息中包括Q个广告或广告指示信息,所述广告指示信息用于生成所述Q个广告,其中,当所述上下文特征为所述第一上下文特征时,所述Q个广告为所述f个广告,当所述上下文特征为所述第二上下文特征时,所述Q个广告为所述g个广告;
    显示所述Q个广告。
  14. 根据权利要求9或10所述的方法,其特征在于,基于上下文特征显示广告,具体包括:
    向服务器发送第一消息,所述第一消息中包含所述上下文特征,所述第一消息用于指示所述服务器对所述上下文特征进行特征提取,所述上下文特征为所述第一上下文特征或所述第二上下文特征;
    接收所述服务器发送的第二消息,所述第二消息中包括所述服务器基于所述上下文特征提取到的第一特征向量;
    确定所述第一特征向量与K个第二特征向量间的相似度值,以得到K个相似度值,每个所述第二特征向量均用于表征一个广告的特征;
    从所述K个相似度值中筛选出Q个相似度值,其中,所述Q个相似度值中的每一个均大于所述K个相似度值中除所述Q个相似度值之外的相似度值,1≤Q≤K;
    显示所述Q个相似度值各自对应的广告,其中,当所述上下文特征为所述第一上下文特征时,所述Q个相似度值各自对应的广告为所述f个广告,当所述上下文特征为所述第二上 下文特征时,所述Q个相似度值各自对应的广告为所述g个广告。
  15. 根据权利要求9-14任一所述的方法,其特征在于,所述第一上下文特征包括以下一项或多项:所述第一页面的标识、所述第一页面中的文字、所述第一页面中视频的标识、所述第一页面中图片的标识、所述第一页面中音频的标识、所述用户的IP地域信息、访问时间、所述电子设备的设备类型、为所述电子设备的提供网络服务的运营商、所述电子设备的网络类型、所述电子设备的系统语言、所述电子设备的品牌、所述电子设备的型号、所述电子设备所需展示广告的场景、所述电子设备的显示界面中用于展示广告的区域的大小、所述电子设备所在的国家。
  16. 根据权利要求10-15任一所述的方法,其特征在于,所述第二上下文特征包括以下一项或多项:所述第二页面的标识、所述第二页面中的文字、所述第二页面中视频的标识、所述第二页面中图片的标识、所述第二页面中音频的标识、所述用户的IP地域信息、访问时间、所述电子设备的设备类型、为所述电子设备的提供网络服务的运营商、所述电子设备的网络类型、所述电子设备的系统语言、所述电子设备的品牌、所述电子设备的型号、所述电子设备所需展示广告的场景、所述电子设备的显示界面中用于展示广告的区域的大小、所述电子设备所在的国家。
  17. 一种广告投放方法,其特征在于,应用于服务器,所述方法包括:
    接收电子设备发送的第一消息,所述第一消息中包括与用户在所述电子设备上所访问的页面相关的上下文特征,所述上下文特征与所述用户的用户画像和/或用户行为无关;
    响应于所述第一消息,基于所述上下文特征,得到R个广告或用于指示R个广告的信息,R≥1;
    向所述电子设备发送第二消息,所述第二消息用于指示所述电子设备显示所述R个广告。
  18. 根据权利要求17所述的方法,其特征在于,所述方法还包括:
    利用第一模型对所述上下文特征进行处理,以得到第一特征向量,所述第一模型为神经网络模型;
    确定所述第一特征向量与K个第二特征向量间的相似度值,以得到K个相似度值,每个所述第二特征向量均用于表征一个广告的特征;
    从所述K个相似度值中筛选出Q个相似度值,其中,所述Q个相似度值中的每一个均大于所述K个相似度值中除所述Q个相似度值之外的相似度值,1≤Q≤K;
    将所述Q个相似度值各自所对应的广告作为所述R个广告,或者,将所述Q个相似度值各自所对应的指示广告的信息作为所述用于指示R个广告的信息
  19. 根据权利要求17或18所述的方法,其特征在于,所述上下文特征包括以下一项或多项:所述页面的标识、所述页面中的文字、所述页面中视频的标识、所述页面中图片的标识、所述页面中音频的标识、所述用户的IP地域信息、访问时间、所述用户所使用的电子设备的类型、运营商和联网方式。
  20. 一种模型训练装置,其特征在于,所述装置包括:
    获取模块,用于获取第一样本集,所述第一样本集中包括第一训练样本,所述第一训练样本包括广告的至少一个广告特征和所述广告对应的至少一个上下文特征;
    处理模块,用于通过第一模型对所述至少一个上下文特征进行处理,以得到第一特征向量,以及,通过第二模型对所述至少一个广告特征进行处理,以得到第二特征向量;
    所述处理模块,还用于通过第三模型对所述第一模型内至少一个阶段的处理结果和所述第二模型内至少一个阶段的处理结果进行处理,以得到第一相关性分数,所述第一相关性分数用于表征所述至少一个上下文特征和所述至少一个广告特征间的匹配程度;
    所述处理模块,还用于根据所述第一特征向量、所述第二特征向量、所述第一相关性分数和所述第一训练样本的样本标签,得到所述第一训练样本对应的损失;
    所述处理模块,还用于基于所述第一样本集中至少一个训练样本对应的损失,训练所述第一模型和所述第二模型。
  21. 根据权利要求20所述的装置,其特征在于,所述处理模块在通过第一模型对所述至少一个上下文特征进行处理,以得到第一特征向量时,具体用于:
    通过所述第一模型对所述至少一个上下文特征进行编码,以得到N个第三特征向量,N≥1;
    其中,在N=1的情况下,通过所述第一模型对所述N个第三特征向量进行处理,以得到所述第一特征向量;
    在N≥2的情况下,通过所述第一模型对所述N个第三特征向量进行拼接,以得到一个第四特征向量,以及,通过所述第一模型对所述第四特征向量进行处理,以得到所述第一特征向量。
  22. 根据权利要求20或21所述的装置,其特征在于,所述处理模块在通过第二模型对所述至少一个广告特征进行处理,以得到第二特征向量时,具体用于:
    通过所述第二模型对所述至少一个广告特征进行编码,以得到M个第五特征向量,M≥1;
    其中,在M=1的情况下,通过所述第二模型对所述M个第五特征向量进行处理,以得到所述第二特征向量;
    在M≥2的情况下,通过所述第二模型对所述M个第五特征向量进行拼接,以得到一个第六特征向量,以及,通过所述第二模型对所述第六特征向量进行处理,以得到所述第二特征向量。
  23. 根据权利要求20-22任一所述的装置,其特征在于,所述处理模块在根据所述第一特征向量、所述第二特征向量、所述第一相关性分数和所述第一训练样本的样本标签,得到所述第一训练样本对应的损失时,具体用于:
    根据所述第一特征向量、所述第二特征向量和所述第一训练样本的样本标签,得到第一损失;
    根据所述第一相关性分数和所述第一训练样本的样本标签,得到第二损失;
    根据所述第一损失和所述第二损失,得到所述第一训练样本对应的损失。
  24. 根据权利要求23所述的装置,其特征在于,所述处理模块在根据所述第一特征向量、所述第二特征向量和所述第一训练样本的样本标签,得到第一损失时,具体用于:
    根据所述第一特征向量和所述第二特征向量,确定第二相关性分数,所述第二相关性分数用于表征所述至少一个上下文特征和所述至少一个广告特征间的匹配程度;
    根据所述第二相关性分数和所述第一训练样本的样本标签,得到所述第一损失。
  25. 根据权利要求20-24任一所述的装置,其特征在于,所述处理模块,还用于:
    基于所述第一样本集中至少一个训练样本对应的损失,训练所述第三模型。
  26. 根据权利要求20-25任一所述的装置,其特征在于,所述第三模型为神经网络模型,用于在训练所述第一模型和所述第二模型过程中辅助计算所述第一样本集中训练样本对应的损失。
  27. 根据权利要求20-26任一所述的装置,其特征在于,训练后的所述第一模型用于对与用户所访问的页面相关的上下文特征进行特征提取,训练后的所述第二模型用于对广告进行特征提取。
  28. 一种广告投放装置,其特征在于,部署于具有显示屏的电子设备,所述装置包括:
    获取模块,用于获取用户对第一页面的第一访问操作;
    所述获取模块,还用于响应于所述第一访问操作,获取与所述第一页面相关的第一上下文特征,其中,所述第一上下文特征与所述用户的用户画像和/或用户行为无关;
    显示模块,用于基于所述第一上下文特征,显示f个广告,f≥1。
  29. 根据权利要求28所述的装置,其特征在于,在所述显示模块显示f个广告之后,所述获取模块,还用于获取用户对第二页面的第二访问操作,以及,响应于所述第二访问操作,获取与所述第二页面相关的第二上下文特征,其中,所述第二上下文特征与所述用户的用户画像和/或用户行为无关;
    所述显示模块,还用于基于所述第二上下文特征,显示g个广告,g≥1,其中,所述g个广告中至少一部分广告与所述f个广告中的广告不同。
  30. 根据权利要求28或29所述的装置,其特征在于,所述装置还包括:
    处理模块,用于利用第一模型对所述上下文特征进行处理,以得到第一特征向量,所述第一模型为神经网络模型,所述上下文特征为所述第一上下文特征或所述第二上下文特征;
    所述处理模块,还用于确定所述第一特征向量与K个第二特征向量间的相似度值,以得到K个相似度值,每个所述第二特征向量均用于表征一个广告的特征;
    所述处理模块,还用于从所述K个相似度值中筛选出Q个相似度值,其中,所述Q个相似度值中的每一个均大于所述K个相似度值中除所述Q个相似度值之外的相似度值,1≤Q≤K;
    所述显示模块,用于显示所述Q个相似度值各自对应的广告,其中,当所述上下文特征为所述第一上下文特征时,所述Q个相似度值各自对应的广告为所述f个广告,当所述上下 文特征为所述第二上下文特征时,所述Q个相似度值各自对应的广告为所述g个广告。
  31. 根据权利要求28或29所述的装置,其特征在于,所述装置还包括:
    通信模块,用于向服务器发送第一消息,所述第一消息中包含所述上下文特征,所述上下文特征为所述第一上下文特征或所述第二上下文特征;
    所述通信模块,还用于接收所述服务器发送的第二消息,所述第二消息中包括Q个广告或广告指示信息,所述广告指示信息用于生成所述Q个广告,其中,当所述上下文特征为所述第一上下文特征时,所述Q个广告为所述f个广告,当所述上下文特征为所述第二上下文特征时,所述Q个广告为所述g个广告;
    所述显示模块,用于显示所述Q个广告。
  32. 根据权利要求28或29所述的装置,其特征在于,所述装置还包括:
    处理模块,用于利用第一模型对所述上下文特征进行处理,以得到第一特征向量,所述第一模型为神经网络模型,所述上下文特征为所述第一上下文特征或所述第二上下文特征;
    通信模块,用于向服务器发送第一消息,所述第一消息中包含所述第一特征向量;
    所述通信模块,还用于接收所述服务器发送的第二消息,所述第二消息中包括Q个广告或广告指示信息,所述广告指示信息用于生成所述Q个广告,其中,当所述上下文特征为所述第一上下文特征时,所述Q个广告为所述f个广告,当所述上下文特征为所述第二上下文特征时,所述Q个广告为所述g个广告;
    所述显示模块,用于显示所述Q个广告。
  33. 根据权利要求28或29所述的装置,其特征在于,所述装置还包括:
    通信模块,用于向服务器发送第一消息,所述第一消息中包含所述上下文特征,所述第一消息用于指示所述服务器对所述上下文特征进行特征提取,所述上下文特征为所述第一上下文特征或所述第二上下文特征;
    所述通信模块,还用于接收所述服务器发送的第二消息,所述第二消息中包括所述服务器基于所述上下文特征提取到的第一特征向量;
    处理模块,用于确定所述第一特征向量与K个第二特征向量间的相似度值,以得到K个相似度值,每个所述第二特征向量均用于表征一个广告的特征;
    所述处理模块,还用于从所述K个相似度值中筛选出Q个相似度值,其中,所述Q个相似度值中的每一个均大于所述K个相似度值中除所述Q个相似度值之外的相似度值,1≤Q≤K;
    所述显示模块,用于显示所述Q个相似度值各自对应的广告,其中,当所述上下文特征为所述第一上下文特征时,所述Q个相似度值各自对应的广告为所述f个广告,当所述上下文特征为所述第二上下文特征时,所述Q个相似度值各自对应的广告为所述g个广告。
  34. 根据权利要求28-33任一所述的装置,其特征在于,所述第一上下文特征包括以下一项或多项:所述第一页面的标识、所述第一页面中的文字、所述第一页面中视频的标识、所述第一页面中图片的标识、所述第一页面中音频的标识、所述用户的IP地域信息、访问时间、所述电子设备的设备类型、为所述电子设备的提供网络服务的运营商、所述电子设备的 网络类型、所述电子设备的系统语言、所述电子设备的品牌、所述电子设备的型号、所述电子设备所需展示广告的场景、所述电子设备的显示界面中用于展示广告的区域的大小、所述电子设备所在的国家。
  35. 根据权利要求29-34任一所述的装置,其特征在于,所述第二上下文特征包括以下一项或多项:所述第二页面的标识、所述第二页面中的文字、所述第二页面中视频的标识、所述第二页面中图片的标识、所述第二页面中音频的标识、所述用户的IP地域信息、访问时间、所述电子设备的设备类型、为所述电子设备的提供网络服务的运营商、所述电子设备的网络类型、所述电子设备的系统语言、所述电子设备的品牌、所述电子设备的型号、所述电子设备所需展示广告的场景、所述电子设备的显示界面中用于展示广告的区域的大小、所述电子设备所在的国家。
  36. 一种广告投放装置,其特征在于,部署于服务器,所述装置包括:
    通信模块,用于接收电子设备发送的第一消息,所述第一消息中包括与用户在所述电子设备上所访问的页面相关的上下文特征,所述上下文特征与所述用户的用户画像和/或用户行为无关;
    处理模块,用于响应于所述第一消息,基于所述上下文特征,得到R个广告或用于指示R个广告的信息,R≥1;
    所述通信模块,还用于向所述电子设备发送第二消息,所述第二消息用于指示所述电子设备显示所述R个广告。
  37. 根据权利要求36所述的装置,其特征在于,所述处理模块在基于上下文特征,得到R个广告或用于指示R个广告的信息时,具体用于:
    利用第一模型对所述上下文特征进行处理,以得到第一特征向量,所述第一模型为神经网络模型;
    确定所述第一特征向量与K个第二特征向量间的相似度值,以得到K个相似度值,每个所述第二特征向量均用于表征一个广告的特征;
    从所述K个相似度值中筛选出Q个相似度值,其中,所述Q个相似度值中的每一个均大于所述K个相似度值中除所述Q个相似度值之外的相似度值,1≤Q≤K;
    将所述Q个相似度值各自所对应的广告作为所述R个广告,或者,将所述Q个相似度值各自所对应的指示广告的信息作为所述用于指示R个广告的信息。
  38. 根据权利要求36或37所述的装置,其特征在于,所述上下文特征包括以下一项或多项:所述页面的标识、所述页面中的文字、所述页面中视频的标识、所述页面中图片的标识、所述页面中音频的标识、所述用户的IP地域信息、访问时间、所述用户所使用的电子设备的类型、运营商和联网方式。
  39. 一种电子设备,其特征在于,包括:
    显示屏;
    至少一个存储器,用于存储程序;
    至少一个处理器,用于执行所述存储器存储的程序;
    其中,当所述存储器存储的程序被执行时,所述处理器用于执行如权利要求9-16任一所述的方法。
  40. 一种服务器,其特征在于,包括:
    至少一个存储器,用于存储程序;
    至少一个处理器,用于执行所述存储器存储的程序;
    其中,当所述存储器存储的程序被执行时,所述处理器用于执行如权利要求17-19任一所述的方法。
  41. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,当所述计算机程序在处理器上运行时,使得所述处理器执行如权利要求1-19任一所述的方法。
  42. 一种计算机程序产品,其特征在于,当所述计算机程序产品在处理器上运行时,使得所述处理器执行如权利要求1-19任一所述的方法。
PCT/CN2022/118950 2022-09-15 2022-09-15 一种模型训练方法、广告投放方法、装置及电子设备 WO2024055228A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/118950 WO2024055228A1 (zh) 2022-09-15 2022-09-15 一种模型训练方法、广告投放方法、装置及电子设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/118950 WO2024055228A1 (zh) 2022-09-15 2022-09-15 一种模型训练方法、广告投放方法、装置及电子设备

Publications (1)

Publication Number Publication Date
WO2024055228A1 true WO2024055228A1 (zh) 2024-03-21

Family

ID=90274131

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/118950 WO2024055228A1 (zh) 2022-09-15 2022-09-15 一种模型训练方法、广告投放方法、装置及电子设备

Country Status (1)

Country Link
WO (1) WO2024055228A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140229271A1 (en) * 2013-02-11 2014-08-14 Vindico Llc System and method to analyze and rate online advertisement placement quality and potential value
CN105373941A (zh) * 2015-11-20 2016-03-02 小米科技有限责任公司 广告投放方法和装置
CN112308588A (zh) * 2019-07-31 2021-02-02 北京达佳互联信息技术有限公司 广告的投放方法、装置及存储介质
CN112446727A (zh) * 2019-09-04 2021-03-05 百度在线网络技术(北京)有限公司 广告触发的方法、装置、设备及计算机可读存储介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140229271A1 (en) * 2013-02-11 2014-08-14 Vindico Llc System and method to analyze and rate online advertisement placement quality and potential value
CN105373941A (zh) * 2015-11-20 2016-03-02 小米科技有限责任公司 广告投放方法和装置
CN112308588A (zh) * 2019-07-31 2021-02-02 北京达佳互联信息技术有限公司 广告的投放方法、装置及存储介质
CN112446727A (zh) * 2019-09-04 2021-03-05 百度在线网络技术(北京)有限公司 广告触发的方法、装置、设备及计算机可读存储介质

Similar Documents

Publication Publication Date Title
JP6814298B2 (ja) 警告するための方法と装置
CN110825957B (zh) 基于深度学习的信息推荐方法、装置、设备及存储介质
CN111444428A (zh) 基于人工智能的信息推荐方法、装置、电子设备及存储介质
WO2017181612A1 (zh) 个性化视频推荐方法及装置
CN107862553A (zh) 广告实时推荐方法、装置、终端设备及存储介质
WO2020156389A1 (zh) 信息推送方法和装置
US20180336045A1 (en) Determining agents for performing actions based at least in part on image data
WO2020107624A1 (zh) 信息推送方法、装置、电子设备及计算机可读存储介质
CN114036398B (zh) 内容推荐和排序模型训练方法、装置、设备以及存储介质
WO2021155691A1 (zh) 用户画像生成方法、装置、存储介质及设备
CN106610970A (zh) 基于协同过滤的内容推荐系统与方法
CN112364204A (zh) 视频搜索方法、装置、计算机设备及存储介质
CN113407851B (zh) 基于双塔模型的确定推荐信息的方法、装置、设备和介质
CN113569129A (zh) 点击率预测模型处理方法、内容推荐方法、装置及设备
CN111897950A (zh) 用于生成信息的方法和装置
WO2023231542A1 (zh) 表示信息的确定方法、装置、设备及存储介质
CN111552884A (zh) 用于内容推荐的方法和设备
CN116051192A (zh) 处理数据的方法和装置
CN113297525A (zh) 网页分类方法、装置、电子设备、及存储介质
CN110827078B (zh) 一种信息推荐方法、装置、设备及存储介质
CN112381236A (zh) 联邦迁移学习的数据处理方法、装置、设备及存储介质
WO2023082864A1 (zh) 内容推荐模型的训练方法、装置、设备及存储介质
CN112115354A (zh) 信息处理方法、装置、服务器及存储介质
WO2024055228A1 (zh) 一种模型训练方法、广告投放方法、装置及电子设备
CN111507471B (zh) 一种模型训练方法、装置、设备及存储介质

Legal Events

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

Ref document number: 22958421

Country of ref document: EP

Kind code of ref document: A1