WO2024002167A1 - 一种操作预测方法及相关装置 - Google Patents

一种操作预测方法及相关装置 Download PDF

Info

Publication number
WO2024002167A1
WO2024002167A1 PCT/CN2023/103227 CN2023103227W WO2024002167A1 WO 2024002167 A1 WO2024002167 A1 WO 2024002167A1 CN 2023103227 W CN2023103227 W CN 2023103227W WO 2024002167 A1 WO2024002167 A1 WO 2024002167A1
Authority
WO
WIPO (PCT)
Prior art keywords
feature extraction
extraction network
user
recommendation
information
Prior art date
Application number
PCT/CN2023/103227
Other languages
English (en)
French (fr)
Inventor
王奕超
郭慧丰
董振华
唐睿明
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2024002167A1 publication Critical patent/WO2024002167A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3438Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment monitoring of user actions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent

Definitions

  • the present application relates to the field of artificial intelligence, and in particular, to an operation prediction method and related devices.
  • Artificial intelligence is a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
  • artificial intelligence is a branch of computer science that attempts to understand the nature of intelligence and produce a new class of intelligent machines that can respond in a manner similar to human intelligence.
  • Artificial intelligence is the study of the design principles and implementation methods of various intelligent machines, so that the machines have the functions of perception, reasoning and decision-making.
  • Selection rate prediction refers to predicting the user's probability of selecting an item in a specific environment. For example, in recommendation systems for applications such as app stores and online advertising, selection rate prediction plays a key role; selection rate prediction can maximize corporate profits and improve user satisfaction. The recommendation system must also consider the user's selection rate of items. And item bidding, where the selection rate is predicted by the recommendation system based on the user's historical behavior, and the item bidding represents the system's revenue after the item is selected/downloaded. For example, you can build a function that can calculate a function value based on the predicted user selection rate and item bidding, and the recommendation system sorts items in descending order according to the function value.
  • the recommendation system includes a variety of recommendation scenarios: browser, negative screen, video streaming, etc.
  • Users behave differently in different scenarios based on their preferences, and each scenario has user-specific behavioral characteristics. Normally, each scenario is modeled separately. Independently model a single scene. Since the same user will have different behaviors in different scenes, it is impossible to effectively capture the user's behavioral characteristics in different scenes. And when there are many scenes, each scene must be modeled independently and Maintenance will cause a large consumption of manpower and resources.
  • a feature extraction network is used to extract features in multiple scenarios, due to the different features between different scenarios, the network cannot learn common behavioral characteristics, resulting in poor prediction accuracy of operational information.
  • This application can extract common features (that is, scene-independent features) in different scenarios through the first feature extraction network, and use the fusion results of the features and scene-related features to predict the operation information, which can improve the prediction accuracy of the operation information.
  • this application provides an operation prediction method.
  • the method includes: obtaining attribute information of users and items in a target recommendation scenario; according to the attribute information, respectively through the first feature extraction network and the second feature extraction network, obtain The first embedding representation and the second embedding representation, the first embedding representation is a feature unrelated to the recommendation scene information, and the second embedding representation is a feature related to the target recommendation scene; the first embedding representation and the second embedding representation are used for fusion to obtain fusion
  • the fused embedding representation for example, matrix multiplication and other fusion methods can be used
  • the user's target operation information for the item is predicted.
  • the first feature extraction network is used to extract features that are not related to the recommended scene information, that is, the unbiased feature representation (invariant representation) of each scene, and combine it with the features related to the recommended scene information (the embodiment of this application can be called
  • the fusion of bias representation can indicate that each scene has user-specific behavioral characteristics, and it can also express user-specific behavioral characteristics between different scenarios, improving the prediction accuracy of subsequent operation information prediction.
  • the attribute information includes the user's operation data in the target recommendation scenario, and the operation data also includes the user's first operation information on the item;
  • the method also includes: predicting the user's second operation information on the item through the first neural network according to the attribute information; predicting the first recommendation scenario of the operation data according to the attribute information through the second neural network; wherein the first operation information and The difference between the second operation information and the difference between the first recommendation scene and the target recommendation scene is used to determine the first loss; according to the first loss, the gradient corresponding to the network is extracted from the third feature in the first neural network Orthogonalize the gradient corresponding to the fourth feature extraction network in the second neural network to obtain the first gradient corresponding to the initial feature extraction network; update the third feature extraction network according to the first gradient to obtain the first feature carry Take the network.
  • the idea of the embodiments of this application is that by training the third feature extraction network, the trained third feature extraction network can identify the unbiased feature representation (invariant representation) shared in each scene.
  • the embodiments of this application pass The second neural network is set up. Since the second neural network is to identify the recommended scene where the operation data is located, the embedded representation obtained based on the fourth feature extraction network in the second neural network can carry semantics that are strongly related to the recommended scene. Information, this part of semantic information that is strongly related to the recommendation scene does not need to be carried in the unbiased feature representation.
  • the embodiment of this application can be called bias representation (scenario representation)
  • the embodiment of this application when determining the gradients used to update the third feature extraction network and the fourth feature extraction network, orthogonalization processing is performed on the gradients of the third feature extraction network and the fourth feature extraction network, and the orthogonalization processing can constrain the third The gradient directions (that is, the update directions of parameters) of the feature extraction network and the fourth feature extraction network are orthogonal to each other or close to orthogonal to each other.
  • the embedded representations extracted by the third feature extraction network and the fourth feature extraction network can have different information, realizing the separation of embedded representations.
  • the updated The embedding representation extracted by the fourth feature extraction network has semantic information strongly related to the recommended scene, and the first neural network is used to identify operation information.
  • the trained first neural network has a better prediction of the user's operation behavior. Therefore, the third feature extraction network after training can identify the information used to identify the operation information (that is, the outer edge of the information), and this information does not have semantic information that is strongly related to the recommended scene. Improves the generalization of the recommendation model in various scenarios.
  • an additional neural network may be deployed for orthogonalizing the gradient corresponding to the third feature extraction network and the gradient corresponding to the fourth feature extraction network.
  • a constraint term can be added to the first loss, and the constraint term is used to orthogonally constrain the gradient corresponding to the third feature extraction network and the gradient corresponding to the fourth feature extraction network.
  • the gradient corresponding to the initial third feature extraction network and the gradient corresponding to the fourth feature extraction network can be The gradients corresponding to the four feature extraction networks are orthogonalized, so that the directions of the obtained first gradient and the gradient corresponding to the fourth feature extraction network are orthogonal (or close to orthogonal).
  • the information indicating the target recommendation scene is not used as the input of the third feature extraction network and the fourth feature extraction network.
  • the first operation information is used as the ground truth when training the third feature extraction network, the first operation information does not need to be input into the first feature extraction network during the feedforward process. Since the information indicating the target recommendation scene is the ground truth when training the fourth feature extraction network, the information indicating the target recommendation scene does not need to be input to the third feature extraction network in the feedforward process.
  • the unbiased representation obtained by the third feature extraction network and the biased representation obtained by the fourth feature extraction network can be combined (or called fusion), and the combination is
  • the final representation can still have high prediction ability after passing through the neural network (used for operating information prediction).
  • the unbiased representation obtained by the third feature extraction network and the biased representation obtained by the fourth feature extraction network can be input into the fourth neural network to predict the user's fifth operation information on the item; The difference between the fifth operation information and the first operation information is used to determine the first loss.
  • the unbiased representation obtained by the third feature extraction network and the biased representation obtained by the fourth feature extraction network can be fused (such as splicing operation), and the fusion result is input to the fourth neural network.
  • the fourth The neural network and the first neural network may have the same or similar network structure. For details, please refer to the introduction about the first neural network in the above embodiments, which will not be described again here.
  • the unbiased representation obtained by the third feature extraction network and the biased representation obtained by the fourth feature extraction network can be input into the fourth neural network to obtain the user's fifth operation information on the item, And construct the first loss based on the difference between the fifth operation information and the first operation information (that is, the true value). That is to say, the first loss includes in addition to the difference between the above-mentioned first operation information and the second operation information, and In addition to the loss item for the difference between the first recommendation scenario and the target recommendation scenario, the difference between the fifth operation information and the first operation information may also be included.
  • the difference between the target operation information and the first operation information is used to determine the second loss; the method further includes: updating the first feature extraction network according to the second loss.
  • the trained third feature extraction network needs to be connected to the operation information prediction network related to the scene, and each scene corresponds to an operation information prediction related to the scene.
  • the network is reasoning, in order to predict the user's operation information on items in a certain recommendation scenario (recommendation scenario A), the attribute information of the user and the item will be input to the trained third feature extraction network on the one hand to obtain the embedded representation ( For example, the first embedding representation), the attribute information of the user and items will be input to the feature extraction network related to the recommended scene A (or input to the feature extraction network related to each scene, and then weighted based on the weight of the scene), so as to The embedded representation (for example, the second embedded representation) is obtained.
  • the first embedded representation and the second embedded representation can be fused and input into the operation information prediction network corresponding to the recommended scenario A to obtain the predicted operation information (for example, target operation information).
  • the third feature extraction network in addition to the gradient obtained by backpropagation based on the output of the first neural network (for example, the first gradient), it is also necessary to predict based on the operation information corresponding to each scene
  • the output of the network (such as target operation information) is updated by backpropagating the obtained gradient (such as the second gradient).
  • the above-mentioned gradient is a gradient related to a specific scene (for example, the second gradient).
  • This gradient (for example, the second gradient) will have a negative impact (for example, each other) on the gradient obtained based on the unbiased representation (for example, the first gradient).
  • the direction of parameter update between gradients For example, gradient A and gradient B are gradients in opposite directions. If gradient A and gradient B are directly superimposed and then updated, it is equivalent to no parameter update) and cannot make good use of each other. Use effective information to improve the effect of the corresponding scene.
  • the third feature extraction network is first updated based on the gradient obtained from the unbiased representation, and then, on the one hand, the third feature extraction network is updated based on the feature extraction network related to the recommended scenario (such as the second feature extraction network) ( Or input to the feature extraction network related to each scene, and then weighted based on the weight of the scene) to process the attribute information of the user and items to obtain the embedded representation (such as the second embedded representation).
  • the third feature extraction network is first updated based on the gradient obtained from the unbiased representation, and then, on the one hand, the third feature extraction network is updated based on the feature extraction network related to the recommended scenario (such as the second feature extraction network) ( Or input to the feature extraction network related to each scene, and then weighted based on the weight of the scene) to process the attribute information of the user and items to obtain the embedded representation (such as the second embedded representation).
  • the third feature extraction network is first updated based on the gradient obtained from the unbiased representation, and then, on the one hand, the third feature extraction network is updated based on
  • the first embedding representation and the second embedding representation can be fused and input into the operation information prediction network corresponding to the recommended scenario A to obtain the predicted operation information (such as target operation information), and obtain the loss (such as the second loss) based on the target operation information. , and determine the gradient (for example, the second gradient) based on the second loss, and update the first feature extraction network according to the second gradient.
  • the predicted operation information such as target operation information
  • the loss such as the second loss
  • this application does not update the third feature extraction after combining the gradient obtained based on the unbiased representation and the gradient obtained based on the operation information related to the scene. Instead, the third feature extraction is updated based on the gradient obtained based on the unbiased representation.
  • the first feature extraction network is updated based on the gradient obtained from the operation information related to the scene, so that the gradient related to the specific scene is the same as the gradient obtained based on the unbiased representation. There is no negative impact between gradients, and effective information between each other can be well utilized to improve the effect of the corresponding scene.
  • obtaining the first embedding representation and the second embedding representation through the first feature extraction network and the second feature extraction network respectively according to the attribute information includes: according to the attribute information, through the second feature extraction network, Obtain the second embedding representation; according to the attribute information, obtain the second embedding representation through the second feature extraction network, including: according to the attribute information, obtain multiple embedding representations through multiple feature extraction networks including the second feature extraction network ; Wherein, each feature extraction network corresponds to a recommendation scenario, and the second feature extraction network corresponds to the target recommendation scenario; multiple embedding representations are fused to obtain the second embedding representation.
  • multiple embedding representations are fused, including: predicting the probability value of the attribute information corresponding to each recommended scenario based on the attribute information; using each probability value as the weight of the corresponding recommended scenario, and comparing multiple Embedded representations are fused.
  • corresponding feature extraction networks can be set up for each recommendation scenario.
  • attribute information will be input into each feature extraction network.
  • Each feature extraction network can output an embedding representation and multiple feature extractions. Multiple embedding representations output by the network can be fused.
  • the weight (or probability value) corresponding to each recommended scenario can be determined based on attribute information, and multiple embedding representations can be made based on the probability value. fusion to obtain the second embedding representation.
  • the probability value of the attribute information corresponding to each recommended scenario can be obtained based on the attribute information; each probability value is used as the weight of the corresponding recommended scenario, and multiple embedding representations are fused to obtain the second Embedded representation. For example, you can do a weighted sum.
  • the fourth neural network can be used to obtain the probability values of the attribute information corresponding to each recommended scenario.
  • the fourth neural network can reuse the second neural network and use the output probabilities for each recommended scenario as multiple Embedding representation weights, you can also choose to retrain end-to-end a fourth neural network with recommended scene prediction capabilities to achieve efficient fusion of multiple scene information.
  • the model in each iteration, can be updated based on the gradient obtained from a batch of data.
  • the same batch of data can contain operational data for different recommendation scenarios. For example, it can contain the first Based on the operation data of the second recommendation scenario, a loss (for example, the third loss in the embodiment of the present application) and the gradient used to update the first feature extraction network can also be obtained based on the operation data of the second recommendation scenario.
  • a loss for example, the third loss in the embodiment of the present application
  • the gradient used to update the first feature extraction network can also be obtained based on the operation data of the second recommendation scenario.
  • the gradient obtained based on the second loss and the gradient obtained based on the third loss are gradients obtained under different recommendation scenarios, they may have negative impacts on each other (parameter update directions will conflict with each other, such as gradient A and gradient B are gradients in opposite directions. If gradient A and gradient B are directly superimposed and then updated, it is equivalent to not updating the parameters), and the effective information between each other cannot be well utilized to improve the effect of the
  • the gradient obtained based on the second loss and the gradient obtained based on the third loss are orthogonalized, thereby reducing the mutual negative direction between the gradients obtained in different recommendation scenarios. Influence.
  • the user's operation data (including attribute information) in the second recommendation scene can be obtained; based on the operation data in the second recommendation scene, the user's operation information on items in the second recommendation scene is predicted (
  • the attribute information of the user's operation data in the second recommendation scenario can be input into the feature extraction network corresponding to the second recommendation scenario.
  • the embedding representation can be input into the neural network corresponding to the second recommended scene (used to predict the operation information of the second recommended scene) to obtain the corresponding prediction result), and the prediction result can be combined with the operation data in the second recommended scene.
  • the true value of the operation information is used to determine the third loss.
  • the third loss can obtain the gradient corresponding to the first feature extraction network (a third gradient) during backpropagation.
  • multiple third gradients of the first feature extraction network can be obtained by orthogonalizing multiple gradients corresponding to the first feature extraction network based on the second loss and the third loss, Among them, one gradient among the plurality of third gradients is obtained according to the second loss, and one gradient among the plurality of third gradients is obtained according to the third loss; the plurality of third gradients are fused (for example, through vector summation). fusion) to obtain the second gradient corresponding to the first feature extraction network; according to the second gradient, the first feature extraction network is updated.
  • the operation data includes information indicating the target recommendation scenario; the method also includes: obtaining a third embedding representation through a second feature extraction network according to the operation data; and obtaining a third embedding representation through a third neural network according to the third embedding representation. , predict the user's third operation information on the item; wherein the difference between the third operation information and the first operation information is used to determine the fourth loss; according to the fourth loss, the third neural network and the second feature extraction network are updated.
  • the above-mentioned weighted fusion method based on the embedding representations of multiple feature extraction networks can make the second embedding representation obtained after the fusion have more information about the corresponding recommendation scenarios and contain less non-corresponding recommendation scenarios.
  • Information since attribute information (excluding information indicating target recommendation scenarios) is input into multiple feature extraction networks, the embedded representations output by multiple feature extraction networks do not have accurate semantic information of the corresponding recommendation scenarios. Therefore, in the process of training multiple feature extraction networks, information including information indicating recommended scenarios and attribute information can be additionally input into the feature extraction network to participate in the feedforward process of network training.
  • the operation information indicates whether the user has performed a target operation on the item, and the target operation includes at least one of the following: a click operation, a browsing operation, an add to shopping cart operation, and a purchase operation.
  • the attribute information includes user attributes of the user, and the user attributes include at least one of the following: gender, age, occupation, income, hobbies, and education level.
  • the attribute information includes item attributes of the item, and the item attributes include at least one of the following: item name, developer, installation package size, category, and favorable rating.
  • the user's attribute information may be attributes related to the user's preference characteristics, including at least one of gender, age, occupation, income, hobbies, and educational level.
  • the gender may be male or female, and the age may be 0-100.
  • the number between, the occupation can be teachers, programmers, chefs, etc.
  • the hobbies can be basketball, tennis, running, etc.
  • the education level can be elementary school, junior high school, high school, university, etc.; this application does not limit the user's The specific type of attribute information;
  • the items can be physical items or virtual items, such as APP, audio and video, web pages, news information, etc.
  • the attribute information of the item can be the item name, developer, installation package size, category, and praise rating. At least one of them, with Taking the item as an application as an example, the category of the item can be chatting, parkour games, office, etc., and the rating can be ratings, comments, etc. for the item; this application does not limit the specific type of attribute information of the item. .
  • different recommendation scenarios are for different applications, or different recommendation scenarios are for different types of applications (for example, video-type applications and browser-type applications are different applications). program), or different recommendation scenarios are different functions of the same application (such as different channels of the same application, such as news channels, technology channels, etc.), and the above different functions can be divided according to recommendation categories.
  • the method further includes: determining to recommend items to the user when the target operation information satisfies preset conditions.
  • this application provides an operation prediction device, which includes:
  • the acquisition module is used to obtain attribute information of users and items in the target recommendation scenario
  • the feature extraction module is used to obtain the first embedding representation and the second embedding representation through the first feature extraction network and the second feature extraction network respectively according to the attribute information.
  • the first embedding representation is a feature that is irrelevant to the recommended scene information
  • the second embedding representation is The embedding representation is a feature related to the target recommendation scene; the first embedding representation and the second embedding representation are used to fuse to obtain the fused embedding representation;
  • the prediction module is used to predict the user's target operation information on items based on the fused embedding representation.
  • the attribute information includes the user's operation data in the target recommendation scenario, and the operation data also includes the user's first operation information on the item;
  • Prediction module also used for:
  • the first neural network is used to predict the user's second operation information on the item
  • the first recommendation scenario of the operation data is predicted through the second neural network; wherein the difference between the first operation information and the second operation information, and the difference between the first recommendation scenario and the target recommendation scenario are used Determine the first loss;
  • the installation also includes:
  • the model update module is also configured to perform orthogonal processing on the gradient corresponding to the third feature extraction network in the first neural network and the gradient corresponding to the fourth feature extraction network in the second neural network based on the first loss. Obtain the first gradient corresponding to the initial feature extraction network;
  • the third feature extraction network is updated to obtain the first feature extraction network.
  • the difference between the target operation information and the first operation information is used to determine the second loss; the model update module is also used to:
  • the first feature extraction network is updated.
  • the feature extraction module is specifically configured to obtain the second embedding representation through the second feature extraction network based on the attribute information
  • the second embedding representation is obtained, including:
  • multiple embedding representations are obtained through multiple feature extraction networks including the second feature extraction network; wherein each feature extraction network corresponds to a recommendation scenario, and the second feature extraction network corresponds to the target recommendation scenario ;
  • the feature extraction module is specifically used to predict the probability value of the attribute information corresponding to each recommended scenario based on the attribute information
  • Each probability value is used as the weight of the corresponding recommended scenario to fuse multiple embedding representations.
  • the get module is also used to:
  • the prediction module is also used to predict the user's operation information on the item in the second recommendation scene based on the operation data in the second recommendation scene; wherein the user's operation information on the item in the second recommendation scene is used to determine the third loss ;
  • the model update module is specifically configured to: perform orthogonalization processing on multiple gradients corresponding to the first feature extraction network according to the second loss and the third loss to obtain multiple third gradients of the first feature extraction network;
  • the first feature extraction network is updated.
  • the operation data includes information indicating the target recommendation scenario; the feature extraction module is also used to obtain the third embedding representation through the second feature extraction network according to the operation data;
  • the user's third operation information on the item is predicted through the third neural network; wherein the difference between the third operation information and the first operation information is used to determine the fourth loss;
  • the model update module is also used to: update the third neural network and the second feature extraction network according to the fourth loss.
  • the target operation information indicates whether the user has performed a target operation on the item, and the target operation includes at least one of the following:
  • the attribute information includes user attributes of the user, and the user attributes include at least one of the following: gender, age, occupation, income, hobbies, and education level.
  • the attribute information includes item attributes of the item, and the item attributes include at least one of the following: item name, developer, installation package size, category, and favorable rating.
  • the device further includes:
  • embodiments of the present application provide a model training method, which method includes:
  • the operation data including the attribute information of the user and the item, and the user's first operation information on the item;
  • the first recommended scenario of the operation data is predicted through the second neural network; wherein the difference between the first operation information and the second operation information, and the first recommended scenario The difference between the target recommendation scenario and the target recommendation scenario is used to determine the first loss;
  • the third feature extraction network is updated to obtain a first feature extraction network.
  • the method further includes:
  • the first embedding representation and the second embedding representation are obtained through the first feature extraction network and the second feature extraction network respectively; the first embedding representation and the second embedding representation are used for fusion to obtain Fusion embedding representation;
  • the user's target operation information for the item is predicted; the difference between the target operation information and the first operation information is used to determine the second loss;
  • the first feature extraction network is updated.
  • obtaining the first embedding representation and the second embedding representation through the first feature extraction network and the second feature extraction network respectively according to the attribute information includes:
  • a second embedding representation is obtained through the second feature extraction network
  • the second embedding representation is obtained through the second feature extraction network according to the attribute information, including:
  • multiple embedded representations are obtained through multiple feature extraction networks including the second feature extraction network; wherein each of the feature extraction networks corresponds to a recommendation scenario, and the second feature extraction network The feature extraction network corresponds to the target recommendation scenario;
  • the plurality of embedding representations are fused to obtain the second embedding representation.
  • the method further includes:
  • the second loss and the third loss perform orthogonalization processing on multiple gradients corresponding to the first feature extraction network to obtain multiple third gradients of the first feature extraction network;
  • the first feature extraction network is updated.
  • a model training device which includes:
  • An acquisition module configured to acquire the user's operation data in the target recommendation scenario, the operation data including the attribute information of the user and the item, and the user's first operation information on the item;
  • a prediction module configured to predict the second operation information of the user on the item through the first neural network based on the attribute information
  • the first recommended scenario of the operation data is predicted through the second neural network; wherein the difference between the first operation information and the second operation information, and the first recommended scenario The difference between the target recommendation scenario and the target recommendation scenario is used to determine the first loss;
  • a model update module configured to update the third feature extraction network according to the first gradient to obtain a first feature extraction network.
  • the device further includes:
  • a feature extraction module configured to obtain a first embedding representation and a second embedding representation through the first feature extraction network and the second feature extraction network respectively according to the attribute information; the first embedding representation and the second embedding representation The embedding representation is used for fusion to obtain the fused embedding representation;
  • a prediction module further configured to predict the user's target operation information on the item based on the fused embedding representation; the difference between the target operation information and the first operation information is used to determine the second loss ;
  • the model update module is also configured to update the first feature extraction network according to the second loss.
  • obtaining the first embedding representation and the second embedding representation through the first feature extraction network and the second feature extraction network respectively according to the attribute information includes:
  • a second embedding representation is obtained through the second feature extraction network
  • the second embedding representation is obtained through the second feature extraction network according to the attribute information, including:
  • multiple embedded representations are obtained through multiple feature extraction networks including the second feature extraction network; wherein each of the feature extraction networks corresponds to a recommendation scenario, and the second feature extraction network The feature extraction network corresponds to the target recommendation scenario;
  • the plurality of embedding representations are fused to obtain the second embedding representation.
  • the acquisition module is also used to:
  • a prediction module further configured to predict the user's operation information on the item in the second recommendation scene according to the operation data in the second recommendation scene; wherein, the user's operation information on the item in the second recommendation scene The operation information on the items is used to determine the third loss;
  • a model update module specifically configured to perform orthogonalization processing on multiple gradients corresponding to the first feature extraction network according to the second loss and the third loss to obtain the gradient of the first feature extraction network. multiple third gradients;
  • the first feature extraction network is updated.
  • embodiments of the present application provide an operation prediction device, which may include a memory, a processor, and a bus system, wherein the memory is used to store programs, and the processor is used to execute programs in the memory to perform the first aspect as described above. Any optional method.
  • a model training device which may include a memory, a processor, and a bus system.
  • the memory is used to store programs
  • the processor is used to execute programs in the memory to perform the third aspect as described above. Any optional method.
  • embodiments of the present application provide a computer-readable storage medium.
  • a computer program is stored in the computer-readable storage medium. When it is run on a computer, it causes the computer to execute the above-mentioned first aspect and any optional method. method, and any optional method in the third aspect above.
  • embodiments of the present application provide a computer program product, including code.
  • code When the code is executed, it is used to implement the above-mentioned first aspect and any optional method, and any optional method of the above-mentioned third aspect. method.
  • the present application provides a chip system, which includes a processor for supporting an execution device or a training device to implement the functions involved in the above aspects, for example, sending or processing data involved in the above methods; Or, information.
  • the chip system further includes a memory, which is used to store necessary program instructions and data for executing the device or training the device.
  • the chip system may be composed of chips, or may include chips and other discrete devices.
  • Figure 1 is a structural schematic diagram of the main framework of artificial intelligence
  • Figure 2 is a schematic diagram of a system architecture provided by an embodiment of the present application.
  • Figure 3 is a schematic diagram of a system architecture provided by an embodiment of the present application.
  • Figure 4 is a schematic diagram of a recommendation scenario provided by an embodiment of the present application.
  • Figure 5 is a schematic flowchart of an operation prediction method provided by an embodiment of the present application.
  • Figure 6 is a schematic diagram of a recommendation model
  • Figure 7 is a schematic diagram of a recommendation model
  • Figure 8 is a schematic diagram of a recommendation model
  • Figure 9 is a schematic diagram of a recommendation model
  • Figure 10 is a schematic flowchart of an operation prediction method provided by an embodiment of the present application.
  • Figure 11 is a schematic structural diagram of a recommendation device provided by an embodiment of the present application.
  • Figure 12 is a schematic diagram of an execution device provided by an embodiment of the present application.
  • Figure 13 is a schematic diagram of a training device provided by an embodiment of the present application.
  • Figure 14 is a schematic diagram of a chip provided by an embodiment of the present application.
  • Figure 1 shows a structural schematic diagram of the artificial intelligence main framework.
  • the following is from the “intelligent information chain” (horizontal axis) and “IT value chain” ( The above artificial intelligence theme framework is elaborated on the two dimensions of vertical axis).
  • the "intelligent information chain” reflects a series of processes from data acquisition to processing. For example, it can be the general process of intelligent information perception, intelligent information representation and formation, intelligent reasoning, intelligent decision-making, intelligent execution and output. In this process, the data has gone through the condensation process of "data-information-knowledge-wisdom".
  • the "IT value chain” reflects the value that artificial intelligence brings to the information technology industry, from the underlying infrastructure of human intelligence and information (providing and processing technology implementation) to the systematic industrial ecological process.
  • Infrastructure provides computing power support for artificial intelligence systems, enables communication with the external world, and supports it through basic platforms.
  • computing power is provided by smart chips (hardware acceleration chips such as CPU, NPU, GPU, ASIC, FPGA, etc.);
  • the basic platform includes distributed computing framework and network and other related platform guarantees and support, which can include cloud storage and Computing, interconnection networks, etc.
  • sensors communicate with the outside world to obtain data, which are provided to smart chips in the distributed computing system provided by the basic platform for calculation.
  • Data from the upper layer of the infrastructure is used to represent data sources in the field of artificial intelligence.
  • the data involves graphics, images, voice, and text, as well as IoT data of traditional devices, including business data of existing systems and sensory data such as force, displacement, liquid level, temperature, and humidity.
  • Data processing usually includes data training, machine learning, deep learning, search, reasoning, decision-making and other methods.
  • machine learning and deep learning can perform symbolic and formal intelligent information modeling, extraction, preprocessing, training, etc. on data.
  • Reasoning refers to the process of simulating human intelligent reasoning in computers or intelligent systems, using formal information to perform machine thinking and problem solving based on reasoning control strategies. Typical functions are search and matching.
  • Decision-making refers to the process of decision-making after intelligent information is reasoned, and usually provides functions such as classification, sorting, and prediction.
  • some general capabilities can be formed based on the results of further data processing, such as algorithms or a general system, such as translation, text analysis, computer vision processing, speech recognition, and image processing. identification, etc.
  • Intelligent products and industry applications refer to the products and applications of artificial intelligence systems in various fields. They are the encapsulation of overall artificial intelligence solutions, productizing intelligent information decision-making and realizing practical applications. Its application fields mainly include: intelligent terminals, intelligent transportation, Smart healthcare, autonomous driving, smart cities, etc.
  • Embodiments of this application can be applied to the field of information recommendation.
  • This scenario includes but is not limited to scenarios involving e-commerce product recommendation, search engine result recommendation, application market recommendation, music recommendation, video recommendation, etc.
  • Items recommended in various application scenarios It can also be called "object" to facilitate subsequent description, that is, in different recommendation scenarios, the recommended object can be an APP, or a video, or music, or a certain product (such as the presentation interface of an online shopping platform, which will be based on the user's Different products are displayed for different purposes, which can also be presented through the recommendation results of the recommendation model).
  • These recommendation scenarios usually involve user behavior log collection, log data preprocessing (such as quantification, sampling, etc.), sample set training to obtain a recommendation model, and objects involved in the scenarios corresponding to the training sample items based on the recommendation model (such as APP, music, etc.) for analysis and processing.
  • the samples selected in the recommendation model training process come from the operating behavior of users in the mobile application market for the recommended APP, then the recommendation model trained thereby is suitable for the above-mentioned mobile APP application market. Or it can be used in APP application markets of other types of terminals to recommend terminal APPs.
  • the recommendation model will finally calculate the recommendation probability of each object to be recommended or or score, the recommendation results selected by the recommendation system according to certain selection rules, such as sorting according to recommendation probability or score, are presented to the user through the corresponding application or terminal device, and the user operates on the objects in the recommendation results to generate users Behavior logs, etc.
  • a recommendation request when a user interacts with the recommendation system, a recommendation request will be triggered.
  • the recommendation system will input the request and its related feature information into the deployed recommendation model, and then predict the user's response to all candidates. click-through rate.
  • the candidate objects are sorted in descending order according to the predicted click-through rate, and the candidate objects are displayed in different positions in order as a recommendation result for the user.
  • Users browse the displayed items and perform user actions, such as browsing, clicking, and downloading. These user behaviors will be stored in logs as training data, and the parameters of the recommendation model will be updated from time to time through the offline training module to improve the recommendation effect of the model.
  • a user can trigger the recommendation module of the application market by opening the mobile application market.
  • the recommendation module of the application market will predict the user's response to a given application based on the user's historical download records, user click records, the application's own characteristics, time, location and other environmental feature information. download likelihood of each candidate application. Based on the predicted results, the application market is displayed in descending order of likelihood, achieving the effect of increasing the probability of application downloads. Specifically, apps that are more likely to be downloaded are ranked higher, and apps that are less likely to be downloaded are ranked lower.
  • the user's behavior will also be stored in the log and the parameters of the prediction model will be trained and updated through the offline training module.
  • a cognitive brain can be built based on the user's historical data in video, music, news and other fields through various models and algorithms, imitating the human brain mechanism, and building a user lifelong learning system framework.
  • Lifelong Companion can record the user's past events based on system data and application data, understand the user's current intentions, predict the user's future actions or behaviors, and ultimately implement intelligent services.
  • users’ behavioral data including client-side text messages, photos, email events, etc.
  • a user portrait system is built, and on the other hand, user information-based Learning and memory modules for filtering, correlation analysis, cross-domain recommendation, causal reasoning, etc. build users’ personal knowledge graphs.
  • an embodiment of the present invention provides a recommendation system architecture 200.
  • the data collection device 260 is used to collect samples.
  • a training sample can be composed of multiple feature information (or described as attribute information, such as user attributes and item attributes).
  • feature information can be many kinds of feature information, specifically including user feature information and object features.
  • Information and tag features User feature information is used to characterize the user's characteristics, such as gender, age, occupation, hobbies, etc.
  • Object feature information is used to characterize the features of objects pushed to the user.
  • Different recommendation systems correspond to different objects, and different The types of features that need to be extracted from the objects are also different.
  • the object features extracted from the training samples of the APP market can be the name (logo), type, size, etc.
  • the object characteristics can be the name of the product, its category, price range, etc.; the label characteristics are used to indicate whether the sample is a positive or negative example.
  • the label characteristics of the sample can be determined by the user's operation information on the recommended object. Obtained, samples in which the user has performed operations on the recommended objects are positive examples, and samples in which the user has not performed operations on the recommended objects, or has only browsed are negative examples. For example, when the user clicks, downloads, or purchases the recommended objects, then The label feature is 1, indicating that the sample is a positive example, and if the user does not perform any operation on the recommended object, the label feature is 0, indicating that the sample is a negative example.
  • the sample can be stored in the database 230.
  • Some or all of the characteristic information in the sample in the database 230 can also be obtained directly from the client device 240, such as user characteristic information, user operation information on the object (used to determine the type identification ), object characteristic information (such as object identification), etc.
  • the training device 220 obtains a model parameter matrix based on sample training in the database 230 for generating the recommendation model 201 (such as the feature extraction network and neural network in the embodiment of the present application). The following will describe in more detail how the training device 220 trains to obtain the model parameter matrix used to generate the recommendation model 201.
  • the recommendation model 201 can be used to evaluate a large number of objects to obtain the scores of each object to be recommended.
  • the calculation module 211 obtains the recommendation results based on the evaluation results of the recommendation model 201 and recommends them to the client device through the I/O interface 212 .
  • the training device 220 can select positive and negative samples from the sample set in the database 230 and add them to the training set, and then use the recommendation model to train the samples in the training set to obtain a trained recommendation model;
  • the calculation module 211 For implementation details of the calculation module 211, reference may be made to the detailed description of the method embodiment shown in FIG. 5 .
  • the training device 220 After the training device 220 obtains the model parameter matrix based on sample training and uses it to build the recommended model 201, it sends the recommended model 201 to the execution device 210, or directly sends the model parameter matrix to the execution device 210, and builds the recommended model in the execution device 210.
  • the recommendation model obtained by training based on video-related samples can be used to recommend videos to users on video websites or APPs.
  • the recommendation model obtained by training based on APP-related samples can be used in the application market. Recommend APPs to users.
  • the execution device 210 is configured with an I/O interface 212 to interact with external devices.
  • the execution device 210 can use the I/O interface 212 to interact with data.
  • the recommendation model 201 recommends target recommendation objects to the user based on the user characteristic information and the characteristic information of the objects to be recommended.
  • the execution device 210 can be set in the cloud server or in the user client.
  • the execution device 210 can call data, codes, etc. in the data storage system 250, and can also store the output data in the data storage system 250.
  • the data storage system 250 can be set up in the execution device 210, can be set up independently, or can be set up in other network entities, and the number can be one or multiple.
  • the calculation module 211 uses the recommendation model 201 to process the user feature information and the feature information of the objects to be recommended. For example, the calculation module 211 uses the recommendation model 201 to analyze and process the user feature information and the feature information of the objects to be recommended, thereby obtaining the According to the scores of the objects to be recommended, the objects to be recommended are sorted according to their scores, and the objects with the highest ranking will be used as objects recommended to the client device 240 .
  • the I/O interface 212 returns the recommendation results to the client device 240 and presents them to the user.
  • the training device 220 can generate corresponding recommendation models 201 based on different sample feature information for different goals to provide users with better results.
  • Figure 2 is only a schematic diagram of a system architecture provided by an embodiment of the present invention, and the positional relationship between the devices, devices, modules, etc. shown in the figure does not constitute any limitation.
  • the data storage system 250 is an external memory relative to the execution device 210. In other cases, the data storage system 250 can also be placed in the execution device 210.
  • the training device 220, the execution device 210, and the client device 240 may be three different physical devices respectively. It is also possible that the training device 220 and the execution device 210 are on the same physical device or a cluster, or they may be on the same physical device or a cluster. It is possible that the execution device 210 and the client device 240 are on the same physical device or a cluster.
  • a system architecture 300 is provided according to an embodiment of the present invention.
  • the execution device 210 is implemented by one or more servers, and optionally cooperates with other computing devices, such as data storage, routers, load balancers and other devices; the execution device 210 can be arranged on a physical site, or Distributed across multiple physical sites.
  • the execution device 210 can use the data in the data storage system 250, or call the program code in the data storage system 250 to implement the function of object recommendation.
  • the information of the object to be recommended is input into the recommendation model, and the recommendation model is for each
  • the objects to be recommended generate estimated scores, and then they are sorted from high to low according to the estimated scores, and the objects to be recommended are recommended to the user based on the sorting results. For example, recommend the top 10 objects in the sorted results to the user.
  • the data storage system 250 is used to receive and store the parameters of the recommended model sent by the training device, and to store the data of the recommendation results obtained through the recommended model.
  • the data storage system 250 can be a device deployed outside the execution device 210 or a distributed storage cluster composed of multiple devices. In this case, when the execution device 210 needs to use the data on the storage system 250, the storage system 250 can send the data to the execution device 250.
  • Device 210 sends data required by the execution device, and accordingly, execution device 210 receives and stores (or caches) the data.
  • the data storage system 250 can also be deployed in the execution device 210.
  • the distributed storage system can include one or more memories.
  • different memories can be used.
  • the model parameters of the recommendation model generated by the training device and the data of the recommendation results obtained by the recommendation model can be stored in two different memories respectively.
  • the user may operate respective user devices (eg, local device 301 and local device 302) to interact with execution device 210.
  • Each local device may represent any computing device, such as a personal computer, computer workstation, smartphone, tablet, smart camera, smart car or other type of cellular phone, media consumption device, wearable device, set-top box, game console, etc.
  • Each user's local device can interact with the execution device 210 through a communication network of any communication mechanism/communication standard.
  • the communication network can be a wide area network, a local area network, a point-to-point connection, etc., or any combination thereof.
  • the execution device 210 can be implemented by a local device.
  • the local device 301 can implement the recommendation function of the execution device 210 based on the recommendation model to obtain user characteristic information and feed back the recommendation results to the user, or provide the local device 302 with the recommendation function. Users provide services.
  • CTR Click-throughrate
  • Click probability also known as click-through rate
  • Click-through rate refers to the ratio of the number of clicks and the number of exposures to recommended information (for example, recommended items) on a website or application. Click-through rate is usually an important indicator for measuring recommendation systems in recommendation systems.
  • a personalized recommendation system refers to a system that uses machine learning algorithms to analyze based on the user's historical data (such as the operation information in the embodiment of this application), and uses this to predict new requests and provide personalized recommendation results.
  • Offline training refers to a module in the personalized recommendation system that iteratively updates the recommendation model parameters according to the machine learning algorithm based on the user's historical data (such as the operation information in the embodiments of this application) until the set requirements are met.
  • Online prediction refers to predicting the user's preference for recommended items in the current context based on the characteristics of users, items and context based on offline trained models, and predicting the probability of users choosing recommended items.
  • FIG. 3 is a schematic diagram of a recommendation system provided by an embodiment of the present application.
  • the recommendation system will input the request and its related information (such as the operation information in the embodiment of this application) into the recommendation model, and then predict the user's response to the system.
  • the items are arranged in descending order according to the predicted selection rate or a function based on the selection rate, that is, the recommendation system can display the items in different locations in order as a recommendation result to the user.
  • Users browse different located items and perform user actions such as browsing, selection, and downloading.
  • the user's actual behavior will be stored in the log as training data, and the parameters of the recommended model will be continuously updated through the offline training module to improve the prediction effect of the model.
  • the recommendation system in the application market can be triggered.
  • the recommendation system of the application market will predict the probability of users downloading each recommended candidate APP based on the user's historical behavior logs, such as the user's historical download records, user selection records, and the application market's own characteristics, such as time, location and other environmental feature information. .
  • the recommendation system of the application market can display the candidate APPs in descending order according to the predicted probability value, thereby increasing the download probability of the candidate APPs.
  • APPs with a predicted higher user selection rate can be displayed in the front recommendation position
  • APPs with a lower predicted user selection rate can be displayed in the lower recommendation position
  • the above recommendation model may be a neural network model.
  • the relevant terms and concepts of neural networks that may be involved in the embodiments of this application are introduced below.
  • the neural network can be composed of neural units.
  • the neural unit can refer to an operation unit that takes xs (ie, input data) and intercept 1 as input.
  • the output of the operation unit can be:
  • s 1, 2,...n, n is a natural number greater than 1
  • Ws is the weight of xs
  • b is the bias of the neural unit.
  • f is the activation function of the neural unit, which is used to introduce nonlinear characteristics into the neural network to convert the input signal in the neural unit into an output signal.
  • the output signal of this activation function can be used as the input of the next convolutional layer, and the activation function can be a sigmoid function.
  • a neural network is a network formed by connecting multiple above-mentioned single neural units together, that is, the output of one neural unit can be the input of another neural unit.
  • the input of each neural unit can be connected to the local receptive field of the previous layer to extract the features of the local receptive field.
  • the local receptive field can be an area composed of several neural units.
  • Deep Neural Network also known as multi-layer neural network
  • DNN Deep Neural Network
  • the neural network inside DNN can be divided into three categories: input layer, hidden layer, and output layer.
  • the first layer is the input layer
  • the last layer is the output layer
  • the layers in between are hidden layers.
  • the layers are fully connected, that is to say, any neuron in the i-th layer must be connected to any neuron in the i+1-th layer.
  • the coefficient from the k-th neuron in layer L-1 to the j-th neuron in layer L is defined as It should be noted that the input layer has no W parameter.
  • more hidden layers make the network more capable of describing complex situations in the real world. Theoretically, a model with more parameters has higher complexity and greater "capacity", which means it can complete more complex learning tasks.
  • Training a deep neural network is the process of learning the weight matrix. The ultimate goal is to obtain the weight matrix of all layers of the trained deep neural network (a weight matrix formed by the vectors W of many layers).
  • the error back propagation (BP) algorithm can be used to correct the size of the parameters in the initial model during the training process, so that the error loss of the model becomes smaller and smaller. Specifically, forward propagation of the input signal until the output will produce an error loss, and backward propagation of the error loss information is used to update the parameters in the initial model, so that the error loss converges.
  • the backpropagation algorithm is a backpropagation movement dominated by error loss, aiming to obtain optimal model parameters, such as weight matrices.
  • the parameters of the machine learning model are trained through optimization methods such as gradient descent, and finally the trained model is used to complete the prediction of unknown data.
  • a system that uses machine learning algorithms to analyze and model based on users' historical data, and uses this to predict new user requests and provide personalized recommendation results.
  • the recommended scenario can be an application (APP) that serves specific needs, such as Huawei Browser, Huawei Video, or it can refer to specific channels, such as entertainment channels, news channels, technology channels, etc. in the browser information flow. .
  • APP application
  • Fusion of data from multiple scenarios and training generates a model to serve multiple scenarios.
  • Machine learning systems including personalized recommendation systems, train the parameters of the machine learning model through optimization methods such as gradient descent based on input data and labels. When the model parameters converge, the model can be used to complete the prediction of unknown data.
  • the input data includes user attributes and product attributes. How to predict a personalized recommendation list based on user preferences has an important impact on improving the recommendation accuracy of the recommendation system.
  • the recommendation system includes a variety of recommendation scenarios: browser, negative screen, video streaming, etc. Users behave differently in different scenarios based on their preferences. Each scenario has user-specific behavioral characteristics as well as common behavioral characteristics. Normally, each scenario is modeled separately.
  • the STAR (Star Topology Adaptive Recommender) model uses multi-scenario models to capture common behavioral characteristics of users in different scenarios.
  • STAR Star Topology Adaptive Recommender
  • a common feature extraction network is trained , to adapt to various scenarios.
  • the public feature extraction network in the existing technology cannot extract an embedded representation that can accurately represent the common behavioral characteristics of users in different scenarios, making the recommendation model have poor generalization in various scenarios.
  • the operation prediction method can be a feedforward process of model training or an inference process.
  • Figure 5 is a schematic diagram of an operation prediction method provided by an embodiment of the present application. As shown in Figure 5, an operation prediction method provided by an embodiment of the present application includes:
  • the execution subject of step 501 may be a terminal device, and the terminal device may be a portable mobile device, such as but not limited to a mobile or portable computing device (such as a smart phone), a personal computer, a server computer, a handheld device (such as tablet) or laptop device, multi-processor system, game console or controller, microprocessor-based system, set-top box, programmable consumer electronics, mobile phone, wearable or accessory form factor (e.g., watch, glasses, headsets, or earbuds), network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and the like.
  • a mobile or portable computing device such as a smart phone
  • a personal computer such as a server computer
  • a handheld device such as tablet
  • microprocessor-based system such as tablet
  • set-top box such as programmable consumer electronics
  • mobile phone wearable or accessory form factor
  • network PCs e.g., watch, glasses, headsets, or earbuds
  • minicomputers
  • the execution subject of step 501 may be a server on the cloud side.
  • the server may receive the user's operation data sent from the terminal device, and the server may obtain the user's operation data.
  • the attribute information can be the user's operation data.
  • the user's operation data can be obtained based on the interaction records between the user and the items (such as the user's behavior log).
  • the operation data can include the user's actual operation records of each item.
  • the operation data can include the user's attribute information, each item attribute information and the type of operations performed by the user on the multiple items (such as clicks, downloads, etc.).
  • the user's attribute information may be attributes related to the user's preference characteristics, including at least one of gender, age, occupation, income, hobbies, and educational level.
  • the gender may be male or female, and the age may be 0-100.
  • the number between, the occupation can be teachers, programmers, chefs, etc.
  • the hobbies can be basketball, tennis, running, etc.
  • the education level can be elementary school, junior high school, high school, university, etc.; this application does not limit the user's The specific type of attribute information.
  • the items can be physical items or virtual items, such as applications (APPs), audio and video, web pages, news information, etc.
  • the attribute information of the items can be item name, developer, installation package size, At least one of category and positive rating.
  • the category of the item can be chatting, parkour games, office, etc., and the positive rating can be ratings, comments, etc. for the item. ; This application does not limit the specific type of attribute information of items.
  • the training device can obtain the user's operation data, where the operation data includes attribute information of the user and the item, and the user's first operation information on the item in the target recommendation scenario.
  • the target recommendation scenario can be an application that serves specific needs, such as Huawei Browser and Huawei Video, or it can also refer to a specific channel, such as an entertainment channel or a news channel in the browser information stream. , Technology Channel, etc.
  • different recommendation scenarios are for different applications, or different recommendation scenarios are for different types of applications (for example, video-type applications and browser-type applications are different applications). program), or different recommendation scenarios are different functions of the same application (such as different channels of the same application, such as news channels, technology channels, etc.), and the above different functions can be divided according to recommendation categories.
  • the attribute information obtain the first embedding representation and the second embedding representation through the first feature extraction network and the second feature extraction network respectively.
  • the first embedding representation is a feature that is irrelevant to the recommended scene information.
  • the second embedding representation is a feature related to the target recommendation scene; the first embedding representation and the second embedding representation are used to fuse to obtain a fused embedding representation.
  • the user's second operation information on the item can be predicted through a first neural network based on the attribute information; and the second operation information of the item can be predicted based on the attribute information through a second neural network.
  • Orthogonalization processing is performed to obtain the first gradient corresponding to the initial feature extraction network; and the third feature extraction network is updated according to the first gradient to obtain the first feature extraction network.
  • predicting the user's second operation information on the item based on the attribute information through a first neural network and predicting the second operation information based on the attribute information through a second neural network During the operation of the first recommendation scene of the data, the information indicating the target recommendation scene is not used as an input of the third feature extraction network and the fourth feature extraction network.
  • the first operation information is used as the ground truth when training the third feature extraction network, the first operation information does not need to be input into the third feature extraction network during the feedforward process. Since the information indicating the target recommendation scene is the ground truth when training the fourth feature extraction network, the information indicating the target recommendation scene does not need to be input to the third feature extraction network during the feedforward process. middle.
  • the second operation information can indicate whether the user has performed a target operation.
  • the target operation can be a behavioral operation type of the user.
  • Form that is, there are multiple operation types), such as browsing, clicking, adding to shopping cart, purchasing and other operation types in the user's behavior on the e-commerce platform.
  • the second operation information may be the probability that the user will perform the target operation on the item.
  • the second operation information may be whether the user clicks, or the probability of clicking.
  • the first neural network may include a multilayer perceptron (MLP) and an output layer.
  • the first neural network may output second operation information of the user on the item.
  • the second operation information Can indicate whether the user will perform the target action on the item.
  • the first recommended scenario of the operation data can be predicted through a second neural network; wherein the difference between the first operation information and the second operation information, and the The difference between a recommended scenario and the target recommended scenario is used to determine the first loss.
  • the first recommendation scenario can be represented by a piece of identification information, for example, 1 represents application A, 2 represents application B, etc.
  • the second neural network may include a multilayer perceptron (MLP) and an output layer, and the second neural network may output the first recommended scenario of the operation data.
  • MLP multilayer perceptron
  • the loss after predicting the second operation information and the first recommended scenario through the first neural network and the second neural network, the loss can be constructed based on the true values of the second operation information and the first recommended scenario respectively.
  • the function (such as the first loss in the embodiment of the present application), for example, can be based on the difference between the first operation information and the second operation information, and the difference between the first recommendation scenario and the target recommendation scenario. The difference is used to determine the first loss.
  • the first loss may also include Other loss items are not limited here.
  • the gradient corresponding to the third feature extraction network and the gradient corresponding to the fourth feature extraction network can be orthogonalized according to the first loss to obtain the third feature extraction network.
  • the idea of the embodiment of the present application is that by training the third feature extraction network, the trained third feature extraction network can identify the unbiased feature representation (invariant representation) shared in each scene.
  • a second neural network is set up. Since the second neural network is used to identify the recommended scene where the operation data is located, the embedded representation obtained based on the fourth feature extraction network in the second neural network can carry and Semantic information strongly related to the recommended scene. This part of semantic information strongly related to the recommended scene does not need to be carried in the unbiased feature representation.
  • this embodiment of the present application can be called bias representation (scenario representation)
  • this embodiment of the present application when determining the gradients used to update the third feature extraction network and the fourth feature extraction network, orthogonalization processing is performed on the gradients of the third feature extraction network and the fourth feature extraction network, and the orthogonalization processing can constrain the third The gradient directions (that is, the update directions of parameters) of the feature extraction network and the fourth feature extraction network are orthogonal to each other or close to orthogonal to each other.
  • the embedded representations extracted by the third feature extraction network and the fourth feature extraction network can have different information, realizing the separation of embedded representations.
  • the updated The embedding representation extracted by the fourth feature extraction network has semantic information strongly related to the recommended scene, and the first neural network is used to identify operation information.
  • the trained first neural network has a better ability to predict the user's operating behavior, so the trained third feature extraction network can identify the information used to identify the operating information (that is, the appearance of the information) ), and this information does not have semantic information strongly related to the recommended scenario.
  • an additional neural network may be deployed for orthogonalizing the gradient corresponding to the third feature extraction network and the gradient corresponding to the fourth feature extraction network.
  • a constraint term can be added to the first loss, and the constraint term is used to orthogonally constrain the gradient corresponding to the third feature extraction network and the gradient corresponding to the fourth feature extraction network.
  • the gradient corresponding to the initial third feature extraction network and the gradient corresponding to the fourth feature extraction network can be The gradients corresponding to the four feature extraction networks are orthogonalized, so that the directions of the obtained first gradient and the gradient corresponding to the fourth feature extraction network are orthogonal (or close to orthogonal).
  • the third feature extraction network can be updated according to the first gradient to obtain a first feature extraction network.
  • the unbiased representation obtained by the third feature extraction network and the biased representation obtained by the fourth feature extraction network can be combined (or called fusion), and the combination is
  • the final representation can still have high prediction ability after passing through the neural network (used for operating information prediction).
  • the unbiased representation obtained by the third feature extraction network and the biased representation obtained by the fourth feature extraction network can be input into the fourth neural network to predict the user's response to the Fifth operation information of the item; the difference between the fifth operation information and the first operation information is used to determine the first loss.
  • the unbiased representation obtained by the third feature extraction network and the biased representation obtained by the fourth feature extraction network can be fused (such as splicing operation), and the fusion result is input to the fourth neural network.
  • the fourth The neural network and the first neural network may have the same or similar network structure. For details, please refer to the introduction about the first neural network in the above embodiments, which will not be described again here.
  • the unbiased representation obtained by the third feature extraction network and the biased representation obtained by the fourth feature extraction network can be input into the fourth neural network to obtain the user's fifth operation information on the item, And construct the first loss based on the difference between the fifth operation information and the first operation information (that is, the true value). That is to say, the first loss includes in addition to the difference between the above-mentioned first operation information and the second operation information, and In addition to the loss item for the difference between the first recommendation scenario and the target recommendation scenario, the difference between the fifth operation information and the first operation information may also be included.
  • This application uses the first feature extraction network to extract features that are not related to the recommended scene information, that is, the unbiased feature representation (invariant representation) of each scene, and combines it with the features related to the recommended scene information (the embodiment of this application can be called It is a fusion of bias representation (scenario representation), which can show that each scene has user-specific behavioral characteristics, and can also express user-specific behavioral characteristics between different scenes, improving the prediction accuracy of subsequent operation information prediction.
  • bias representation scenario representation
  • the difference between the target operation information and the first operation information is used to determine a second loss; the method further includes: updating the first feature according to the second loss Extract network.
  • the trained third feature extraction network needs to be connected to the operation information prediction network related to the scene, and each scene corresponds to an operation information prediction related to the scene.
  • the network is reasoning, in order to predict the user's operation information on items in a certain recommendation scenario (recommendation scenario A), the attribute information of the user and the item will be input to the trained third feature extraction network on the one hand to obtain the embedded representation ( For example, the first embedding representation), the attribute information of the user and items will be input to the feature extraction network related to the recommended scene A (or input to the feature extraction network related to each scene, and then weighted based on the weight of the scene), so as to The embedded representation (for example, the second embedded representation) is obtained.
  • the first embedded representation and the second embedded representation can be fused and input into the operation information prediction network corresponding to the recommended scenario A to obtain the predicted operation information (for example, the target operation information).
  • the third feature extraction network in addition to the gradient obtained by backpropagation based on the output of the first neural network (for example, the first gradient), it is also necessary to predict based on the operation information corresponding to each scene
  • the output of the network (such as target operation information) is updated by backpropagating the obtained gradient (such as the second gradient).
  • the above-mentioned gradient is a gradient related to a specific scene (for example, the second gradient).
  • This gradient (for example, the second gradient) will have a negative impact (for example, each other) on the gradient obtained based on the unbiased representation (for example, the first gradient).
  • the third feature extraction network is first updated based on the gradient obtained from the unbiased representation, and then, on the one hand, the third feature extraction network is updated based on the feature extraction network related to the recommended scenario (such as the second feature extraction network) (or input to the feature extraction network related to each scene, and then weighted based on the weight of the scene) to process the attribute information of the user and items to obtain the embedded representation (such as the second embedded representation).
  • the third feature extraction network is first updated based on the gradient obtained from the unbiased representation, and then, on the one hand, the third feature extraction network is updated based on the feature extraction network related to the recommended scenario (such as the second feature extraction network) (or input to the feature extraction network related to each scene, and then weighted based on the weight of the scene) to process the attribute information of the user and items to obtain the embedded representation (such as the second embedded representation).
  • the updated third feature network processes the attribute information of the user and the item to obtain the embedded representation (such as the first embedded representation).
  • the first embedding representation and the second embedding representation can be fused and input into the operation information prediction network corresponding to the recommended scenario A to obtain the predicted operation information (such as target operation information), and obtain the loss (such as the second loss) based on the target operation information. , and determine the gradient (for example, the second gradient) based on the second loss, and update the first feature extraction network according to the second gradient.
  • the predicted operation information such as target operation information
  • the loss such as the second loss
  • this application does not update the third feature extraction after combining the gradient obtained based on the unbiased representation and the gradient obtained based on the operation information related to the scene. Instead, the third feature extraction is updated based on the gradient obtained based on the unbiased representation.
  • the first feature extraction network is updated based on the gradient obtained from the operation information related to the scene, so that the gradient related to the specific scene is the same as the gradient obtained based on the unbiased representation. There is no negative impact between gradients, and effective information between each other can be well utilized to improve the effect of the corresponding scene.
  • obtaining the first embedding representation and the second embedding representation through the first feature extraction network and the second feature extraction network respectively according to the attribute information includes: according to the The attribute information is passed through the second feature extraction network to obtain a second embedded representation; the second embedded representation is obtained through the second feature extraction network according to the attribute information, including: according to the attribute information, by including the third Multiple feature extraction networks, including two feature extraction networks, obtain multiple embedded representations; wherein each of the feature extraction networks corresponds to a recommendation scenario, and the second feature extraction network corresponds to the target recommendation scenario; The plurality of embedding representations are fused to obtain the second embedding representation.
  • the fusion of the multiple embedded representations includes: predicting the probability value of the attribute information corresponding to each recommended scenario according to the attribute information; and using each of the probability values as The multiple embedding representations are fused according to the weight of the corresponding recommended scene.
  • corresponding feature extraction networks can be set up for each recommendation scenario.
  • attribute information will be input into each feature extraction network.
  • Each feature extraction network can output an embedding representation and multiple feature extractions. Multiple embedding representations output by the network can be fused.
  • the weight (or probability value) corresponding to each recommended scenario can be determined based on attribute information, and multiple embedding representations can be made based on the probability value. fusion to obtain the second embedding representation.
  • the probability value of the attribute information corresponding to each recommended scenario can be obtained based on the attribute information; each probability value is used as the weight of the corresponding recommended scenario, and multiple embedding representations are fused to obtain the second Embedded representation. For example, you can do a weighted sum.
  • the fourth neural network can be used to obtain the probability values of the attribute information corresponding to each recommended scenario.
  • the fourth neural network can reuse the second neural network and use the output probabilities for each recommended scenario as multiple Embedding representation weights, you can also choose to retrain end-to-end a fourth neural network with recommended scene prediction capabilities to achieve efficient fusion of multiple scene information.
  • the above describes how to obtain the second embedding representation through the second feature extraction network based on the attribute information.
  • the second embedding representation is an embedding representation related to the scene. It is also necessary to perform a feedforward process based on the first feature extraction network.
  • the first embedding representation can be obtained through the first feature extraction network according to the attribute information; further, the first embedding representation and the second embedding representation can be fused (for example, a matrix can be multiplication and other fusion methods) to obtain the fused embedding representation; and then the user's target operation information for the item in the target recommendation scenario can be predicted based on the fused embedding representation.
  • the above-mentioned weighted fusion method based on the embedding representations of multiple feature extraction networks can make the second embedding representation obtained after the fusion have more information about the corresponding recommendation scenarios and contain less non-corresponding recommendation scenarios.
  • Information since attribute information (excluding information indicating target recommendation scenarios) is input into multiple feature extraction networks, the embedded representations output by multiple feature extraction networks do not have accurate semantic information of the corresponding recommendation scenarios. Therefore, in the process of training multiple feature extraction networks, information including information indicating recommended scenarios and attribute information can be additionally input into the feature extraction network to participate in the feedforward process of network training.
  • the operation data includes information indicating the target recommendation scenario; the method further includes: obtaining a third embedding representation through the second feature extraction network according to the operation data; according to The third embedded representation is represented by the third A neural network predicts the user's third operation information on the item; wherein the difference between the third operation information and the first operation information is used to determine a fourth loss; according to the fourth loss, Update the third neural network and the second feature extraction network.
  • the model in each iteration, can be updated based on the gradient obtained from a batch of data.
  • the same batch of data can contain operational data for different recommendation scenarios. For example, it can contain the first Based on the operation data of the second recommendation scenario, a loss (for example, the third loss in the embodiment of the present application) and the gradient used to update the first feature extraction network can also be obtained based on the operation data of the second recommendation scenario.
  • a loss for example, the third loss in the embodiment of the present application
  • the gradient used to update the first feature extraction network can also be obtained based on the operation data of the second recommendation scenario.
  • the gradient obtained based on the second loss and the gradient obtained based on the third loss are gradients obtained under different recommendation scenarios, they may have negative impacts on each other (parameter update directions will conflict with each other, such as gradient A and gradient B are gradients in opposite directions. If gradient A and gradient B are directly superimposed and then updated, it is equivalent to not updating the parameters), and the effective information between each other cannot be well utilized to improve the effect of the
  • the gradient obtained based on the second loss and the gradient obtained based on the third loss are orthogonalized, thereby reducing the mutual negative direction between the gradients obtained in different recommendation scenarios. Influence.
  • the user's operation data (including attribute information) in the second recommendation scene can be obtained; based on the operation data in the second recommendation scene, the user's operation information on items in the second recommendation scene is predicted (
  • the attribute information of the user's operation data in the second recommendation scenario can be input into the feature extraction network corresponding to the second recommendation scenario.
  • the embedding representation can be input into the neural network corresponding to the second recommended scene (used to predict the operation information of the second recommended scene) to obtain the corresponding prediction result), and the prediction result can be combined with the operation data in the second recommended scene.
  • the true value of the operation information is used to determine the third loss.
  • the third loss can obtain the gradient corresponding to the first feature extraction network (a third gradient) during backpropagation.
  • multiple third gradients of the first feature extraction network can be obtained by orthogonalizing multiple gradients corresponding to the first feature extraction network based on the second loss and the third loss, Among them, one gradient among the plurality of third gradients is obtained according to the second loss, and one gradient among the plurality of third gradients is obtained according to the third loss; the plurality of third gradients are fused (for example, through vector summation). fusion) to obtain the second gradient corresponding to the first feature extraction network; according to the second gradient, the first feature extraction network is updated.
  • the probability that the user performs an operation on the item can be obtained, and information recommendation can be made based on the above probability. Specifically, when the recommended information meets the preset conditions, it can be determined to recommend the item to the user.
  • the recommended information can be recommended to users in the form of a list page in order to expect users to take behavioral actions.
  • the offline evaluation index is AUC
  • the online evaluation index is CTR and ECPM.
  • this solution is better than the baseline model (including single-scenario modeling solution, heuristic solution, multi-task solution and existing multi-scenario modeling solution) on both public data sets and company data sets.
  • Figure 11 is a schematic structural diagram of an operation prediction device provided by an embodiment of the present application. As shown in Figure 11, the implementation of the present application An example of an operation prediction device 1100 includes:
  • the acquisition module 1101 is used to acquire attribute information of users and items in the target recommendation scenario
  • step 501 For a specific introduction to the acquisition module 1101, please refer to the description of step 501 in the above embodiment, and will not be described again here.
  • the feature extraction module 1102 is configured to obtain the first embedding representation and the second embedding representation through the first feature extraction network and the second feature extraction network respectively according to the attribute information, and the first embedding representation is independent of the recommended scene information.
  • the second embedding representation is a feature related to the target recommendation scene; the first embedding representation and the second embedding representation are used to fuse to obtain a fused embedding representation;
  • step 502 For a specific introduction to the feature extraction module 1102, please refer to the description of step 502 in the above embodiment, and will not be described again here.
  • the prediction module 1103 is configured to predict the user's target operation information for the item based on the fused embedding representation.
  • step 503 and step 504 in the above embodiment, which will not be described again here.
  • the attribute information includes the user's operation data in the target recommendation scenario, and the operation data also includes the user's first operation information on the item;
  • the prediction module is also used to:
  • the first recommended scenario of the operation data is predicted through the second neural network; wherein the difference between the first operation information and the second operation information, and the first recommended scenario The difference between the target recommendation scenario and the target recommendation scenario is used to determine the first loss;
  • the device also includes:
  • the model update module 1104 is further configured to calculate, according to the first loss, the gradient corresponding to the third feature extraction network in the first neural network and the gradient corresponding to the fourth feature extraction network in the second neural network. Perform orthogonalization processing to obtain the first gradient corresponding to the initial feature extraction network;
  • the third feature extraction network is updated to obtain the first feature extraction network.
  • the difference between the target operation information and the first operation information is used to determine the second loss; the model update module 1104 is also used to:
  • the first feature extraction network is updated.
  • the feature extraction module is specifically configured to obtain a second embedding representation through a second feature extraction network according to the attribute information
  • the second embedding representation is obtained through the second feature extraction network according to the attribute information, including:
  • multiple embedded representations are obtained through multiple feature extraction networks including the second feature extraction network; wherein each of the feature extraction networks corresponds to a recommendation scenario, and the second feature extraction network The feature extraction network corresponds to the target recommendation scenario;
  • the plurality of embedding representations are fused to obtain the second embedding representation.
  • the feature extraction module is specifically configured to predict, according to the attribute information, the probability value of the attribute information corresponding to each recommended scenario;
  • Each of the probability values is used as the weight of the corresponding recommended scene, and the multiple embedding representations are fused.
  • the acquisition module is also used to:
  • the prediction module is also configured to predict the user's operation information on the item in the second recommendation scene according to the operation data in the second recommendation scene; wherein, the user's operation information on the item in the second recommendation scene is The operation information on the item in the recommended scenario is used to determine the third loss;
  • the model update module 1104 is specifically configured to: perform orthogonalization processing on multiple gradients corresponding to the first feature extraction network according to the second loss and the third loss to obtain the first multiple third gradients of the feature extraction network;
  • the first feature extraction network is updated.
  • the operation data includes information indicating the target recommendation scenario;
  • the feature extraction module is also configured to obtain a third embedding through the second feature extraction network according to the operation data. express;
  • the third operation information of the user on the item is predicted through the third neural network; wherein the difference between the third operation information and the first operation information is expressed by To determine the fourth loss;
  • the model update module 1104 is also configured to update the third neural network and the second feature extraction network according to the fourth loss.
  • the target operation information indicates whether the user has performed a target operation on the item, and the target operation includes at least one of the following:
  • the attribute information includes user attributes of the user, and the user attributes include at least one of the following: gender, age, occupation, income, hobbies, and education level.
  • the attribute information includes item attributes of the item, and the item attributes include at least one of the following: item name, developer, installation package size, category, and favorable rating.
  • the device further includes:
  • a recommendation module configured to determine to recommend the item to the user when the target operation information satisfies a preset condition.
  • An embodiment of the present application also provides a model training device, which includes:
  • An acquisition module configured to acquire the user's operation data in the target recommendation scenario, the operation data including the attribute information of the user and the item, and the user's first operation information on the item;
  • a prediction module configured to predict the second operation information of the user on the item through the first neural network based on the attribute information
  • the first recommended scenario of the operation data is predicted through the second neural network; wherein the difference between the first operation information and the second operation information, and the first recommended scenario The difference between the target recommendation scenario and the target recommendation scenario is used to determine the first loss;
  • a model update module configured to update the third feature extraction network according to the first gradient to obtain a first feature extraction network.
  • the device further includes:
  • a feature extraction module configured to obtain a first embedding representation and a second embedding representation through the first feature extraction network and the second feature extraction network respectively according to the attribute information; the first embedding representation and the second embedding representation The embedding representation is used for fusion to obtain the fused embedding representation;
  • a prediction module further configured to predict the user's target operation information on the item based on the fused embedding representation; the difference between the target operation information and the first operation information is used to determine the second loss ;
  • the model update module is also configured to update the first feature extraction network according to the second loss.
  • obtaining the first embedding representation and the second embedding representation through the first feature extraction network and the second feature extraction network respectively according to the attribute information includes:
  • a second embedding representation is obtained through the second feature extraction network
  • the second embedding representation is obtained through the second feature extraction network according to the attribute information, including:
  • multiple embedded representations are obtained through multiple feature extraction networks including the second feature extraction network; wherein each of the feature extraction networks corresponds to a recommendation scenario, and the second feature extraction network The feature extraction network corresponds to the target recommendation scenario;
  • the plurality of embedding representations are fused to obtain the second embedding representation.
  • the acquisition module is also used to:
  • a prediction module further configured to predict the user's operation information on the item in the second recommendation scene according to the operation data in the second recommendation scene; wherein, the user's operation information on the item in the second recommendation scene The operation information on the items is used to determine the third loss;
  • a model update module specifically configured to perform orthogonalization processing on multiple gradients corresponding to the first feature extraction network according to the second loss and the third loss to obtain the gradient of the first feature extraction network. multiple third gradients;
  • the first feature extraction network is updated.
  • FIG. 12 is a schematic structural diagram of an execution device provided by an embodiment of the present application.
  • the execution device 1200 can be embodied as a mobile phone, a tablet, a notebook computer, Smart wearable devices, servers, etc. are not limited here. Among them, the execution device 1200 implements the function of the operation prediction method in the corresponding embodiment of FIG. 5 .
  • the execution device 1200 includes: a receiver 1201, a transmitter 1202, a processor 1203, and a memory 1204 (the number of processors 1203 in the execution device 1200 may be one or more), where the processor 1203 may include application processing processor 12031 and communication processor 12032.
  • the receiver 1201, the transmitter 1202, the processor 1203, and the memory 1204 may be connected through a bus or other means.
  • Memory 1204 may include read-only memory and random access memory and provides instructions and data to processor 1203 .
  • a portion of memory 1204 may also include non-volatile random access memory (NVRAM).
  • NVRAM non-volatile random access memory
  • the memory 1204 stores processor and operating instructions, executable modules or data structures, or a subset thereof, or an extended set thereof, where the operating instructions may include various operating instructions for implementing various operations.
  • the processor 1203 controls the execution of operations of the device.
  • various components of the execution device are coupled together through a bus system.
  • the bus system may also include a power bus, a control bus, a status signal bus, etc.
  • various buses are called bus systems in the figure.
  • the methods disclosed in the above embodiments of the present application can be applied to the processor 1203 or implemented by the processor 1203.
  • the processor 1203 may be an integrated circuit chip with signal processing capabilities. During the implementation process, each step of the above method can be completed by instructions in the form of hardware integrated logic circuits or software in the processor 1203 .
  • the above-mentioned processor 1203 may be a general-purpose processor, a digital signal processor (DSP), a microprocessor or a microcontroller, a vision processing unit (VPU), or a tensor processing unit.
  • DSP digital signal processor
  • VPU vision processing unit
  • TPU and other processors suitable for AI computing, which can further include application specific integrated circuits (ASICs), field programmable gate arrays (field-programmable gate array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.
  • ASICs application specific integrated circuits
  • FPGA field programmable gate array
  • the processor 1203 can implement or execute the various methods, steps and logical block diagrams disclosed in the embodiments of this application.
  • a general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
  • the steps of the method disclosed in conjunction with the embodiments of the present application can be directly implemented by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor.
  • the software module can be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other mature storage media in this field.
  • the storage medium is located in the memory 1204.
  • the processor 1203 reads the information in the memory 1204 and completes steps 501 to 503 in the above embodiment in conjunction with its hardware.
  • the receiver 1201 may be configured to receive input numeric or character information and generate signal inputs related to performing relevant settings and functional controls of the device.
  • the transmitter 1202 can be used to output numeric or character information through the first interface; the transmitter 1202 can also be used to send instructions to the disk group through the first interface to modify the data in the disk group; the transmitter 1202 can also include a display device such as a display screen .
  • FIG. 13 is a schematic structural diagram of the training device provided by the embodiment of the present application.
  • the training device 1300 is implemented by one or more servers.
  • the training device 1300 There may be relatively large differences due to different configurations or performance, and may include one or more central processing units (CPU) 1313 (for example, one or more processors) and memory 1332, one or more storage applications Storage medium 1330 for program 1342 or data 1344 (eg, one or more mass storage devices).
  • the memory 1332 and the storage medium 1330 may be short-term storage or persistent storage.
  • the program stored in the storage medium 1330 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the training device. Furthermore, the central processor 1313 may be configured to communicate with the storage medium 1330 and execute a series of instruction operations in the storage medium 1330 on the training device 1300 .
  • the training device 1300 may also include one or more power supplies 1326, one or more wired or wireless network interfaces 1350, one or more input and output interfaces 1358; or, one or more operating systems 1341, such as Windows ServerTM, Mac OS XTM , UnixTM, LinuxTM, FreeBSDTM and so on.
  • operating systems 1341 such as Windows ServerTM, Mac OS XTM , UnixTM, LinuxTM, FreeBSDTM and so on.
  • the training device can perform steps 501 to 503 in the above embodiment.
  • An embodiment of the present application also provides a computer program product that, when run on a computer, causes the computer to perform the steps performed by the foregoing execution device, or causes the computer to perform the steps performed by the foregoing training device.
  • Embodiments of the present application also provide a computer-readable storage medium.
  • the computer-readable storage medium stores a program for performing signal processing.
  • the program When the program is run on a computer, it causes the computer to perform the steps performed by the aforementioned execution device. , or, causing the computer to perform the steps performed by the aforementioned training device.
  • the execution device, training device or terminal device provided by the embodiment of the present application may specifically be a chip.
  • the chip includes: a processing unit and a communication unit.
  • the processing unit may be, for example, a processor.
  • the communication unit may be, for example, an input/output interface. Pins or circuits, etc.
  • the processing unit can execute the computer execution instructions stored in the storage unit, so that the chip in the execution device executes the data processing method described in the above embodiment, or so that the chip in the training device executes the data processing method described in the above embodiment.
  • the storage unit is a storage unit within the chip, such as a register, cache, etc.
  • the storage unit may also be a storage unit located outside the chip in the wireless access device, such as Read-only memory (ROM) or other types of static storage devices that can store static information and instructions, random access memory (random access memory, RAM), etc.
  • ROM Read-only memory
  • RAM random access memory
  • Figure 14 is a structural schematic diagram of a chip provided by an embodiment of the present application.
  • the chip can be represented as a neural network processor NPU 1400.
  • the NPU 1400 serves as a co-processor and is mounted to the host CPU. ), tasks are allocated by the Host CPU.
  • the core part of the NPU is the arithmetic circuit 1403.
  • the arithmetic circuit 1403 is controlled by the controller 1404 to extract the matrix data in the memory and perform multiplication operations.
  • the NPU 1400 can implement the operation prediction method provided in the embodiment described in Figure 5 through the cooperation between various internal devices.
  • the computing circuit 1403 in the NPU 1400 internally includes multiple processing units (Process Engine, PE).
  • arithmetic circuit 1403 is a two-dimensional systolic array.
  • the arithmetic circuit 1403 may also be a one-dimensional systolic array or other electronic circuit capable of performing mathematical operations such as multiplication and addition.
  • the arithmetic circuit 1403 is a general matrix processing manager.
  • the arithmetic circuit obtains the corresponding data of matrix B from the weight memory 1402 and caches it on each PE in the arithmetic circuit.
  • the operation circuit takes matrix A data and matrix B from the input memory 1401 to perform matrix operations, and the partial result or final result of the matrix is stored in an accumulator (accumulator) 1408 .
  • the unified memory 1406 is used to store input data and output data.
  • the weight data directly passes through the storage unit access controller (Direct Memory Access Controller, DMAC) 1405, and the DMAC is transferred to the weight memory 1402.
  • Input data is also transferred to unified memory 1406 via DMAC.
  • DMAC Direct Memory Access Controller
  • BIU is the Bus Interface Unit, that is, the bus interface unit 1410, which is used for the interaction between the AXI bus and the DMAC and the Instruction Fetch Buffer (IFB) 1409.
  • IFB Instruction Fetch Buffer
  • the bus interface unit 1410 (Bus Interface Unit, BIU for short) is used to fetch the memory 1409 to obtain instructions from the external memory, and is also used for the storage unit access controller 1405 to obtain the original data of the input matrix A or the weight matrix B from the external memory.
  • BIU Bus Interface Unit
  • DMAC is mainly used to transfer the input data in the external memory DDR to the unified memory 1406 or the weight data to the weight memory 1402 or the input data to the input memory 1401 .
  • the vector calculation unit 1407 includes multiple arithmetic processing units, and if necessary, further processes the output of the arithmetic circuit 1403, such as vector multiplication, vector addition, exponential operation, logarithmic operation, size comparison, etc.
  • vector calculation unit 1407 can store the processed output vectors to unified memory 1406 .
  • the vector calculation unit 1407 can apply a linear function; or a nonlinear function to the output of the operation circuit 1403, such as linear interpolation on the feature plane extracted by the convolution layer, or a vector of accumulated values, to generate an activation value.
  • vector calculation unit 1407 generates normalized values, pixel-wise summed values, or both.
  • the processed output vector can be used as an activation input to the arithmetic circuit 1403, such as for use in a subsequent layer in a neural network.
  • the instruction fetch buffer 1409 connected to the controller 1404 is used to store instructions used by the controller 1404;
  • the unified memory 1406, input memory 1401, weight memory 1402 and instruction fetch memory 1409 are all On-Chip memories. External memory is private to the NPU hardware architecture.
  • the processor mentioned in any of the above places can be a general central processing unit, a microprocessor, an ASIC, or one or more integrated circuits used to control the execution of the above programs.
  • the device embodiments described above are only illustrative.
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physically separate.
  • the physical unit can be located in one place, or it can be distributed across multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • the connection relationship between modules indicates that there are communication connections between them, which can be specifically implemented as one or more communication buses or signal lines.
  • the present application can be implemented by software plus necessary general hardware. Of course, it can also be implemented by dedicated hardware including dedicated integrated circuits, dedicated CPUs, dedicated memories, Special components, etc. to achieve. In general, all functions performed by computer programs can be easily implemented with corresponding hardware. Moreover, the specific hardware structures used to implement the same function can also be diverse, such as analog circuits, digital circuits or special-purpose circuits. circuit etc. However, for this application, software program implementation is a better implementation in most cases. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence or that contributes to the existing technology.
  • the computer software product is stored in a readable storage medium, such as a computer floppy disk. , U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk, etc., including several instructions to cause a computer device (which can be a personal computer, training device, or network device, etc.) to execute the steps described in various embodiments of the present application. method.
  • a computer device which can be a personal computer, training device, or network device, etc.
  • 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 a computer-readable storage medium or retrieved from a computer Computer-readable storage media may be transmitted to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, training facility, or data center over wires (e.g., coaxial cable, optical fiber, digital subscriber line (DSL) )) or wirelessly (such as infrared, wireless, microwave, etc.) to another website, computer, training equipment or data center.
  • wires e.g., coaxial cable, optical fiber, digital subscriber line (DSL)
  • wirelessly such as infrared, wireless, microwave, etc.
  • the computer-readable storage medium may be any available medium that a computer can store, or a data storage device such as a training device or a data center integrated with one or more available media.
  • 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 (Solid State Disk, SSD)), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Quality & Reliability (AREA)
  • Computer Hardware Design (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Medical Informatics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

一种操作预测方法,方法包括:分别通过第一特征提取网络和第二特征提取网络,得到用户和物品的属性信息的第一嵌入表示和第二嵌入表示,第一嵌入表示为与推荐场景信息无关的特征,第二嵌入表示为与目标推荐场景相关的特征;第一嵌入表示和第二嵌入表示用于融合得到融合后的嵌入表示,根据融合后的嵌入表示,预测用户对物品的目标操作信息。

Description

一种操作预测方法及相关装置
本申请要求于2022年6月30日提交中国专利局、申请号为202210759871.6、发明名称为“一种操作预测方法及相关装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及人工智能领域,尤其涉及一种操作预测方法及相关装置。
背景技术
人工智能(artificial intelligence,AI)是利用数字计算机或者数字计算机控制的机器模拟、延伸和扩展人的智能,感知环境、获取知识并使用知识获得最佳结果的理论、方法、技术及应用系统。换句话说,人工智能是计算机科学的一个分支,它企图了解智能的实质,并生产出一种新的能以人类智能相似的方式作出反应的智能机器。人工智能也就是研究各种智能机器的设计原理与实现方法,使机器具有感知、推理与决策的功能。
选择率预测(或者称之为点击率预测),是指预测用户在特定环境下对某个物品的选择概率。例如,应用商店、在线广告等应用的推荐系统中,选择率预测起到关键作用;通过选择率预测可以实现最大化企业的收益和提升用户满意度,推荐系统需同时考虑用户对物品的选择率和物品竞价,其中,选择率为推荐系统根据用户历史行为预测得到,而物品竞价代表该物品被选择/下载后系统的收益。例如,可以通过构建一个函数,该函数可以根据预测的用户选择率和物品竞价计算得到一个函数值,推荐系统按照该函数值对物品进行降序排列。
为满足用户个性化的需求,推荐系统包括多种推荐场景:浏览器、负一屏、视频流等。用户根据偏好在不同的场景产生不同的行为,每个场景有用户特有的行为特性。在通常情况下,会为每一个场景单独建模。为单个场景独立建模,由于同一个用户在不同的场景中会有不同的行为,无法有效捕获用户不同场景下的行为特征,且在场景比较多的情况下,为每个场景独立建模并维护,会造成较大的人力和资源消耗。且,若通过一个特征提取网络来提取多个场景下的特征,由于不同场景之间的特征不同,网络无法学习到共有的行为特性,导致操作信息的预测精度较差。
发明内容
本申请可以通过第一特征提取网络来提取不同场景下的共同特征(也就是场景无关特征),并利用该特征和场景相关的特征的融合结果进行操作信息预测,可以提高操作信息的预测精度。
第一方面,本申请提供了一种操作预测方法,方法包括:获取在目标推荐场景中的用户和物品的属性信息;根据属性信息,分别通过第一特征提取网络和第二特征提取网络,得到第一嵌入表示和第二嵌入表示,第一嵌入表示为与推荐场景信息无关的特征,第二嵌入表示为与目标推荐场景相关的特征;第一嵌入表示和第二嵌入表示用于融合得到融合后的嵌入表示(例如可以进行矩阵的乘法等融合方式);根据融合后的嵌入表示,预测用户对物品的目标操作信息。
通过第一特征提取网络来提取与推荐场景信息无关的特征,也就是各个场景的无偏特征表示(invariant representation),并将其和与推荐场景信息相关的特征(本申请实施例可以称之为偏差表征(scenario representation))进行融合,可以表示出每个场景有用户特有的行为特性,也可以表示出不同场景之间用户特有的行为特性,提高了后续进行操作信息预测的预测精度。
在一种可能的实现中,属性信息包括于用户在目标推荐场景中的操作数据,操作数据还包括用户对物品的第一操作信息;
方法还包括:根据属性信息,通过第一神经网络,预测用户对物品的第二操作信息;根据属性信息,通过第二神经网络,预测操作数据的第一推荐场景;其中,第一操作信息和第二操作信息之间的差异、以及第一推荐场景和目标推荐场景之间的差异用于确定第一损失;根据第一损失,通过对第一神经网络中的第三特征提取网络对应的梯度和第二神经网络中的第四特征提取网络对应的梯度进行正交化处理,以得到初始特征提取网络对应的第一梯度;根据第一梯度,更新第三特征提取网络,以得到第一特征提 取网络。
本申请实施例的思路在于:通过对第三特征提取网络的训练,能够使得训练后的第三特征提取网络具备识别出共享于各个场景的无偏特征表示(invariant representation),本申请实施例通过设置第二神经网络,由于第二神经网络是为了识别出操作数据所在的推荐场景,因此,基于第二神经网络中的第四特征提取网络得到的嵌入表示可以携带有和推荐场景强相关的语义信息,这部分和推荐场景强相关的语义信息是无偏特征表示中不需要携带的。因此,为了使得第三特征提取网络能够具备识别出的嵌入表示不具有和推荐场景强相关的语义信息(本申请实施例可以称之为偏差表征(scenario representation))的能力,本申请实施例中,在确定用于更新第三特征提取网络和第四特征提取网络的梯度时,对第三特征提取网络和第四特征提取网络的梯度进行了正交化处理,正交化处理可以约束第三特征提取网络和第四特征提取网络的梯度方向(也就是参数的更新方向)相互正交或者接近于相互正交。进而使得第三特征提取网络和第四特征提取网络提取的嵌入表示可以具不同的信息,实现了嵌入表征的分离,由于第二神经网络对于操作数据具有很好的推荐场景区分能力,使得更新后的第四特征提取网络提取的嵌入表示具有和推荐场景强相关的语义信息,且第一神经网络是用于识别操作信息的,训练后的第一神经网络对用户的操作行为有较好的预估能力,因此训练后的第三特征提取网络可以具备识别出用于进行操作信息识别的信息(也就是信息的外沿),且该信息不具有和推荐场景强相关的语义信息。提高了推荐模型在各个场景的泛化性。
在一种可能的实现中,可以额外部署一个神经网络,用于对第三特征提取网络对应的梯度和第四特征提取网络对应的梯度进行正交化处理。
在一种可能的实现中,可以在第一损失中增加约束项,该约束项用于对第三特征提取网络对应的梯度和第四特征提取网络对应的梯度进行正交化约束。
在一种可能的实现中,可以在基于第一损失得到初始的第三特征提取网络对应的梯度和第四特征提取网络对应的梯度之后,可以对初始的第三特征提取网络对应的梯度和第四特征提取网络对应的梯度进行正交化处理,以便得到的第一梯度和第四特征提取网络对应的梯度的方向正交(或者接近正交)。
在一种可能的实现中,在根据属性信息,通过第一神经网络,预测用户对物品的第二操作信息以及根据属性信息,通过第二神经网络,预测操作数据的第一推荐场景的过程中,指示目标推荐场景的信息不作为第三特征提取网络和第四特征提取网络的输入。
由于第一操作信息是作为第三特征提取网络进行训练时的真值(ground truth),因此在前馈过程中第一操作信息不需要输入到第一特征提取网络中。由于指示目标推荐场景的信息是作为第四特征提取网络进行训练时的真值(ground truth),因此在前馈过程中指示目标推荐场景的信息不需要输入到第三特征提取网络中。
本申请实施例中,为了提高模型的泛化性,可以将第三特征提取网络得到的无偏表征和第四特征提取网络得到的有偏表征进行组合(或者称之为融合),并使得组合后的表征经过神经网络(用于进行操作信息预测)仍然可以具备较高的预估能力。
在一种可能的实现中,可以将第三特征提取网络得到的无偏表征和第四特征提取网络得到的有偏表征输入到第四神经网络中,预测用户对物品的第五操作信息;第五操作信息和第一操作信息之间的差异用于确定第一损失。例如,可以将第三特征提取网络得到的无偏表征和第四特征提取网络得到的有偏表征进行融合(例如拼接操作),并将融合结果输入到第四神经网络,可选的,第四神经网络和第一神经网络可以具备相同或相似的网络结构,具体可以参照上述实施例中关于第一神经网络的介绍,这里不再赘述。
在一种可能的实现中,可以将第三特征提取网络得到的无偏表征和第四特征提取网络得到的有偏表征输入到第四神经网络中,以得到用户对物品的第五操作信息,并基于第五操作信息和第一操作信息(也就是真值)的差异来构建第一损失,也就是说,第一损失除了包括上述第一操作信息和第二操作信息之间的差异、以及第一推荐场景和目标推荐场景之间的差异的损失项之外,还可以包括第五操作信息和第一操作信息之间的差异。
在一种可能的实现中,目标操作信息和第一操作信息之间的差异用于确定第二损失;方法还包括:根据第二损失,更新第一特征提取网络。
在一种可能的实现中,在实际的模型的推理过程中,训练后的第三特征提取网络需要连接和场景相关的操作信息预测网络,每个场景对应于一个与该场景相关的操作信息预测网络,在推理时,为了预测某一推荐场景(推荐场景A)中用户对物品的操作信息,用户和物品的属性信息会一方面输入到训练后的第三特征提取网络,以得到嵌入表征(例如第一嵌入表示),用户和物品的属性信息会另一方面输入到和推荐场景A相关的特征提取网络(或者输入到各个场景相关的特征提取网络,然后基于场景的权重进行加权),以得到嵌入表征(例如第二嵌入表示),该第一嵌入表征和第二嵌入表征可以融合并输入到与推荐场景A对应的操作信息预测网络,得到预测的操作信息(例如目标操作信息)。
因此,在训练过程中,针对于第三特征提取网络的更新,除了基于第一神经网络的输出反向传播得到的梯度(例如第一梯度)之外,还需要基于各个场景对应的操作信息预测网络的输出(例如目标操作信息)反向传播得到的梯度(例如第二梯度)来进行更新。
然而,上述梯度为和具体场景相关的梯度(例如第二梯度),该梯度(例如第二梯度)会和基于无偏表征得到的梯度(例如第一梯度)之间存在负向影响(彼此之间参数更新方向会有冲突,例如梯度A和梯度B为方向相反的梯度,若将梯度A和梯度B之间直接叠加后进行更新,相当于没有进行参数的更新),不能很好的利用彼此间有效的信息,来提升对应场景的效果。
本申请实施例中,为了解决上述问题,首先基于无偏表征得到的梯度进行第三特征提取网络的更新,之后,一方面基于和推荐场景相关的特征提取网络(例如第二特征提取网络)(或者输入到各个场景相关的特征提取网络,然后基于场景的权重进行加权)对用户和物品的属性信息进行处理,以得到嵌入表征(例如第二嵌入表示),另一方面,基于更新后的第三特征网络,对用户和物品的属性信息进行处理,以得到嵌入表征(例如第一嵌入表示)。该第一嵌入表征和第二嵌入表征可以融合并输入到与推荐场景A对应的操作信息预测网络,得到预测的操作信息(例如目标操作信息),基于目标操作信息得到损失(例如第二损失),并基于第二损失确定梯度(例如第二梯度),并根据第二梯度来更新第一特征提取网络。
通过上述方式,本申请并不将基于无偏表征得到的梯度和基于和场景相关的操作信息得到的梯度进行组合后进行第三特征提取的更新,而是在基于无偏表征得到的梯度对第三特征提取网络进行更新后(得到第一特征提取网络),再基于和场景相关的操作信息得到的梯度对第一特征提取网络进行更新,使得和具体场景相关的梯度和基于无偏表征得到的梯度之间不存在负向影响,能很好的利用彼此间有效的信息,来提升对应场景的效果。
在一种可能的实现中,根据属性信息,分别通过第一特征提取网络和第二特征提取网络,得到第一嵌入表示和第二嵌入表示,包括:根据属性信息,通过第二特征提取网络,得到第二嵌入表示;根据属性信息,通过第二特征提取网络,得到第二嵌入表示,包括:根据属性信息,通过包括第二特征提取网络在内的多个特征提取网络,得到多个嵌入表示;其中,每个特征提取网络对应于一个推荐场景,且第二特征提取网络对应于目标推荐场景;对多个嵌入表示进行融合,以得到第二嵌入表示。
在一种可能的实现中,对多个嵌入表示进行融合,包括:根据属性信息,预测属性信息对应于各个推荐场景的概率值;将每个概率值作为对应的推荐场景的权重,对多个嵌入表示进行融合。
也就是说,可以为各个推荐场景设置对应的特征提取网络,在前馈过程中,属性信息会输入到每个特征提取网络中,每个特征提取网络都可以输出一个嵌入表示,多个特征提取网络输出的多个嵌入表示可以进行融合,其中,在融合的方式上,可以对基于属性信息来确定各个推荐场景对应的权重(或者称之为概率值),并基于概率值进行多个嵌入表示的融合,以得到第二嵌入表示。在一种可能的实现中,可以根据属性信息,得到属性信息对应于各个推荐场景的概率值;将每个概率值作为对应的推荐场景的权重,对多个嵌入表示进行融合,以得到第二嵌入表示。例如,可以进行加权求和。
在一种可能的实现中,可以利用第四神经网络得到属性信息对应于各个推荐场景的概率值,第四神经网络可以复用第二神经网络,利用输出的针对于各个推荐场景的概率作为多个嵌入表示的权重,也可以选择端到端重新训练一个具备推荐场景预测能力的第四神经网络,实现多个场景信息的高效融合。
在一种可能的实现中,每次迭代时,可以基于一个批次(batch)的数据得到的梯度进行模型的更新,同一批次的数据可以包含不同推荐场景的操作数据,例如,可以包含第二推荐场景的操作数据,基于第二推荐场景的操作数据也可以得到一个损失(例如,本申请实施例中的第三损失)以及用于更新第一特征提取网络的梯度。然而,由于基于第二损失得到的梯度,和基于第三损失得到的梯度,是不同推荐场景下得到的梯度,彼此之前可能存在负向影响(彼此之间参数更新方向会有冲突,例如梯度A和梯度B为方向相反的梯度,若将梯度A和梯度B之间直接叠加后进行更新,相当于没有进行参数的更新),不能很好的利用彼此间有效的信息,来提升对应场景的效果。
为了解决上述问题,本申请实施例中,对基于第二损失得到的梯度,和基于第三损失得到的梯度之间进行正交化处理,进而降低不同推荐场景得到的梯度之间的相互负向影响。
在一种可能的实现中,可以获取用户在第二推荐场景中的操作数据(包括属性信息);根据第二推荐场景中的操作数据,预测用户在第二推荐场景中对物品的操作信息(例如可以将用户在第二推荐场景中的操作数据的属性信息输入到第二推荐场景对应的特征提取网络中,具体可以参照上述实施例中关于第二特征提取网络的描述,以得到嵌入表示,该嵌入表示可以输入到第二推荐场景对应的神经网络(用于进行第二推荐场景的操作信息预测)中,以得到对应的预测结果),预测结果可以和第二推荐场景中的操作数据中的操作信息的真值来确定第三损失,该第三损失在反向传播时可以得到第一特征提取网络对应的梯度(一个第三梯度)。
在一种可能的实现中,可以根据第二损失和第三损失,通过对第一特征提取网络对应的多个梯度进行正交化处理,以得到第一特征提取网络的多个第三梯度,其中,多个第三梯度中的一个梯度为根据第二损失得到的,多个第三梯度中的一个梯度为第三损失得到的;对多个第三梯度进行融合(例如通过向量加和的方式进行融合),以得到第一特征提取网络对应的第二梯度;根据第二梯度,更新第一特征提取网络。
在一种可能的实现中,操作数据包括指示目标推荐场景的信息;方法还包括:根据操作数据,通过第二特征提取网络,得到第三嵌入表示;根据第三嵌入表示,通过第三神经网络,预测用户对物品的第三操作信息;其中,第三操作信息和第一操作信息之间的差异用于确定第四损失;根据第四损失,更新第三神经网络和第二特征提取网络。
应理解,上述基于多个特征提取网络的嵌入表示的加权融合方式,虽然可以使得融合后得到的第二嵌入表示具备较多的对应的推荐场景的信息,且含有较少的非对应的推荐场景的信息。然而,由于是将属性信息(不包含指示目标推荐场景的信息)输入到多个特征提取网络中,因此,多个特征提取网络输出的嵌入表征不具备对应的推荐场景的准确的语义信息。因此,在对多个特征提取网络训练的过程中,可以另外将包含指示推荐场景的信息以及属性信息都输入到特征提取网络中,参与网络训练的前馈过程。
在一种可能的实现中,操作信息指示用户是否对物品进行了目标操作,目标操作包括如下的至少一种:点击操作、浏览操作,加入购物车操作以及购买操作。
在一种可能的实现中,属性信息包括用户的用户属性,用户属性包括如下的至少一种:性别,年龄,职业,收入,爱好,教育程度。
在一种可能的实现中,属性信息包括物品的物品属性,物品属性包括如下的至少一种:物品名称,开发者,安装包大小,品类,好评度。
其中,用户的属性信息可以为与用户喜好特征相关的属性,性别、年龄、职业、收入、爱好以及受教育程度中的至少一种,其中,性别可以为男或者女,年龄可以为0-100之间的数字,职业可以为教师、程序员、厨师等等,爱好可以为篮球、网球、跑步等等,受教育程度可以为小学、初中、高中、大学等等;本申请并不限定用户的属性信息的具体类型;
其中,物品可以为实体物品,或者是虚拟物品,例如可以为APP、音视频、网页以及新闻资讯等物品,物品的属性信息可以为物品名称、开发者、安装包大小、品类以及好评度中的至少一种,其中,以 物品为应用程序为例,物品的品类可以为聊天类、跑酷类游戏、办公类等等,好评度可以为针对于物品的打分、评论等;本申请并不限定物品的属性信息的具体类型。
在一种可能的实现中,不同的推荐场景为不同的应用程序,或者是,不同的推荐场景为为不同类的应用程序(例如视频类的应用程序和浏览器类的应用程序为不同的应用程序),或者是,不同的推荐场景为相同应用程序的不同功能(例如同一个应用程序的不同频道,例如新闻频道、科技频道等),上述不同的功能可以按照推荐类别进行划分。
在一种可能的实现中,方法还包括:当目标操作信息满足预设条件,确定向用户推荐物品。
第二方面,本申请提供了一种操作预测装置,装置包括:
获取模块,用于获取在目标推荐场景中的用户和物品的属性信息;
特征提取模块,用于根据属性信息,分别通过第一特征提取网络和第二特征提取网络,得到第一嵌入表示和第二嵌入表示,第一嵌入表示为与推荐场景信息无关的特征,第二嵌入表示为与目标推荐场景相关的特征;第一嵌入表示和第二嵌入表示用于融合得到融合后的嵌入表示;
预测模块,用于根据融合后的嵌入表示,预测用户对物品的目标操作信息。
在一种可能的实现中,属性信息包括于用户在目标推荐场景中的操作数据,操作数据还包括用户对物品的第一操作信息;
预测模块,还用于:
根据属性信息,通过第一神经网络,预测用户对物品的第二操作信息;
根据属性信息,通过第二神经网络,预测操作数据的第一推荐场景;其中,第一操作信息和第二操作信息之间的差异、以及第一推荐场景和目标推荐场景之间的差异用于确定第一损失;
装置还包括:
模型更新模块,还用于根据第一损失,通过对第一神经网络中的第三特征提取网络对应的梯度和第二神经网络中的第四特征提取网络对应的梯度进行正交化处理,以得到初始特征提取网络对应的第一梯度;
根据第一梯度,更新第三特征提取网络,以得到第一特征提取网络。
在一种可能的实现中,目标操作信息和第一操作信息之间的差异用于确定第二损失;模型更新模块,还用于:
根据第二损失,更新第一特征提取网络。
在一种可能的实现中,特征提取模块,具体用于根据属性信息,通过第二特征提取网络,得到第二嵌入表示;
根据属性信息,通过第二特征提取网络,得到第二嵌入表示,包括:
根据属性信息,通过包括第二特征提取网络在内的多个特征提取网络,得到多个嵌入表示;其中,每个特征提取网络对应于一个推荐场景,且第二特征提取网络对应于目标推荐场景;
对多个嵌入表示进行融合,以得到第二嵌入表示。
在一种可能的实现中,特征提取模块,具体用于根据属性信息,预测属性信息对应于各个推荐场景的概率值;
将每个概率值作为对应的推荐场景的权重,对多个嵌入表示进行融合。
在一种可能的实现中,获取模块,还用于:
获取用户在第二推荐场景中的操作数据;
预测模块,还用于根据第二推荐场景中的操作数据,预测用户在第二推荐场景中对物品的操作信息;其中,用户在第二推荐场景中对物品的操作信息用于确定第三损失;
模型更新模块,具体用于:根据第二损失和第三损失,通过对第一特征提取网络对应的多个梯度进行正交化处理,以得到第一特征提取网络的多个第三梯度;
对多个第四梯度进行融合,以得到第一特征提取网络对应的第二梯度;
根据第二梯度,更新第一特征提取网络。
在一种可能的实现中,操作数据包括指示目标推荐场景的信息;特征提取模块,还用于根据操作数据,通过第二特征提取网络,得到第三嵌入表示;
根据第三嵌入表示,通过第三神经网络,预测用户对物品的第三操作信息;其中,第三操作信息和第一操作信息之间的差异用于确定第四损失;
模型更新模块,还用于:根据第四损失,更新第三神经网络和第二特征提取网络。
在一种可能的实现中,目标操作信息指示用户是否对物品进行了目标操作,目标操作包括如下的至少一种:
点击操作、浏览操作,加入购物车操作以及购买操作。
在一种可能的实现中,属性信息包括用户的用户属性,用户属性包括如下的至少一种:性别,年龄,职业,收入,爱好,教育程度。
在一种可能的实现中,属性信息包括物品的物品属性,物品属性包括如下的至少一种:物品名称,开发者,安装包大小,品类,好评度。
在一种可能的实现中,不同的推荐场景为不同的应用程序;或者,
不同的推荐场景为不同类的应用程序;或者,
不同的推荐场景为同一个应用程序的不同功能。
在一种可能的实现中,装置还包括:
当目标操作信息满足预设条件,确定向用户推荐物品。
第三方面,本申请实施例提供了一种模型训练方法,所述方法包括:
获取用户在目标推荐场景中的操作数据,所述操作数据包括所述用户和物品的属性信息、以及所述用户对所述物品的第一操作信息;
根据所述属性信息,通过第一神经网络,预测所述用户对所述物品的第二操作信息;
根据所述属性信息,通过第二神经网络,预测所述操作数据的第一推荐场景;其中,所述第一操作信息和所述第二操作信息之间的差异、以及所述第一推荐场景和所述目标推荐场景之间的差异用于确定第一损失;
根据所述第一损失,通过对所述第一神经网络中的第三特征提取网络对应的梯度和所述第二神经网络中的第四特征提取网络对应的梯度进行正交化处理,以得到所述初始特征提取网络对应的第一梯度;
根据所述第一梯度,更新所述第三特征提取网络,以得到第一特征提取网络。
在一种可能的实现中,所述方法还包括:
根据所述属性信息,分别通过所述第一特征提取网络和第二特征提取网络,得到第一嵌入表示和第二嵌入表示;所述第一嵌入表示和所述第二嵌入表示用于融合得到融合后的嵌入表示;
根据所述融合后的嵌入表示,预测所述用户对所述物品的目标操作信息;所述目标操作信息和所述第一操作信息之间的差异用于确定第二损失;
根据所述第二损失,更新所述第一特征提取网络。
在一种可能的实现中,所述根据所述属性信息,分别通过所述第一特征提取网络和第二特征提取网络,得到第一嵌入表示和第二嵌入表示,包括:
根据所述属性信息,通过第二特征提取网络,得到第二嵌入表示;
所述根据所述属性信息,通过第二特征提取网络,得到第二嵌入表示,包括:
根据所述属性信息,通过包括所述第二特征提取网络在内的多个特征提取网络,得到多个嵌入表示;其中,每个所述特征提取网络对应于一个推荐场景,且所述第二特征提取网络对应于所述目标推荐场景;
对所述多个嵌入表示进行融合,以得到所述第二嵌入表示。
在一种可能的实现中,所述方法还包括:
获取用户在第二推荐场景中的操作数据;
根据所述第二推荐场景中的操作数据,预测所述用户在所述第二推荐场景中对所述物品的操作信息;其中,所述用户在所述第二推荐场景中对所述物品的操作信息用于确定第三损失;
所述根据所述第二损失,更新所述第一特征提取网络,包括:
根据所述第二损失和所述第三损失,通过对所述第一特征提取网络对应的多个梯度进行正交化处理,以得到所述第一特征提取网络的多个第三梯度;
对所述多个第四梯度进行融合,以得到所述第一特征提取网络对应的第二梯度;
根据所述第二梯度,更新所述第一特征提取网络。
第四方面,本申请实施例提供了一种模型训练装置,所述装置包括:
获取模块,用于获取用户在目标推荐场景中的操作数据,所述操作数据包括所述用户和物品的属性信息、以及所述用户对所述物品的第一操作信息;
预测模块,用于根据所述属性信息,通过第一神经网络,预测所述用户对所述物品的第二操作信息;
根据所述属性信息,通过第二神经网络,预测所述操作数据的第一推荐场景;其中,所述第一操作信息和所述第二操作信息之间的差异、以及所述第一推荐场景和所述目标推荐场景之间的差异用于确定第一损失;
根据所述第一损失,通过对所述第一神经网络中的第三特征提取网络对应的梯度和所述第二神经网络中的第四特征提取网络对应的梯度进行正交化处理,以得到所述初始特征提取网络对应的第一梯度;
模型更新模块,用于根据所述第一梯度,更新所述第三特征提取网络,以得到第一特征提取网络。
在一种可能的实现中,所述装置还包括:
特征提取模块,用于根据所述属性信息,分别通过所述第一特征提取网络和第二特征提取网络,得到第一嵌入表示和第二嵌入表示;所述第一嵌入表示和所述第二嵌入表示用于融合得到融合后的嵌入表示;
预测模块,还用于根据所述融合后的嵌入表示,预测所述用户对所述物品的目标操作信息;所述目标操作信息和所述第一操作信息之间的差异用于确定第二损失;
模型更新模块,还用于根据所述第二损失,更新所述第一特征提取网络。
在一种可能的实现中,所述根据所述属性信息,分别通过所述第一特征提取网络和第二特征提取网络,得到第一嵌入表示和第二嵌入表示,包括:
根据所述属性信息,通过第二特征提取网络,得到第二嵌入表示;
所述根据所述属性信息,通过第二特征提取网络,得到第二嵌入表示,包括:
根据所述属性信息,通过包括所述第二特征提取网络在内的多个特征提取网络,得到多个嵌入表示;其中,每个所述特征提取网络对应于一个推荐场景,且所述第二特征提取网络对应于所述目标推荐场景;
对所述多个嵌入表示进行融合,以得到所述第二嵌入表示。
在一种可能的实现中,所述获取模块,还用于:
获取用户在第二推荐场景中的操作数据;
预测模块,还用于根据所述第二推荐场景中的操作数据,预测所述用户在所述第二推荐场景中对所述物品的操作信息;其中,所述用户在所述第二推荐场景中对所述物品的操作信息用于确定第三损失;
模型更新模块,具体用于根据所述第二损失和所述第三损失,通过对所述第一特征提取网络对应的多个梯度进行正交化处理,以得到所述第一特征提取网络的多个第三梯度;
对所述多个第四梯度进行融合,以得到所述第一特征提取网络对应的第二梯度;
根据所述第二梯度,更新所述第一特征提取网络。
第五方面,本申请实施例提供了一种操作预测装置,可以包括存储器、处理器以及总线系统,其中,存储器用于存储程序,处理器用于执行存储器中的程序,以执行如上述第一方面任一可选的方法。
第六方面,本申请实施例提供了一种模型训练装置,可以包括存储器、处理器以及总线系统,其中,存储器用于存储程序,处理器用于执行存储器中的程序,以执行如上述第三方面任一可选的方法。
第七方面,本申请实施例提供了一种计算机可读存储介质,计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行上述第一方面及任一可选的方法、以及上述第三方面任一可选的方法。
第八方面,本申请实施例提供了一种计算机程序产品,包括代码,当代码被执行时,用于实现上述第一方面及任一可选的方法、以及上述第三方面任一可选的方法。
第九方面,本申请提供了一种芯片系统,该芯片系统包括处理器,用于支持执行设备或训练设备实现上述方面中所涉及的功能,例如,发送或处理上述方法中所涉及的数据;或,信息。在一种可能的设计中,芯片系统还包括存储器,所述存储器,用于保存执行设备或训练设备必要的程序指令和数据。该芯片系统,可以由芯片构成,也可以包括芯片和其他分立器件。
附图说明
图1为人工智能主体框架的一种结构示意图;
图2为本申请实施例提供的一种系统架构的示意图;
图3为本申请实施例提供的一种系统架构的示意图;
图4为本申请实施例提供的一种推荐场景的示意图;
图5为本申请实施例提供的一种操作预测方法的流程示意图;
图6为一种推荐模型的示意;
图7为一种推荐模型的示意;
图8为一种推荐模型的示意;
图9为一种推荐模型的示意;
图10为本申请实施例提供的一种操作预测方法的流程示意图;
图11为本申请实施例提供的一种推荐装置的结构示意图;
图12为本申请实施例提供的一种执行设备的示意图;
图13为本申请实施例提供的一种训练设备的示意图;
图14为本申请实施例提供的一种芯片的示意图。
具体实施方式
下面结合本发明实施例中的附图对本发明实施例进行描述。本发明的实施方式部分使用的术语仅用于对本发明的具体实施例进行解释,而非旨在限定本发明。
下面结合附图,对本申请的实施例进行描述。本领域普通技术人员可知,随着技术的发展和新场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的术语在适当情况下可以互换,这仅仅是描述本申请的实施例中对相同属性的对象在描述时所采用的区分方式。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,以便包含一系列单元的过程、方法、系统、产品或设备不必限于那些单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它单元。
首先对人工智能系统总体工作流程进行描述,请参见图1,图1示出的为人工智能主体框架的一种结构示意图,下面从“智能信息链”(水平轴)和“IT价值链”(垂直轴)两个维度对上述人工智能主题框架进行阐述。其中,“智能信息链”反映从数据的获取到处理的一列过程。举例来说,可以是智能信息感知、智能信息表示与形成、智能推理、智能决策、智能执行与输出的一般过程。在这个过程中,数据经历了“数据—信息—知识—智慧”的凝练过程。“IT价值链”从人智能的底层基础设施、信息(提供和处理技术实现)到系统的产业生态过程,反映人工智能为信息技术产业带来的价值。
(1)基础设施
基础设施为人工智能系统提供计算能力支持,实现与外部世界的沟通,并通过基础平台实现支撑。通过传感器与外部沟通;计算能力由智能芯片(CPU、NPU、GPU、ASIC、FPGA等硬件加速芯片)提供;基础平台包括分布式计算框架及网络等相关的平台保障和支持,可以包括云存储和计算、互联互通网络等。举例来说,传感器和外部沟通获取数据,这些数据提供给基础平台提供的分布式计算系统中的智能芯片进行计算。
(2)数据
基础设施的上一层的数据用于表示人工智能领域的数据来源。数据涉及到图形、图像、语音、文本,还涉及到传统设备的物联网数据,包括已有系统的业务数据以及力、位移、液位、温度、湿度等感知数据。
(3)数据处理
数据处理通常包括数据训练,机器学习,深度学习,搜索,推理,决策等方式。
其中,机器学习和深度学习可以对数据进行符号化和形式化的智能信息建模、抽取、预处理、训练等。
推理是指在计算机或智能系统中,模拟人类的智能推理方式,依据推理控制策略,利用形式化的信息进行机器思维和求解问题的过程,典型的功能是搜索与匹配。
决策是指智能信息经过推理后进行决策的过程,通常提供分类、排序、预测等功能。
(4)通用能力
对数据经过上面提到的数据处理后,进一步基于数据处理的结果可以形成一些通用的能力,比如可以是算法或者一个通用系统,例如,翻译,文本的分析,计算机视觉的处理,语音识别,图像的识别等等。
(5)智能产品及行业应用
智能产品及行业应用指人工智能系统在各领域的产品和应用,是对人工智能整体解决方案的封装,将智能信息决策产品化、实现落地应用,其应用领域主要包括:智能终端、智能交通、智能医疗、自动驾驶、智慧城市等。
本申请实施例可以应用于信息推荐领域,该场景包括但不限于涉及电商产品推荐、搜索引擎结果推荐、应用市场推荐、音乐推荐、视频推荐等场景,各种不同应用场景中被推荐的物品也可以称为“对象”以方便后续描述,即在不同的推荐场景中,推荐对象可以是APP,或者视频,或者音乐,或者某款商品(如线上购物平台的呈现界面,会根据用户的不同而显示不同的商品进行呈现,这实质也可以是通过推荐模型的推荐结果来进行呈现)。这些推荐场景通常涉及用户行为日志采集、日志数据预处理(例如,量化、采样等)、样本集训练以获得推荐模型、根据推荐模型对训练样本项对应的场景中所涉及的对象(如APP、音乐等)进行分析处理、例如,推荐模型训练环节中所选择的样本来自于手机应用市场用户对于所推荐APP的操作行为,则由此所训练出来的推荐模型则适用于上述手机APP应用市场,或者可以用于其它的类型的终端的APP应用市场进行终端APP的推荐。推荐模型将最终计算出各个待推荐对象的推荐概率或 者分值,推荐系统根据一定的选择规则选定的推荐结果,例如按照推荐概率或者分值进行排序,通过相应的应用或者终端设备呈现给用户、用户对推荐结果中的对象进行操作以生成用户行为日志等环节。
参照图4,在推荐过程中,当一个用户与推荐系统进行交互会触发一个推荐请求,推荐系统会将该请求及其相关的特征信息输入到部署的推荐模型中,然后预测用户对所有候选对象的点击率。随后,根据预测的点击率对候选对象进行降序排列,按顺序将候选对象展示在不同的位置作为对用户的推荐结果。用户对展示的项目进行浏览并发生用户行为,如浏览、点击和下载等。这些用户行为会被存入日志中作为训练数据,通过离线训练模块不定期地更新推荐模型的参数,提高模型的推荐效果。
比如,用户打开手机应用市场即可触发应用市场的推荐模块,应用市场的推荐模块会根据用户的历史下载记录、用户点击记录,应用的自身特征,时间、地点等环境特征信息,预测用户对给定的各个候选应用的下载可能性。根据预测的结果,应用市场按照可能性降序展示,达到提高应用下载概率的效果。具体来说,将更有可能下载的应用排在靠前的位置,将不太可能下载的应用排列在靠后的位置。而用户的行为也会存入日志并通过离线训练模块对预测模型的参数进行训练和更新。
又比如,在终身伴侣相关的应用中,可以基于用户在视频、音乐、新闻等域的历史数据,通过各种模型和算法,仿照人脑机制,构建认知大脑,搭建用户终身学习系统框架。终身伴侣可以根据系统数据和应用数据等来记录用户过去发生的事件,理解用户的当前意图,预测用户未来的动作或行为,最终实现智能服务。在当前第一阶段,根据音乐APP、视频APP和浏览器APP等获取用户的行为数据(包含端侧短信、照片、邮件事件等信息),一方面构建用户画像系统,另一方面实现基于用户信息过滤、关联分析、跨域推荐、因果推理等的学习与记忆模块,构建用户个人知识图谱。
接下来介绍本申请实施例的应用架构。
参见附图2,本发明实施例提供了一种推荐系统架构200。数据采集设备260用于采集样本,一个训练样本可以由多个特征信息(或者描述为属性信息,例如用户属性以及物品属性)组成,特征信息可以有多种,具体可以包括用户特征信息和对象特征信息以及标签特征,用户特征信息用于表征用户的特征,例如性别,年龄,职业,爱好等,对象特征信息用于表征向用户所推送的对象的特征,不同的推荐系统对应不同的对象,不同的对象所需要提取的特征类型也不想同,例如APP市场的训练样本中所提取的对象特征可以为,APP的名称(标识),类型,大小等;而电商类APP的训练样本中所提起的对象特征可以为,商品的名称,所属的类别,价格区间等;标签特征,则是用于表示这个样本是正例还是负例,通常样本的标签特征可以通过用户对所推荐对象的操作信息所获的,用户对所推荐对象有进行操作的样本为正例,用户对所推荐对象没有进行操作,或者仅浏览的样本为负例,例如当用户点击或者下载或者购买了所推荐的对象,则所述标签特征为1,表示该样本是正例,而如果用户没有对所推荐的对象进行任何操作,则所述标签特征为0,表示该样本是负例。样本在采集后可以保存在数据库230中,数据库230中的样本中的部分或全部特征信息也可以直接从客户设备240中获取,如用户特征信息,用户对对象的操作信息(用于确定类型标识),对象特征信息(如对象标识)等。训练设备220基于数据库230中样本训练获取模型参数矩阵用于生成推荐模型201(例如本申请实施例中的特征提取网络以及神经网络等)。下面将更详细地描述训练设备220如何训练得到用于生成推荐模型201的模型参数矩阵,推荐模型201能够用于对大量对象进行评估从而得出各个待推荐对象的分值,进一步的还可以从大量对象的评估结果中推荐指定或者预设数目个对象,计算模块211基于推荐模型201的评估结果获取推荐结果,通过I/O接口212推荐给客户设备。
在本申请实施例中,该训练设备220可以从数据库230中样本集内选取正、负样本添加到所述训练集中,之后采用推荐模型对训练集中的样本进行训练从而得到训练后的推荐模型;计算模块211的实现细节可以参照图5所示的方法实施例的详细描述。
训练设备220基于样本训练获得模型参数矩阵后用于构建推荐模型201后,将推荐模型201发送给执行设备210,或者直接将模型参数矩阵发送给执行设备210,在执行设备210中构建推荐模型,用于进行相应系统的推荐,例如基于视频相关的样本训练获得的推荐模型可以用于视频网站或APP中对用户进行视频的推荐,基于APP相关的样本训练获得的推荐模型可以用于应用市场中对用户进行APP的推荐。
执行设备210配置有I/O接口212,与外部设备进行数据交互,执行设备210可以通过I/O接口212 从客户设备240获取用户特征信息,例如用户标识、用户身份、性别、职业、爱好等,此部分信息也可以从系统数据库中获取。推荐模型201基于用户特征信息和待推荐对象特征信息向用户推荐目标推荐对象。执行设备210可以设置在云端服务器中,也可以设置于用户客户端中。
执行设备210可以调用数据存储系统250中的数据、代码等,同时也可以将输出的数据存入数据存储系统250中。数据存储系统250可以设置于执行设备210中,也可以独立设置,或者设置于其他网络实体中,数量可以是一个也可以是多个。
计算模块211使用推荐模型201对用户特征信息,待推荐对象特征信息进行处理,例如,该计算模块211使用推荐模型201对用户特征信息,以及待推荐对象的特征信息进行分析处理,从而得出该待推荐对象的分值,对待推荐对象按照分值进行排序,其中,排序靠前的对象将作为推荐给客户设备240的对象。
最后,I/O接口212将推荐结果返回给客户设备240,呈现给用户。
更深层地,训练设备220可以针对不同的目标,基于不同的样本特征信息生成相应的推荐模型201,以给用户提供更佳的结果。
值得注意的,附图2仅是本发明实施例提供的一种系统架构的示意图,图中所示设备、器件、模块等之间的位置关系不构成任何限制,例如,在附图2中,数据存储系统250相对执行设备210是外部存储器,在其它情况下,也可将数据存储系统250置于执行设备210中。
在本申请实施例中,该训练设备220、执行设备210、客户设备240可以分别为三个不同的物理设备,也可能该训练设备220和执行设备210在同一个物理设备或者一个集群上,也可能该执行设备210与该客户设备240在同一个物理设备或者一个集群上。
参见附图3,是本发明实施例提的一种系统架构300。在此架构中执行设备210由一个或多个服务器实现,可选的,与其它计算设备配合,例如:数据存储、路由器、负载均衡器等设备;执行设备210可以布置在一个物理站点上,或者分布在多个物理站点上。执行设备210可以使用数据存储系统250中的数据,或者调用数据存储系统250中的程序代码实现对象推荐的功能,具体地,将待推荐的对象的信息输入到推荐模型中,推荐模型为每个待推荐对象生成预估分数,然后按照预估分数从高到低的顺序进行排序,按照排序结果向用户推荐该待推荐对象。例如,将排序结果中的前10个对象推荐给用户。
其中,数据存储系统250用于接收和存储训练设备发送的推荐模型的参数,以及用于存储通过推荐模型得到的推荐结果的数据,当然还可能包括该存储系统250正常运行所需的程序代码(或指令)。数据存储系统250可以为部署在执行设备210以外的一个设备或者多个设备构成的分布式存储集群,此时,当执行设备210需要使用存储系统250上的数据时,可以由存储系统250向执行设备210发送该执行设备所需的数据,相应地,该执行设备210接收并存储(或者缓存)该数据。当然数据存储系统250也可以部署在执行设备210内,当部署在执行设备210内时,该分布式存储系统可以包括一个或者多个存储器,可选的,存在多个存储器时,不同的存储器用于存储不同类型的数据,如通过训练设备生成的推荐模型的模型参数和通过推荐模型得到的推荐结果的数据可以分别存储在两个不同的存储器上。
用户可以操作各自的用户设备(例如本地设备301和本地设备302)与执行设备210进行交互。每个本地设备可以表示任何计算设备,例如个人计算机、计算机工作站、智能手机、平板电脑、智能摄像头、智能汽车或其他类型蜂窝电话、媒体消费设备、可穿戴设备、机顶盒、游戏机等。
每个用户的本地设备可以通过任何通信机制/通信标准的通信网络与执行设备210进行交互,通信网络可以是广域网、局域网、点对点连接等方式,或它们的任意组合。
在另一种实现中,执行设备210可以由本地设备实现,例如,本地设备301可以基于推荐模型实现执行设备210的的推荐功能获取用户特征信息并向用户反馈推荐结果,或者为本地设备302的用户提供服务。
由于本申请实施例涉及大量神经网络的应用,为了便于理解,下面先对本申请实施例涉及的相关术语及神经网络等相关概念进行介绍。
1、点击概率(click-throughrate,CTR)
点击概率又可以称为点击率,是指网站或者应用程序上推荐信息(例如,推荐物品)被点击次数和曝光次数之比,点击率通常是推荐系统中衡量推荐系统的重要指标。
2、个性化推荐系统
个性化推荐系统是指根据用户的历史数据(例如本申请实施例中的操作信息),利用机器学习算法进行分析,并以此对新请求进行预测,给出个性化的推荐结果的系统。
3、离线训练(offlinetraining)
离线训练是指在个性化推荐系统中,根据用户的历史数据(例如本申请实施例中的操作信息),对推荐模型参数按照器学习的算法进行迭代更新直至达到设定要求的模块。
4、在线预测(onlineinference)
在线预测是指基于离线训练好的模型,根据用户、物品和上下文的特征预测该用户在当前上下文环境下对推荐物品的喜好程度,预测用户选择推荐物品的概率。
例如,图3是本申请实施例提供的推荐系统的示意图。如图3所示,当一个用户进入统,会触发一个推荐的请求,推荐系统会将该请求及其相关信息(例如本申请实施例中的操作信息)输入到推荐模型,然后预测用户对系统内的物品的选择率。进一步,根据预测的选择率或基于该选择率的某个函数将物品降序排列,即推荐系统可以按顺序将物品展示在不同的位置作为对用户的推荐结果。用户浏览不同的处于位置的物品并发生用户行为,如浏览、选择以及下载等。同时,用户的实际行为会存入日志中作为训练数据,通过离线训练模块不断更新推荐模型的参数,提高模型的预测效果。
例如,用户打开智能终端(例如,手机)中的应用市场即可触发应用市场中的推荐系统。应用市场的推荐系统会根据用户的历史行为日志,例如,用户的历史下载记录、用户选择记录,应用市场的自身特征,比如时间、地点等环境特征信息,预测用户下载推荐的各个候选APP的概率。根据计算的结果,应用市场的推荐系统可以按照预测的概率值大小降序展示候选APP,从而提高候选APP的下载概率。
示例性地,可以将预测的用户选择率较高的APP展示在靠前的推荐位置,将预测的用户选择率较低的APP展示在靠后的推荐位置。
上述推荐模型可以是神经网络模型,下面对本申请实施例可能涉及的神经网络的相关术语和概念进行介绍。
(1)神经网络
神经网络可以是由神经单元组成的,神经单元可以是指以xs(即输入数据)和截距1为输入的运算单元,该运算单元的输出可以为:
其中,s=1、2、……n,n为大于1的自然数,Ws为xs的权重,b为神经单元的偏置。f为神经单元的激活函数(activation functions),用于将非线性特性引入神经网络中,来将神经单元中的输入信号转换为输出信号。该激活函数的输出信号可以作为下一层卷积层的输入,激活函数可以是sigmoid函数。神经网络是将多个上述单一的神经单元联结在一起形成的网络,即一个神经单元的输出可以是另一个神经单元的输入。每个神经单元的输入可以与前一层的局部接受域相连,来提取局部接受域的特征,局部接受域可以是由若干个神经单元组成的区域。
(2)深度神经网络
深度神经网络(Deep Neural Network,DNN),也称多层神经网络,可以理解为具有很多层隐含层的神经网络,这里的“很多”并没有特别的度量标准。从DNN按不同层的位置划分,DNN内部的神经网络可以分为三类:输入层,隐含层,输出层。一般来说第一层是输入层,最后一层是输出层,中间的层数都是隐含层。层与层之间是全连接的,也就是说,第i层的任意一个神经元一定与第i+1层的任意一个神经元相连。虽然DNN看起来很复杂,但是就每一层的工作来说,其实并不复杂,简单来说就是如下线性关系表达式:其中,是输入向量,是输出向量,是偏移向量,W是权重矩阵(也称系数),α()是激活函数。每一层仅仅是对输入向量经过如此简单的操作得到输出向量由于DNN 层数多,则系数W和偏移向量的数量也就很多了。这些参数在DNN中的定义如下所述:以系数W为例:假设在一个三层的DNN中,第二层的第4个神经元到第三层的第2个神经元的线性系数定义为上标3代表系数W所在的层数,而下标对应的是输出的第三层索引2和输入的第二层索引4。总结就是:第L-1层的第k个神经元到第L层的第j个神经元的系数定义为需要注意的是,输入层是没有W参数的。在深度神经网络中,更多的隐含层让网络更能够刻画现实世界中的复杂情形。理论上而言,参数越多的模型复杂度越高,“容量”也就越大,也就意味着它能完成更复杂的学习任务。训练深度神经网络的也就是学习权重矩阵的过程,其最终目的是得到训练好的深度神经网络的所有层的权重矩阵(由很多层的向量W形成的权重矩阵)。
(3)损失函数
在训练深度神经网络的过程中,因为希望深度神经网络的输出尽可能的接近真正想要预测的值,所以可以通过比较当前网络的预测值和真正想要的目标值,再根据两者之间的差异情况来更新每一层神经网络的权重向量(当然,在第一次更新之前通常会有初始化的过程,即为深度神经网络中的各层预先配置参数),比如,如果网络的预测值高了,就调整权重向量让它预测低一些,不断的调整,直到深度神经网络能够预测出真正想要的目标值或与真正想要的目标值非常接近的值。因此,就需要预先定义“如何比较预测值和目标值之间的差异”,这便是损失函数(loss function)或目标函数(objective function),它们是用于衡量预测值和目标值的差异的重要方程。其中,以损失函数举例,损失函数的输出值(loss)越高表示差异越大,那么深度神经网络的训练就变成了尽可能缩小这个loss的过程。
(4)反向传播算法
可以采用误差反向传播(back propagation,BP)算法在训练过程中修正初始模型中参数的大小,使得模型的误差损失越来越小。具体地,前向传递输入信号直至输出会产生误差损失,通过反向传播误差损失信息来更新初始模型中的参数,从而使误差损失收敛。反向传播算法是以误差损失为主导的反向传播运动,旨在得到最优的模型参数,例如权重矩阵。
(5)机器学习系统
基于输入数据和标签,通过梯度下降等优化方法训练机器学习模型的参数,最终利用训练得到的模型来完成未知数据的预测。
(6)个性化推荐系统
根据用户的历史数据,利用机器学习算法进行分析和建模,并以此对新的用户请求进行预测,给出个性化的推荐结果的系统。
(7)推荐场景
推荐场景可以是一种服务于特定需求的应用程序(application,APP),比如华为浏览器、华为视频,也可以指具体的频道,比如浏览器信息流中的娱乐频道、新闻频道、科技频道等。
(8)多场景建模
融合多个场景的数据,训练产生一个模型,服务于多个场景。
机器学习系统,包括个性化推荐系统,基于输入数据和标签,通过梯度下降等优化方法训练机器学习模型的参数,当模型参数收敛之后,可利用该模型来完成未知数据的预测。以个性化推荐系统中的点击率预测为例,其输入数据包括用户属性和商品属性等。如何根据用户的偏好,预测出个性化的推荐列表,对提升推荐系统的推荐精度有着重要的影响。
为满足用户个性化的需求,推荐系统包括多种推荐场景:浏览器、负一屏、视频流等。用户根据偏好在不同的场景产生不同的行为,每个场景有用户特有的行为特性也有共有的行为特性。在通常情况下,会为每一个场景单独建模。
但是单个场景独立建模,由于同一个用户在不同的场景中会有不同的行为,单场景独立建模,无法有效捕获用户不同场景下的行为特征,从而更充分的学习用户偏好,且在场景比较多的情况下,为每个场景独立建模并维护,会造成较大的人力和资源消耗。
STAR(Star Topology Adaptive Recommender)模型在现有的实现中,通过多场景模型来捕获用户不同场景下共同的行为特征,例如在STAR(star topology adaptive recommender)模型中,通过训练一个公共的特征提取网络,来适配各个场景,然而现有技术中公共的特征提取网络并不能提取出能够准确表征出用户不同场景共同的行为特征的嵌入表示,使得推荐模型在各个场景的泛化性较差。
为了解决上述问题,本申请提供了一种操作预测方法,该操作预测方法可以为模型训练的前馈过程,也可以为推理过程。
参照图5,图5为本申请实施例提供的一种操作预测方法的实施例示意,如图5示出的那样,本申请实施例提供的一种操作预测方法包括:
501、获取获取在目标推荐场景中的用户和物品的属性信息。
本申请实施例中,步骤501的执行主体可以为终端设备,终端设备可以为便携式移动设备,例如但不限于移动或便携式计算设备(如智能手机)、个人计算机、服务器计算机、手持式设备(例如平板)或膝上型设备、多处理器系统、游戏控制台或控制器、基于微处理器的系统、机顶盒、可编程消费电子产品、移动电话、具有可穿戴或配件形状因子(例如,手表、眼镜、头戴式耳机或耳塞)的移动计算和/或通信设备、网络PC、小型计算机、大型计算机、包括上面的系统或设备中的任何一种的分布式计算环境等等。
本申请实施例中,步骤501的执行主体可以为云侧的服务器,服务器可以接收来自终端设备发送的用户的操作数据,进而服务器可以获取到用户的操作数据。
为了方便描述,以下不对执行主体的形态进行区分,都描述为训练设备。
在模型训练的过程中,属性信息可以为用户的操作数据。
其中,用户的操作数据可以基于用户与物品之间的交互记录(例如用户的行为日志)得到,该操作数据可以包括用户对各个物品的真实操作记录,操作数据可以包括用户的属性信息、各个物品的属性信息信息以及所述用户对所述多个物品进行的操作的操作类型(例如点击、下载等等)。
其中,用户的属性信息可以为与用户喜好特征相关的属性,性别、年龄、职业、收入、爱好以及受教育程度中的至少一种,其中,性别可以为男或者女,年龄可以为0-100之间的数字,职业可以为教师、程序员、厨师等等,爱好可以为篮球、网球、跑步等等,受教育程度可以为小学、初中、高中、大学等等;本申请并不限定用户的属性信息的具体类型。
其中,物品可以为实体物品,或者是虚拟物品,例如可以为应用程序(application,APP)、音视频、网页以及新闻资讯等物品,物品的属性信息可以为物品名称、开发者、安装包大小、品类以及好评度中的至少一种,其中,以物品为应用程序为例,物品的品类可以为聊天类、跑酷类游戏、办公类等等,好评度可以为针对于物品的打分、评论等;本申请并不限定物品的属性信息的具体类型。
在一种可能的实现中,训练设备可以获取到用户的操作数据,所述操作数据包括用户和物品的属性信息、以及所述用户在目标推荐场景中对所述物品的第一操作信息。
在一种可能的实现中,目标推荐场景可以为一种服务于特定需求的应用程序,比如华为浏览器、华为视频,也可以指具体的频道,比如浏览器信息流中的娱乐频道、新闻频道、科技频道等。
在一种可能的实现中,不同的推荐场景为不同的应用程序,或者是,不同的推荐场景为为不同类的应用程序(例如视频类的应用程序和浏览器类的应用程序为不同的应用程序),或者是,不同的推荐场景为相同应用程序的不同功能(例如同一个应用程序的不同频道,例如新闻频道、科技频道等),上述不同的功能可以按照推荐类别进行划分。
502、根据所述属性信息,分别通过第一特征提取网络和第二特征提取网络,得到第一嵌入表示和第二嵌入表示,所述第一嵌入表示为与推荐场景信息无关的特征,所述第二嵌入表示为与所述目标推荐场景相关的特征;所述第一嵌入表示和所述第二嵌入表示用于融合得到融合后的嵌入表示。
接下来首先介绍如何得到第一特征提取网络:
在一种可能的实现中,可以根据所述属性信息,通过第一神经网络,预测所述用户对所述物品的第二操作信息;根据所述属性信息,通过第二神经网络,预测所述操作数据的第一推荐场景;其中,所述第一操作信息和所述第二操作信息之间的差异、以及所述第一推荐场景和所述目标推荐场景之间的差异 用于确定第一损失;根据所述第一损失,通过对所述第一神经网络中的第三特征提取网络对应的梯度和所述第二神经网络中的第四特征提取网络对应的梯度进行正交化处理,以得到所述初始特征提取网络对应的第一梯度;根据所述第一梯度,更新所述第三特征提取网络,以得到所述第一特征提取网络。
在一种可能的实现中,在根据所述属性信息,通过第一神经网络,预测所述用户对所述物品的第二操作信息以及根据所述属性信息,通过第二神经网络,预测所述操作数据的第一推荐场景的过程中,指示所述目标推荐场景的信息不作为所述第三特征提取网络和第四特征提取网络的输入。
由于第一操作信息是作为第三特征提取网络进行训练时的真值(ground truth),因此在前馈过程中第一操作信息不需要输入到第三特征提取网络中。由于指示所述目标推荐场景的信息是作为第四特征提取网络进行训练时的真值(ground truth),因此在前馈过程中指示所述目标推荐场景的信息不需要输入到第三特征提取网络中。
在一种可能的实现中,第二操作信息可以表示用户是否进行了目标操作,目标操作可以为用户的一种行为操作类型,在网络平台和应用上,用户往往和物品有多种多样的交互形式(也就是有多种操作类型),比如用户在电商平台行为中的浏览、点击、加入购物车、购买等操作类型。
在一种可能的实现中,第二操作信息可以为用户会对物品进行目标操作的概率。
示例性的,第二操作信息可以为用户是否点击,或者进行点击的概率。
在一种可能的实现中,第一神经网络可以包括多层感知器(multilayer perceptron,MLP)以及输出层,第一神经网络可以输出用户对所述物品的第二操作信息,该第二操作信息可以指示用户是否会对物品进行目标操作。
在一种可能的实现中,可以通过第二神经网络,预测所述操作数据的第一推荐场景;其中,所述第一操作信息和所述第二操作信息之间的差异、以及所述第一推荐场景和所述目标推荐场景之间的差异用于确定第一损失。
在一种可能的实现中,第一推荐场景可以通过一个标识信息来表示,例如,1表示应用程序A,2表示应用程序B等。
在一种可能的实现中,第二神经网络可以包括多层感知器(multilayer perceptron,MLP)以及输出层,第二神经网络可以输出操作数据的第一推荐场景。
在一种可能的实现中,在通过第一神经网络以及第二神经网络预测得到第二操作信息以及第一推荐场景之后,可以分别根据第二操作信息以及第一推荐场景的真值来构建损失函数(例如本申请实施例中的第一损失),例如可以根据所述第一操作信息和所述第二操作信息之间的差异、以及所述第一推荐场景和所述目标推荐场景之间的差异用于确定第一损失。
应理解,第一损失除了和所述第一操作信息和所述第二操作信息之间的差异、以及所述第一推荐场景和所述目标推荐场景之间的差异有关之外,还可以包括其他损失项,这里并不限定。
在一种可能的实现中,可以根据所述第一损失,通过对所述第三特征提取网络对应的梯度和所述第四特征提取网络对应的梯度进行正交化处理,以得到所述第三特征提取网络对应的第一梯度。
参照图6,本申请实施例的思路在于:通过对第三特征提取网络的训练,能够使得训练后的第三特征提取网络具备识别出共享于各个场景的无偏特征表示(invariant representation),本申请实施例通过设置第二神经网络,由于第二神经网络是为了识别出操作数据所在的推荐场景,因此,基于所述第二神经网络中的第四特征提取网络得到的嵌入表示可以携带有和推荐场景强相关的语义信息,这部分和推荐场景强相关的语义信息是无偏特征表示中不需要携带的。因此,为了使得第三特征提取网络能够具备识别出的嵌入表示不具有和推荐场景强相关的语义信息(本申请实施例可以称之为偏差表征(scenario representation))的能力,本申请实施例中,在确定用于更新第三特征提取网络和第四特征提取网络的梯度时,对第三特征提取网络和第四特征提取网络的梯度进行了正交化处理,正交化处理可以约束第三特征提取网络和第四特征提取网络的梯度方向(也就是参数的更新方向)相互正交或者接近于相互正交。进而使得第三特征提取网络和第四特征提取网络提取的嵌入表示可以具不同的信息,实现了嵌入表征的分离,由于第二神经网络对于操作数据具有很好的推荐场景区分能力,使得更新后的第四特征提取网络提取的嵌入表示具有和推荐场景强相关的语义信息,且第一神经网络是用于识别操作信 息的,训练后的第一神经网络对用户的操作行为有较好的预估能力,因此训练后的第三特征提取网络可以具备识别出用于进行操作信息识别的信息(也就是信息的外沿),且该信息不具有和推荐场景强相关的语义信息。提高了推荐模型在各个场景的泛化性。
在一种可能的实现中,可以额外部署一个神经网络,用于对第三特征提取网络对应的梯度和第四特征提取网络对应的梯度进行正交化处理。
在一种可能的实现中,可以在第一损失中增加约束项,该约束项用于对第三特征提取网络对应的梯度和第四特征提取网络对应的梯度进行正交化约束。
在一种可能的实现中,可以在基于第一损失得到初始的第三特征提取网络对应的梯度和第四特征提取网络对应的梯度之后,可以对初始的第三特征提取网络对应的梯度和第四特征提取网络对应的梯度进行正交化处理,以便得到的第一梯度和第四特征提取网络对应的梯度的方向正交(或者接近正交)。
在一种可能的实现中,可以根据所述第一梯度,更新所述第三特征提取网络,以得到第一特征提取网络。
本申请实施例中,为了提高模型的泛化性,可以将第三特征提取网络得到的无偏表征和第四特征提取网络得到的有偏表征进行组合(或者称之为融合),并使得组合后的表征经过神经网络(用于进行操作信息预测)仍然可以具备较高的预估能力。
参照图7,在一种可能的实现中,可以将第三特征提取网络得到的无偏表征和第四特征提取网络得到的有偏表征输入到第四神经网络中,预测所述用户对所述物品的第五操作信息;所述第五操作信息和所述第一操作信息之间的差异用于确定所述第一损失。例如,可以将第三特征提取网络得到的无偏表征和第四特征提取网络得到的有偏表征进行融合(例如拼接操作),并将融合结果输入到第四神经网络,可选的,第四神经网络和第一神经网络可以具备相同或相似的网络结构,具体可以参照上述实施例中关于第一神经网络的介绍,这里不再赘述。
在一种可能的实现中,可以将第三特征提取网络得到的无偏表征和第四特征提取网络得到的有偏表征输入到第四神经网络中,以得到用户对物品的第五操作信息,并基于第五操作信息和第一操作信息(也就是真值)的差异来构建第一损失,也就是说,第一损失除了包括上述第一操作信息和第二操作信息之间的差异、以及第一推荐场景和目标推荐场景之间的差异的损失项之外,还可以包括第五操作信息和第一操作信息之间的差异。
本申请通过第一特征提取网络来提取与推荐场景信息无关的特征,也就是各个场景的无偏特征表示(invariant representation),并将其和与推荐场景信息相关的特征(本申请实施例可以称之为偏差表征(scenario representation))进行融合,可以表示出每个场景有用户特有的行为特性,也可以表示出不同场景之间用户特有的行为特性,提高了后续进行操作信息预测的预测精度。
503、根据所述融合后的嵌入表示,预测所述用户对所述物品的目标操作信息。
在一种可能的实现中,所述目标操作信息和所述第一操作信息之间的差异用于确定第二损失;所述方法还包括:根据所述第二损失,更新所述第一特征提取网络。
在一种可能的实现中,在实际的模型的推理过程中,训练后的第三特征提取网络需要连接和场景相关的操作信息预测网络,每个场景对应于一个与该场景相关的操作信息预测网络,在推理时,为了预测某一推荐场景(推荐场景A)中用户对物品的操作信息,用户和物品的属性信息会一方面输入到训练后的第三特征提取网络,以得到嵌入表征(例如第一嵌入表示),用户和物品的属性信息会另一方面输入到和推荐场景A相关的特征提取网络(或者输入到各个场景相关的特征提取网络,然后基于场景的权重进行加权),以得到嵌入表征(例如第二嵌入表示),该第一嵌入表征和第二嵌入表征可以融合并输入到与推荐场景A对应的操作信息预测网络,得到预测的操作信息(例如目标操作信息)。
因此,在训练过程中,针对于第三特征提取网络的更新,除了基于第一神经网络的输出反向传播得到的梯度(例如第一梯度)之外,还需要基于各个场景对应的操作信息预测网络的输出(例如目标操作信息)反向传播得到的梯度(例如第二梯度)来进行更新。
然而,上述梯度为和具体场景相关的梯度(例如第二梯度),该梯度(例如第二梯度)会和基于无偏表征得到的梯度(例如第一梯度)之间存在负向影响(彼此之间参数更新方向会有冲突,例如梯度A 和梯度B为方向相反的梯度,若将梯度A和梯度B之间直接叠加后进行更新,相当于没有进行参数的更新),不能很好的利用彼此间有效的信息,来提升对应场景的效果。
本申请实施例中,参照图8,为了解决上述问题,首先基于无偏表征得到的梯度进行第三特征提取网络的更新,之后,一方面基于和推荐场景相关的特征提取网络(例如第二特征提取网络)(或者输入到各个场景相关的特征提取网络,然后基于场景的权重进行加权)对用户和物品的属性信息进行处理,以得到嵌入表征(例如第二嵌入表示),另一方面,基于更新后的第三特征网络,对用户和物品的属性信息进行处理,以得到嵌入表征(例如第一嵌入表示)。该第一嵌入表征和第二嵌入表征可以融合并输入到与推荐场景A对应的操作信息预测网络,得到预测的操作信息(例如目标操作信息),基于目标操作信息得到损失(例如第二损失),并基于第二损失确定梯度(例如第二梯度),并根据第二梯度来更新第一特征提取网络。
通过上述方式,本申请并不将基于无偏表征得到的梯度和基于和场景相关的操作信息得到的梯度进行组合后进行第三特征提取的更新,而是在基于无偏表征得到的梯度对第三特征提取网络进行更新后(得到第一特征提取网络),再基于和场景相关的操作信息得到的梯度对第一特征提取网络进行更新,使得和具体场景相关的梯度和基于无偏表征得到的梯度之间不存在负向影响,能很好的利用彼此间有效的信息,来提升对应场景的效果。
在一种可能的实现中,参照图9,所述根据所述属性信息,分别通过第一特征提取网络和第二特征提取网络,得到第一嵌入表示和第二嵌入表示,包括:根据所述属性信息,通过第二特征提取网络,得到第二嵌入表示;所述根据所述属性信息,通过第二特征提取网络,得到第二嵌入表示,包括:根据所述属性信息,通过包括所述第二特征提取网络在内的多个特征提取网络,得到多个嵌入表示;其中,每个所述特征提取网络对应于一个推荐场景,且所述第二特征提取网络对应于所述目标推荐场景;对所述多个嵌入表示进行融合,以得到所述第二嵌入表示。
在一种可能的实现中,所述对所述多个嵌入表示进行融合,包括:根据所述属性信息,预测所述属性信息对应于各个推荐场景的概率值;将每个所述概率值作为对应的推荐场景的权重,对所述多个嵌入表示进行融合。
也就是说,可以为各个推荐场景设置对应的特征提取网络,在前馈过程中,属性信息会输入到每个特征提取网络中,每个特征提取网络都可以输出一个嵌入表示,多个特征提取网络输出的多个嵌入表示可以进行融合,其中,在融合的方式上,可以对基于属性信息来确定各个推荐场景对应的权重(或者称之为概率值),并基于概率值进行多个嵌入表示的融合,以得到第二嵌入表示。在一种可能的实现中,可以根据属性信息,得到属性信息对应于各个推荐场景的概率值;将每个概率值作为对应的推荐场景的权重,对多个嵌入表示进行融合,以得到第二嵌入表示。例如,可以进行加权求和。
在一种可能的实现中,可以利用第四神经网络得到属性信息对应于各个推荐场景的概率值,第四神经网络可以复用第二神经网络,利用输出的针对于各个推荐场景的概率作为多个嵌入表示的权重,也可以选择端到端重新训练一个具备推荐场景预测能力的第四神经网络,实现多个场景信息的高效融合。
以上介绍了如何根据所述属性信息,通过第二特征提取网络,得到第二嵌入表示,该第二嵌入表示为和场景相关的嵌入表示,还需要根据第一特征提取网络,来进行前馈过程,具体的,可以根据所述属性信息,通过所述第一特征提取网络,得到第一嵌入表示;进而,可以将所述第一嵌入表示与所述第二嵌入表示进行融合(例如可以进行矩阵的乘法等融合方式),以得到融合后的嵌入表示;进而可以根据所述融合后的嵌入表示,预测所述用户在所述目标推荐场景中对所述物品的目标操作信息。
应理解,上述基于多个特征提取网络的嵌入表示的加权融合方式,虽然可以使得融合后得到的第二嵌入表示具备较多的对应的推荐场景的信息,且含有较少的非对应的推荐场景的信息。然而,由于是将属性信息(不包含指示目标推荐场景的信息)输入到多个特征提取网络中,因此,多个特征提取网络输出的嵌入表征不具备对应的推荐场景的准确的语义信息。因此,在对多个特征提取网络训练的过程中,可以另外将包含指示推荐场景的信息以及属性信息都输入到特征提取网络中,参与网络训练的前馈过程。
在一种可能的实现中,所述操作数据包括指示所述目标推荐场景的信息;所述方法还包括:根据所述操作数据,通过所述第二特征提取网络,得到第三嵌入表示;根据所述第三嵌入表示,通过所述第三 神经网络,预测所述用户对所述物品的第三操作信息;其中,所述第三操作信息和所述第一操作信息之间的差异用于确定第四损失;根据所述第四损失,更新所述第三神经网络和所述第二特征提取网络。
在一种可能的实现中,每次迭代时,可以基于一个批次(batch)的数据得到的梯度进行模型的更新,同一批次的数据可以包含不同推荐场景的操作数据,例如,可以包含第二推荐场景的操作数据,基于第二推荐场景的操作数据也可以得到一个损失(例如,本申请实施例中的第三损失)以及用于更新第一特征提取网络的梯度。然而,由于基于第二损失得到的梯度,和基于第三损失得到的梯度,是不同推荐场景下得到的梯度,彼此之前可能存在负向影响(彼此之间参数更新方向会有冲突,例如梯度A和梯度B为方向相反的梯度,若将梯度A和梯度B之间直接叠加后进行更新,相当于没有进行参数的更新),不能很好的利用彼此间有效的信息,来提升对应场景的效果。
为了解决上述问题,本申请实施例中,对基于第二损失得到的梯度,和基于第三损失得到的梯度之间进行正交化处理,进而降低不同推荐场景得到的梯度之间的相互负向影响。
在一种可能的实现中,可以获取用户在第二推荐场景中的操作数据(包括属性信息);根据第二推荐场景中的操作数据,预测用户在第二推荐场景中对物品的操作信息(例如可以将用户在第二推荐场景中的操作数据的属性信息输入到第二推荐场景对应的特征提取网络中,具体可以参照上述实施例中关于第二特征提取网络的描述,以得到嵌入表示,该嵌入表示可以输入到第二推荐场景对应的神经网络(用于进行第二推荐场景的操作信息预测)中,以得到对应的预测结果),预测结果可以和第二推荐场景中的操作数据中的操作信息的真值来确定第三损失,该第三损失在反向传播时可以得到第一特征提取网络对应的梯度(一个第三梯度)。
在一种可能的实现中,可以根据第二损失和第三损失,通过对第一特征提取网络对应的多个梯度进行正交化处理,以得到第一特征提取网络的多个第三梯度,其中,多个第三梯度中的一个梯度为根据第二损失得到的,多个第三梯度中的一个梯度为第三损失得到的;对多个第三梯度进行融合(例如通过向量加和的方式进行融合),以得到第一特征提取网络对应的第二梯度;根据第二梯度,更新第一特征提取网络。
在一种可能的实现中,在模型的推理过程中,当所述目标操作信息满足预设条件,确定向所述用户推荐所述物品。
通过上述方式,可以得到用户进行针对于物品进行操作的概率,并基于上述概率进行信息推荐,具体的,当推荐信息满足预设条件,可以确定向所述用户推荐所述物品。
在进行信息推荐时,可以以列表页的形式将推荐信息推荐给用户,以期望用户进行行为动作。
接下来结合实验结果介绍本申请实施例的有益效果:
在公开的商业数据集和私有的公司数据集上对本申请实施例进行了验证,数据统计信息如下:
表1.数据集信息统计
其中,离线的评价指标为AUC,线上评价指标为CTR和ECPM。
相比于当前已有的基线,离线实验结果如下:
表2.在公开数据集上整体效果
表3.在公司私有数据集上整体效果
可以看出,本方案在公开数据集和公司数据集上均优于基线模型(包括单场景建模方案、启发式方案、多任务方案和现有多场景建模方案)。
本方案三个部分可独立使用,也可以叠加使用。表4体现了本方案涉及模块的增量效果。
表4.不同模块的增量叠加效果
可以看出,基于最简单的骨架模型Shared Bottom,逐渐增加三个模块,模型的效果是逐渐增加的,即相对于基线模型的提升越来越大。
接下来从装置的角度介绍本申请实施例提供的一种操作预测装置,参照图11,图11为本申请实施例提供的一种操作预测装置的结构示意,如图11所示,本申请实施例提供的一种操作预测装置1100包括:
获取模块1101,用于获取在目标推荐场景中的用户和物品的属性信息;
其中,关于获取模块1101的具体介绍可以参照上述实施例中步骤501的描述,这里不再赘述。
特征提取模块1102,用于根据所述属性信息,分别通过第一特征提取网络和第二特征提取网络,得到第一嵌入表示和第二嵌入表示,所述第一嵌入表示为与推荐场景信息无关的特征,所述第二嵌入表示为与所述目标推荐场景相关的特征;所述第一嵌入表示和所述第二嵌入表示用于融合得到融合后的嵌入表示;
其中,关于特征提取模块1102的具体介绍可以参照上述实施例中步骤502的描述,这里不再赘述。
预测模块1103,用于根据所述融合后的嵌入表示,预测所述用户对所述物品的目标操作信息。
其中,关于预测模块1103的具体介绍可以参照上述实施例中步骤503和步骤504的描述,这里不再赘述。
在一种可能的实现中,所述属性信息包括于所述用户在目标推荐场景中的操作数据,所述操作数据还包括所述用户对所述物品的第一操作信息;
所述预测模块,还用于:
根据所述属性信息,通过第一神经网络,预测所述用户对所述物品的第二操作信息;
根据所述属性信息,通过第二神经网络,预测所述操作数据的第一推荐场景;其中,所述第一操作信息和所述第二操作信息之间的差异、以及所述第一推荐场景和所述目标推荐场景之间的差异用于确定第一损失;
所述装置还包括:
模型更新模块1104,还用于根据所述第一损失,通过对所述第一神经网络中的第三特征提取网络对应的梯度和所述第二神经网络中的第四特征提取网络对应的梯度进行正交化处理,以得到所述初始特征提取网络对应的第一梯度;
根据所述第一梯度,更新所述第三特征提取网络,以得到所述第一特征提取网络。
在一种可能的实现中,所述目标操作信息和所述第一操作信息之间的差异用于确定第二损失;所述模型更新模块1104,还用于:
根据所述第二损失,更新所述第一特征提取网络。
在一种可能的实现中,所述特征提取模块,具体用于根据所述属性信息,通过第二特征提取网络,得到第二嵌入表示;
所述根据所述属性信息,通过第二特征提取网络,得到第二嵌入表示,包括:
根据所述属性信息,通过包括所述第二特征提取网络在内的多个特征提取网络,得到多个嵌入表示;其中,每个所述特征提取网络对应于一个推荐场景,且所述第二特征提取网络对应于所述目标推荐场景;
对所述多个嵌入表示进行融合,以得到所述第二嵌入表示。
在一种可能的实现中,所述特征提取模块,具体用于根据所述属性信息,预测所述属性信息对应于各个推荐场景的概率值;
将每个所述概率值作为对应的推荐场景的权重,对所述多个嵌入表示进行融合。
一种可能的实现中,所述获取模块,还用于:
获取用户在第二推荐场景中的操作数据;
所述预测模块,还用于根据所述第二推荐场景中的操作数据,预测所述用户在所述第二推荐场景中对所述物品的操作信息;其中,所述用户在所述第二推荐场景中对所述物品的操作信息用于确定第三损失;
所述模型更新模块1104,具体用于:根据所述第二损失和所述第三损失,通过对所述第一特征提取网络对应的多个梯度进行正交化处理,以得到所述第一特征提取网络的多个第三梯度;
对所述多个第四梯度进行融合,以得到所述第一特征提取网络对应的第二梯度;
根据所述第二梯度,更新所述第一特征提取网络。
在一种可能的实现中,所述操作数据包括指示所述目标推荐场景的信息;所述特征提取模块,还用于根据所述操作数据,通过所述第二特征提取网络,得到第三嵌入表示;
根据所述第三嵌入表示,通过所述第三神经网络,预测所述用户对所述物品的第三操作信息;其中,所述第三操作信息和所述第一操作信息之间的差异用于确定第四损失;
所述模型更新模块1104,还用于:根据所述第四损失,更新所述第三神经网络和所述第二特征提取网络。
在一种可能的实现中,所述目标操作信息指示所述用户是否对所述物品进行了目标操作,所述目标操作包括如下的至少一种:
点击操作、浏览操作,加入购物车操作以及购买操作。
在一种可能的实现中,所述属性信息包括所述用户的用户属性,所述用户属性包括如下的至少一种:性别,年龄,职业,收入,爱好,教育程度。
在一种可能的实现中,所述属性信息包括所述物品的物品属性,所述物品属性包括如下的至少一种:物品名称,开发者,安装包大小,品类,好评度。
在一种可能的实现中,不同的推荐场景为不同的应用程序;或者,
不同的推荐场景为不同类的应用程序;或者,
不同的推荐场景为同一个应用程序的不同功能。
在一种可能的实现中,所述装置还包括:
推荐模块,用于当所述目标操作信息满足预设条件,确定向所述用户推荐所述物品。
本申请实施例还提供了一种模型训练装置,所述装置包括:
获取模块,用于获取用户在目标推荐场景中的操作数据,所述操作数据包括所述用户和物品的属性信息、以及所述用户对所述物品的第一操作信息;
预测模块,用于根据所述属性信息,通过第一神经网络,预测所述用户对所述物品的第二操作信息;
根据所述属性信息,通过第二神经网络,预测所述操作数据的第一推荐场景;其中,所述第一操作信息和所述第二操作信息之间的差异、以及所述第一推荐场景和所述目标推荐场景之间的差异用于确定第一损失;
根据所述第一损失,通过对所述第一神经网络中的第三特征提取网络对应的梯度和所述第二神经网络中的第四特征提取网络对应的梯度进行正交化处理,以得到所述初始特征提取网络对应的第一梯度;
模型更新模块,用于根据所述第一梯度,更新所述第三特征提取网络,以得到第一特征提取网络。
在一种可能的实现中,所述装置还包括:
特征提取模块,用于根据所述属性信息,分别通过所述第一特征提取网络和第二特征提取网络,得到第一嵌入表示和第二嵌入表示;所述第一嵌入表示和所述第二嵌入表示用于融合得到融合后的嵌入表示;
预测模块,还用于根据所述融合后的嵌入表示,预测所述用户对所述物品的目标操作信息;所述目标操作信息和所述第一操作信息之间的差异用于确定第二损失;
模型更新模块,还用于根据所述第二损失,更新所述第一特征提取网络。
在一种可能的实现中,所述根据所述属性信息,分别通过所述第一特征提取网络和第二特征提取网络,得到第一嵌入表示和第二嵌入表示,包括:
根据所述属性信息,通过第二特征提取网络,得到第二嵌入表示;
所述根据所述属性信息,通过第二特征提取网络,得到第二嵌入表示,包括:
根据所述属性信息,通过包括所述第二特征提取网络在内的多个特征提取网络,得到多个嵌入表示;其中,每个所述特征提取网络对应于一个推荐场景,且所述第二特征提取网络对应于所述目标推荐场景;
对所述多个嵌入表示进行融合,以得到所述第二嵌入表示。
在一种可能的实现中,所述获取模块,还用于:
获取用户在第二推荐场景中的操作数据;
预测模块,还用于根据所述第二推荐场景中的操作数据,预测所述用户在所述第二推荐场景中对所述物品的操作信息;其中,所述用户在所述第二推荐场景中对所述物品的操作信息用于确定第三损失;
模型更新模块,具体用于根据所述第二损失和所述第三损失,通过对所述第一特征提取网络对应的多个梯度进行正交化处理,以得到所述第一特征提取网络的多个第三梯度;
对所述多个第四梯度进行融合,以得到所述第一特征提取网络对应的第二梯度;
根据所述第二梯度,更新所述第一特征提取网络。
接下来介绍本申请实施例提供的一种执行设备,请参阅图12,图12为本申请实施例提供的执行设备的一种结构示意图,执行设备1200具体可以表现为手机、平板、笔记本电脑、智能穿戴设备、服务器等,此处不做限定。其中,执行设备1200实现图5对应实施例中操作预测方法的功能。具体的,执行设备1200包括:接收器1201、发射器1202、处理器1203和存储器1204(其中执行设备1200中的处理器1203的数量可以一个或多个),其中,处理器1203可以包括应用处理器12031和通信处理器12032。在本申请的一些实施例中,接收器1201、发射器1202、处理器1203和存储器1204可通过总线或其它方式连接。
存储器1204可以包括只读存储器和随机存取存储器,并向处理器1203提供指令和数据。存储器1204的一部分还可以包括非易失性随机存取存储器(non-volatile random access memory,NVRAM)。存储器1204存储有处理器和操作指令、可执行模块或者数据结构,或者它们的子集,或者它们的扩展集,其中,操作指令可包括各种操作指令,用于实现各种操作。
处理器1203控制执行设备的操作。具体的应用中,执行设备的各个组件通过总线系统耦合在一起,其中总线系统除包括数据总线之外,还可以包括电源总线、控制总线和状态信号总线等。但是为了清楚说明起见,在图中将各种总线都称为总线系统。
上述本申请实施例揭示的方法可以应用于处理器1203中,或者由处理器1203实现。处理器1203可以是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器1203中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器1203可以是通用处理器、数字信号处理器(digital signal processing,DSP)、微处理器或微控制器、以及视觉处理器(vision processing unit,VPU)、张量处理器(tensor processing unit,TPU)等适用于AI运算的处理器,还可进一步包括专用集成电路(application specific integrated circuit,ASIC)、现场可编程门阵列 (field-programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。该处理器1203可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器1204,处理器1203读取存储器1204中的信息,结合其硬件完成上述实施例中步骤501至步骤503的步骤。
接收器1201可用于接收输入的数字或字符信息,以及产生与执行设备的相关设置以及功能控制有关的信号输入。发射器1202可用于通过第一接口输出数字或字符信息;发射器1202还可用于通过第一接口向磁盘组发送指令,以修改磁盘组中的数据;发射器1202还可以包括显示屏等显示设备。
本申请实施例还提供了一种训练设备,请参阅图13,图13是本申请实施例提供的训练设备一种结构示意图,具体的,训练设备1300由一个或多个服务器实现,训练设备1300可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上中央处理器(central processing units,CPU)1313(例如,一个或一个以上处理器)和存储器1332,一个或一个以上存储应用程序1342或数据1344的存储介质1330(例如一个或一个以上海量存储设备)。其中,存储器1332和存储介质1330可以是短暂存储或持久存储。存储在存储介质1330的程序可以包括一个或一个以上模块(图示没标出),每个模块可以包括对训练设备中的一系列指令操作。更进一步地,中央处理器1313可以设置为与存储介质1330通信,在训练设备1300上执行存储介质1330中的一系列指令操作。
训练设备1300还可以包括一个或一个以上电源1326,一个或一个以上有线或无线网络接口1350,一个或一个以上输入输出接口1358;或,一个或一个以上操作系统1341,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM等等。
具体的,训练设备可以进行上述实施例中步骤501至步骤503的步骤。
本申请实施例中还提供一种包括计算机程序产品,当其在计算机上运行时,使得计算机执行如前述执行设备所执行的步骤,或者,使得计算机执行如前述训练设备所执行的步骤。
本申请实施例中还提供一种计算机可读存储介质,该计算机可读存储介质中存储有用于进行信号处理的程序,当其在计算机上运行时,使得计算机执行如前述执行设备所执行的步骤,或者,使得计算机执行如前述训练设备所执行的步骤。
本申请实施例提供的执行设备、训练设备或终端设备具体可以为芯片,芯片包括:处理单元和通信单元,所述处理单元例如可以是处理器,所述通信单元例如可以是输入/输出接口、管脚或电路等。该处理单元可执行存储单元存储的计算机执行指令,以使执行设备内的芯片执行上述实施例描述的数据处理方法,或者,以使训练设备内的芯片执行上述实施例描述的数据处理方法。可选地,所述存储单元为所述芯片内的存储单元,如寄存器、缓存等,所述存储单元还可以是所述无线接入设备端内的位于所述芯片外部的存储单元,如只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)等。
具体的,请参阅图14,图14为本申请实施例提供的芯片的一种结构示意图,所述芯片可以表现为神经网络处理器NPU1400,NPU 1400作为协处理器挂载到主CPU(Host CPU)上,由Host CPU分配任务。NPU的核心部分为运算电路1403,通过控制器1404控制运算电路1403提取存储器中的矩阵数据并进行乘法运算。
NPU 1400可以通过内部的各个器件之间的相互配合,来实现图5所描述的实施例中提供的操作预测方法。
更具体的,在一些实现中,NPU 1400中的运算电路1403内部包括多个处理单元(Process Engine,PE)。在一些实现中,运算电路1403是二维脉动阵列。运算电路1403还可以是一维脉动阵列或者能够执行例如乘法和加法这样的数学运算的其它电子线路。在一些实现中,运算电路1403是通用的矩阵处 理器。
举例来说,假设有输入矩阵A,权重矩阵B,输出矩阵C。运算电路从权重存储器1402中取矩阵B相应的数据,并缓存在运算电路中每一个PE上。运算电路从输入存储器1401中取矩阵A数据与矩阵B进行矩阵运算,得到的矩阵的部分结果或最终结果,保存在累加器(accumulator)1408中。
统一存储器1406用于存放输入数据以及输出数据。权重数据直接通过存储单元访问控制器(Direct Memory Access Controller,DMAC)1405,DMAC被搬运到权重存储器1402中。输入数据也通过DMAC被搬运到统一存储器1406中。
BIU为Bus Interface Unit即,总线接口单元1410,用于AXI总线与DMAC和取指存储器(Instruction Fetch Buffer,IFB)1409的交互。
总线接口单元1410(Bus Interface Unit,简称BIU),用于取指存储器1409从外部存储器获取指令,还用于存储单元访问控制器1405从外部存储器获取输入矩阵A或者权重矩阵B的原数据。
DMAC主要用于将外部存储器DDR中的输入数据搬运到统一存储器1406或将权重数据搬运到权重存储器1402中或将输入数据数据搬运到输入存储器1401中。
向量计算单元1407包括多个运算处理单元,在需要的情况下,对运算电路1403的输出做进一步处理,如向量乘,向量加,指数运算,对数运算,大小比较等等。主要用于神经网络中非卷积/全连接层网络计算,如Batch Normalization(批归一化),像素级求和,对特征平面进行上采样等。
在一些实现中,向量计算单元1407能将经处理的输出的向量存储到统一存储器1406。例如,向量计算单元1407可以将线性函数;或,非线性函数应用到运算电路1403的输出,例如对卷积层提取的特征平面进行线性插值,再例如累加值的向量,用以生成激活值。在一些实现中,向量计算单元1407生成归一化的值、像素级求和的值,或二者均有。在一些实现中,处理过的输出的向量能够用作到运算电路1403的激活输入,例如用于在神经网络中的后续层中的使用。
控制器1404连接的取指存储器(instruction fetch buffer)1409,用于存储控制器1404使用的指令;
统一存储器1406,输入存储器1401,权重存储器1402以及取指存储器1409均为On-Chip存储器。外部存储器私有于该NPU硬件架构。
其中,上述任一处提到的处理器,可以是一个通用中央处理器,微处理器,ASIC,或一个或多个用于控制上述程序执行的集成电路。
另外需说明的是,以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。另外,本申请提供的装置实施例附图中,模块之间的连接关系表示它们之间具有通信连接,具体可以实现为一条或多条通信总线或信号线。
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到本申请可借助软件加必需的通用硬件的方式来实现,当然也可以通过专用硬件包括专用集成电路、专用CPU、专用存储器、专用元器件等来实现。一般情况下,凡由计算机程序完成的功能都可以很容易地用相应的硬件来实现,而且,用来实现同一功能的具体硬件结构也可以是多种多样的,例如模拟电路、数字电路或专用电路等。但是,对本申请而言更多情况下软件程序实现是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在可读取的存储介质中,如计算机的软盘、U盘、移动硬盘、ROM、RAM、磁碟或者光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,训练设备,或者网络设备等)执行本申请各个实施例所述的方法。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。
所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计 算机可读存储介质向另一计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、训练设备或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、训练设备或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存储的任何可用介质或者是包含一个或多个可用介质集成的训练设备、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘(Solid State Disk,SSD))等。

