WO2024041483A1 - 一种推荐方法及相关装置 - Google Patents

一种推荐方法及相关装置 Download PDF

Info

Publication number
WO2024041483A1
WO2024041483A1 PCT/CN2023/114023 CN2023114023W WO2024041483A1 WO 2024041483 A1 WO2024041483 A1 WO 2024041483A1 CN 2023114023 W CN2023114023 W CN 2023114023W WO 2024041483 A1 WO2024041483 A1 WO 2024041483A1
Authority
WO
WIPO (PCT)
Prior art keywords
feature
representation
sub
target
user
Prior art date
Application number
PCT/CN2023/114023
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 WO2024041483A1 publication Critical patent/WO2024041483A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0631Item recommendations

Definitions

  • This application relates to the field of artificial intelligence, and in particular, to a recommendation 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 ordinary two-tower model is the main model used by the industry in the rough planning stage at this stage. It usually consists of two parts: the user tower and the item tower.
  • the user tower and item tower model user information and item information respectively, and then score them.
  • the modeled item information is usually pre-stored in the server. When facing each user request, only the user information is modeled, and then the modeled user information and the pre-stored item information are stored in the server. Item information is calculated and scores are obtained for sorting.
  • the existing ordinary two-tower model models users and items separately, lacking interactive information between users and items.
  • the ordinary two-tower model only scores the interaction between user and item information when calculating the ranking score. This is It is a delayed interaction strategy. Due to the lack of interaction information between the user and the item, this strategy will cause the accuracy of the model to decrease.
  • This application provides a recommended method that can achieve better prediction results.
  • this application provides a recommendation method, which method includes: obtaining a first feature representation and a second feature representation; the first feature representation corresponds to the attribute information of the target user; the second feature representation corresponds to Based on the attribute information of the target item; the first feature representation includes a plurality of first sub-feature representations, and the second feature representation includes a plurality of second sub-feature representations; according to the plurality of first sub-feature representations and the A plurality of second sub-feature representations are used to determine a plurality of similarities; wherein each similarity is a similarity between one of the first sub-feature representations and one of the second sub-feature representations; The similarities are fused to obtain recommendation information between the target user and the target; when the recommendation information meets the preset conditions, it is determined to recommend the target item to the target user.
  • the similarity between the slices represented by the characteristics of the user and the item is used to model the interactive information between the user and the item, that is, the interactive information between the user and the item is modeled through an explicit method. There is no need to add additional parameters in the interactive link, and at the same time better prediction results can be achieved.
  • the plurality of first sub-feature representations are obtained by segmenting the first feature representation; the plurality of second sub-feature representations are obtained by segmenting the second feature representation. Got it.
  • the obtained user and item representations are sliced, the similarity between each slice is calculated and the maximum value is taken, and then the user-item interaction score of each layer is multi-layered. Hierarchical aggregation to obtain the final interaction score.
  • the plurality of similarities may include multiple groups of similarities, and each group of similarities may be: the similarity between one of the first sub-feature representations and each of the second sub-feature representations. ; Or, the similarity between one of the second sub-feature representations and each of the first sub-feature representations; when fusing the multiple similarities, the multiple similarities included in each group of similarities can be The maximum value of the degrees is fused to obtain recommendation information between the target user and the target.
  • each first sub-feature representation the similarity between it and each second sub-feature representation can be calculated separately to obtain a set of similarities, and the similarity within a set of similarities can be calculated. Find the maximum value of multiple similarities.
  • each first sub-feature representation can obtain a set of similarities. The maximum value can be obtained for multiple similarities within a set of similarities, and then multiple maximum values can be obtained. , which can fuse the maximum values of multiple similarities.
  • the fusion method may be a summation operation (optionally, the summation result may also be normalized to between 0 and 1), and the recommendation information is used to represent the target user's interest in the The probability of selecting the target item.
  • the first target embedding representation corresponding to the attribute information of the target user can be processed by the first encoder to obtain The first feature representation, that is to say, the first feature representation is obtained by processing the first target embedding representation corresponding to the attribute information of the target user by the first encoder.
  • the first encoder includes a plurality of first fully connected layers, and the first feature is represented by M first fully connected layers according to the plurality of first fully connected layers.
  • the output is that M is a positive number greater than 1.
  • the multi-layer user representation output by the first encoder on the user side in the twin-tower model can be used to model different levels of interactive information.
  • the twin-tower model only uses the feature representation output by the last layer of the user-side encoder for modeling, which is a coarse-grained modeling method.
  • multi-layer user representation is used for modeling, which can improve subsequent prediction effect.
  • the second feature representation is obtained through a second encoder according to the attribute information of the target item.
  • the second encoder includes a plurality of second fully connected layers.
  • the second The feature representation is obtained based on the output of the second fully connected layer closest to the output layer among the plurality of second fully connected layers.
  • feature extraction can be performed on the attribute information of the target user and the target item based on the embedding layer to obtain the first target embedding representation corresponding to the attribute information of the target user and the attribute information corresponding to the target item.
  • the target user and the attributes of each dimension of the target user can be processed separately based on the embedding layer to obtain the embedding vector corresponding to the attributes of each dimension.
  • the attribute information of the target user includes user attributes in multiple dimensions, and the user attributes in multiple dimensions can be processed through the embedding layer to obtain the first initial embedded representation corresponding to the attribute information of the user;
  • the third An initial embedding representation includes a plurality of first embedding vectors, each first embedding vector corresponding to one dimension of user attributes.
  • a concatenation operation can be performed on each first embedding vector to obtain a first feature representation, which can be used as a user-side branch in the recommendation model (for example, the user-side branch in the two-tower model encoder) input.
  • the attribute information of the target item includes item attributes in multiple dimensions, and the item attributes in multiple dimensions can be processed through the embedding layer to obtain a second initial embedding representation corresponding to the attribute information of the item; the third The second initial embedding representation includes a plurality of second embedding vectors, and each second embedding vector corresponds to an item attribute of one dimension.
  • a concatenation operation can be performed on each second embedding vector to obtain a second feature representation, which can be used as an item-side branch in the recommendation model (for example, the item-side branch in the two-tower model encoder) input.
  • the splicing result may not be used as the input of the recommendation model, but based on a trained network that can determine the attributes of each dimension based on the splicing result. Weight distribution, and adjust the splicing result based on the weight distribution.
  • a first initial embedding representation corresponding to the user's attribute information can be obtained; the first initial embedding representation includes a plurality of first embedding vectors, each first embedding vector corresponding to a user of one dimension. attributes; process the first initial embedding representation through a weight determination network; obtain a first weight for each of the user attributes; adjust the plurality of first embedding vectors according to the first weight (for example, by weighting ) to obtain the first target embedding representation.
  • a second initial embedding representation corresponding to the attribute information of the item can be obtained; the second initial embedding representation includes a plurality of second embedding vectors, each second embedding vector corresponding to an item of one dimension. attributes; process the second initial embedding representation through a weight determination network; obtain a second weight for each of the item attributes; adjust the plurality of second embedding vectors according to the second weight (for example, by weighting ) to obtain the second target embedding representation.
  • the weight determination network includes only one layer of FC.
  • ranking models require the use of multi-layer neural networks to adjust the weights of different features, which will result in too large parameters of the model.
  • This application proposes a lightweight model to adjust the weight of feature importance, which reduces the number of parameters of the model while ensuring that better feature expressions can be learned.
  • the attribute information of the target user can be attributes related to the user's preference characteristics, including at least one of gender, age, occupation, income, hobbies and education level, where the gender can be male or female, and the age can be 0- A number between 100, the occupation can be teachers, programmers, chefs, etc., the hobbies can be basketball, tennis, running, etc., and the education level can be elementary school, junior high school, high school, university, etc.; this application does not limit the goals The specific type of user 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.
  • the category of the item can be chatting, parkour games, office, etc., and the favorable rating can be ratings, comments, etc. for the item; this application is not limited to The specific type of attribute information for the item.
  • this application provides a data processing method, which method includes:
  • the first feature representation is obtained by feature extraction of the target user's attribute information through the first encoder;
  • the second feature representation is obtained by extracting the target item through the second encoder
  • the attribute information is obtained by feature extraction;
  • the first feature representation includes a plurality of first sub-feature representations, and the second feature representation includes a plurality of second sub-feature representations;
  • the multiple similarities are fused to obtain recommendation information between the target user and the target; the recommendation information and the corresponding similarity annotation are used to determine the first loss, and the first loss is used to update For the first encoder and the second encoder, the similarity annotation is obtained based on the real operation log of the target user.
  • the similarity between the first feature representation and the second feature representation is used to determine a second loss, and the second loss is used to update the first encoder and the third Two encoders; when the real operation log indicates that the target user has a positive operation behavior for the target item, the second loss indication maximizes the sum of the first feature representation and the second feature representation. When the real operation log indicates that the target user has no operation behavior on the target item or there is a negative operation behavior on the target item, the second loss indication minimizes the The similarity between the first feature representation and the second feature representation.
  • the implicit self-supervised twin-tower interaction module uses contrastive learning to establish an implicit twin-tower feature interaction, that is, to shorten the distance between the user and the positive sample items, and to push away the user and the negative sample items. The distance of the sample items.
  • the plurality of first sub-feature representations are obtained by segmenting the first feature representation; the plurality of second sub-feature representations are obtained by segmenting the second feature representation. Got it.
  • the multiple similarities include multiple groups of similarities, and each group of similarities is:
  • the fusion of the multiple similarities includes:
  • the first encoder includes a plurality of first fully connected layers, and the first feature representation is obtained according to the output of M first fully connected layers in the plurality of first fully connected layers, where M is greater than a positive number of 1; or,
  • the second encoder includes a plurality of second fully connected layers, and the second feature representation is obtained according to the output of the second fully connected layer closest to the output layer among the plurality of second fully connected layers.
  • the attribute information of the target user includes user attributes in multiple dimensions
  • the first feature representation is a first target embedding representation corresponding to the attribute information of the target user through a first encoder. obtained by processing; the method also includes:
  • the first initial embedding representation includes a plurality of first embedding vectors, each first embedding vector corresponding to one dimension of user attributes;
  • the first loss is also used to update the weight determination network.
  • this application provides a recommendation device, which includes:
  • the Acquisition module used to obtain a first feature representation and a second feature representation;
  • the first feature representation corresponds to the attribute information of the target user;
  • the second feature representation corresponds to the attribute information of the target item;
  • the first feature representation It includes a plurality of first sub-feature representations, and the second feature representation includes a plurality of second sub-feature representations;
  • a data processing module configured to determine multiple similarities based on the plurality of first sub-feature representations and the plurality of second sub-feature representations; wherein each of the similarities is one of the first sub-feature representations and the similarity between one of the second sub-feature representations;
  • a recommendation module configured to determine to recommend the target item to the target user when the recommendation information satisfies the preset conditions.
  • the plurality of first sub-feature representations are obtained by segmenting the first feature representation; the plurality of second sub-feature representations are obtained by segmenting the second feature representation. Got it.
  • the multiple similarities include multiple groups of similarities, and each group of similarities is:
  • the fusion of the multiple similarities includes:
  • the first feature representation is obtained through a first encoder according to the attribute information of the target user.
  • the first encoder includes a plurality of first fully connected layers.
  • the first The feature representation is obtained according to the output of M first fully connected layers among the plurality of first fully connected layers, where M is a positive number greater than 1.
  • the second feature representation is obtained through a second encoder according to the attribute information of the target item.
  • the second encoder includes a plurality of second fully connected layers.
  • the second feature representation is obtained according to the plurality of second fully connected layers.
  • the output of the second fully connected layer closest to the output layer in the second fully connected layer is obtained.
  • the attribute information of the target user includes user attributes in multiple dimensions
  • the first feature representation is a first target embedding representation corresponding to the attribute information of the target user through a first encoder. Obtained by processing;
  • the acquisition module is also used to obtain the first initial embedding representation corresponding to the user's attribute information;
  • the first initial embedding representation includes a plurality of first embedding vectors, each first embedding vector corresponding to one dimension of user attributes. ;
  • the device further includes: a weight adjustment module, configured to process the first initial embedded representation through a weight determination network; obtain the first weight of each of the user attributes;
  • the plurality of first embedding vectors are adjusted to obtain the first target embedding representation.
  • the attribute information of the target item includes item attributes of multiple dimensions
  • the second feature representation is a second target embedding representation corresponding to the attribute information of the target item through a second encoder. Obtained by processing;
  • the acquisition module is also used to obtain a second initial embedding representation corresponding to the attribute information of the item;
  • the second initial embedding representation includes a plurality of second embedding vectors, each second embedding vector corresponding to one dimension of item attributes. ;
  • the device further includes: a weight adjustment module, configured to process the second initial embedding representation through a weight determination network; obtain the second weight of each of the item attributes;
  • the plurality of second embedding vectors are adjusted to obtain the second target embedding representation.
  • the weight determination network includes only one layer of FC.
  • the attribute information of the target user includes at least one of the following: gender, age, occupation, income, hobbies, and education level.
  • the attribute information of the target item includes at least one of the following: item name, developer, installation package size, category, and favorable rating.
  • this application provides a data processing device, which includes:
  • An acquisition module is used to obtain a first feature representation and a second feature representation; the first feature representation is obtained by feature extraction of the attribute information of the target user through the first encoder; the second feature representation is obtained by using the second feature representation.
  • the encoder extracts features from the attribute information of the target item; the first feature representation includes a plurality of first sub-feature representations, and the second feature representation includes a plurality of second sub-feature representations;
  • a data processing module configured to determine multiple similarities based on the plurality of first sub-feature representations and the plurality of second sub-feature representations; wherein each of the similarities is one of the first sub-feature representations and the similarity between one of the second sub-feature representations;
  • the multiple similarities are fused to obtain recommendation information between the target user and the target; the recommendation information and the corresponding similarity annotation are used to determine the first loss, and the first loss is used to update For the first encoder and the second encoder, the similarity annotation is obtained based on the real operation log of the target user.
  • the similarity between the first feature representation and the second feature representation is used to determine a second loss, and the second loss is used to update the first encoder and the third Two encoders; when the real operation log indicates that the target user has a positive operation behavior for the target item, the second loss indication maximizes the sum of the first feature representation and the second feature representation. When the real operation log indicates that the target user has no operation behavior on the target item or there is a negative operation behavior on the target item, the second loss indication minimizes the The similarity between the first feature representation and the second feature representation.
  • the plurality of first sub-feature representations are obtained by segmenting the first feature representation; the plurality of second sub-feature representations are obtained by segmenting the second feature representation. Got it.
  • the multiple similarities include multiple groups of similarities, and each group of similarities is:
  • the fusion of the multiple similarities includes:
  • the first encoder includes a plurality of first fully connected layers, and the first feature representation is obtained according to the output of M first fully connected layers in the plurality of first fully connected layers, where M is greater than a positive number of 1; or,
  • the second encoder includes a plurality of second fully connected layers, and the second feature representation is obtained according to the output of the second fully connected layer closest to the output layer among the plurality of second fully connected layers.
  • the attribute information of the target user includes user attributes in multiple dimensions
  • the first feature representation is a first target embedding representation corresponding to the attribute information of the target user through a first encoder. Obtained by processing;
  • the acquisition module is also used to obtain the first initial embedding representation corresponding to the user's attribute information;
  • the first initial embedding representation includes a plurality of first embedding vectors, each first embedding vector corresponding to one dimension of user attributes. ;
  • the device further includes: a weight adjustment module, configured to process the first initial embedded representation through a weight determination network; obtain the first weight of each of the user attributes;
  • the first loss is also used to update the weight determination network.
  • embodiments of the present application provide a recommended 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 any of the above-mentioned first aspects.
  • a 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 any of the above-mentioned tasks in the second aspect.
  • embodiments of the present application provide a computer-readable storage medium that stores a computer program that, when run on a computer, causes the computer to execute the first aspect and any of the above-mentioned aspects.
  • 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, the above-mentioned second aspect and any optional method. 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, and the memory 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 recommended flow scenario provided by an embodiment of the present application.
  • Figure 5 is a schematic flow chart of a recommendation method provided by an embodiment of the present application.
  • Figure 6 is a schematic diagram of a recommendation model
  • Figure 7 is a schematic flowchart of a data processing method provided by an embodiment of the present application.
  • Figure 8 is a schematic structural diagram of a recommendation device provided by an embodiment of the present application.
  • Figure 9 is a schematic structural diagram of a data processing device provided by an embodiment of the present application.
  • Figure 10 is a schematic diagram of an execution device provided by an embodiment of the present application.
  • Figure 11 is a schematic diagram of a training device provided by an embodiment of the present application.
  • Figure 12 is a schematic diagram of a chip provided by an embodiment of the present application.
  • Figure 13 is a schematic diagram of an experimental effect provided by the 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 eventually calculate the recommendation probability or score of each object to be recommended.
  • the recommendation system selects the recommendation results according to certain selection rules, such as sorting according to the recommendation probability or score, and presents them to the user through the corresponding application or terminal device. , the user operates the objects in the recommendation results to generate user behavior logs and other links.
  • 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 . 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. Further, it can also be obtained from A specified or preset number of objects are recommended from the evaluation results of a large number of objects.
  • 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 for data interaction with external devices.
  • the execution device 210 can obtain user characteristic information from the client device 240 through the I/O interface 212, such as user identification, user identity, gender, occupation, hobbies, etc. , this part of information can also be obtained from the system database.
  • 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.
  • twin-tower model Since the number of users and items in large-scale industrial retrieval systems is very large, and the user's request response time needs to be strictly controlled within tens of milliseconds, the twin-tower model is commonly used in industrial retrieval systems to model users and items. .
  • the two-tower model includes two towers—the user tower and the item tower. They model users and items respectively, and pre-store the modeled item information in the online server. When there is a new user request, only the user request is modeled, and then the modeled user information and the pre-stored item information are calculated to obtain the scoring result, which greatly reduces the calculation delay.
  • 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 higher predicted user selection rate may be displayed in the front recommendation position
  • APPs with a lower predicted user selection rate may 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 ordinary two-tower model is the main model used by the industry in the rough planning stage at this stage. It usually consists of two parts: the user tower and the item tower.
  • the user tower and item tower model user information and item information respectively, and then score them.
  • the modeled item information is usually pre-stored in the server. When facing each user request, only the user information is modeled, and then the modeled user information and the pre-stored item information are stored in the server. Item information is calculated and scores are obtained for sorting.
  • the existing ordinary two-tower model models users and items separately, lacking interactive information between users and items.
  • the ordinary two-tower model only scores the interaction between user and item information when calculating the ranking score. This is It is a delayed interaction strategy. Due to the lack of interaction information between the user and the item, this strategy will cause the accuracy of the model to decrease.
  • this application provides a recommendation method.
  • the information recommendation method provided by the embodiment of this application will be described by taking the model inference stage as an example.
  • Figure 5 is a schematic diagram of a recommendation method provided by an embodiment of the present application.
  • a recommendation method provided by an embodiment of the present application includes:
  • first feature representation and a second feature representation corresponds to the attribute information of the target user; the second feature representation corresponds to the attribute information of the target item; the first feature representation includes multiple A first sub-feature representation, and the second feature representation includes a plurality of second sub-feature representations.
  • 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 execution device may obtain the attribute information of the target user and the attribute information of the target item.
  • the attribute information of the target user can be attributes related to the user's preference characteristics, including at least one of gender, age, occupation, income, hobbies and education level, where the gender can be male or female, and the age can be 0- A number between 100, the occupation can be teachers, programmers, chefs, etc., the hobbies can be basketball, tennis, running, etc., and the education level can be elementary school, junior high school, high school, university, etc.; this application does not limit the goals The specific type of user 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.
  • the category of the item can be chatting, parkour games, office, etc., and the favorable rating can be ratings, comments, etc. for the item; this application is not limited to The specific type of attribute information for the item.
  • the original user and item embedding representations can be compressed first using, but not limited to, the average pooling method to obtain global information.
  • the compression process can be performed with reference to the following formula:
  • feature extraction can be performed on the attribute information of the target user and the target item based on the embedding layer to obtain the first target embedding representation corresponding to the attribute information of the target user and the attribute information corresponding to the target item.
  • the target user and the attributes of each dimension of the target user can be processed separately based on the embedding layer to obtain the embedding vector corresponding to the attributes of each dimension.
  • the attribute information of the target user includes user attributes in multiple dimensions, and the user attributes in multiple dimensions can be processed through the embedding layer to obtain the first initial embedded representation corresponding to the attribute information of the user;
  • the third An initial embedding representation includes a plurality of first embedding vectors, each first embedding vector corresponding to one dimension of user attributes.
  • a concatenation operation can be performed on each first embedding vector to obtain a first feature representation, which can be used as a user-side branch in the recommendation model (for example, the user-side branch in the two-tower model encoder) input.
  • the attribute information of the target item includes item attributes in multiple dimensions, and the item attributes in multiple dimensions can be processed through the embedding layer to obtain a second initial embedding representation corresponding to the attribute information of the item; the third The second initial embedding representation includes a plurality of second embedding vectors, and each second embedding vector corresponds to an item attribute of one dimension.
  • a concatenation operation can be performed on each second embedding vector to obtain a second feature representation, which can be used as an item-side branch in the recommendation model (for example, the item-side branch in the two-tower model encoder) input.
  • the splicing result may not be used as the input of the recommendation model, but based on a trained network that can determine the attributes of each dimension based on the splicing result. Weight distribution, and adjust the splicing result based on the weight distribution.
  • a first initial embedding representation corresponding to the user's attribute information can be obtained; the first initial embedding representation includes a plurality of first embedding vectors, each first embedding vector corresponding to a user of one dimension. attributes; process the first initial embedding representation through a weight determination network; obtain a first weight for each of the user attributes; adjust the plurality of first embedding vectors according to the first weight (for example, by weighting ) to obtain the first target embedding representation.
  • a second initial embedding representation corresponding to the attribute information of the item can be obtained; the second initial embedding representation includes a plurality of second embedding vectors, each second embedding vector corresponding to an item of one dimension. attributes; process the second initial embedding representation through a weight determination network; obtain a second weight for each of the item attributes; adjust the plurality of second embedding vectors according to the second weight (for example, by weighting ) to obtain the second target embedding representation.
  • the weight determination network includes only one layer of FC.
  • ranking models require the use of multi-layer neural networks to adjust the weights of different features, which will result in too large parameters of the model.
  • This application proposes a lightweight model to adjust the weight of feature importance, which reduces the number of parameters of the model while ensuring that better feature expressions can be learned.
  • the first target embedding representation corresponding to the attribute information of the target user can be processed by the first encoder to obtain The first feature representation, that is to say, the first feature representation is obtained by processing the first target embedding representation corresponding to the attribute information of the target user by the first encoder.
  • the first encoder includes a plurality of first fully connected layers, and the first feature is represented by M first fully connected layers according to the plurality of first fully connected layers.
  • the output is that M is a positive number greater than 1.
  • the multi-layer user representation output by the first encoder on the user side in the twin-tower model can be used to model different levels of interactive information.
  • the twin-tower model only uses the feature representation output by the last layer of the user-side encoder for modeling, which is a coarse-grained modeling method.
  • multi-layer user representation is used for modeling, which can improve subsequent prediction effect.
  • FIG. 6 is a schematic diagram of the processing flow of a recommendation model.
  • the first encoder may include multiple fully connected layers FC, and the outputs of the last three fully connected layers may be used to determine the first feature representation.
  • the extracted user feature representation (for example, the output of the above-mentioned M first fully connected layers) can be further learned to obtain a more optimized user feature representation (for example, the first feature representation).
  • the second feature representation is obtained by processing a second target embedding representation corresponding to the attribute information of the target item through a second encoder.
  • the second encoder includes a plurality of second fully connected layers, and the second feature representation is based on the second fully connected layer closest to the output layer among the plurality of second fully connected layers. The output of the layer is obtained.
  • FIG. 6 is a schematic diagram of the processing flow of a recommendation model, in which the second encoder may include multiple fully connected layers FC, and the output of the last fully connected layer may be used to determine the second feature representation.
  • the feature representation of the extracted items (such as the output of the second fully connected layer closest to the output layer) can be further learned to obtain a more optimized feature representation of the item (such as the second feature representation ).
  • the interaction between the user-side branch and the item-side branch in the twin-tower model can be performed based on the first feature representation and the second feature representation.
  • the first feature representation includes a plurality of first sub-feature representations
  • the second feature representation includes a plurality of second sub-feature representations; for example, the plurality of first sub-feature representations are: The plurality of second sub-feature representations are obtained by segmenting the first feature representation; the plurality of second sub-feature representations are obtained by segmenting the second feature representation.
  • the obtained user and item representations are sliced, the similarity between each slice is calculated and the maximum value is taken, and then the user-item interaction score of each layer is multi-layered. Hierarchical aggregation to obtain the final interaction score.
  • the plurality of similarities may include multiple groups of similarities, and each group of similarities may be: the similarity between one of the first sub-feature representations and each of the second sub-feature representations. ; Or, the similarity between one of the second sub-feature representations and each of the first sub-feature representations; when fusing the multiple similarities, the multiple similarities included in each group of similarities can be The maximum value of the degrees is fused to obtain recommendation information between the target user and the target.
  • each first sub-feature representation the similarity between it and each second sub-feature representation can be calculated separately to obtain a set of similarities. Find the maximum value of multiple similarities within the similarity. Similarly, each first sub-feature representation can obtain a set of similarities. The maximum value of multiple similarities within a set of similarities can be obtained, and then we can get Multiple maximum values can be used to fuse the maximum values of multiple similarities.
  • the fusion method may be a summation operation (optionally, the summation result may also be normalized to between 0 and 1), and the recommendation information is used to represent the target user's interest in the The probability of selecting the target item.
  • the interaction stage In the interaction stage, the obtained user and item representations can be sliced, the similarity between each slice can be calculated and the maximum value is taken, and then the user-item relationship of each layer is The interaction scores are aggregated at multiple levels to obtain the final interaction score.
  • the interaction phase can be executed through the following formula:
  • the similarity between the slices represented by the characteristics of the user and the item is used to model the interactive information between the user and the item, that is, the interactive information between the user and the item is modeled through an explicit method. There is no need to add additional parameters in the interactive link, and at the same time better prediction results can be achieved.
  • the probability that the target user selects the target 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 target item to the target user.
  • the probability that the target user selects multiple items (including target items) can be calculated, and the user selects multiple items (including target items) based on probability to determine the recommendation index of each item for the target user.
  • the recommendation index After obtaining the recommendation index of each item for the target user, the recommendation index can be sorted, and the M items with the largest recommendation index can be recommended to the target user.
  • a probability threshold When the probability of the target user selecting multiple items (including target items) is greater than the above probability threshold, recommendations can be made to the target 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.
  • This application provides a recommendation method.
  • the method includes: obtaining a first feature representation and a second feature representation; the first feature representation corresponds to the attribute information of the target user; the second feature representation corresponds to the attribute information of the target item. Attribute information; the first feature representation includes a plurality of first sub-feature representations, the second feature representation includes a plurality of second sub-feature representations; according to the plurality of first sub-feature representations and the plurality of second sub-feature representations Sub-feature representation, determine a plurality of similarities; wherein each similarity is a similarity between one of the first sub-feature representation and one of the second sub-feature representation; perform the multiple similarities Through fusion, recommendation information between the target user and the target is obtained; when the recommendation information meets the preset conditions, it is determined to recommend the target item to the target user.
  • the similarity between the slices represented by the characteristics of the user and the item is used to model the interactive information between the user and the item, that is, the interactive information between the user and the item is modeled through an explicit method. There is no need to add additional parameters in the interactive link, and at the same time better prediction results can be achieved.
  • the recommendation method provided by the embodiment of the present application has been described above from the inference process of the model. Next, the training process of the model will be described.
  • Figure 7 is a flow diagram of a model training method provided by an embodiment of the present application.
  • a model training method provided by an embodiment of the present application includes:
  • the first feature representation and the second feature representation are obtained by feature extraction of the attribute information of the target user through the first encoder;
  • the second feature representation is obtained by extracting the attribute information of the target user through the second encoder.
  • the attribute information of the target item is obtained through feature extraction;
  • the first feature representation includes a plurality of first sub-feature representations, and the second feature representation includes a plurality of second sub-feature representations;
  • the similarity between the first feature representation and the second feature representation is used to determine a second loss, and the second loss is used to update the first encoder and the third Two encoders; when the real operation log indicates that the target user has a positive operation behavior for the target item, the second loss indication maximizes the sum of the first feature representation and the second feature representation. When the real operation log indicates that the target user has no operation behavior on the target item or there is a negative operation behavior on the target item, the second loss indication minimizes the The similarity between the first feature representation and the second feature representation.
  • negative operation behavior can indicate that the user has operation behavior on the item, but this operation behavior indicates that the user has no intention to choose the item, such as complaint operation, chargeback operation, etc.
  • the implicit self-supervised twin-tower interaction module uses contrastive learning to establish an implicit twin-tower feature interaction, that is, to shorten the distance between the user and the positive sample items, and to push away the user and the negative sample items. The distance of the sample items.
  • the model can be jointly trained using L ctr and L cir , where L ctr is the loss function that calculates the difference between the predicted value and the true value, and L cir is the loss function that calculates the hidden value of the user and positive and negative item pairs. loss function for distance in equation space.
  • the plurality of first sub-feature representations are obtained by segmenting the first feature representation; the plurality of second sub-feature representations are obtained by segmenting the second feature representation. Got it.
  • the plurality of similarities includes multiple groups of similarities, and each group of similarities is: the similarity between one of the first sub-feature representations and each of the second sub-feature representations; or , the similarity between one second sub-feature representation and each of the first sub-feature representations; when fusing the multiple similarities, specifically the multiple similarities included in each group of similarities can be The maximum value is merged.
  • the first encoder includes a plurality of first fully connected layers, and the first feature is represented by M first fully connected layers according to the plurality of first fully connected layers.
  • the output is that M is a positive number greater than 1; or,
  • the second encoder includes a plurality of second fully connected layers, and the second feature representation is obtained according to the output of the second fully connected layer closest to the output layer among the plurality of second fully connected layers.
  • the attribute information of the target user includes user attributes in multiple dimensions
  • the first feature representation is a first target embedding representation corresponding to the attribute information of the target user through a first encoder. Obtained by processing; the first initial embedding representation corresponding to the user's attribute information can also be obtained; the first initial embedding representation includes a plurality of first embedding vectors, each first embedding vector corresponding to one dimension of user attributes; Process the first initial embedding representation through a weight determination network; obtain the first weight of each user attribute; adjust the plurality of first embedding vectors according to the first weight to obtain the first Target embedding representation; the first loss is also used to update the weight determination network.
  • the attribute information of the target user includes at least one of the following: gender, age, occupation, income, hobbies, and education level.
  • the attribute information of the target item includes at least one of the following: item name, developer, installation package size, category, and favorable rating.
  • FIG 8 is a structural representation of a recommendation device 800 provided by an embodiment of the present application.
  • the device 800 includes:
  • Acquisition module 801 is used to obtain a first feature representation and a second feature representation; the first feature representation corresponds to the attribute information of the target user; the second feature representation corresponds to the attribute information of the target item; the first feature The representation includes a plurality of first sub-feature representations, and the second feature representation includes a plurality of second sub-feature representations;
  • step 501 For a specific description of the acquisition module 801, please refer to the description of step 501 in the above embodiment, and will not be described again here.
  • Data processing module 802 configured to determine multiple similarities based on the plurality of first sub-feature representations and the plurality of second sub-feature representations; wherein each of the similarities is one of the first sub-features. The similarity between the representation and one of the second sub-feature representations;
  • the recommendation module 803 is configured to determine to recommend the target item to the target user when the recommendation information meets the preset conditions.
  • the plurality of first sub-feature representations are obtained by segmenting the first feature representation; the plurality of second sub-feature representations are obtained by segmenting the second feature representation. Got it.
  • the multiple similarities include multiple groups of similarities, and each group of similarities is:
  • the fusion of the multiple similarities includes:
  • the first feature representation is obtained through a first encoder according to the attribute information of the target user.
  • the first encoder includes a plurality of first fully connected layers.
  • the first The feature representation is obtained according to the output of M first fully connected layers among the plurality of first fully connected layers, where M is a positive number greater than 1.
  • the second feature representation is obtained through a second encoder according to the attribute information of the target item.
  • the second encoder includes a plurality of second fully connected layers.
  • the second feature representation is obtained according to the plurality of second fully connected layers.
  • the output of the second fully connected layer closest to the output layer in the second fully connected layer is obtained.
  • the attribute information of the target user includes user attributes in multiple dimensions
  • the first feature representation is a first target embedding representation corresponding to the attribute information of the target user through a first encoder. Obtained by processing;
  • the acquisition module is also used to obtain the first initial embedding representation corresponding to the user's attribute information;
  • the first initial embedding representation includes a plurality of first embedding vectors, each first embedding vector corresponding to one dimension of user attributes. ;
  • the device further includes: a weight adjustment module, configured to process the first initial embedded representation through a weight determination network; obtain the first weight of each of the user attributes;
  • the plurality of first embedding vectors are adjusted to obtain the first target embedding representation.
  • the attribute information of the target item includes item attributes of multiple dimensions
  • the second feature representation is a second target embedding representation corresponding to the attribute information of the target item through a second encoder. Obtained by processing;
  • the acquisition module is also used to obtain a second initial embedding representation corresponding to the attribute information of the item;
  • the second initial embedding representation includes a plurality of second embedding vectors, each second embedding vector corresponding to one dimension of item attributes. ;
  • the device further includes: a weight adjustment module, configured to process the second initial embedding representation through a weight determination network; obtain the second weight of each of the item attributes;
  • the plurality of second embedding vectors are adjusted to obtain the second target embedding representation.
  • the weight determination network includes only one layer of FC.
  • the attribute information of the target user includes at least one of the following: gender, age, occupation, income, hobbies, and education level.
  • the attribute information of the target item includes at least one of the following: item name, developer, installation package size, category, and favorable rating.
  • Figure 9 is a schematic structural diagram of a data processing device 900 provided by an embodiment of the present application.
  • the device 900 includes:
  • the acquisition module 901 is used to obtain a first feature representation and a second feature representation; the first feature representation is obtained by feature extraction of the attribute information of the target user through the first encoder; the second feature representation is obtained by using the first encoder. Obtained by feature extraction of the attribute information of the target item by two encoders; the first feature representation includes a plurality of first sub-feature representations, and the second feature representation includes a plurality of second sub-feature representations;
  • Data processing module 902 configured to determine a plurality of similarities based on the plurality of first sub-feature representations and the plurality of second sub-feature representations; wherein each of the similarities is one of the first sub-features.
  • the multiple similarities are fused to obtain recommendation information between the target user and the target; the recommendation information and the corresponding similarity annotation are used to determine the first loss, and the first loss is used to update For the first encoder and the second encoder, the similarity annotation is obtained based on the real operation log of the target user.
  • the similarity between the first feature representation and the second feature representation and the corresponding similarity annotation determine a second loss, and the second loss is used to update the first encoder and the second encoder, the similarity annotation is obtained according to the real operation log of the target user; when the real operation log indicates that the target user has a positive operation behavior on the target item, the The similarity indicated by the similarity annotation is greater than the threshold.
  • the similarity degree is The annotation indicates a similarity less than the threshold.
  • the plurality of first sub-feature representations are obtained by segmenting the first feature representation; the plurality of second sub-feature representations are obtained by segmenting the second feature representation. Got it.
  • the multiple similarities include multiple groups of similarities, and each group of similarities is:
  • the fusion of the multiple similarities includes:
  • the first encoder includes a plurality of first fully connected layers, and the first feature representation is obtained according to the output of M first fully connected layers in the plurality of first fully connected layers, where M is greater than a positive number of 1; or,
  • the second encoder includes a plurality of second fully connected layers, and the second feature representation is obtained according to the output of the second fully connected layer closest to the output layer among the plurality of second fully connected layers.
  • the attribute information of the target user includes user attributes in multiple dimensions
  • the first feature representation is a first target embedding representation corresponding to the attribute information of the target user through a first encoder. Obtained by processing;
  • the acquisition module is also used to obtain the first initial embedding representation corresponding to the user's attribute information;
  • the first initial embedding representation includes a plurality of first embedding vectors, each first embedding vector corresponding to one dimension of user attributes. ;
  • the device further includes: a weight adjustment module, configured to process the first initial embedded representation through a weight determination network; obtain the first weight of each of the user attributes;
  • the first loss is also used to update the weight determination network.
  • FIG. 10 is a schematic structural diagram of an execution device provided by an embodiment of the present application.
  • the execution device 1000 can be embodied as a mobile phone, a tablet, a notebook computer, Smart wearable devices, servers, etc. are not limited here.
  • the recommendation device described in the embodiment corresponding to FIG. 8 may be deployed on the execution device 1000 to implement the function of the recommendation method in the embodiment corresponding to FIG. 10 .
  • the execution device 1000 includes: a receiver 1001, a transmitter 1002, a processor 1003 and a memory 1004 (the number of processors 1003 in the execution device 1000 may be one or more), where the processor 1003 may include application processing processor 10031 and communication processor 10032.
  • the receiver 1001, the transmitter 1002, the processor 1003 and the memory 1004 may be connected through a bus or other means.
  • Memory 1004 may include read-only memory and random access memory and provides instructions and data to processor 1003 .
  • a portion of memory 1004 may also include non-volatile random access memory (NVRAM).
  • NVRAM non-volatile random access memory
  • the memory 1004 stores processors 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 1003 controls 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 1003 or implemented by the processor 1003.
  • the processor 1003 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 1003 .
  • the above-mentioned processor 1003 can 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, may further include application specific integrated circuits (ASICs), field-programmable gate arrays (field-programmable gate arrays, FPGAs) or other programmable logic devices, Discrete gate or transistor logic devices, discrete hardware components.
  • ASICs application specific integrated circuits
  • FPGAs field-programmable gate arrays
  • Discrete gate or transistor logic devices discrete hardware components.
  • the processor 1003 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 1004.
  • the processor 1003 reads the information in the memory 1004 and completes steps 501 to 504 in the above embodiment in conjunction with its hardware.
  • the receiver 1001 may be used to receive input numeric or character information and generate signal inputs related to performing relevant settings and functional controls of the device.
  • the transmitter 1002 can be used to output numeric or character information through the first interface; the transmitter 1002 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 1002 can also include a display device such as a display screen .
  • FIG. 11 is a schematic structural diagram of the training device provided by the embodiment of the present application.
  • the training device 1100 is implemented by one or more servers.
  • the training device 1100 There may be relatively large differences due to different configurations or performance, and may include one or more central processing units (CPU) 1111 (for example, one or more processors) and memory 1132, one or more storage applications Storage medium 1130 for program 1142 or data 1144 (eg, one or more mass storage devices).
  • the memory 1132 and the storage medium 1130 may be short-term storage or persistent storage.
  • the program stored in the storage medium 1130 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 1111 may be configured to communicate with the storage medium 1130 and execute a series of instruction operations in the storage medium 1130 on the training device 1100 .
  • the training device 1100 may also include one or more power supplies 1126, one or more wired or wireless network interfaces 1150, one or more input and output interfaces 1158; or, one or more operating systems 1141, such as Windows ServerTM, Mac OS XTM , UnixTM, LinuxTM, FreeBSDTM and so on.
  • operating systems 1141 such as Windows ServerTM, Mac OS XTM , UnixTM, LinuxTM, FreeBSDTM and so on.
  • the training device can perform steps 701 to 703 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 12 is a schematic structural diagram of a chip provided by an embodiment of the present application.
  • the chip can be represented as a neural network processor NPU 1200.
  • the NPU 1200 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 1203.
  • the arithmetic circuit 1203 is controlled by the controller 1204 to extract the matrix data in the memory and perform multiplication operations.
  • NPU 1200 can implement the information recommendation method provided in the embodiment described in Figure 5 and the model training method provided in the embodiment described in Figure 7 through the cooperation between various internal components.
  • the computing circuit 1203 in the NPU 1200 internally includes multiple processing units (Process Engine, PE).
  • arithmetic circuit 1203 is a two-dimensional systolic array.
  • the arithmetic circuit 1203 may also be a one-dimensional systolic array or other electronic circuit capable of performing mathematical operations such as multiplication and addition.
  • arithmetic circuit 1203 is a general-purpose matrix processor.
  • the arithmetic circuit obtains the corresponding data of matrix B from the weight memory 1202 and caches it on each PE in the arithmetic circuit.
  • the operation circuit takes matrix A data and matrix B from the input memory 1201 to perform matrix operations, and the partial result or final result of the matrix is stored in an accumulator (accumulator) 1208 .
  • the unified memory 1206 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) 1205, and the DMAC is transferred to the weight memory 1202.
  • Input data is also transferred to unified memory 1206 via DMAC.
  • DMAC Direct Memory Access Controller
  • BIU is the Bus Interface Unit, that is, the bus interface unit 1210, which is used for the interaction between the AXI bus and the DMAC and the Instruction Fetch Buffer (IFB) 1209.
  • IFB Instruction Fetch Buffer
  • the bus interface unit 1210 (Bus Interface Unit, BIU for short) is used to fetch the memory 1209 to obtain instructions from the external memory, and is also used for the storage unit access controller 1205 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 1206 or the weight data to the weight memory 1202 or the input data to the input memory 1201 .
  • the vector calculation unit 1207 includes multiple arithmetic processing units, and if necessary, further processes the output of the arithmetic circuit 1203, such as vector multiplication, vector addition, exponential operation, logarithmic operation, size comparison, etc.
  • vector calculation unit 1207 can store the processed output vectors to unified memory 1206 .
  • the vector calculation unit 1207 can apply a linear function; or a nonlinear function to the output of the operation circuit 1203, 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 1207 generates normalized values, pixel-wise summed values, or both.
  • the processed output vector can be used as an activation input to the arithmetic circuit 1203, such as for use in a subsequent layer in a neural network.
  • the instruction fetch buffer 1209 connected to the controller 1204 is used to store instructions used by the controller 1204;
  • the unified memory 1206, the input memory 1201, the weight memory 1202 and the fetch memory 1209 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 this 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 or transmitted from one computer-readable storage medium to another, for example, the computer instructions may be transferred from a website, computer, training device, or data
  • the center transmits to another website site, computer, training equipment or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) means.
  • wired such as coaxial cable, optical fiber, digital subscriber line (DSL)
  • wireless 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)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Economics (AREA)
  • Databases & Information Systems (AREA)
  • Strategic Management (AREA)
  • Human Resources & Organizations (AREA)
  • Data Mining & Analysis (AREA)
  • Development Economics (AREA)
  • Accounting & Taxation (AREA)
  • Marketing (AREA)
  • General Engineering & Computer Science (AREA)
  • General Business, Economics & Management (AREA)
  • Finance (AREA)
  • Health & Medical Sciences (AREA)
  • Biophysics (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • Game Theory and Decision Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Computational Linguistics (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种推荐方法,可以应用于人工智能领域,包括:获取第一特征表示和第二特征表示;所述第一特征表示对应于目标用户的属性信息;所述第二特征表示对应于目标物品的属性信息;所述第一特征表示包括多个第一子特征表示,所述第二特征表示包括多个第二子特征表示;根据所述多个第一子特征表示和所述多个第二子特征表示,确定多个相似度;其中,每个所述相似度为一个所述第一子特征表示和一个所述第二子特征表示之间的相似度;将所述多个相似度进行融合,得到所述目标用户和所述目标之间的推荐信息。本申请通过显式的方法建模用户和物品之间的交互信息,在交互环节不需要增加额外参数,并且同时可以取得更好的预测效果。

Description

一种推荐方法及相关装置
本申请要求于2022年08月26日提交中国专利局、申请号为202211032748.0、发明名称为“一种推荐方法及相关装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及人工智能领域,尤其涉及一种推荐方法及相关装置。
背景技术
人工智能(artificial intelligence,AI)是利用数字计算机或者数字计算机控制的机器模拟、延伸和扩展人的智能,感知环境、获取知识并使用知识获得最佳结果的理论、方法、技术及应用系统。换句话说,人工智能是计算机科学的一个分支,它企图了解智能的实质,并生产出一种新的能以人类智能相似的方式作出反应的智能机器。人工智能也就是研究各种智能机器的设计原理与实现方法,使机器具有感知、推理与决策的功能。
选择率预测,是指预测用户在特定环境下对某个物品的选择概率。例如,应用商店、在线广告等应用的推荐系统中,选择率预测起到关键作用;通过选择率预测可以实现最大化企业的收益和提升用户满意度,推荐系统需同时考虑用户对物品的选择率和物品竞价,其中,选择率为推荐系统根据用户历史行为预测得到,而物品竞价代表该物品被选择/下载后系统的收益。例如,可以通过构建一个函数,该函数可以根据预测的用户选择率和物品竞价计算得到一个函数值,推荐系统按照该函数值对物品进行降序排列。
普通双塔模型是现阶段工业界在粗排阶段使用的主要模型,它通常由两部分组成:用户塔和物品塔。在模型的训练阶段,用户塔和物品塔分别对用户信息和物品信息进行建模,然后进行打分。在模型的线上部署阶段,通常把建模好的物品信息预存到服务器中,当面对每个用户请求时,只需对用户信息进行建模,然后将建模好的用户信息和预存的物品信息进行计算,得出分数进行排序。
然而,现有的普通双塔模型单独对用户和物品进行建模,缺乏用户和物品的交互信息,普通的双塔模型只在计算排序分数的时候,才对用户和物品信息进行交互打分,这是一种延迟交互策略,因为缺乏用户和物品之间的交互信息,这种策略会造成模型的准确率有所下降。
发明内容
本申请提供了一种推荐方法,可以取得更好的预测效果。
第一方面,本申请提供了一种推荐方法,所述方法包括:获取第一特征表示和第二特征表示;所述第一特征表示对应于目标用户的属性信息;所述第二特征表示对应于目标物品的属性信息;所述第一特征表示包括多个第一子特征表示,所述第二特征表示包括多个第二子特征表示;根据所述多个第一子特征表示和所述多个第二子特征表示,确定多个相似度;其中,每个所述相似度为一个所述第一子特征表示和一个所述第二子特征表示之间的相似度;将所述多个相似度进行融合,得到所述目标用户和所述目标之间的推荐信息;当所述推荐信息满足预设条件,确定向所述目标用户推荐所述目标物品。
本申请实施例中,利用用户和物品的特征表示的切片之间的相似度来建模用户和物品之间的交互信息,也就是通过显式的方法建模用户和物品之间的交互信息,在交互环节不需要增加额外参数,并且同时可以取得更好的预测效果。
在一种可能的实现中,所述多个第一子特征表示为对所述第一特征表示进行切分得到的;所述多个第二子特征表示为对所述第二特征表示进行切分得到的。
在一种可能的实现中,在交互阶段,将得到的用户和物品表征进行切片,并计算每一片之间的相似度并取最大值,然后把每一层的用户-物品的交互分数进行多层级聚合,得到最后的交互分数。
在一种可能的实现中,所述多个相似度可以包括多组相似度,每组相似度可以为:一个所述第一子特征表示和各个所述第二子特征表示之间的相似度;或者,一个所述第二子特征表示和各个所述第一子特征表示之间的相似度;在将所述多个相似度进行融合时,可以将每组相似度中包括的多个相似度的最大值进行融合,得到所述目标用户和所述目标之间的推荐信息。
在一种可能的实现中,针对于每个第一子特征表示,可以分别计算其和各个第二子特征表示之间的相似度,以得到一组相似度,可以对一组相似度内的多个相似度求取最大值,类似的,每个第一子特征表示可以得到一组相似度,可以对一组相似度内的多个相似度求取最大值,进而可以得到多个最大值,可以对多个相似度的最大值进行融合。
在一种实现中,融合方式可以是加和运算(可选的,还可以对加和结果进行归一化到0至1之间),所述推荐信息用于表示所述目标用户对所述目标物品进行选择的概率。
在一种可能的实现中,在得到所述目标用户的属性信息对应的第一目标嵌入表示之后,可以通过第一编码器对所述目标用户的属性信息对应的第一目标嵌入表示进行处理得到第一特征表示,也就是说,所述第一特征表示为通过第一编码器对所述目标用户的属性信息对应的第一目标嵌入表示进行处理得到的。
在一种可能的实现中,所述第一编码器包括多个第一全连接层,所述第一特征表示为根据所述多个第一全连接层中的M个第一全连接层的输出得到,所述M为大于1的正数。
在得到用户对应的特征表示后,可以利用双塔模型中用户侧的第一编码器输出的多层用户表征,来建模不同层次的交互信息。现有技术中双塔模型中仅采用用户侧编码器最后一层输出的特征表示进行建模,是一种粗粒度的建模方式,本申请中利用多层用户表征进行建模,可以提升后续的预测效果。
在一种可能的实现中,所述第二特征表示为根据所述目标物品的属性信息通过第二编码器得到的,所述第二编码器包括多个第二全连接层,所述第二特征表示为根据所述多个第二全连接层中最靠近输出层的第二全连接层的输出得到。
在一种可能的实现中,可以基于嵌入层对目标用户和目标物品的属性信息进行特征提取,以得到所述目标用户的属性信息对应的第一目标嵌入表示以及所述目标物品的属性信息对应的第二目标嵌入表示。
在一种可能的实现中,可以基于嵌入层(embedding layer)对目标用户和目标用户的各个维度的属性分别进行处理,以得到每个维度的属性对应的嵌入向量。
例如,所述目标用户的属性信息包括多个维度的用户属性,可以通过嵌入层对多个维度的用户属性进行处理,以得到所述用户的属性信息对应的第一初始嵌入表示;所述第一初始嵌入表示包括多个第一嵌入向量,每个第一嵌入向量对应一个维度的用户属性。
在一种可能的实现中,可以对各个第一嵌入向量进行拼接操作(concat),以得到第一特征表示,该第一特征表示可以作为推荐模型中用户侧分支(例如双塔模型中用户侧的编码器)的输入。
例如,所述目标物品的属性信息包括多个维度的物品属性,可以通过嵌入层对多个维度的物品属性进行处理,以得到所述物品的属性信息对应的第二初始嵌入表示;所述第二初始嵌入表示包括多个第二嵌入向量,每个第二嵌入向量对应一个维度的物品属性。
在一种可能的实现中,可以对各个第二嵌入向量进行拼接操作(concat),以得到第二特征表示,该第二特征表示可以作为推荐模型中物品侧分支(例如双塔模型中物品侧的编码器)的输入。
在一种可能的实现中,在对各个嵌入向量进行拼接操作之后,可以不将拼接结果作为推荐模型的输入,而是基于一个训练好的网络,该网络可以基于拼接结果确定各个维度的属性的权重分布,并基于权重分布调整拼接结果。
在一种可能的实现中,可以获取所述用户的属性信息对应的第一初始嵌入表示;所述第一初始嵌入表示包括多个第一嵌入向量,每个第一嵌入向量对应一个维度的用户属性;通过权重确定网络,处理所述第一初始嵌入表示;得到每个所述用户属性的第一权重;根据所述第一权重,对所述多个第一嵌入向量进行调整(例如通过加权的方式进行调整),得到所述第一目标嵌入表示。
在一种可能的实现中,可以获取所述物品的属性信息对应的第二初始嵌入表示;所述第二初始嵌入表示包括多个第二嵌入向量,每个第二嵌入向量对应一个维度的物品属性;通过权重确定网络,处理所述第二初始嵌入表示;得到每个所述物品属性的第二权重;根据所述第二权重,对所述多个第二嵌入向量进行调整(例如通过加权的方式进行调整),得到所述第二目标嵌入表示。
通过上述方式,对不同的特征进行基于权重的调整,可以学习到更好的特征表达。
在一种可能的实现中,所述权重确定网络仅包括一层FC。通常情况下,排序模型需要用多层的神经网络来对不同的特征调整权重,这样做会导致模型的参数量过于巨大。本申请提出了一个轻量级的模型对特征重要性进行调权,在可以保证学习到更好的特征表达的情况下,降低了模型的参数量。
其中,目标用户的属性信息可以为与用户喜好特征相关的属性,性别、年龄、职业、收入、爱好以及受教育程度中的至少一种,其中,性别可以为男或者女,年龄可以为0-100之间的数字,职业可以为教师、程序员、厨师等等,爱好可以为篮球、网球、跑步等等,受教育程度可以为小学、初中、高中、大学等等;本申请并不限定目标用户的属性信息的具体类型。
其中,物品可以为实体物品,或者是虚拟物品,例如可以为APP、音视频、网页以及新闻资讯等物品,物品的属性信息可以为物品名称、开发者、安装包大小、品类以及好评度中的至少一种,其中,以物品为应用程序为例,物品的品类可以为聊天类、跑酷类游戏、办公类等等,好评度可以为针对于物品的打分、评论等;本申请并不限定物品的属性信息的具体类型。
第二方面,本申请提供了一种数据处理方法,所述方法包括:
获取第一特征表示和第二特征表示;所述第一特征表示为通过第一编码器对目标用户的属性信息进行特征提取得到的;所述第二特征表示为通过第二编码器对目标物品的属性信息进行特征提取得到的;所述第一特征表示包括多个第一子特征表示,所述第二特征表示包括多个第二子特征表示;
根据所述多个第一子特征表示和所述多个第二子特征表示,确定多个相似度;其中,每个所述相似度为一个所述第一子特征表示和一个所述第二子特征表示之间的相似度;
将所述多个相似度进行融合,得到所述目标用户和所述目标之间的推荐信息;所述推荐信息和对应的相似度标注用于确定第一损失,所述第一损失用于更新所述第一编码器和所述第二编码器,所述相似度标注为根据所述目标用户的真实操作日志得到。
在一种可能的实现中,所述第一特征表示和所述第二特征表示之间相似度用于确定第二损失,所述第二损失用于更新所述第一编码器和所述第二编码器;在所述真实操作日志指示所述目标用户存在对所述目标物品的正向操作行为时,所述第二损失指示最大化所述第一特征表示和所述第二特征表示之间的相似度,在所述真实操作日志指示所述目标用户不存在对所述目标物品的操作行为或者存在对所述目标物品的负向操作行为时,所述第二损失指示最小化所述第一特征表示和所述第二特征表示之间的相似度。
本申请实施例在得到了用户以及物品的表征后,隐式自监督双塔交互模块使用对比学习来建立隐式的双塔特征交互,即拉近用户和正样本物品的距离,推远用户和负样本物品的距离。
在一种可能的实现中,所述多个第一子特征表示为对所述第一特征表示进行切分得到的;所述多个第二子特征表示为对所述第二特征表示进行切分得到的。
在一种可能的实现中,所述多个相似度包括多组相似度,每组相似度为:
一个所述第一子特征表示和各个所述第二子特征表示之间的相似度;或者,
一个所述第二子特征表示和各个所述第一子特征表示之间的相似度;
所述将所述多个相似度进行融合,包括:
将每组相似度中包括的多个相似度的最大值进行融合。
在一种可能的实现中,
所述第一编码器包括多个第一全连接层,所述第一特征表示为根据所述多个第一全连接层中的M个第一全连接层的输出得到,所述M为大于1的正数;或者,
所述第二编码器包括多个第二全连接层,所述第二特征表示为根据所述多个第二全连接层中最靠近输出层的第二全连接层的输出得到。
在一种可能的实现中,所述目标用户的属性信息包括多个维度的用户属性,所述第一特征表示为通过第一编码器对所述目标用户的属性信息对应的第一目标嵌入表示进行处理得到的;所述方法还包括:
获取所述用户的属性信息对应的第一初始嵌入表示;所述第一初始嵌入表示包括多个第一嵌入向量,每个第一嵌入向量对应一个维度的用户属性;
通过权重确定网络,处理所述第一初始嵌入表示;得到每个所述用户属性的第一权重;
根据所述第一权重,对所述多个第一嵌入向量进行调整,得到所述第一目标嵌入表示;
所述第一损失还用于更新所述权重确定网络。
第三方面,本申请提供了一种推荐装置,所述装置包括:
获取模块,用于获取第一特征表示和第二特征表示;所述第一特征表示对应于目标用户的属性信息;所述第二特征表示对应于目标物品的属性信息;所述第一特征表示包括多个第一子特征表示,所述第二特征表示包括多个第二子特征表示;
数据处理模块,用于根据所述多个第一子特征表示和所述多个第二子特征表示,确定多个相似度;其中,每个所述相似度为一个所述第一子特征表示和一个所述第二子特征表示之间的相似度;
将所述多个相似度进行融合,得到所述目标用户和所述目标之间的推荐信息;
推荐模块,用于当所述推荐信息满足预设条件,确定向所述目标用户推荐所述目标物品。
在一种可能的实现中,所述多个第一子特征表示为对所述第一特征表示进行切分得到的;所述多个第二子特征表示为对所述第二特征表示进行切分得到的。
在一种可能的实现中,所述多个相似度包括多组相似度,每组相似度为:
一个所述第一子特征表示和各个所述第二子特征表示之间的相似度;或者,
一个所述第二子特征表示和各个所述第一子特征表示之间的相似度;
所述将所述多个相似度进行融合,包括:
将每组相似度中包括的多个相似度的最大值进行融合。
在一种可能的实现中,所述第一特征表示为根据所述目标用户的属性信息通过第一编码器得到的,所述第一编码器包括多个第一全连接层,所述第一特征表示为根据所述多个第一全连接层中的M个第一全连接层的输出得到,所述M为大于1的正数。
在一种可能的实现中,
所述第二特征表示为根据所述目标物品的属性信息通过第二编码器得到的,所述第二编码器包括多个第二全连接层,所述第二特征表示为根据所述多个第二全连接层中最靠近输出层的第二全连接层的输出得到。
在一种可能的实现中,所述目标用户的属性信息包括多个维度的用户属性,所述第一特征表示为通过第一编码器对所述目标用户的属性信息对应的第一目标嵌入表示进行处理得到的;
所述获取模块,还用于获取所述用户的属性信息对应的第一初始嵌入表示;所述第一初始嵌入表示包括多个第一嵌入向量,每个第一嵌入向量对应一个维度的用户属性;
所述装置还包括:权重调整模块,用于通过权重确定网络,处理所述第一初始嵌入表示;得到每个所述用户属性的第一权重;
根据所述第一权重,对所述多个第一嵌入向量进行调整,得到所述第一目标嵌入表示。
在一种可能的实现中,所述目标物品的属性信息包括多个维度的物品属性,所述第二特征表示为通过第二编码器对所述目标物品的属性信息对应的第二目标嵌入表示进行处理得到的;
所述获取模块,还用于获取所述物品的属性信息对应的第二初始嵌入表示;所述第二初始嵌入表示包括多个第二嵌入向量,每个第二嵌入向量对应一个维度的物品属性;
所述装置还包括:权重调整模块,用于通过权重确定网络,处理所述第二初始嵌入表示;得到每个所述物品属性的第二权重;
根据所述第二权重,对所述多个第二嵌入向量进行调整,得到所述第二目标嵌入表示。
在一种可能的实现中,所述权重确定网络仅包括一层FC。
在一种可能的实现中,所述目标用户的属性信息包括如下的至少一种:性别,年龄,职业,收入,爱好,教育程度。
在一种可能的实现中,所述目标物品的属性信息包括如下的至少一种:物品名称,开发者,安装包大小,品类,好评度。
第四方面,本申请提供了一种数据处理装置,所述装置包括:
获取模块,用于获取第一特征表示和第二特征表示;所述第一特征表示为通过第一编码器对目标用户的属性信息进行特征提取得到的;所述第二特征表示为通过第二编码器对目标物品的属性信息进行特征提取得到的;所述第一特征表示包括多个第一子特征表示,所述第二特征表示包括多个第二子特征表示;
数据处理模块,用于根据所述多个第一子特征表示和所述多个第二子特征表示,确定多个相似度;其中,每个所述相似度为一个所述第一子特征表示和一个所述第二子特征表示之间的相似度;
将所述多个相似度进行融合,得到所述目标用户和所述目标之间的推荐信息;所述推荐信息和对应的相似度标注用于确定第一损失,所述第一损失用于更新所述第一编码器和所述第二编码器,所述相似度标注为根据所述目标用户的真实操作日志得到。
在一种可能的实现中,所述第一特征表示和所述第二特征表示之间相似度用于确定第二损失,所述第二损失用于更新所述第一编码器和所述第二编码器;在所述真实操作日志指示所述目标用户存在对所述目标物品的正向操作行为时,所述第二损失指示最大化所述第一特征表示和所述第二特征表示之间的相似度,在所述真实操作日志指示所述目标用户不存在对所述目标物品的操作行为或者存在对所述目标物品的负向操作行为时,所述第二损失指示最小化所述第一特征表示和所述第二特征表示之间的相似度。
在一种可能的实现中,所述多个第一子特征表示为对所述第一特征表示进行切分得到的;所述多个第二子特征表示为对所述第二特征表示进行切分得到的。
在一种可能的实现中,所述多个相似度包括多组相似度,每组相似度为:
一个所述第一子特征表示和各个所述第二子特征表示之间的相似度;或者,
一个所述第二子特征表示和各个所述第一子特征表示之间的相似度;
所述将所述多个相似度进行融合,包括:
将每组相似度中包括的多个相似度的最大值进行融合。
在一种可能的实现中,
所述第一编码器包括多个第一全连接层,所述第一特征表示为根据所述多个第一全连接层中的M个第一全连接层的输出得到,所述M为大于1的正数;或者,
所述第二编码器包括多个第二全连接层,所述第二特征表示为根据所述多个第二全连接层中最靠近输出层的第二全连接层的输出得到。
在一种可能的实现中,所述目标用户的属性信息包括多个维度的用户属性,所述第一特征表示为通过第一编码器对所述目标用户的属性信息对应的第一目标嵌入表示进行处理得到的;
所述获取模块,还用于获取所述用户的属性信息对应的第一初始嵌入表示;所述第一初始嵌入表示包括多个第一嵌入向量,每个第一嵌入向量对应一个维度的用户属性;
所述装置还包括:权重调整模块,用于通过权重确定网络,处理所述第一初始嵌入表示;得到每个所述用户属性的第一权重;
根据所述第一权重,对所述多个第一嵌入向量进行调整,得到所述第一目标嵌入表示;
所述第一损失还用于更新所述权重确定网络。
第五方面,本申请实施例提供了一种推荐装置,可以包括存储器、处理器以及总线系统,其中,存储器用于存储程序,处理器用于执行存储器中的程序,以执行如上述第一方面任一可选的方法。
第六方面,本申请实施例提供了一种训练装置,可以包括存储器、处理器以及总线系统,其中,存储器用于存储程序,处理器用于执行存储器中的程序,以执行如上述第二方面任一可选的方法。
第七方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行上述第一方面及任一可选的方法,上述第二方面及任一可选的方法。
第八方面,本申请实施例提供了一种计算机程序产品,包括代码,当代码被执行时,用于实现上述第一方面及任一可选的方法,上述第二方面及任一可选的方法。
第九方面,本申请提供了一种芯片系统,该芯片系统包括处理器,用于支持执行设备或训练设备实现上述方面中所涉及的功能,例如,发送或处理上述方法中所涉及的数据;或,信息。在一种可能的设计中,所述芯片系统还包括存储器,所述存储器,用于保存执行设备或训练设备必要的程序指令和数据。该芯片系统,可以由芯片构成,也可以包括芯片和其他分立器件。
附图说明
图1为人工智能主体框架的一种结构示意图;
图2为本申请实施例提供的一种系统架构的示意图;
图3为本申请实施例提供的一种系统架构的示意图;
图4为本申请实施例提供的一种推荐流场景的示意图;
图5为本申请实施例提供的一种推荐方法的流程示意图;
图6为一种推荐模型的示意;
图7为本申请实施例提供的一种数据处理方法的流程示意图;
图8为本申请实施例提供的一种推荐装置的结构示意图;
图9为本申请实施例提供的一种数据处理装置的结构示意图;
图10为本申请实施例提供的一种执行设备的示意图;
图11为本申请实施例提供的一种训练设备的示意图;
图12为本申请实施例提供的一种芯片的示意图;
图13为本申请实施例提供的一种实验效果的示意图。
具体实施方式
下面结合本发明实施例中的附图对本发明实施例进行描述。本发明的实施方式部分使用的术语仅用于对本发明的具体实施例进行解释,而非旨在限定本发明。
下面结合附图,对本申请的实施例进行描述。本领域普通技术人员可知,随着技术的发展和新场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的术语在适当情况下可以互换,这仅仅是描述本申请的实施例中对相同属性的对象在描述时所采用的区分方式。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,以便包含一系列单元的过程、方法、系统、产品或设备不必限于那些单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它单元。
首先对人工智能系统总体工作流程进行描述,请参见图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)
在线预测是指基于离线训练好的模型,根据用户、物品和上下文的特征预测该用户在当前上下文环境下对推荐物品的喜好程度,预测用户选择推荐物品的概率。
5、双塔模型:由于大规模工业检索系统中的用户和物品数量十分庞大,同时用户的请求响应时间需要严格控制在几十毫秒内,在工业检索系统常用双塔模型来建模用户和物品。双塔模型包括两个塔——用户塔和物品塔,它们分别对用户和物品建模,并将建模好的物品信息预存到线上服务器中。当有新的用户请求时,只需对用户请求进行建模,然后将建模好的用户信息和与预存起来的物品信息进行计算,得出打分结果,极大地减少计算时延。
例如,图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,图5为本申请实施例提供的一种推荐方法的实施例示意,如图5示出的那样,本申请实施例提供的一种推荐方法包括:
501、获取获取第一特征表示和第二特征表示;所述第一特征表示对应于目标用户的属性信息;所述第二特征表示对应于目标物品的属性信息;所述第一特征表示包括多个第一子特征表示,所述第二特征表示包括多个第二子特征表示。
本申请实施例中,步骤501的执行主体可以为终端设备,终端设备可以为便携式移动设备,例如但不限于移动或便携式计算设备(如智能手机)、个人计算机、服务器计算机、手持式设备(例如平板)或膝上型设备、多处理器系统、游戏控制台或控制器、基于微处理器的系统、机顶盒、可编程消费电子产品、移动电话、具有可穿戴或配件形状因子(例如,手表、眼镜、头戴式耳机或耳塞)的移动计算和/或通信设备、网络PC、小型计算机、大型计算机、包括上面的系统或设备中的任何一种的分布式计算环境等等。
本申请实施例中,步骤501的执行主体可以为云侧的服务器。
为了方便描述,以下不对执行主体的形态进行区分,都描述为执行设备。
在一种可能的实现中,为了计算目标用户对目标物品的选择概率,执行设备可以获取到目标用户的属性信息以及目标物品的属性信息。
其中,目标用户的属性信息可以为与用户喜好特征相关的属性,性别、年龄、职业、收入、爱好以及受教育程度中的至少一种,其中,性别可以为男或者女,年龄可以为0-100之间的数字,职业可以为教师、程序员、厨师等等,爱好可以为篮球、网球、跑步等等,受教育程度可以为小学、初中、高中、大学等等;本申请并不限定目标用户的属性信息的具体类型。
其中,物品可以为实体物品,或者是虚拟物品,例如可以为APP、音视频、网页以及新闻资讯等物品,物品的属性信息可以为物品名称、开发者、安装包大小、品类以及好评度中的至少一种,其中,以物品为应用程序为例,物品的品类可以为聊天类、跑酷类游戏、办公类等等,好评度可以为针对于物品的打分、评论等;本申请并不限定物品的属性信息的具体类型。
应理解,在一种可能的实现中,可以首先使用但不限于平均池化方法对原始的用户以及物品的嵌入表示进行压缩,得到全局信息,例如可以参照如下公式进行压缩过程:
在一种可能的实现中,可以基于嵌入层对目标用户和目标物品的属性信息进行特征提取,以得到所述目标用户的属性信息对应的第一目标嵌入表示以及所述目标物品的属性信息对应的第二目标嵌入表示。
在一种可能的实现中,可以基于嵌入层(embedding layer)对目标用户和目标用户的各个维度的属性分别进行处理,以得到每个维度的属性对应的嵌入向量。
例如,所述目标用户的属性信息包括多个维度的用户属性,可以通过嵌入层对多个维度的用户属性进行处理,以得到所述用户的属性信息对应的第一初始嵌入表示;所述第一初始嵌入表示包括多个第一嵌入向量,每个第一嵌入向量对应一个维度的用户属性。
在一种可能的实现中,可以对各个第一嵌入向量进行拼接操作(concat),以得到第一特征表示,该第一特征表示可以作为推荐模型中用户侧分支(例如双塔模型中用户侧的编码器)的输入。
例如,所述目标物品的属性信息包括多个维度的物品属性,可以通过嵌入层对多个维度的物品属性进行处理,以得到所述物品的属性信息对应的第二初始嵌入表示;所述第二初始嵌入表示包括多个第二嵌入向量,每个第二嵌入向量对应一个维度的物品属性。
在一种可能的实现中,可以对各个第二嵌入向量进行拼接操作(concat),以得到第二特征表示,该第二特征表示可以作为推荐模型中物品侧分支(例如双塔模型中物品侧的编码器)的输入。
在一种可能的实现中,在对各个嵌入向量进行拼接操作之后,可以不将拼接结果作为推荐模型的输入,而是基于一个训练好的网络,该网络可以基于拼接结果确定各个维度的属性的权重分布,并基于权重分布调整拼接结果。
在一种可能的实现中,可以获取所述用户的属性信息对应的第一初始嵌入表示;所述第一初始嵌入表示包括多个第一嵌入向量,每个第一嵌入向量对应一个维度的用户属性;通过权重确定网络,处理所述第一初始嵌入表示;得到每个所述用户属性的第一权重;根据所述第一权重,对所述多个第一嵌入向量进行调整(例如通过加权的方式进行调整),得到所述第一目标嵌入表示。
在一种可能的实现中,可以获取所述物品的属性信息对应的第二初始嵌入表示;所述第二初始嵌入表示包括多个第二嵌入向量,每个第二嵌入向量对应一个维度的物品属性;通过权重确定网络,处理所述第二初始嵌入表示;得到每个所述物品属性的第二权重;根据所述第二权重,对所述多个第二嵌入向量进行调整(例如通过加权的方式进行调整),得到所述第二目标嵌入表示。
通过上述方式,对不同的特征进行基于权重的调整,可以学习到更好的特征表达。
在一种可能的实现中,所述权重确定网络仅包括一层FC。通常情况下,排序模型需要用多层的神经网络来对不同的特征调整权重,这样做会导致模型的参数量过于巨大。本申请提出了一个轻量级的模型对特征重要性进行调权,在可以保证学习到更好的特征表达的情况下,降低了模型的参数量。
示例性的,可以参照如下公式进行权重的确定:
k=fex(z)=softmax(Wz+b),
示例性的,可以参照如下公式进行特征的调整:
在一种可能的实现中,在得到所述目标用户的属性信息对应的第一目标嵌入表示之后,可以通过第一编码器对所述目标用户的属性信息对应的第一目标嵌入表示进行处理得到第一特征表示,也就是说,所述第一特征表示为通过第一编码器对所述目标用户的属性信息对应的第一目标嵌入表示进行处理得到的。
在一种可能的实现中,所述第一编码器包括多个第一全连接层,所述第一特征表示为根据所述多个第一全连接层中的M个第一全连接层的输出得到,所述M为大于1的正数。
在得到用户对应的特征表示后,可以利用双塔模型中用户侧的第一编码器输出的多层用户表征,来建模不同层次的交互信息。现有技术中双塔模型中仅采用用户侧编码器最后一层输出的特征表示进行建模,是一种粗粒度的建模方式,本申请中利用多层用户表征进行建模,可以提升后续的预测效果。
参照图6,图6为一种推荐模型的处理流程示意,其中,第一编码器可以包括多个全连接层FC,可以使用靠后三层的全连接层的输出来确定第一特征表示。
在一种可能的实现中,可以对抽取到的用户的特征表示(例如上述M个第一全连接层的输出)进行进一步学习,得到更优化的用户特征表达(例如第一特征表示)。
在一种可能的实现中,所述第二特征表示为通过第二编码器对所述目标物品的属性信息对应的第二目标嵌入表示进行处理得到的。
在一种可能的实现中,所述第二编码器包括多个第二全连接层,所述第二特征表示为根据所述多个第二全连接层中最靠近输出层的第二全连接层的输出得到。
参照图6,图6为一种推荐模型的处理流程示意,其中,第二编码器可以包括多个全连接层FC,可以使用最后一个全连接层的输出来确定第二特征表示。
在一种可能的实现中,可以对抽取到的物品的特征表示(例如上述最靠近输出层的第二全连接层的输出)进行进一步学习,得到更优化的物品特征表达(例如第二特征表示)。
示例性的,可以参照如下公式对用户或者物品的特征表示进行进一步学习:

在一种可能的实现中,在得到用户的第一特征表示以及物品的第二特征表示之后,可以基于第一特征表示以及第二特征表示进行双塔模型中用户侧分支和物品侧分支的交互。
502、根据所述多个第一子特征表示和所述多个第二子特征表示,确定多个相似度;其中,每个所述相似度为一个所述第一子特征表示和一个所述第二子特征表示之间的相似度。
503、将所述多个相似度进行融合,得到所述目标用户和所述目标之间的推荐信息。
在一种可能的实现中,所述第一特征表示包括多个第一子特征表示,所述第二特征表示包括多个第二子特征表示;例如,所述多个第一子特征表示为对所述第一特征表示进行切分得到的;所述多个第二子特征表示为对所述第二特征表示进行切分得到的。
在一种可能的实现中,在交互阶段,将得到的用户和物品表征进行切片,并计算每一片之间的相似度并取最大值,然后把每一层的用户-物品的交互分数进行多层级聚合,得到最后的交互分数。
在一种可能的实现中,所述多个相似度可以包括多组相似度,每组相似度可以为:一个所述第一子特征表示和各个所述第二子特征表示之间的相似度;或者,一个所述第二子特征表示和各个所述第一子特征表示之间的相似度;在将所述多个相似度进行融合时,可以将每组相似度中包括的多个相似度的最大值进行融合,得到所述目标用户和所述目标之间的推荐信息。
在一种可能的实现中,参照图6,针对于每个第一子特征表示,可以分别计算其和各个第二子特征表示之间的相似度,以得到一组相似度,可以对一组相似度内的多个相似度求取最大值,类似的,每个第一子特征表示可以得到一组相似度,可以对一组相似度内的多个相似度求取最大值,进而可以得到多个最大值,可以对多个相似度的最大值进行融合。
在一种实现中,融合方式可以是加和运算(可选的,还可以对加和结果进行归一化到0至1之间),所述推荐信息用于表示所述目标用户对所述目标物品进行选择的概率。
接下来给出一个交互阶段具体的示例,在交互阶段,可以将得到的用户和物品表征进行切片,并计算每一片之间的相似度并取最大值,然后把每一层的用户-物品的交互分数进行多层级聚合,得到最后的交互分数,例如可以通过如下公式进行交互阶段的执行:

本申请实施例中,利用用户和物品的特征表示的切片之间的相似度来建模用户和物品之间的交互信息,也就是通过显式的方法建模用户和物品之间的交互信息,在交互环节不需要增加额外参数,并且同时可以取得更好的预测效果。
504、当所述推荐信息满足预设条件,确定向所述目标用户推荐所述目标物品。
通过上述方式,可以得到目标用户进行针对于目标物品的选择的概率,并基于上述概率进行信息推荐,具体的,当推荐信息满足预设条件,可以确定向所述目标用户推荐所述目标物品。
接下来描述预设条件:
在一种可能的实现中,在对目标用户进行信息推荐时,可以计算得到目标用户对多个物品(包括目标物品)进行选择的概率,并基于户对多个物品(包括目标物品)进行选择的概率来确定各个物品的对于该目标用户的推荐指数。
在得到各个物品的对于该目标用户的推荐指数之后,可以对推荐指数进行排序,并向目标用户推荐推荐指数最大的M个物品。
在一种可能的实现中,还可以选择可以设置一个概率阈值,当目标用户对多个物品(包括目标物品)进行选择的概率大于上述概率阈值,就可以向所述目标用户推荐。
在进行信息推荐时,可以以列表页的形式将推荐信息推荐给用户,以期望用户进行行为动作。
以浏览器信息流推荐为例,本申请实施例的一个具体流程可以如下:
1)首先,在线下利用数据训练交互增强的双塔模型,之后将训练好的物品表征预存到线上的服务器中。
2)将模型部署到线上,每当有一个新的用户请求到来时,用户塔对该用户进行建模分析,得到该用户的用户表征。
3)取出在线上预存的物品表征,将用户表征和物品表征分割成多块,分别计算每一块的最大相似度,并进行求和,得到用户和物品的相似度分数,根据分数大小对物品进行排序,筛选出分数最高的一些物品,送入精排模型中。
接下来结合试验介绍本申请实施例的的技术效果:
在三个公开数据集进行了离线实验,实验评估指标选取三个指标:
排序:Area Under Curve(AUC),logistic loss(Logloss),relative improvement(RelaImpr)
以下是三个公开数据集上的实验结果:

