Welcome toTencent Cloud + community, get more Tencent mass technology practice dry goods oh ~

This post was posted by JJ in cloud + Community

I. Overview of recommendation system

1.1 an overview of the

Recommendation system is almost everywhere at present, and the mainstream apps are basically applied to the recommendation system. For example, for travel, Ctrip and Qunar will recommend air tickets and hotels to you. Order take-out, ele. me, Meituan will recommend restaurants to you; When shopping, jd.com, Taobao, Amazon, etc. recommend items that you might like. See news, today’s headlines, Tencent news will give you push you interested in news…. Almost every app or website has a recommendation system.

The fundamental reason is that the popularity of recommendation system is to solve a problem: there are more and more items and more and more information, but people’s energy and time are limited, so they need a way to obtain information more efficiently and link people and information.

Recommendation system is to solve this problem and was born, in the mass of goods and people, build a bridge. It is like a private exclusive shopping guide, according to your historical behavior, personal information and so on, diy recommendations for everyone, thousands of people in front, to help people better, faster to choose their own interests, their own needs. Supported by the recommendation algorithm, the feed flow of Toutiao system has achieved impressive user growth rate and usage duration data in just a few years, which is highly sought after and highly valued by the market. You can see how important it is that almost every app started to feed and offer recommendations overnight.

1.2 Basic Architecture

Let’s take a brief look at the recommendation system, which can be simplified into the following architecture.

Recommendation systems, whether complex or simple, basically contain processes:

  • 1) Results presentation. Whether in the app or on the web, there will be a UI to display the list of recommendations.
  • 2) Behavior log section. User’s various behaviors will be recorded and uploaded to the background log system at any time, such as click behavior, purchase behavior, location and so on. These data are generally followed by ETL (Extract extraction, Transform transformation, load) for iterative generation of new models for prediction.
  • 3) Feature engineering. To obtain user behavior data, characteristics of objects, scene data and so on, it is necessary to extract features from the original data manually or automatically. These features serve as inputs to provide data for subsequent recommendation algorithms. Feature selection is very important, the wrong feature will inevitably bring wrong results.
  • 4) Recall part. With the user’s portrait, data engineering and algorithms are used to lock specific candidate sets from tens of millions of products and complete the preliminary screening of the recommendation list, which to a certain extent determines the efficiency of the sorting stage and the merits of the recommendation results.
  • 5) The sorting part. According to the candidate set of the previous step, a more refined score and ranking will be carried out. Meanwhile, a series of indicators such as novelty, surprise and commercial interest will be taken into account to obtain a final recommendation list and present it.

The complete recommendation system will also include many auxiliary modules, such as offline training module, which allows algorithm researchers to use real historical data to test different algorithms and preliminarily verify the advantages and disadvantages of algorithms. Algorithms that work well in offline testing will be put into online testing, known as A/B test system. It uses the traffic distribution system to screen specific users to display the list of recommendations generated by the algorithm to be tested, and then collects this batch of specific user behavior data for online evaluation.

Each part of the recommendation system can be large or small. As can be seen from Figure 2, there are many technology stacks involved in each part. Terminal apps constantly report logs, such as click, display, time, location, and so on. These massive information depends on the support of big data-related software stacks, such as Kafka, Spark, HDFS, and Hive. Kafka is often used to deal with the consumption of massive logs reported. After data is stored in Hive data warehouse after ETL, it can be used for various online and offline tests. Offline algorithms will be subjected to ABtest in an online-to-online environment. ABtest involves the completion of a complete test loop. Otherwise, the results cannot be obtained and iterative algorithms cannot be rapidly developed. Online recommendation system should also pay attention to real-time features and off-line features to balance performance, various indicators and business objectives.

1.3 Evaluation Indicators

Whether something is well done or not, whether it can be optimized, the first prerequisite is to determine the evaluation indicators. Only when the evaluation index is determined, can we have the direction of optimization. The indexes of evaluation and recommendation system can be considered in the following aspects:

1.3.1 User satisfaction

As the main participants of the propulsion system, the satisfaction of the users is the most important index to evaluate the system. Satisfaction can be obtained by conducting user surveys or online experiments. In online systems, user satisfaction is generally measured by the statistics of user behavior, such as click rate, user stay time and conversion rate.