Claims (31)

  1. 一种操作预测方法,其特征在于,所述方法包括:
    获取在目标推荐场景中的用户和物品的属性信息;
    根据所述属性信息,分别通过第一特征提取网络和第二特征提取网络,得到第一嵌入表示和第二嵌入表示,所述第一嵌入表示为与推荐场景信息无关的特征,所述第二嵌入表示为与所述目标推荐场景相关的特征;所述第一嵌入表示和所述第二嵌入表示用于融合得到融合后的嵌入表示;
    根据所述融合后的嵌入表示,预测所述用户对所述物品的目标操作信息。
  2. 根据权利要求1所述的方法,其特征在于,所述属性信息包括于所述用户在目标推荐场景中的操作数据,所述操作数据还包括所述用户对所述物品的第一操作信息;
    所述方法还包括:
    根据所述属性信息,通过第一神经网络,预测所述用户对所述物品的第二操作信息;
    根据所述属性信息,通过第二神经网络,预测所述操作数据的第一推荐场景;其中,所述第一操作信息和所述第二操作信息之间的差异、以及所述第一推荐场景和所述目标推荐场景之间的差异用于确定第一损失;
    根据所述第一损失,通过对所述第一神经网络中的第三特征提取网络对应的梯度和所述第二神经网络中的第四特征提取网络对应的梯度进行正交化处理,以得到所述初始特征提取网络对应的第一梯度;
    根据所述第一梯度,更新所述第三特征提取网络,以得到所述第一特征提取网络。
  3. 根据权利要求1或2所述的方法,其特征在于,所述目标操作信息和所述第一操作信息之间的差异用于确定第二损失;所述方法还包括:
    根据所述第二损失,更新所述第一特征提取网络。
  4. 根据权利要求3所述的方法,其特征在于,所述根据所述属性信息,分别通过第一特征提取网络和第二特征提取网络,得到第一嵌入表示和第二嵌入表示,包括:
    根据所述属性信息,通过第二特征提取网络,得到第二嵌入表示;
    所述根据所述属性信息,通过第二特征提取网络,得到第二嵌入表示,包括:
    根据所述属性信息,通过包括所述第二特征提取网络在内的多个特征提取网络,得到多个嵌入表示;其中,每个所述特征提取网络对应于一个推荐场景,且所述第二特征提取网络对应于所述目标推荐场景;
    对所述多个嵌入表示进行融合,以得到所述第二嵌入表示。
  5. 根据权利要求4所述的方法,其特征在于,所述对所述多个嵌入表示进行融合,包括:
    根据所述属性信息,预测所述属性信息对应于各个推荐场景的概率值;
    将每个所述概率值作为对应的推荐场景的权重,对所述多个嵌入表示进行融合。
  6. 根据权利要求3至5任一所述的方法,其特征在于,所述方法还包括:
    获取用户在第二推荐场景中的操作数据;
    根据所述第二推荐场景中的操作数据,预测所述用户在所述第二推荐场景中对所述物品的操作信息;其中,所述用户在所述第二推荐场景中对所述物品的操作信息用于确定第三损失;
    所述根据所述第二损失,更新所述第一特征提取网络,包括:
    根据所述第二损失和所述第三损失,通过对所述第一特征提取网络对应的多个梯度进行正交化处理,以得到所述第一特征提取网络的多个第三梯度;
    对所述多个第四梯度进行融合,以得到所述第一特征提取网络对应的第二梯度;
    根据所述第二梯度,更新所述第一特征提取网络。
  7. 根据权利要求3至6任一所述的方法,其特征在于,所述操作数据包括指示所述目标推荐场景的信息;所述方法还包括:
    根据所述操作数据,通过所述第二特征提取网络,得到第三嵌入表示;
    根据所述第三嵌入表示,通过所述第三神经网络,预测所述用户对所述物品的第三操作信息;其中,所述第三操作信息和所述第一操作信息之间的差异用于确定第四损失;
    根据所述第四损失,更新所述第三神经网络和所述第二特征提取网络。
  8. 根据权利要求1至7任一所述的方法,其特征在于,所述目标操作信息指示所述用户是否对所述物品进行了目标操作,所述目标操作包括如下的至少一种:
    点击操作、浏览操作,加入购物车操作以及购买操作。
  9. 根据权利要求1至8任一所述的方法,其特征在于,所述属性信息包括所述用户的用户属性,所述用户属性包括如下的至少一种:性别,年龄,职业,收入,爱好,教育程度。
  10. 根据权利要求1至9任一所述的方法,其特征在于,所述属性信息包括所述物品的物品属性,所述物品属性包括如下的至少一种:物品名称,开发者,安装包大小,品类,好评度。
  11. 根据权利要求1至10任一所述的方法,其特征在于,
    不同的推荐场景为不同的应用程序;或者,
    不同的推荐场景为不同类的应用程序;或者,
    不同的推荐场景为同一个应用程序的不同功能。
  12. 根据权利要求1至11任一所述的方法,其特征在于,所述方法还包括:
    当所述目标操作信息满足预设条件,确定向所述用户推荐所述物品。
  13. 一种模型训练方法,其特征在于,所述方法包括:
    获取用户在目标推荐场景中的操作数据,所述操作数据包括所述用户和物品的属性信息、以及所述用户对所述物品的第一操作信息;
    根据所述属性信息,通过第一神经网络,预测所述用户对所述物品的第二操作信息;
    根据所述属性信息,通过第二神经网络,预测所述操作数据的第一推荐场景;其中,所述第一操作信息和所述第二操作信息之间的差异、以及所述第一推荐场景和所述目标推荐场景之间的差异用于确定第一损失;
    根据所述第一损失,通过对所述第一神经网络中的第三特征提取网络对应的梯度和所述第二神经网络中的第四特征提取网络对应的梯度进行正交化处理,以得到所述初始特征提取网络对应的第一梯度;
    根据所述第一梯度,更新所述第三特征提取网络,以得到第一特征提取网络。
  14. 根据权利要求13所述的方法,其特征在于,所述方法还包括:
    根据所述属性信息,分别通过所述第一特征提取网络和第二特征提取网络,得到第一嵌入表示和第二嵌入表示;所述第一嵌入表示和所述第二嵌入表示用于融合得到融合后的嵌入表示;
    根据所述融合后的嵌入表示,预测所述用户对所述物品的目标操作信息;所述目标操作信息和所述第一操作信息之间的差异用于确定第二损失;
    根据所述第二损失,更新所述第一特征提取网络。
  15. 根据权利要求13或14所述的方法,其特征在于,所述根据所述属性信息,分别通过所述第一特征提取网络和第二特征提取网络,得到第一嵌入表示和第二嵌入表示,包括:
    根据所述属性信息,通过第二特征提取网络,得到第二嵌入表示;
    所述根据所述属性信息,通过第二特征提取网络,得到第二嵌入表示,包括:
    根据所述属性信息,通过包括所述第二特征提取网络在内的多个特征提取网络,得到多个嵌入表示;其中,每个所述特征提取网络对应于一个推荐场景,且所述第二特征提取网络对应于所述目标推荐场景;
    对所述多个嵌入表示进行融合,以得到所述第二嵌入表示。
  16. 根据权利要求14或15所述的方法,其特征在于,所述方法还包括:
    获取用户在第二推荐场景中的操作数据;
    根据所述第二推荐场景中的操作数据,预测所述用户在所述第二推荐场景中对所述物品的操作信息;其中,所述用户在所述第二推荐场景中对所述物品的操作信息用于确定第三损失;
    所述根据所述第二损失,更新所述第一特征提取网络,包括:
    根据所述第二损失和所述第三损失,通过对所述第一特征提取网络对应的多个梯度进行正交化处理,以得到所述第一特征提取网络的多个第三梯度;
    对所述多个第四梯度进行融合,以得到所述第一特征提取网络对应的第二梯度;
    根据所述第二梯度,更新所述第一特征提取网络。
  17. 一种操作预测装置,其特征在于,所述装置包括:
    获取模块,用于获取在目标推荐场景中的用户和物品的属性信息;
    特征提取模块,用于根据所述属性信息,分别通过第一特征提取网络和第二特征提取网络,得到第一嵌入表示和第二嵌入表示,所述第一嵌入表示为与推荐场景信息无关的特征,所述第二嵌入表示为与所述目标推荐场景相关的特征;所述第一嵌入表示和所述第二嵌入表示用于融合得到融合后的嵌入表示;
    预测模块,用于根据所述融合后的嵌入表示,预测所述用户对所述物品的目标操作信息。
  18. 根据权利要求17所述的装置,其特征在于,所述属性信息包括于所述用户在目标推荐场景中的操作数据,所述操作数据还包括所述用户对所述物品的第一操作信息;
    所述预测模块,还用于:
    根据所述属性信息,通过第一神经网络,预测所述用户对所述物品的第二操作信息;
    根据所述属性信息,通过第二神经网络,预测所述操作数据的第一推荐场景;其中,所述第一操作信息和所述第二操作信息之间的差异、以及所述第一推荐场景和所述目标推荐场景之间的差异用于确定第一损失;
    所述装置还包括:
    模型更新模块,还用于根据所述第一损失,通过对所述第一神经网络中的第三特征提取网络对应的梯度和所述第二神经网络中的第四特征提取网络对应的梯度进行正交化处理,以得到所述初始特征提取网络对应的第一梯度;
    根据所述第一梯度,更新所述第三特征提取网络,以得到所述第一特征提取网络。
  19. 根据权利要求17或18所述的装置,其特征在于,所述目标操作信息和所述第一操作信息之间的差异用于确定第二损失;所述模型更新模块,还用于:
    根据所述第二损失,更新所述第一特征提取网络。
  20. 根据权利要求19所述的装置,其特征在于,所述特征提取模块,具体用于根据所述属性信息,通过第二特征提取网络,得到第二嵌入表示;
    所述根据所述属性信息,通过第二特征提取网络,得到第二嵌入表示,包括:
    根据所述属性信息,通过包括所述第二特征提取网络在内的多个特征提取网络,得到多个嵌入表示;其中,每个所述特征提取网络对应于一个推荐场景,且所述第二特征提取网络对应于所述目标推荐场景;
    对所述多个嵌入表示进行融合,以得到所述第二嵌入表示。
  21. 根据权利要求20所述的装置,其特征在于,所述特征提取模块,具体用于根据所述属性信息,预测所述属性信息对应于各个推荐场景的概率值;
    将每个所述概率值作为对应的推荐场景的权重,对所述多个嵌入表示进行融合。
  22. 根据权利要求19至21任一所述的装置,其特征在于,所述获取模块,还用于:
    获取用户在第二推荐场景中的操作数据;
    所述预测模块,还用于根据所述第二推荐场景中的操作数据,预测所述用户在所述第二推荐场景中对所述物品的操作信息;其中,所述用户在所述第二推荐场景中对所述物品的操作信息用于确定第三损失;
    所述模型更新模块,具体用于:根据所述第二损失和所述第三损失,通过对所述第一特征提取网络对应的多个梯度进行正交化处理,以得到所述第一特征提取网络的多个第三梯度;
    对所述多个第四梯度进行融合,以得到所述第一特征提取网络对应的第二梯度;
    根据所述第二梯度,更新所述第一特征提取网络。
  23. 根据权利要求19至22任一所述的装置,其特征在于,所述操作数据包括指示所述目标推荐场景的信息;所述特征提取模块,还用于根据所述操作数据,通过所述第二特征提取网络,得到第三嵌入表示;
    根据所述第三嵌入表示,通过所述第三神经网络,预测所述用户对所述物品的第三操作信息;其中,所述第三操作信息和所述第一操作信息之间的差异用于确定第四损失;
    所述模型更新模块,还用于:根据所述第四损失,更新所述第三神经网络和所述第二特征提取网络。
  24. 根据权利要求17至23任一所述的装置,其特征在于,所述目标操作信息指示所述用户是否对所述物品进行了目标操作,所述目标操作包括如下的至少一种:
    点击操作、浏览操作,加入购物车操作以及购买操作。
  25. 根据权利要求17至24任一所述的装置,其特征在于,所述属性信息包括所述用户的用户属性,所述用户属性包括如下的至少一种:性别,年龄,职业,收入,爱好,教育程度。
  26. 根据权利要求17至25任一所述的装置,其特征在于,所述属性信息包括所述物品的物品属性,所述物品属性包括如下的至少一种:物品名称,开发者,安装包大小,品类,好评度。
  27. 根据权利要求17至26任一所述的装置,其特征在于,
    不同的推荐场景为不同的应用程序;或者,
    不同的推荐场景为不同类的应用程序;或者,
    不同的推荐场景为同一个应用程序的不同功能。
  28. 根据权利要求17至27任一所述的装置,其特征在于,所述装置还包括:
    当所述目标操作信息满足预设条件,确定向所述用户推荐所述物品。
  29. 一种计算设备,其特征在于,所述计算设备包括存储器和处理器;所述存储器存储有代码,所述处理器被配置为获取所述代码,并执行如权利要求1至16任一所述的方法。
  30. 一种计算机存储介质,其特征在于,所述计算机存储介质存储有一个或多个指令,所述指令在 由一个或多个计算机执行时使得所述一个或多个计算机实施权利要求1至16任一所述的方法。
  31. 一种计算机程序产品,包括代码,其特征在于,在所述代码被执行时用于实现如权利要求1至16任一所述的方法。