以下表格以及图13是本发明的训练和推理效率:
经过实验,从模型的性能表现可以看出,本申请实施例提供的推荐模型的准确率高于大部分的现有粗排模型。并且在训练和推理效率上,本模型的训练和推理效率和双塔模型接近,并且和单塔模型相比,显著的减少了推理时延。
本申请提供了一种推荐方法,所述方法包括:获取第一特征表示和第二特征表示;所述第一特征表示对应于目标用户的属性信息;所述第二特征表示对应于目标物品的属性信息;所述第一特征表示包括多个第一子特征表示,所述第二特征表示包括多个第二子特征表示;根据所述多个第一子特征表示和所述多个第二子特征表示,确定多个相似度;其中,每个所述相似度为一个所述第一子特征表示和一个所述第二子特征表示之间的相似度;将所述多个相似度进行融合,得到所述目标用户和所述目标之间的推荐信息;当所述推荐信息满足预设条件,确定向所述目标用户推荐所述目标物品。本申请实施例中,利用用户和物品的特征表示的切片之间的相似度来建模用户和物品之间的交互信息,也就是通过显式的方法建模用户和物品之间的交互信息,在交互环节不需要增加额外参数,并且同时可以取得更好的预测效果。
以上从模型的推理过程对本申请实施例提供的推荐方法进行了描述,接下来从模型的训练过程进行描述。
参照图7,图7为本申请实施例提供的一种模型训练方法的流程示意,如图7所示,本申请实施例提供的一种模型训练方法包括:
701、获取第一特征表示和第二特征表示;所述第一特征表示为通过第一编码器对目标用户的属性信息进行特征提取得到的;所述第二特征表示为通过第二编码器对目标物品的属性信息进行特征提取得到的;所述第一特征表示包括多个第一子特征表示,所述第二特征表示包括多个第二子特征表示;
702、根据所述多个第一子特征表示和所述多个第二子特征表示,确定多个相似度;其中,每个所述相似度为一个所述第一子特征表示和一个所述第二子特征表示之间的相似度;
703、将所述多个相似度进行融合,得到所述目标用户和所述目标之间的推荐信息;所述推荐信息和对应的相似度标注用于确定第一损失,所述第一损失用于更新所述第一编码器和所述第二编码器,所述相似度标注为根据所述目标用户的真实操作日志得到。
在一种可能的实现中,所述第一特征表示和所述第二特征表示之间相似度用于确定第二损失,所述第二损失用于更新所述第一编码器和所述第二编码器;在所述真实操作日志指示所述目标用户存在对所述目标物品的正向操作行为时,所述第二损失指示最大化所述第一特征表示和所述第二特征表示之间的相似度,在所述真实操作日志指示所述目标用户不存在对所述目标物品的操作行为或者存在对所述目标物品的负向操作行为时,所述第二损失指示最小化所述第一特征表示和所述第二特征表示之间的相似度。
其中,负向操作行为可以表示该用户对物品存在操作行为,但该操作行为指示用户对物品没有选择的意愿,例如投诉操作、退单操作等。
本申请实施例在得到了用户以及物品的表征后,隐式自监督双塔交互模块使用对比学习来建立隐式的双塔特征交互,即拉近用户和正样本物品的距离,推远用户和负样本物品的距离。
在最终的模型训练过程中,可以使用Lctr和Lcir来联合训练该模型,其中Lctr是计算预测值和真实值之间差距的损失函数,Lcir是计算用户和正负物品对在隐式空间中的距离的损失函数。