1.3.2 Precision of prediction

Predictive accuracy measures the ability of a recommender system or recommender algorithm to predict user behavior. This metric is the most important offline metric. Since off-line data are computable, most researchers are talking about this metric.

Score prediction problems generally use RMSE, MAE, etc., and TopN prediction problems generally use Recall, Precision, etc.

In fact, at present, many domestic places and data confused the name of the two indicators, the accuracy corresponding to the English precision index. But try to use English.

Accuracy = (TP + TN)/(TP + FP + TN + FN)

+ FP Precision Precision = TP/(TP)

1.3.3 Coverage

Coverage describes the ability of a recommendation system to exploit the long tail of items. There are many ways to define coverage. The easiest way to calculate coverage is to divide the number of items on the recommended list by the total number of items.

In information theory and economics, two well-known indicators are used to define coverage, one is information entropy and the other is gini coefficient. Specific formulas and introductions can be found on Google.

Ps: Long tail is a common term in recommendation system. To help you understand, in stores, with limited shelves and space, the most visible items are usually the famous, the hot, and therefore the best sellers. Many unknown or small visibility of goods due to the shelf corner or fundamentally not shelf, these goods sales are very poor. In the Internet age, this phenomenon will be broken. With an almost infinite length of “shelves”, e-malls can show users many products that meet their niche needs, so that the total volume of sales will be far greater than the previous model.

Google is one of the most typical “long tail” companies. Its growth process is the process of commercializing the “long tail” of advertisers and publishers. Millions of small businesses and individuals who have never advertised before or on a large scale. They are so small that advertisers don’t even think they can advertise. But Google’s AdSense has lowered the bar for advertising: it’s no longer unattainable, it’s self-service, it’s cheap, and anyone can do it. On the other hand, for thousands of blogs and small business sites, advertising on their own sites is a breeze. Half of Google’s business now comes from these small sites rather than ads placed in search results. Millions of small and medium-sized businesses represent a huge long-tail advertising market. No one can predict how long the long tail will last. Countless decimals accumulated together is an inestimable large number, countless small business together is an inestimable large market.

1.3.4 diversity

Users’ interests are diverse, and the recommendation system needs to be able to cover all aspects of users’ preferences. The assumption here is that if the list of recommendations is diverse and covers a wide variety of interests, the probability of hitting a user’s interest will be higher, which will increase the probability that the user will find something they are interested in.

1.3.5 novelty

Novel recommendations refer to recommending items to users that they have not heard of before. User surveys are needed to accurately measure novelty.

1.3.6 surprise degrees

If the result of the recommendation is not similar to the user’s historical interest, but is satisfactory to the user, it can be said that the recommendation is highly surprising, and the novelty of the recommendation depends only on whether the user has heard of the recommendation.

1.3.7 trust

Users’ trust in the recommendation system. If the user trusts the recommendation system, it increases the interaction between the user and the recommendation system. Especially in e-commerce recommendation system, it is very important to make users trust the recommendation results. The same recommendation results, recommended to users in a way that makes users trust will be more likely to make users want to buy, while recommended to users in the form of similar advertising may be difficult to make users want to buy. There are two main ways to improve the trust of recommendation systems. First of all, it is necessary to increase transparency of recommendation system, and the main way to increase transparency of recommendation system is to provide recommendation explanation. Secondly, consider the user’s social network information, use the user’s friends’ information to make recommendations to users, and use friends to recommend explanations.

1.3.8 real-time

On many sites, because items (news, tweets, etc.) are time-sensitive, they need to be recommended to users while they are still time-sensitive. Therefore, in these websites, the real-time performance of the recommendation system is very important.

The real-time performance of recommendation system includes two aspects. First, the recommendation system needs to update the recommendation list in real time to meet the user’s new behavior changes. The second aspect of real time is that the recommendation system needs to be able to recommend new items to users. This mainly tests the recommendation system’s ability to handle the cold start of an item.

1.3.9 robustness

Measures a recommendation system’s ability to combat cheating. Simulation attacks are used to evaluate the robustness of algorithms. First, given a data set and an algorithm, you can use the algorithm to generate a list of recommendations for the users in that data set. Then, noise data is injected into the dataset by common attack methods, and the algorithm is used to generate recommendatory list for users on the dataset after noise injection. Finally, the robustness of the algorithm is evaluated by comparing the similarity of the recommendation list before and after the attack. If the recommendation list after the attack does not change significantly compared with that before the attack, it indicates that the algorithm is relatively robust.