PCT/CN2023/103227 2022-06-30 2023-06-28 一种操作预测方法及相关装置 WO2024002167A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210759871.6A CN115237732A (zh) 2022-06-30 2022-06-30 一种操作预测方法及相关装置
CN202210759871.6 2022-06-30

Publications (1)

Publication Number Publication Date
WO2024002167A1 true WO2024002167A1 (zh) 2024-01-04

Family

ID=83670955

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/103227 WO2024002167A1 (zh) 2022-06-30 2023-06-28 一种操作预测方法及相关装置

Country Status (2)

Country Link
CN (1) CN115237732A (zh)
WO (1) WO2024002167A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115237732A (zh) * 2022-06-30 2022-10-25 华为技术有限公司 一种操作预测方法及相关装置
CN116662814B (zh) * 2023-07-28 2023-10-31 腾讯科技(深圳)有限公司 对象意向预测方法、装置、计算机设备及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113641894A (zh) * 2021-07-20 2021-11-12 北京三快在线科技有限公司 一种信息推荐的方法及装置
CN113672807A (zh) * 2021-08-05 2021-11-19 杭州网易云音乐科技有限公司 推荐方法、装置、介质、装置和计算设备
CN113688313A (zh) * 2021-08-12 2021-11-23 北京三快在线科技有限公司 一种预测模型的训练方法、信息推送的方法及装置
CN114528323A (zh) * 2021-12-30 2022-05-24 天翼电子商务有限公司 一种基于多场景数据融合推荐的方法
CN115237732A (zh) * 2022-06-30 2022-10-25 华为技术有限公司 一种操作预测方法及相关装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113641894A (zh) * 2021-07-20 2021-11-12 北京三快在线科技有限公司 一种信息推荐的方法及装置
CN113672807A (zh) * 2021-08-05 2021-11-19 杭州网易云音乐科技有限公司 推荐方法、装置、介质、装置和计算设备
CN113688313A (zh) * 2021-08-12 2021-11-23 北京三快在线科技有限公司 一种预测模型的训练方法、信息推送的方法及装置
CN114528323A (zh) * 2021-12-30 2022-05-24 天翼电子商务有限公司 一种基于多场景数据融合推荐的方法
CN115237732A (zh) * 2022-06-30 2022-10-25 华为技术有限公司 一种操作预测方法及相关装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
WANG YICHAO; GUO HUIFENG; CHEN BO; LIU WEIWEN; LIU ZHIRONG; ZHANG QI; HE ZHICHENG; ZHENG HONGKUN; YAO WEIWEI; ZHANG MUYU; DONG ZHE: "CausalInt: Causal Inspired Intervention for Multi-Scenario Recommendation", PROCEEDINGS OF THE 34TH ACM SYMPOSIUM ON PARALLELISM IN ALGORITHMS AND ARCHITECTURES, ACMPUB27, NEW YORK, NY, USA, 14 August 2022 (2022-08-14) - 27 July 2023 (2023-07-27), New York, NY, USA, pages 4090 - 4099, XP059162766, ISBN: 978-1-4503-9408-6, DOI: 10.1145/3534678.3539221 *