在一种可能的实现中,所述多个第一子特征表示为对所述第一特征表示进行切分得到的;所述多个第二子特征表示为对所述第二特征表示进行切分得到的。
在一种可能的实现中,所述多个相似度包括多组相似度,每组相似度为:一个所述第一子特征表示和各个所述第二子特征表示之间的相似度;或者,一个所述第二子特征表示和各个所述第一子特征表示之间的相似度;在将所述多个相似度进行融合时,具体可以将每组相似度中包括的多个相似度的最大值进行融合。
在一种可能的实现中,所述第一编码器包括多个第一全连接层,所述第一特征表示为根据所述多个第一全连接层中的M个第一全连接层的输出得到,所述M为大于1的正数;或者,
所述第二编码器包括多个第二全连接层,所述第二特征表示为根据所述多个第二全连接层中最靠近输出层的第二全连接层的输出得到。
在一种可能的实现中,所述目标用户的属性信息包括多个维度的用户属性,所述第一特征表示为通过第一编码器对所述目标用户的属性信息对应的第一目标嵌入表示进行处理得到的;还可以获取所述用户的属性信息对应的第一初始嵌入表示;所述第一初始嵌入表示包括多个第一嵌入向量,每个第一嵌入向量对应一个维度的用户属性;通过权重确定网络,处理所述第一初始嵌入表示;得到每个所述用户属性的第一权重;根据所述第一权重,对所述多个第一嵌入向量进行调整,得到所述第一目标嵌入表示;所述第一损失还用于更新所述权重确定网络。
在一种可能的实现中,所述目标用户的属性信息包括如下的至少一种:性别,年龄,职业,收入,爱好,教育程度。
在一种可能的实现中,所述目标物品的属性信息包括如下的至少一种:物品名称,开发者,安装包大小,品类,好评度。
参照图8,图8为本申请实施例提供的一种推荐装置800的结构示意,所述装置800包括:
获取模块801,用于获取第一特征表示和第二特征表示;所述第一特征表示对应于目标用户的属性信息;所述第二特征表示对应于目标物品的属性信息;所述第一特征表示包括多个第一子特征表示,所述第二特征表示包括多个第二子特征表示;
关于获取模块801的具体描述可以参照上述实施例中步骤501的描述,这里不再赘述。
数据处理模块802,用于根据所述多个第一子特征表示和所述多个第二子特征表示,确定多个相似度;其中,每个所述相似度为一个所述第一子特征表示和一个所述第二子特征表示之间的相似度;
关于数据处理模块802的具体描述可以参照上述实施例中步骤502和步骤503的描述,这里不再赘述。
将所述多个相似度进行融合,得到所述目标用户和所述目标之间的推荐信息;
推荐模块803,用于当所述推荐信息满足预设条件,确定向所述目标用户推荐所述目标物品。
关于推荐模块803的具体描述可以参照上述实施例中步骤504的描述,这里不再赘述。
在一种可能的实现中,所述多个第一子特征表示为对所述第一特征表示进行切分得到的;所述多个第二子特征表示为对所述第二特征表示进行切分得到的。
在一种可能的实现中,所述多个相似度包括多组相似度,每组相似度为:
一个所述第一子特征表示和各个所述第二子特征表示之间的相似度;或者,
一个所述第二子特征表示和各个所述第一子特征表示之间的相似度;
所述将所述多个相似度进行融合,包括:
将每组相似度中包括的多个相似度的最大值进行融合。
在一种可能的实现中,所述第一特征表示为根据所述目标用户的属性信息通过第一编码器得到的,所述第一编码器包括多个第一全连接层,所述第一特征表示为根据所述多个第一全连接层中的M个第一全连接层的输出得到,所述M为大于1的正数。
在一种可能的实现中,
所述第二特征表示为根据所述目标物品的属性信息通过第二编码器得到的,所述第二编码器包括多个第二全连接层,所述第二特征表示为根据所述多个第二全连接层中最靠近输出层的第二全连接层的输出得到。
在一种可能的实现中,所述目标用户的属性信息包括多个维度的用户属性,所述第一特征表示为通过第一编码器对所述目标用户的属性信息对应的第一目标嵌入表示进行处理得到的;
所述获取模块,还用于获取所述用户的属性信息对应的第一初始嵌入表示;所述第一初始嵌入表示包括多个第一嵌入向量,每个第一嵌入向量对应一个维度的用户属性;
所述装置还包括:权重调整模块,用于通过权重确定网络,处理所述第一初始嵌入表示;得到每个所述用户属性的第一权重;
根据所述第一权重,对所述多个第一嵌入向量进行调整,得到所述第一目标嵌入表示。
在一种可能的实现中,所述目标物品的属性信息包括多个维度的物品属性,所述第二特征表示为通过第二编码器对所述目标物品的属性信息对应的第二目标嵌入表示进行处理得到的;
所述获取模块,还用于获取所述物品的属性信息对应的第二初始嵌入表示;所述第二初始嵌入表示包括多个第二嵌入向量,每个第二嵌入向量对应一个维度的物品属性;
所述装置还包括:权重调整模块,用于通过权重确定网络,处理所述第二初始嵌入表示;得到每个所述物品属性的第二权重;
根据所述第二权重,对所述多个第二嵌入向量进行调整,得到所述第二目标嵌入表示。
在一种可能的实现中,所述权重确定网络仅包括一层FC。
在一种可能的实现中,所述目标用户的属性信息包括如下的至少一种:性别,年龄,职业,收入,爱好,教育程度。
在一种可能的实现中,所述目标物品的属性信息包括如下的至少一种:物品名称,开发者,安装包大小,品类,好评度。
参照图9,图9为本申请实施例提供的一种数据处理装置900的结构示意,所述装置900包括:
获取模块901,用于获取第一特征表示和第二特征表示;所述第一特征表示为通过第一编码器对目标用户的属性信息进行特征提取得到的;所述第二特征表示为通过第二编码器对目标物品的属性信息进行特征提取得到的;所述第一特征表示包括多个第一子特征表示,所述第二特征表示包括多个第二子特征表示;
关于获取模块901的具体描述可以参照上述实施例中步骤701的描述,这里不再赘述。
数据处理模块902,用于根据所述多个第一子特征表示和所述多个第二子特征表示,确定多个相似度;其中,每个所述相似度为一个所述第一子特征表示和一个所述第二子特征表示之间的相似度;
将所述多个相似度进行融合,得到所述目标用户和所述目标之间的推荐信息;所述推荐信息和对应的相似度标注用于确定第一损失,所述第一损失用于更新所述第一编码器和所述第二编码器,所述相似度标注为根据所述目标用户的真实操作日志得到。
关于数据处理模块902的具体描述可以参照上述实施例中步骤702和步骤703的描述,这里不再赘述。
在一种可能的实现中,所述第一特征表示和所述第二特征表示之间相似度和对应的相似度标注确定第二损失,所述第二损失用于更新所述第一编码器和所述第二编码器,所述相似度标注为根据所述目标用户的真实操作日志得到;在所述真实操作日志指示所述目标用户存在对所述目标物品的正向操作行为时,所述相似度标注指示的相似度大于阈值,在所述真实操作日志指示所述目标用户不存在对所述目标物品的操作行为或者存在对所述目标物品的负向操作行为时,所述相似度标注指示的相似度小于阈值。
在一种可能的实现中,所述多个第一子特征表示为对所述第一特征表示进行切分得到的;所述多个第二子特征表示为对所述第二特征表示进行切分得到的。
在一种可能的实现中,所述多个相似度包括多组相似度,每组相似度为:
一个所述第一子特征表示和各个所述第二子特征表示之间的相似度;或者,
一个所述第二子特征表示和各个所述第一子特征表示之间的相似度;
所述将所述多个相似度进行融合,包括:
将每组相似度中包括的多个相似度的最大值进行融合。
在一种可能的实现中,
所述第一编码器包括多个第一全连接层,所述第一特征表示为根据所述多个第一全连接层中的M个第一全连接层的输出得到,所述M为大于1的正数;或者,
所述第二编码器包括多个第二全连接层,所述第二特征表示为根据所述多个第二全连接层中最靠近输出层的第二全连接层的输出得到。
在一种可能的实现中,所述目标用户的属性信息包括多个维度的用户属性,所述第一特征表示为通过第一编码器对所述目标用户的属性信息对应的第一目标嵌入表示进行处理得到的;
所述获取模块,还用于获取所述用户的属性信息对应的第一初始嵌入表示;所述第一初始嵌入表示包括多个第一嵌入向量,每个第一嵌入向量对应一个维度的用户属性;
所述装置还包括:权重调整模块,用于通过权重确定网络,处理所述第一初始嵌入表示;得到每个所述用户属性的第一权重;
根据所述第一权重,对所述多个第一嵌入向量进行调整,得到所述第一目标嵌入表示;
所述第一损失还用于更新所述权重确定网络。
接下来介绍本申请实施例提供的一种执行设备,请参阅图10,图10为本申请实施例提供的执行设备的一种结构示意图,执行设备1000具体可以表现为手机、平板、笔记本电脑、智能穿戴设备、服务器等,此处不做限定。其中,执行设备1000上可以部署有图8对应实施例中所描述的推荐装置,用于实现图10对应实施例中推荐方法的功能。具体的,执行设备1000包括:接收器1001、发射器1002、处理器1003和存储器1004(其中执行设备1000中的处理器1003的数量可以一个或多个),其中,处理器1003可以包括应用处理器10031和通信处理器10032。在本申请的一些实施例中,接收器1001、发射器1002、处理器1003和存储器1004可通过总线或其它方式连接。
存储器1004可以包括只读存储器和随机存取存储器,并向处理器1003提供指令和数据。存储器1004的一部分还可以包括非易失性随机存取存储器(non-volatile random access memory,NVRAM)。存储器1004存储有处理器和操作指令、可执行模块或者数据结构,或者它们的子集,或者它们的扩展集,其中,操作指令可包括各种操作指令,用于实现各种操作。
处理器1003控制执行设备的操作。具体的应用中,执行设备的各个组件通过总线系统耦合在一起,其中总线系统除包括数据总线之外,还可以包括电源总线、控制总线和状态信号总线等。但是为了清楚说明起见,在图中将各种总线都称为总线系统。
上述本申请实施例揭示的方法可以应用于处理器1003中,或者由处理器1003实现。处理器1003可以是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器1003中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器1003可以是通用处理器、数字信号处理器(digital signal processing,DSP)、微处理器或微控制器、以及视觉处理器(vision processing unit,VPU)、张量处理器(tensor processing unit,TPU)等适用于AI运算的处理器,还可进一步包括专用集成电路(application specific integrated circuit,ASIC)、现场可编程门阵列(field-programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。该处理器1003可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器1004,处理器1003读取存储器1004中的信息,结合其硬件完成上述实施例中步骤501至步骤504的步骤。
接收器1001可用于接收输入的数字或字符信息,以及产生与执行设备的相关设置以及功能控制有关的信号输入。发射器1002可用于通过第一接口输出数字或字符信息;发射器1002还可用于通过第一接口向磁盘组发送指令,以修改磁盘组中的数据;发射器1002还可以包括显示屏等显示设备。
本申请实施例还提供了一种训练设备,请参阅图11,图11是本申请实施例提供的训练设备一种结构示意图,具体的,训练设备1100由一个或多个服务器实现,训练设备1100可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上中央处理器(central processing units,CPU)1111(例如,一个或一个以上处理器)和存储器1132,一个或一个以上存储应用程序1142或数据1144的存储介质1130(例如一个或一个以上海量存储设备)。其中,存储器1132和存储介质1130可以是短暂存储或持久存储。存储在存储介质1130的程序可以包括一个或一个以上模块(图示没标出),每个模块可以包括对训练设备中的一系列指令操作。更进一步地,中央处理器1111可以设置为与存储介质1130通信,在训练设备1100上执行存储介质1130中的一系列指令操作。
训练设备1100还可以包括一个或一个以上电源1126,一个或一个以上有线或无线网络接口1150,一个或一个以上输入输出接口1158;或,一个或一个以上操作系统1141,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM等等。
具体的,训练设备可以进行上述实施例中步骤701至步骤703的步骤。
本申请实施例中还提供一种包括计算机程序产品,当其在计算机上运行时,使得计算机执行如前述执行设备所执行的步骤,或者,使得计算机执行如前述训练设备所执行的步骤。
本申请实施例中还提供一种计算机可读存储介质,该计算机可读存储介质中存储有用于进行信号处理的程序,当其在计算机上运行时,使得计算机执行如前述执行设备所执行的步骤,或者,使得计算机执行如前述训练设备所执行的步骤。
本申请实施例提供的执行设备、训练设备或终端设备具体可以为芯片,芯片包括:处理单元和通信单元,所述处理单元例如可以是处理器,所述通信单元例如可以是输入/输出接口、管脚或电路等。该处理单元可执行存储单元存储的计算机执行指令,以使执行设备内的芯片执行上述实施例描述的数据处理方法,或者,以使训练设备内的芯片执行上述实施例描述的数据处理方法。可选地,所述存储单元为所述芯片内的存储单元,如寄存器、缓存等,所述存储单元还可以是所述无线接入设备端内的位于所述芯片外部的存储单元,如只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)等。
具体的,请参阅图12,图12为本申请实施例提供的芯片的一种结构示意图,所述芯片可以表现为神经网络处理器NPU1200,NPU 1200作为协处理器挂载到主CPU(Host CPU)上,由Host CPU分配任务。NPU的核心部分为运算电路1203,通过控制器1204控制运算电路1203提取存储器中的矩阵数据并进行乘法运算。
NPU 1200可以通过内部的各个器件之间的相互配合,来实现图5所描述的实施例中提供的信息推荐方法以及图7所描述的实施例中提供的模型训练方法。
更具体的,在一些实现中,NPU 1200中的运算电路1203内部包括多个处理单元(Process Engine,PE)。在一些实现中,运算电路1203是二维脉动阵列。运算电路1203还可以是一维脉动阵列或者能够执行例如乘法和加法这样的数学运算的其它电子线路。在一些实现中,运算电路1203是通用的矩阵处理器。
举例来说,假设有输入矩阵A,权重矩阵B,输出矩阵C。运算电路从权重存储器1202中取矩阵B相应的数据,并缓存在运算电路中每一个PE上。运算电路从输入存储器1201中取矩阵A数据与矩阵B进行矩阵运算,得到的矩阵的部分结果或最终结果,保存在累加器(accumulator)1208中。
统一存储器1206用于存放输入数据以及输出数据。权重数据直接通过存储单元访问控制器(Direct Memory Access Controller,DMAC)1205,DMAC被搬运到权重存储器1202中。输入数据也通过DMAC被搬运到统一存储器1206中。
BIU为Bus Interface Unit即,总线接口单元1210,用于AXI总线与DMAC和取指存储器(Instruction Fetch Buffer,IFB)1209的交互。
总线接口单元1210(Bus Interface Unit,简称BIU),用于取指存储器1209从外部存储器获取指令,还用于存储单元访问控制器1205从外部存储器获取输入矩阵A或者权重矩阵B的原数据。
DMAC主要用于将外部存储器DDR中的输入数据搬运到统一存储器1206或将权重数据搬运到权重存储器1202中或将输入数据数据搬运到输入存储器1201中。
向量计算单元1207包括多个运算处理单元,在需要的情况下,对运算电路1203的输出做进一步处理,如向量乘,向量加,指数运算,对数运算,大小比较等等。主要用于神经网络中非卷积/全连接层网络计算,如Batch Normalization(批归一化),像素级求和,对特征平面进行上采样等。
在一些实现中,向量计算单元1207能将经处理的输出的向量存储到统一存储器1206。例如,向量计算单元1207可以将线性函数;或,非线性函数应用到运算电路1203的输出,例如对卷积层提取的特征平面进行线性插值,再例如累加值的向量,用以生成激活值。在一些实现中,向量计算单元1207生成归一化的值、像素级求和的值,或二者均有。在一些实现中,处理过的输出的向量能够用作到运算电路1203的激活输入,例如用于在神经网络中的后续层中的使用。
控制器1204连接的取指存储器(instruction fetch buffer)1209,用于存储控制器1204使用的指令;
统一存储器1206,输入存储器1201,权重存储器1202以及取指存储器1209均为On-Chip存储器。外部存储器私有于该NPU硬件架构。
其中,上述任一处提到的处理器,可以是一个通用中央处理器,微处理器,ASIC,或一个或多个用于控制上述程序执行的集成电路。
另外需说明的是,以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。另外,本申请提供的装置实施例附图中,模块之间的连接关系表示它们之间具有通信连接,具体可以实现为一条或多条通信总线或信号线。
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到本申请可借助软件加必需的通用硬件的方式来实现,当然也可以通过专用硬件包括专用集成电路、专用CPU、专用存储器、专用元器件等来实现。一般情况下,凡由计算机程序完成的功能都可以很容易地用相应的硬件来实现,而且,用来实现同一功能的具体硬件结构也可以是多种多样的,例如模拟电路、数字电路或专用电路等。但是,对本申请而言更多情况下软件程序实现是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在可读取的存储介质中,如计算机的软盘、U盘、移动硬盘、ROM、RAM、磁碟或者光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,训练设备,或者网络设备等)执行本申请各个实施例所述的方法。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。
所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、训练设备或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、训练设备或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存储的任何可用介质或者是包含一个或多个可用介质集成的训练设备、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘(Solid State Disk,SSD))等。