1.3.10 Business Objectives

In many cases, the evaluation and recommendation system pays more attention to the achievement of business goals, which are closely related to the profit model. Generally speaking, the most essential business goal is the revenue per user for the company. However, this index is not difficult to calculate, but the calculation of a relatively large cost. Therefore, many companies will design different business goals according to their profit model.

1.3.11 Resources

There are a lot of related researches and materials on the evaluation of recommendation system. For the detailed study, please refer to:

  • Actual Combat of Recommendation System
  • Evaluating Recommendation Systems
  • What metrics are used for evaluating recommender systems?

Second, common algorithms

The evolution of recommendation algorithm can be simply divided into three stages, which is also the iteration of recommendation system from simple to complex.

2.1 Evolution of recommendation algorithm

2.1.1 Manual operation

This stage is random, manual push specific content to specific categories of users according to the operation purpose.

Advantages are:

  • Facilitate the promotion of specific content;
  • The recommended contents are easy to explain;

The disadvantage is that:

  • Thousands of people, push the same content;
  • Manual screening, push, huge manpower consumption;
  • Operation according to their own knowledge, subjectivity is relatively large;

2.1.2 Recommendations based on statistics

They make recommendations based on simple statistics, such as a list of top sellers in a particular country; Some more detailed, the user according to the personal characteristics of the division, and then all kinds of heat list.

Advantages are:

  • Popular is the fitting of most user preferences, the effect is good;
  • The recommended contents are easy to explain;

The disadvantage is that:

  • Thousands of people, push the same content;
  • The Matthew Effect, the hot ones get hotter, the cold ones get colder;
  • The effect is easily reached to the ceiling;

2.1.3 Personalized Recommendation

At the current stage, recommendations are based on collaborative filtering algorithm, model-based algorithm and social relationship, etc. Machine learning and deep learning are gradually introduced to improve the recommendation effect.

Advantages are:

  • The effect is much better than before;
  • In front of a thousand people, each person has their own unique recommendation list;

The disadvantage is that:

  • High threshold, recommendation system construction, algorithm design, tuning, etc., have higher requirements for developers;
  • The cost is high, and it is a long-term iterative optimization process, and the input of human and material resources is high;

2.2 Summary of recommendation algorithms

Internal one shares common recommendation algorithms for such classification:

What is the difference between the memory-based and model-based algorithms mentioned here? This is also the problem I focused on before, find a material, explain more thoroughly.

Memory-based techniques use the data (likes, votes, clicks, etc) that you have to establish correlations (similarities?) between either users (Collaborative Filtering) or items (Content-Based Recommendation) to recommend an item i to a user U Who’s never seen it before. In the case of collaborative filtering Closest to U we get the recommendations from items seen by the user’s who are Closest to U, hence the term collaborative. In contrast, content-based recommendation tries to compare items using their characteristics (movie genre, actors, The book’s publisher or author… etc) to recommend similar new items.

In a nutshell, memory-based techniques rely heavily on simple similarity measures (Cosine similarity, Pearson correlation, Jaccard coefficient… etc) to match similar people or items together. If we have a huge matrix with users on one dimension and items on the other, with the cells containing votes or likes, then memory-based techniques use similarity measures on two vectors (rows or columns) of such a matrix to generate a number representing similarity.

Model-based techniques on the other hand try to further fill out this matrix. They tackle the task of “guessing” how much a user will like an item that they did not encounter before. For that they utilize several machine learning algorithms to train on the vector of items for a specific user, then they can build a model that can predict the user’s rating for a new item that has just been added to the system.

Since I’ll be working on news recommendations, the latter technique sounds much more interesting. Particularly since news items emerge very quickly (and disappear also very quickly), it makes sense that the system develops some smart way of detecting when a new piece of news will be interesting to the user even before other users see/rate it.

Popular model-based techniques are Bayesian Networks, Singular Value Decomposition, and Probabilistic Latent Semantic Analysis (or Probabilistic Latent Semantic Indexing). For some reason, all model-based techniques do not enjoy particularly happy-sounding names.