Also Published As

Publication number Publication date
CN115237732A (zh) 2022-10-25

Similar Documents

Publication Publication Date Title
WO2021047593A1 (zh) 推荐模型的训练方法、预测选择概率的方法及装置
WO2021233199A1 (zh) 搜索推荐模型的训练方法、搜索结果排序的方法及装置
WO2022016556A1 (zh) 一种神经网络蒸馏方法以及装置
WO2024002167A1 (zh) 一种操作预测方法及相关装置
WO2023221928A1 (zh) 一种推荐方法、训练方法以及装置
CN115917535A (zh) 推荐模型的训练方法、推荐方法、装置及计算机可读介质
WO2024041483A1 (zh) 一种推荐方法及相关装置
WO2023185925A1 (zh) 一种数据处理方法及相关装置
WO2024131762A1 (zh) 一种推荐方法及相关设备
CN117217284A (zh) 一种数据处理方法及其装置
WO2023050143A1 (zh) 一种推荐模型训练方法及装置
CN114417174B (zh) 内容推荐方法、装置、设备及计算机存储介质
CN115879508A (zh) 一种数据处理方法及相关装置
CN113641916B (zh) 一种内容推荐方法、装置、电子设备和存储介质
WO2024067779A1 (zh) 一种数据处理方法及相关装置
WO2024012360A1 (zh) 一种数据处理方法及相关装置
WO2023246735A1 (zh) 一种项目推荐方法及其相关设备
CN116910357A (zh) 一种数据处理方法及相关装置
CN117057855A (zh) 一种数据处理方法及相关装置
WO2023197910A1 (zh) 一种用户行为预测方法及其相关设备
CN116843022A (zh) 一种数据处理方法及相关装置
CN117251619A (zh) 一种数据处理方法及相关装置
CN116204709A (zh) 一种数据处理方法及相关装置
CN116308640A (zh) 一种推荐方法及相关装置
CN115641490A (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: 23830340

Country of ref document: EP

Kind code of ref document: A1