Claims (35)

  1. 一种推荐方法,其特征在于,所述方法包括:
    获取第一特征表示和第二特征表示;所述第一特征表示对应于目标用户的属性信息;所述第二特征表示对应于目标物品的属性信息;所述第一特征表示包括多个第一子特征表示,所述第二特征表示包括多个第二子特征表示;
    根据所述多个第一子特征表示和所述多个第二子特征表示,确定多个相似度;其中,每个所述相似度为一个所述第一子特征表示和一个所述第二子特征表示之间的相似度;
    将所述多个相似度进行融合,得到所述目标用户和所述目标之间的推荐信息;
    当所述推荐信息满足预设条件,确定向所述目标用户推荐所述目标物品。
  2. 根据权利要求1所述的方法,其特征在于,所述多个第一子特征表示为对所述第一特征表示进行切分得到的;所述多个第二子特征表示为对所述第二特征表示进行切分得到的。
  3. 根据权利要求1或2所述的方法,其特征在于,所述多个相似度包括多组相似度,每组相似度为:
    一个所述第一子特征表示和各个所述第二子特征表示之间的相似度;或者,
    一个所述第二子特征表示和各个所述第一子特征表示之间的相似度;
    所述将所述多个相似度进行融合,包括:
    将每组相似度中包括的多个相似度的最大值进行融合。
  4. 根据权利要求1至3任一所述的方法,其特征在于,所述第一特征表示为根据所述目标用户的属性信息通过第一编码器得到的,所述第一编码器包括多个第一全连接层,所述第一特征表示为根据所述多个第一全连接层中的M个第一全连接层的输出得到,所述M为大于1的正数。
  5. 根据权利要求1至4任一所述的方法,其特征在于,所述第二特征表示为根据所述目标物品的属性信息通过第二编码器得到的,所述第二编码器包括多个第二全连接层,所述第二特征表示为根据所述多个第二全连接层中最靠近输出层的第二全连接层的输出得到。
  6. 根据权利要求4或5所述的方法,其特征在于,所述目标用户的属性信息包括多个维度的用户属性,所述第一特征表示为通过第一编码器对所述目标用户的属性信息对应的第一目标嵌入表示进行处理得到的;所述方法还包括:
    获取所述用户的属性信息对应的第一初始嵌入表示;所述第一初始嵌入表示包括多个第一嵌入向量,每个第一嵌入向量对应一个维度的用户属性;
    通过权重确定网络,处理所述第一初始嵌入表示;得到每个所述用户属性的第一权重;
    根据所述第一权重,对所述多个第一嵌入向量进行调整,得到所述第一目标嵌入表示。
  7. 根据权利要求4至6任一所述的方法,其特征在于,所述目标物品的属性信息包括多个维度的物品属性,所述第二特征表示为通过第二编码器对所述目标物品的属性信息对应的第二目标嵌入表示进行处理得到的;所述方法还包括:
    获取所述物品的属性信息对应的第二初始嵌入表示;所述第二初始嵌入表示包括多个第二嵌入向量,每个第二嵌入向量对应一个维度的物品属性;
    通过权重确定网络,处理所述第二初始嵌入表示;得到每个所述物品属性的第二权重;
    根据所述第二权重,对所述多个第二嵌入向量进行调整,得到所述第二目标嵌入表示。
  8. 根据权利要求6或7所述的方法,其特征在于,所述权重确定网络仅包括一层FC。
  9. 根据权利要求1至8任一所述的方法,其特征在于,所述目标用户的属性信息包括如下的至少一种:性别,年龄,职业,收入,爱好,教育程度。
  10. 根据权利要求1至9任一所述的方法,其特征在于,所述目标物品的属性信息包括如下的至少一种:物品名称,开发者,安装包大小,品类,好评度。
  11. 一种数据处理方法,其特征在于,所述方法包括:
    获取第一特征表示和第二特征表示;所述第一特征表示为通过第一编码器对目标用户的属性信息进行特征提取得到的;所述第二特征表示为通过第二编码器对目标物品的属性信息进行特征提取得到的;所述第一特征表示包括多个第一子特征表示,所述第二特征表示包括多个第二子特征表示;
    根据所述多个第一子特征表示和所述多个第二子特征表示,确定多个相似度;其中,每个所述相似度为一个所述第一子特征表示和一个所述第二子特征表示之间的相似度;
    将所述多个相似度进行融合,得到所述目标用户和所述目标之间的推荐信息;所述推荐信息和对应的相似度标注用于确定第一损失,所述第一损失用于更新所述第一编码器和所述第二编码器,所述相似度标注为根据所述目标用户的真实操作日志得到。
  12. 根据权利要求11所述的方法,其特征在于,所述第一特征表示和所述第二特征表示之间相似度用于确定第二损失,所述第二损失用于更新所述第一编码器和所述第二编码器;在所述真实操作日志指示所述目标用户存在对所述目标物品的正向操作行为时,所述第二损失指示最大化所述第一特征表示和所述第二特征表示之间的相似度,在所述真实操作日志指示所述目标用户不存在对所述目标物品的操作行为或者存在对所述目标物品的负向操作行为时,所述第二损失指示最小化所述第一特征表示和所述第二特征表示之间的相似度。
  13. 根据权利要求11或12所述的方法,其特征在于,所述多个第一子特征表示为对所述第一特征表示进行切分得到的;所述多个第二子特征表示为对所述第二特征表示进行切分得到的。
  14. 根据权利要求11至13任一所述的方法,其特征在于,所述多个相似度包括多组相似度,每组相似度为:
    一个所述第一子特征表示和各个所述第二子特征表示之间的相似度;或者,
    一个所述第二子特征表示和各个所述第一子特征表示之间的相似度;
    所述将所述多个相似度进行融合,包括:
    将每组相似度中包括的多个相似度的最大值进行融合。
  15. 根据权利要求11至14任一所述的方法,其特征在于,
    所述第一编码器包括多个第一全连接层,所述第一特征表示为根据所述多个第一全连接层中的M个第一全连接层的输出得到,所述M为大于1的正数;或者,
    所述第二编码器包括多个第二全连接层,所述第二特征表示为根据所述多个第二全连接层中最靠近输出层的第二全连接层的输出得到。
  16. 根据权利要求11至15任一所述的方法,其特征在于,所述目标用户的属性信息包括多个维度的用户属性,所述第一特征表示为通过第一编码器对所述目标用户的属性信息对应的第一目标嵌入表示进行处理得到的;所述方法还包括:
    获取所述用户的属性信息对应的第一初始嵌入表示;所述第一初始嵌入表示包括多个第一嵌入向量,每个第一嵌入向量对应一个维度的用户属性;
    通过权重确定网络,处理所述第一初始嵌入表示;得到每个所述用户属性的第一权重;
    根据所述第一权重,对所述多个第一嵌入向量进行调整,得到所述第一目标嵌入表示;
    所述第一损失还用于更新所述权重确定网络。
  17. 一种推荐装置,其特征在于,所述装置包括:
    获取模块,用于获取第一特征表示和第二特征表示;所述第一特征表示对应于目标用户的属性信息;所述第二特征表示对应于目标物品的属性信息;所述第一特征表示包括多个第一子特征表示,所述第二特征表示包括多个第二子特征表示;
    数据处理模块,用于根据所述多个第一子特征表示和所述多个第二子特征表示,确定多个相似度;其中,每个所述相似度为一个所述第一子特征表示和一个所述第二子特征表示之间的相似度;
    将所述多个相似度进行融合,得到所述目标用户和所述目标之间的推荐信息;
    推荐模块,用于当所述推荐信息满足预设条件,确定向所述目标用户推荐所述目标物品。
  18. 根据权利要求17所述的装置,其特征在于,所述多个第一子特征表示为对所述第一特征表示进行切分得到的;所述多个第二子特征表示为对所述第二特征表示进行切分得到的。
  19. 根据权利要求17或18所述的装置,其特征在于,所述多个相似度包括多组相似度,每组相似度为:
    一个所述第一子特征表示和各个所述第二子特征表示之间的相似度;或者,
    一个所述第二子特征表示和各个所述第一子特征表示之间的相似度;
    所述将所述多个相似度进行融合,包括:
    将每组相似度中包括的多个相似度的最大值进行融合。
  20. 根据权利要求17至19任一所述的装置,其特征在于,所述第一特征表示为根据所述目标用户的属性信息通过第一编码器得到的,所述第一编码器包括多个第一全连接层,所述第一特征表示为根据所述多个第一全连接层中的M个第一全连接层的输出得到,所述M为大于1的正数。
  21. 根据权利要求17至20任一所述的装置,其特征在于,
    所述第二特征表示为根据所述目标物品的属性信息通过第二编码器得到的,所述第二编码器包括多个第二全连接层,所述第二特征表示为根据所述多个第二全连接层中最靠近输出层的第二全连接层的输出得到。
  22. 根据权利要求20或21所述的装置,其特征在于,所述目标用户的属性信息包括多个维度的用户属性,所述第一特征表示为通过第一编码器对所述目标用户的属性信息对应的第一目标嵌入表示进行处理得到的;
    所述获取模块,还用于获取所述用户的属性信息对应的第一初始嵌入表示;所述第一初始嵌入表示包括多个第一嵌入向量,每个第一嵌入向量对应一个维度的用户属性;
    所述装置还包括:权重调整模块,用于通过权重确定网络,处理所述第一初始嵌入表示;得到每个所述用户属性的第一权重;
    根据所述第一权重,对所述多个第一嵌入向量进行调整,得到所述第一目标嵌入表示。
  23. 根据权利要求20至22任一所述的装置,其特征在于,所述目标物品的属性信息包括多个维度的物品属性,所述第二特征表示为通过第二编码器对所述目标物品的属性信息对应的第二目标嵌入表示进行处理得到的;
    所述获取模块,还用于获取所述物品的属性信息对应的第二初始嵌入表示;所述第二初始嵌入表示包括多个第二嵌入向量,每个第二嵌入向量对应一个维度的物品属性;
    所述装置还包括:权重调整模块,用于通过权重确定网络,处理所述第二初始嵌入表示;得到每个所述物品属性的第二权重;
    根据所述第二权重,对所述多个第二嵌入向量进行调整,得到所述第二目标嵌入表示。
  24. 根据权利要求22或23所述的装置,其特征在于,所述权重确定网络仅包括一层FC。
  25. 根据权利要求17至24任一所述的装置,其特征在于,所述目标用户的属性信息包括如下的至少一种:性别,年龄,职业,收入,爱好,教育程度。
  26. 根据权利要求17至25任一所述的装置,其特征在于,所述目标物品的属性信息包括如下的至少一种:物品名称,开发者,安装包大小,品类,好评度。
  27. 一种数据处理装置,其特征在于,所述装置包括:
    获取模块,用于获取第一特征表示和第二特征表示;所述第一特征表示为通过第一编码器对目标用户的属性信息进行特征提取得到的;所述第二特征表示为通过第二编码器对目标物品的属性信息进行特征提取得到的;所述第一特征表示包括多个第一子特征表示,所述第二特征表示包括多个第二子特征表示;
    数据处理模块,用于根据所述多个第一子特征表示和所述多个第二子特征表示,确定多个相似度;其中,每个所述相似度为一个所述第一子特征表示和一个所述第二子特征表示之间的相似度;
    将所述多个相似度进行融合,得到所述目标用户和所述目标之间的推荐信息;所述推荐信息和对应的相似度标注用于确定第一损失,所述第一损失用于更新所述第一编码器和所述第二编码器,所述相似度标注为根据所述目标用户的真实操作日志得到。
  28. 根据权利要求27所述的装置,其特征在于,所述第一特征表示和所述第二特征表示之间相似度用于确定第二损失,所述第二损失用于更新所述第一编码器和所述第二编码器;在所述真实操作日志指示所述目标用户存在对所述目标物品的正向操作行为时,所述第二损失指示最大化所述第一特征表示和所述第二特征表示之间的相似度,在所述真实操作日志指示所述目标用户不存在对所述目标物品的操作行为或者存在对所述目标物品的负向操作行为时,所述第二损失指示最小化所述第一特征表示和所述第二特征表示之间的相似度。
  29. 根据权利要求27或28所述的装置,其特征在于,所述多个第一子特征表示为对所述第一特征表示进行切分得到的;所述多个第二子特征表示为对所述第二特征表示进行切分得到的。
  30. 根据权利要求27至29任一所述的装置,其特征在于,所述多个相似度包括多组相似度,每组相似度为:
    一个所述第一子特征表示和各个所述第二子特征表示之间的相似度;或者,
    一个所述第二子特征表示和各个所述第一子特征表示之间的相似度;
    所述将所述多个相似度进行融合,包括:
    将每组相似度中包括的多个相似度的最大值进行融合。
  31. 根据权利要求27至30任一所述的装置,其特征在于,
    所述第一编码器包括多个第一全连接层,所述第一特征表示为根据所述多个第一全连接层中的M个第一全连接层的输出得到,所述M为大于1的正数;或者,
    所述第二编码器包括多个第二全连接层,所述第二特征表示为根据所述多个第二全连接层中最靠近输出层的第二全连接层的输出得到。
  32. 根据权利要求27至31任一所述的装置,其特征在于,所述目标用户的属性信息包括多个维度的用户属性,所述第一特征表示为通过第一编码器对所述目标用户的属性信息对应的第一目标嵌入表示进行处理得到的;
    所述获取模块,还用于获取所述用户的属性信息对应的第一初始嵌入表示;所述第一初始嵌入表示包括多个第一嵌入向量,每个第一嵌入向量对应一个维度的用户属性;
    所述装置还包括:权重调整模块,用于通过权重确定网络,处理所述第一初始嵌入表示;得到每个所述用户属性的第一权重;
    根据所述第一权重,对所述多个第一嵌入向量进行调整,得到所述第一目标嵌入表示;
    所述第一损失还用于更新所述权重确定网络。
  33. 一种计算设备,其特征在于,所述计算设备包括存储器和处理器;所述存储器存储有代码,所述处理器被配置为获取所述代码,并执行如权利要求1至16任一所述的方法。
  34. 一种计算机存储介质,其特征在于,所述计算机存储介质存储有一个或多个指令,所述指令在由一个或多个计算机执行时使得所述一个或多个计算机实施权利要求1至16任一所述的方法。
  35. 一种计算机程序产品,包括代码,其特征在于,在所述代码被执行时用于实现如权利要求1至16任一所述的方法。