The article Ctrip Personalized Recommendation Algorithm Practice summarizes the sorting model applied in the industry, which roughly goes through three stages:

This paper does not discuss the principle of these algorithms in detail, it will be more complicated, you can learn by yourself if you are interested.

2.3 Example of CF algorithm

In order to learn this technical knowledge, I participated in the INTERNAL SRTC recommendation competition. The emphasis is on participation, mainly to learn the whole basic process, experience the recommendation scene, and understand what Tencent’s internal teams and products do well.

2.3.1 (Internal sensitive data, deleted)

2.3.2 CF algorithm

Clicking on the Web platform may lose the meaning of learning. Therefore, in the spirit of learning, I implemented some common algorithms, such as CF, on my own machine offline.

CF is relatively common in the recommendation algorithm, and the core is very simple.

  • Basic principle of user-CF

A. Find user sets with similar interests to target users; B. Find the items that the users in this collection like and the target users have never heard of and recommend them to the target users.

  • Basic principle of item-CF

A. Calculate the similarity between items; B. Generate a recommendation list for users based on similarity of items and users’ historical behaviors.

Combined with the previous summary, CF is a memory-base algorithm, and a big feature is the use of similarity function. This user-CF needs to calculate the similarity of users’ interests, and item-CF needs to calculate the similarity between items. Depending on the choice of similarity function, the choice of programming language, the choice of implementation method, and the optimization, the results and overall runtime can be quite different. At that time, it was simply implemented in Python, and it took nearly 10 hours for all 8 processes to run on the CPU at the same time. There are some optimizations for pandas, NUMpy, etc.

2.3.3 harvest

Haha, it was the first time to participate in this kind of competition, although the result was very poor, but I think it is very learned a lot, basically achieved the goal of participating in the competition. Considering various influencing factors and experiencing various algorithms from design, implementation, training, evaluation and other stages in real scenes and data, many things are indeed more in-depth than reading materials and books. Practice is the best way to learn. If I want to go deeper into the recommendation algorithm, I feel I need to continue to learn the principles and hidden rules of various popular algorithms at present, practice more on Kaggle, and exercise related platform and engineering ability.

Iii. Industry recommendation system research

I collected and studied some articles summarizing the implementation of recommendation system on the Internet, which can broaden my vision and deepen my overall understanding.

Here are just a few of the highlights. If you’re interested, read the original:

  • Toutiao Algorithm Principle, original link
  • “The exploration and Practice of recommendation Algorithm in Idle fish Small commodity Pool”, link to the original text
  • Ele. me recommendation System: From 0 to 1, original link
  • Iqiyi personalized recommendation Sorting Practice, original link
  • Ctrip personalized Recommendation Algorithm Practice, original link
  • “Mogujie Recommended project practice”, link to the original text

3.1 Toutiao recommendation System

Dr. Cao Huanhuan, the algorithm architect of Toutiao, gave a report on the Algorithm Principle of Toutiao. It mainly involves four parts: system overview, content analysis, user tags, evaluation and analysis.

  • Four types of typical recommended features

The first category is the relevance feature, which evaluates the attributes of the content and whether it matches the user. The second category is environmental characteristics, including geographical location and time. These are both bias features and can be used to construct some matching features. The third category is heat signatures. Including global heat, classification heat, topic heat, and keywords heat. The fourth category is collaborative features, which can help in part to solve the problem of so-called narrowing algorithms.

  • Most of toutiao’s products are recommended to use real-time training for model training

Most of toutiao’s products are recommended to use real-time training for model training. Real-time training saves resources and gives fast feedback, which is very important for information flow products. Users need the recommendation effect that behavioral information can be quickly captured by the model and fed back to the next brush. Currently, our online sample data is processed in real time based on storm cluster, including action types such as click, display, favorites and share. Model parameter server is a set of high performance system developed internally. As the scale of toutiao data grows too fast, the stability and performance of similar open source systems cannot be satisfied. However, we have made a lot of targeted optimization at the bottom of the system developed by ourselves, providing perfect operation and maintenance tools, which is more suitable for the existing business scenarios.

At present, toutiao’s recommendation algorithm model is relatively large in the world, including tens of billions of original features and billions of vector features. The overall training process is that the online server records real-time features and imports them into the Kafka file queue, and then further imports the Storm cluster to consume Kafka data. The client sends back the recommended label to construct training samples, and then carries out online training to update model parameters according to the latest samples. Finally, the online model is updated. The main delay in this process is the delay of the user’s action feedback, because the user may not read the article immediately after the recommendation, ignoring this part of time, the whole system is almost real-time.

However, because the current content of Toutiao is very large, plus the small video content has tens of millions of levels, it is impossible for the recommendation system to predict all the content by the model. Therefore, it is necessary to design some recall strategies and screen out thousands of content libraries from the mass of content when recommending each time. The most important requirement of recall strategy is that the performance should be extreme, and the timeout should not exceed 50 milliseconds.

  • User tag engineering is even more challenging

Content analysis and user tagging are the two cornerstones of recommendation systems. Content analysis involves more machine learning than user tag engineering. Toutiao’s commonly used user tags include categories and topics of interest to users, keywords, sources, interest-based user clustering, and various vertical interest features (car models, sports teams, stocks, etc.). Gender, age, location, etc. Gender information is obtained through the user’s third-party social media account login. Age information is usually predicted by models, from models, reading time distribution, etc. Resident location comes from the user’s authorized access to location information, on the basis of location information through the traditional clustering method to get the resident location. Resident point Combined with other information, the user’s working place, business trip place and travel place can be predicted. These user tags are very helpful for recommendations.

Of course, the simplest user TAB is the TAB for browsing content. But there are some data-handling strategies involved. Mainly include: one, filter noise. Filter clickbait with short stays. Second, hot spot punishment. To the user in some popular articles (such as PG One news some time ago) on the action to reduce the right processing. In theory, the credibility of more widely distributed content will decline. Third, time attenuation. Users’ interests are biased, so policies favor new user behaviors. Therefore, with the increase of user actions, the old feature weight will decay over time, and the new action will contribute more feature weight. Four, punishment show. If an article recommended to the user is not clicked on, the relevant feature (category, keyword, source) weight will be penalized. Of course, you should also consider the global context, whether the content is pushed too much, as well as the closing and dislike signals.

  • Hadoop cluster is under too much pressure. Storm cluster streaming computing system is launched

Face these challenges. At the end of 2014, Toutiao launched the user-tagged Storm cluster streaming computing system. After changing to streaming, the label will be updated whenever there is user action update, which has a relatively small CPU cost and can save 80% of CPU time, greatly reducing the cost of computing resources. At the same time, only a few dozen machines can support the update of interest model of tens of millions of users every day, and the feature update speed is very fast, which can basically achieve quasi-real-time. The system has been in use since its launch.

  • Many companies don’t do well with algorithms, not because engineers are not competent, but because they need a powerful experimental platform and convenient experimental analysis tools

A/B Test System principle

This is the rationale behind the Toutiao A/B Test experimental system. First of all, we will do user buckets in offline state, and then online distribution of experimental flow, label the users in the buckets and distribute them to the experimental group. For example, open a 10% flow experiment, two experimental groups 5% each, one 5% is the baseline, the strategy is the same as the online market, the other is a new strategy.

During the experiment, user movements will be collected, which is basically quasi-real-time and can be seen every hour. However, because the hourly data fluctuates, it is usually viewed by day as the time node. After action collection, there will be log processing, distributed statistics, write database, very convenient.

3.2 Exploration and practice of recommendation algorithm in idle fish small commodity pool

  • Personalized recommendation process in Xianyu

The personalized product recommendation algorithm mainly consists of Match and Rank: Match stage is also called product recall stage. In the recommendation system, users’ behaviors on products are called user Trigger. Through long-term collection of users’ behaviors on products, the matrix of user behaviors and products is called X2I. Rank stage uses the objective function of different indicators to score the commodities, and carries out a comprehensive ranking of the multiple dimensions of commodities according to the rules of the recommendation system. The following takes the homepage feeds of Xianyu as an example to briefly introduce the personalized recommendation process of Xianyu.

As shown in Step 1.1, the user Trigger is obtained by using the user’s information, including the user’s unique identifier, userId, and the user’s device information, which uniquely identifies utTID.