PCT/CN2023/114023 2022-08-26 2023-08-21 一种推荐方法及相关装置 WO2024041483A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211032748.0 2022-08-26
CN202211032748.0A CN116049536A (zh) 2022-08-26 2022-08-26 一种推荐方法及相关装置

Publications (1)

Publication Number Publication Date
WO2024041483A1 true WO2024041483A1 (zh) 2024-02-29

Family

ID=86132029

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/114023 WO2024041483A1 (zh) 2022-08-26 2023-08-21 一种推荐方法及相关装置

Country Status (2)

Country Link
CN (1) CN116049536A (zh)
WO (1) WO2024041483A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117876015A (zh) * 2024-03-11 2024-04-12 南京数策信息科技有限公司 一种用户行为数据分析方法、装置及相关设备

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116049536A (zh) * 2022-08-26 2023-05-02 华为技术有限公司 一种推荐方法及相关装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170344572A1 (en) * 2009-01-29 2017-11-30 Google Inc. Personalized content-based recommendation system with behavior-based learning
CN111428091A (zh) * 2020-03-19 2020-07-17 腾讯科技(深圳)有限公司 一种编码器的训练方法、信息推荐的方法以及相关装置
CN112765477A (zh) * 2021-03-05 2021-05-07 北京百度网讯科技有限公司 信息处理、信息推荐的方法和装置、电子设备和存储介质
CN113269612A (zh) * 2021-05-27 2021-08-17 清华大学 物品推荐方法、装置、电子设备及存储介质
CN116049536A (zh) * 2022-08-26 2023-05-02 华为技术有限公司 一种推荐方法及相关装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170344572A1 (en) * 2009-01-29 2017-11-30 Google Inc. Personalized content-based recommendation system with behavior-based learning
CN111428091A (zh) * 2020-03-19 2020-07-17 腾讯科技(深圳)有限公司 一种编码器的训练方法、信息推荐的方法以及相关装置
CN112765477A (zh) * 2021-03-05 2021-05-07 北京百度网讯科技有限公司 信息处理、信息推荐的方法和装置、电子设备和存储介质
CN113269612A (zh) * 2021-05-27 2021-08-17 清华大学 物品推荐方法、装置、电子设备及存储介质
CN116049536A (zh) * 2022-08-26 2023-05-02 华为技术有限公司 一种推荐方法及相关装置

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117876015A (zh) * 2024-03-11 2024-04-12 南京数策信息科技有限公司 一种用户行为数据分析方法、装置及相关设备
CN117876015B (zh) * 2024-03-11 2024-05-07 南京数策信息科技有限公司 一种用户行为数据分析方法、装置及相关设备