As shown in Step 1.2, return the user Trigger, which includes the user’s click, purchased goods, favorite categories, tags of the user, frequented shops, goods in the shopping cart, favorite brands and so on.

As shown in Step 1.3, product recall is carried out. Trigger and X2I matrix are used to join to complete product recall.

As shown in Step 1.4, the list of recalled goods is returned. In the product recall, goods recalled by I2I relation matrix are generally the main ones, and other X2I relation matrix is the auxiliary ones.

Step 2.1: Carry out product filtering, remove weight of recalled goods, filter purchased goods and eliminate over-exposed goods.

As shown in Step 2.2, score goods. In the scoring stage, itemInfo and different algorithm indicators are used to score goods from multiple dimensions.

In Step 2.3, the goods are sorted, and the scores of multiple dimensions of goods are comprehensively sorted according to the rules.

In Step 2.4, truncate the return list and return TopN items to the user.

Xianyu completes product recommendation through the above eight steps in the two stages of Match and Rank. Meanwhile, it can be seen from the figure that in order to support personalized recommendation of products, X2I, itemInfo and userTrigger data need to be backstreamed to the search engine, including day-level backflow data and hour-level backflow data.

  • The characteristics of small goods

Small commodity pool has the following characteristics.

Real-time: In the small commodity pool built by Idle fish, commodities are required to flow into the commodity pool under this rule in real time to provide users with the latest high-quality commodities.

Periodicity: In the small goods pool, many goods have periodicity, such as the auction scene of free gift, the auction cycle is 6 hours, after 6 hours will be removed.

Guide the current channel page for most goods presented to the user or using the search engines, in order to ensure the commodity exposure, general use of search time window in the commodity pool for further screening of goods, but there is still a commodity exposure problem, if the time window is too big, so will cause commodity overexposed, if goods window is too small will cause underexposure goods, At the same time, there is also a problem that cannot be solved by search. Each user sees the same product at the same time, so personalized recommendation cannot be made for users. In order to further improve the service for users, it is urgent for small commodity pools to introduce personalized recommendation.

  • Recommended solutions in small commodity pools

In the process of recommending commodities in the small commodity pool based on the X2I data of the whole station above, it is found that in the Match stage, when the small commodity pool is too small, the problem of insufficient product recall is caused. In order to improve the effective recall quantity in the recommendation process of the small commodity pool, the following three solutions are proposed.

Advance filtering method: before the data is returned to the search engine, the small commodity pool filters the data to generate the backflow data of the small commodity pool. In the recall stage, the X2I of the small commodity pool is used to recall the goods, so as to improve the recall rate of the goods.

Vectorization of commodities: In the Match stage, vector similarity is used to recall goods. Vectorization of goods refers to the ability of vector search, which maps the characteristics and rules of goods into commodity vectors through functions, and maps the user’s Trigger and rules into user vectors, text conversion vector common word bag model and machine learning method. The word bag model can well identify the text word vector when the text length is short, but when the text length is too long, it is limited by the size of the word bag. If the word bag is too small, the effect will be poor. The method of machine learning is to use Word2Vector to train the text into vectors. Then the vector search engine is used to search the similar product vector according to the user vector, which is used as the recalled product. As shown in Figure 5, the vector of the commodity is divided into two parts. The first 20 characters represent the rules of the commodity, and the last 200 characters represent the basic characteristic information of the commodity.

Commodity search engine method: in the Match stage, commodity search engine is used to recall commodities. As shown in Figure 6, commodity structure is understood when commodities enter the search engine, Tag and rules are added into the commodity engine, and then the recall of commodities is completed by the search engine according to the user’s Trigger and rules as the search conditions. The natural real-time of search engine solves the problem of strong real-time of small commodity pool recommendation.

3.3 Ele. me recommendation system: from 0 to 1

For any external request, the system builds a QueryInfo(query request), extracts UserInfo(user information), ShopInfo(merchant information), FoodInfo(food information), and ABTest configuration information from various data sources, and then invokes Ranker sort. Here is the basic flow of sorting (as shown below) :

Call RankerManager, initialize Ranker:

  1. According to the ABTest configuration information, build the sorter Ranker;
  2. Retrieve ScorerManger, specify the required Scorer(can be more than one); At the same time, Scorer will obtain the corresponding Model from ModelManager and verify it.
  3. Enlist the FeatureManager to specify and validate the Features required by the Scorer.

Collect InstanceBuilder, summarize the Features of all Scorer, and calculate the Features required by EntityInfo(restaurant/food) ranking.

Score EntityInfo and sort Records as needed.

It is important to note that any Model Model must be presented or invoked as a Scorer. Mainly based on the following considerations:

  • Model iteration: for example, multiple versions of the same Model can be derived based on time, location, data sampling, etc.
  • Model parameters: such as weight and round setting in combination mode (see the next section), whether the model supports parallelization, etc.
  • Feature parameters: Feature Feature calculation parameters, such as distance in different cities with different segmentation parameters.

3.4 IQiyi personalized recommendation ranking practice

Our recommendation system is mainly divided into two stages, recall stage and sorting stage.

The recall phase selects a small candidate set (hundreds to thousands of videos) from a library of tens of millions of videos based on the user’s interests and historical behavior. These candidates are all the content that users are interested in. In the sorting stage, more accurate calculation is carried out on this basis, and each video can be accurately scored, so as to select a small amount of high-quality content (dozens of videos) that users are most interested in from thousands of candidates.

The overall structure of the recommendation system is shown in the figure, and the functions of each module are as follows:

User portrait: a multi-dimensional analysis of user’s crowd attributes, historical behaviors, interests and preferences, is the cornerstone of personalization

Feature engineering: it covers video category attributes, content analysis, crowd preferences, statistical features and other comprehensive description and measurement, which is the basis of video content and quality analysis

Recall algorithm: recall models including multiple channels, such as collaborative filtering, theme model, content recall and SNS channels, can select diverse preferred content from the video library

Ranking model: Sort the contents of multiple recall channels with the same score and select the optimal few results.

In addition to these, the recommendation system also takes into account the diversity, freshness, force and surprise of the recommendation results and other dimensions, which can better meet the needs of diverse users.

Then, the architecture of recommendation sorting system and the evolution of recommendation machine learning sorting algorithm are introduced.

3.5 Ctrip personalized recommendation algorithm practice

The recommendation process can be roughly divided into three parts, recall, sorting and recommendation result generation. The overall architecture is shown in the figure below.

In the recall stage, data engineering and algorithms are used to lock specific candidate sets from tens of millions of products and complete the preliminary screening of products, which to a certain extent determines the efficiency of the sorting stage and the merits of the recommendation results.

Traditional Contextual algorithms in the industry are mainly CF[1][2], statistically based Contextual recommendation and LBS. However, deep learning has been widely introduced recently and its algorithmality has been greatly improved, such as: Session-based recommendation using RNN was proposed by Netflix and Gravity R&D Inc in 2015 [5], and context-aware recommendation combining CNN and PMF was proposed by Recsys in 2016 [10]. The promotion of DNN as MF proposed by Google in 2016 can easily add arbitrary continuous and classification features to the model [9], and the use of LSTM for sequence recommendation proposed by IJCAI conference in 2017 [6]. ASDAE, a deep model proposed by Ctrip personalization team at the AAAI conference in 2017, can improve data sparseness and cold start problems by integrating additional side information into the input [4].

For the candidate set obtained in the recall stage, more complex and accurate scoring and reordering will be carried out to obtain a smaller list of products that users may be interested in. Ctrip’s recommendation ranking does not simply pursue click-through rate or conversion rate, but also needs to consider distance control, product quality control and other factors. Compared with Pairwise and Listwise, which are suitable for search sorting and text relevance retrieval, the Pointwise method can intervene by superimposing other control items and is suitable for multi-objective optimization problems.

Recommendation methods in industry have developed from linear model + massive artificial feature engineering [11] -> complex nonlinear model -> deep learning. In 2007, Microsoft first proposed to use Logistic Regression to predict the click-through rate of search ads [12], and in the same year, proposed OWLQN optimization algorithm to solve LR problem with L1 regular [13]. An online learning version of Ad Predictor based on L2 regulars was proposed in 2010 [14].