Also Published As

Publication number Publication date
CN116049536A (zh) 2023-05-02

Similar Documents

Publication Publication Date Title
WO2021047593A1 (zh) 推荐模型的训练方法、预测选择概率的方法及装置
US20230088171A1 (en) Method and apparatus for training search recommendation model, and method and apparatus for sorting search results
WO2019144892A1 (zh) 数据处理方法、装置、存储介质和电子装置
WO2024041483A1 (zh) 一种推荐方法及相关装置
WO2023221928A1 (zh) 一种推荐方法、训练方法以及装置
WO2022016556A1 (zh) 一种神经网络蒸馏方法以及装置
WO2024002167A1 (zh) 一种操作预测方法及相关装置
EP4322031A1 (en) Recommendation method, recommendation model training method, and related product
WO2023185925A1 (zh) 一种数据处理方法及相关装置
CN115879508A (zh) 一种数据处理方法及相关装置
CN116108267A (zh) 一种推荐方法及相关设备
WO2024012360A1 (zh) 一种数据处理方法及相关装置
WO2024067779A1 (zh) 一种数据处理方法及相关装置
WO2023246735A1 (zh) 一种项目推荐方法及其相关设备
CN116910357A (zh) 一种数据处理方法及相关装置
CN117217284A (zh) 一种数据处理方法及其装置
CN115222433A (zh) 一种信息推荐方法、装置及存储介质
CN117057855A (zh) 一种数据处理方法及相关装置
WO2023050143A1 (zh) 一种推荐模型训练方法及装置
CN116843022A (zh) 一种数据处理方法及相关装置
CN117251619A (zh) 一种数据处理方法及相关装置
CN116204709A (zh) 一种数据处理方法及相关装置
CN116308640A (zh) 一种推荐方法及相关装置
CN117009621A (zh) 信息搜索方法、装置、电子设备、存储介质及程序产品
CN115545738A (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: 23856573

Country of ref document: EP

Kind code of ref document: A1