In 2013, Google proposed AN LR optimization algorithm fTRL-proximal based on L1 regularization [15]. Factorization Machine algorithm [17] proposed in 2010 and filed-aware Factorization Machine[18] proposed in 2014 aim to solve the problem of feature combination under sparse data. So as to avoid the large number of artificial feature combination work required when adopting LR.

Ali proposed the non-linear relationship between the Mixture of Logistic Regression and the learning features of primitive space directly in 2011 [19]. In 2014, Facebook proposed to use GBDT for automatic feature combination and Logistic Regression[20].

In recent years, deep learning has also been successfully applied to the field of recommendation ranking. In 2016, Google proposed the method of Wide and deep learning [21] to integrate the memory and generalization capabilities of models. Further, huawei proposed the DeepFM[15] model to replace the artificial feature combination in WDL. Ali introduced attention mechanism and proposed Deep Interest Network in 2017 [23].

Ctrip has accumulated certain experience in the practice of corresponding models, including the most commonly used Logistic Regression model, tree model (GBDT, Random Forest) [16], factor decomposition machine, And recently proposed WDL model. At the same time, we believe that even in the current era of deep learning, refined feature engineering is still indispensable.

Based on the sorted list, the final recommendation results are generated after comprehensive consideration of diversity, novelty, Exploit & Explore and other factors.

Four,

I have never been in contact with recommendation system before, but now I start to contact this content due to my work. I don’t understand many concepts and technologies and need to make up for them. Recently, I participated in the internal recommendation contest and operated one round of it. Meanwhile, I began to learn the basic knowledge and related architecture of the recommendation system, laying a necessary foundation for the next step.

Recommendation system is a carrier that can exist in almost all products, and it can satisfy users with almost no delay based on users’ needs. Its representative meaning and efficiency, far exceed traditional model. There is no doubt that awesome recommendation systems are the future. But the difficulty is whether the recommendation system is doing a good enough job. At present, the recommendation algorithm and recommendation system do not meet people’s expectation. Because people’s needs are extremely difficult to guess.

I also thought of an article zhihu read before, which said that many Domestic Internet companies have operation positions, but there is no special set up this position in foreign countries. I still remember that the most prominent reason for the author’s analysis is that foreigners are more disciplined, and their life and diet are monotonous. For example, they order pizza when they are happy. But China is different, from the tens of thousands of dishes can be seen, people’s hobbies are extremely wide, difficult to tune. In addition, foreign labor is very expensive, so it is an alternative to use algorithms to fit users’ hobbies and needs, to automatically dig users’ needs, and to carry out further in-depth cultivation and recommendation. This is also the reason why the recommendation system is highly recommended abroad. However, in China, people are relatively cheap, and Chinese people have more and more sophisticated tastes, so the algorithm is not good, so many special operation positions will be set up. But slowly also began to realize that this will be a trend, with the recent AI hot, every big factory is in this area of continuous deep cultivation.

Back to the recommendation system, it can be seen from the objective reasons in reality that it is really difficult to fit the needs and hobbies of users. Sometimes users don’t even know what they want. As A Chinese, it is normal to have no independent opinions and ideas. Being too independent is against the standard answer. However, the meaning behind the recommendation system is: your product knows the interests of users, can meet the interests of users, then users will be inseparable from you. Users can not do without the product, will certainly occupy the market, there must be a high valuation and imagination space. This is also the fundamental reason why everyone is making recommendation systems, although it is silly to use and the effect is not satisfactory, they are still willing to invest heavily.

A few gibberish, after the preliminary study of the simple summary, I still have a lot of things and details need to continue to learn and research. The ability is limited, the article improper place also please correct ~

(PS: The copyright of some screenshots and text in this paper belongs to the original author, and all have been marked with the source address of quoted data. This paper is just for learning and summarizing. If there is infringement, please contact me to delete it.)

Question and answer

How does the recommendation system achieve accurate recommendation?

reading

Recommendation system knowledge base

Evaluate the effectiveness of the recommendation system quantitatively

Real-time asynchronous video recommendation system based on user portrait

Machine learning in action! Quick introduction to online advertising business and CTR knowledge

This article has been authorized by the author to Tencent Cloud + community, more original text pleaseClick on the

Search concern public number “cloud plus community”, the first time to obtain technical dry goods, after concern reply 1024 send you a technical course gift package!

Massive technical practice experience, all in the cloud plus community!