Resource recommendation method and device, and electronic device
Patent Information
- Application Number
- CN202410180088.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-18
- Publication Date
- 2026-11-03
- Estimated Expiration
- 2044-02-18
AI Technical Summary
Existing recall models cannot accurately reflect users' actual preferences, resulting in inaccurate resource recommendations that affect click-through rates, conversion rates, and user experience.
By acquiring user trajectory behavior data, resource groups are divided based on ranking models and business preferences. Preliminary and secondary rankings are then performed using preset rules to optimize resource recommendation results.
It improved the accuracy of resource recommendations, increased click-through rates and conversion rates, and enhanced the user experience.
Smart Images

Figure CN118051667B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to a resource recommendation method, apparatus, and electronic device. Background Technology
[0002] Recall models are a widely used technique in digital marketing, used to filter resources from a massive pool of candidates based on user behavior to identify those most likely to interest the user, thereby improving click-through rate (CTR) and conversion rate (CVR). Existing recall models often rely solely on user behavior patterns (such as browsing, clicking, and searching) to recall relevant resources. However, user behavior patterns are influenced by various factors, and these patterns may differ from the user's actual preferences. Therefore, resources recommended using existing recall models may not align with the user's actual preferences, leading to inaccurate recommendations and negatively impacting CTR, conversion rate, and user experience. Summary of the Invention
[0003] In view of this, the purpose of the present invention is to provide a resource recommendation method, apparatus and electronic device to improve the accuracy of resource recommendation, thereby helping to improve the click-through rate and conversion rate of resources and user experience.
[0004] In a first aspect, embodiments of the present invention provide a resource recommendation method, comprising: acquiring user trajectory behavior data for each resource within a preset time period, and acquiring a first sorting sequence for each type of resource based on all trajectory behavior data; wherein the resource type corresponding to the same first sorting sequence is the same, and each resource of the same type has a corresponding first sorting in its corresponding first sorting sequence; dividing at least one resource group from all resources based on all first sorting sequences, all trajectory behavior data, and preset business preference quantities for each type of resource; wherein each resource group includes each type of resource; performing a preliminary sorting on all resources in each resource group based on all trajectory behavior data and a pre-trained sorting model to obtain a second sorting sequence for each resource group; wherein each resource in each resource group has a corresponding second sorting in its corresponding second sorting sequence; performing a secondary sorting on all resources corresponding to each second sorting sequence based on preset rules and all first sorting sequences, and recommending resources to users based on all optimized sorting sequences obtained after the secondary sorting.
[0005] Secondly, embodiments of the present invention also provide a resource recommendation device, comprising: an acquisition module, configured to acquire trajectory behavior data of users for each resource within a preset time period, and acquire a first sorting sequence of each type of resource based on all trajectory behavior data; wherein the resource type corresponding to the same first sorting sequence is the same, and each resource of the same type has a corresponding first sorting in its corresponding first sorting sequence; a division module, configured to divide at least one resource group from all resources based on all first sorting sequences, all trajectory behavior data, and a preset business preference quantity for each type of resource; wherein each resource group includes each type of resource; a preliminary sorting module, configured to perform a preliminary sorting of all resources in each resource group based on all trajectory behavior data and a pre-trained sorting model to obtain a second sorting sequence for each resource group; wherein each resource in each resource group has a corresponding second sorting in its corresponding second sorting sequence; and a secondary sorting and recommendation module, configured to perform a secondary sorting of all resources corresponding to each second sorting sequence based on preset rules and all first sorting sequences, and recommend resources to users based on all optimized sorting sequences obtained after secondary sorting.
[0006] Thirdly, embodiments of the present invention also provide an electronic device, including a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the resource recommendation method described in the first aspect above.
[0007] This invention provides a resource recommendation method, apparatus, and electronic device. The method involves acquiring user trajectory behavior data for various resources within a preset time period, and obtaining a first ranking sequence for each type of resource based on all trajectory behavior data. Based on all the first ranking sequences, all trajectory behavior data, and pre-set business preference values for each type of resource, at least one resource group is divided from all resources. Based on all trajectory behavior data and a pre-trained ranking model, all resources in each resource group are initially ranked to obtain a second ranking sequence for each resource group. Based on preset rules and all the first ranking sequences, all resources corresponding to each second ranking sequence are then ranked a second time, and all optimized ranking sequences obtained after the second ranking are used to recommend resources to the user. Using this technique, single-type resource ranking results can be obtained using trajectory data, and a ranking model can be used to initially rank mixed-type resources by combining trajectory data and business preference values for single-type resources. Furthermore, preset rules are introduced to combine the single-type resource ranking results with the mixed-type resource ranking results for a second ranking of mixed-type resources. This ensures that the resource recommendation results obtained using the mixed-type resource ranking results are closer to the user's actual preferences, improving the accuracy of resource recommendations and thus helping to increase click-through rates, conversion rates, and user experience.
[0008] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained in accordance with the structures particularly pointed out in the description, claims and drawings.
[0009] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0010] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0011] Figure 1 This is a flowchart illustrating a resource recommendation method according to an embodiment of the present invention;
[0012] Figure 2 This is an example diagram of a resource recommendation method in an embodiment of the present invention;
[0013] Figure 3 This is a schematic diagram of the structure of a resource recommendation device according to an embodiment of the present invention;
[0014] Figure 4 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0015] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0016] Currently, existing recall models can only recall content based on users' trajectory behavior (such as browsing, clicking, searching, etc.) in order to recommend relevant resources to users. However, users' trajectory behavior is affected by a variety of factors, and there may be differences between users' trajectory behavior over a period of time and their actual preferences. Therefore, the resources recommended to users using the recalled content of existing recall models may not match users' actual preferences, resulting in inaccurate resource recommendations, which in turn has an adverse impact on the click-through rate, conversion rate, and user experience.
[0017] Based on this, the resource recommendation method, apparatus, and electronic device provided by this invention can improve the accuracy of resource recommendations, thereby helping to increase the click-through rate and conversion rate of resources and improve user experience.
[0018] To facilitate understanding of this embodiment, a resource recommendation method disclosed in this invention will first be described in detail, see [link to relevant documentation]. Figure 1 The diagram shown illustrates a resource recommendation method, which may include the following steps:
[0019] Step S102: Obtain the trajectory behavior data of users for each resource within a preset time period, and obtain the first sorting sequence of each type of resource based on all trajectory behavior data.
[0020] Among them, the resource types corresponding to the same first sorting sequence are the same, and each resource with the same resource type has a corresponding first sorting in its corresponding first sorting sequence.
[0021] The first sorting sequence can represent the sorting result of multiple resources of the same type; for example, the resource sorting in the first sorting sequence is Hotel A, Hotel B, Hotel C; another example is that the resource sorting in the first sorting sequence is Scenic Spot a, Scenic Spot b, Scenic Spot c.
[0022] The aforementioned trajectory behavior data may include operational data and / or other data (such as the user's latitude and longitude, city, and other location information) generated by the user's clicks, browsing, searches, order placements, etc. on the resource page within a certain period of time. There are no limitations on this. Table 1 illustrates the user's recent trajectory behavior information (i.e., trajectory behavior data generated by the user's recent trajectory behavior).
[0023] Table 1. Example of User Recent Trajectory Behavior Information
[0024]
[0025] Step S104: Based on all first sorted sequences and all trajectory behavior data, as well as the pre-set business preference quantities of each type of resource, at least one resource group is divided from all resources.
[0026] Each resource group includes various types of resources.
[0027] Business preference quantity refers to the number of resource types that a business entity prefers in different business scenarios. For example, tourism-related resources can be categorized into hotels, resorts, scenic spots, and UGC (User Generated Content). UGC refers to content uploaded, published, shared, and commented on by users (such as text content posted by users). The number of preferences for different resource types set by the business entity is as follows: Hotel business preference quantity = 2, Scenic spot business preference quantity = 1, UGC business preference quantity = 1, and Resort business preference quantity = 1.
[0028] After obtaining the user's trajectory behavior data for each resource within a preset time period and the first sorting sequence of each type of resource, for each type of resource, the specific resources to be included in the corresponding resource group can be determined by combining the user's trajectory behavior data for that type of resource and the sorting result of that type of resource represented by the first sorting sequence corresponding to that type of resource. In this way, the specific resources of each type to be included in each resource group can be obtained, thereby forming the corresponding resource group.
[0029] Step S106: Based on all trajectory behavior data and a pre-trained ranking model, perform a preliminary ranking of all resources in each resource group to obtain a second ranking sequence for each resource group.
[0030] Each resource in each resource group has a corresponding second sorting in its corresponding second sorting sequence.
[0031] The ranking model mentioned above can be a machine learning model, such as XGBoost, Wide&Deep, DeepFM, Transformer, etc. The specific model can be selected according to actual needs, and there are no restrictions on it.
[0032] The ranking model described above can also be used to rank items based on specific metrics, such as CTR and CVR, without limitation. For example, in a hotel recommendation scenario, the ranking model uses CTR, while in a vacation recommendation scenario, it uses CVR.
[0033] In this article, CTR refers to the number of users who actually clicked on the resource divided by the number of users who actually saw the resource.
[0034] In this article, CVR refers to the percentage of users who, after being attracted by a marketing strategy and going through a certain process (such as clicking, browsing, or saving), ultimately complete a desired action out of the total number of actions performed.
[0035] Step S108: Based on preset rules and all first sorting sequences, perform secondary sorting on all resources corresponding to each second sorting sequence, and recommend resources to the user based on all optimized sorting sequences obtained after secondary sorting.
[0036] The aforementioned preset rules may include interval constraint rules, quantity preservation rules, first position rules, etc., and can be customized according to actual needs. There are no restrictions on them.
[0037] The constraint rule for the interval position can be: the same type of resource cannot be repeated N times consecutively.
[0038] The quantity guarantee rule can refer to: taking M resources as a group, and guaranteeing that each type of resource has the required number of occurrences in the business.
[0039] The first-priority rule can refer to the requirement that a certain type of resource must be listed first in some business scenarios.
[0040] This invention provides a resource recommendation method that acquires user trajectory behavior data for various resources within a preset time period, and obtains a first ranking sequence for each type of resource based on all trajectory behavior data. Based on all the first ranking sequences, all trajectory behavior data, and pre-set business preference quantities for each type of resource, at least one resource group is divided from all resources. Based on all trajectory behavior data and a pre-trained ranking model, all resources in each resource group are initially ranked to obtain a second ranking sequence for each resource group. Based on preset rules and all the first ranking sequences, all resources corresponding to each second ranking sequence are then ranked a second time, and all optimized ranking sequences obtained after the second ranking are used to recommend resources to the user. Using this technique, single-type resource ranking results can be obtained using trajectory data, and a ranking model can be used to initially rank mixed-type resources by combining trajectory data and business preference quantities for single-type resources. Furthermore, preset rules are introduced to combine the single-type resource ranking results with the mixed-type resource ranking results for a second ranking of mixed-type resources. This ensures that the resource recommendation results obtained using the mixed-type resource ranking results are closer to the user's actual preferences, improving the accuracy of resource recommendations and thus helping to increase click-through rates, conversion rates, and user experience.
[0041] As one possible implementation, step S104 (i.e., dividing at least one resource group from all resources based on all first sorting sequences, all trajectory behavior data, and pre-set service preference quantities for each type of resource) may include:
[0042] Step 1: Based on all trajectory behavior data and the business preference volume of each type of resource, determine the overall preference volume of each type of resource.
[0043] In each of the second resource sets, all resources are of the same type.
[0044] For example, step 1 above can be performed as follows:
[0045] (1) Based on all trajectory behavior data, determine the trajectory preference amount of each type of resource.
[0046] The trajectory behavior volume of each type of resource can be statistically analyzed from all trajectory behavior data, and the trajectory behavior volume of each type of resource can be adjusted using the preset adjustment parameters of each type of resource to obtain the trajectory preference volume of each type of resource.
[0047] Trajectory behavior volume refers to the number of trajectory behaviors a user performs on various types of resources within a certain period of time, such as browsing, clicking, subscribing, saving, and placing orders. For example, if a user browses 10 hotels and 1 UGC on WeChat mini programs in the past 7 days, then the trajectory behavior counts for hotels and UGC are determined to be 10 and 1 respectively, indicating that the user's resource preference may be more inclined towards hotel products.
[0048] Considering the inconsistent number of times users browse different types of resources (e.g., users have more entry points to browse hotels in the application), business users can set corresponding scaling parameter values for each type of resource. This allows them to scale the number of trajectory behaviors for each type of resource according to the corresponding scaling parameter values, thus obtaining the number of trajectory preferences for each type of resource. For example, setting the scaling parameter values for hotels, UGC, vacations, and scenic spots to 5, 2, 1, and 1 respectively, the number of hotel trajectory preferences = number of hotel views / / 5, the number of UGC trajectory preferences = number of UGC views / / 2, the number of vacation trajectory preferences = number of vacation views, and the number of scenic spot trajectory preferences = number of scenic spot views.
[0049] (2) Determine the overall preference amount of each type of resource based on the trajectory preference amount and business preference amount of each type of resource.
[0050] For each type of resource, the total number of preferences for that type of resource can be determined by combining the number of trajectory preferences and the number of business preferences. For example, for a single type of resource, the total number of preferences = the number of trajectory preferences + the number of business preferences.
[0051] Step 2: Based on all first sorted sequences and all overall preference values, divide at least one resource group from all resources.
[0052] Continuing the previous example, given the overall preference value for each type of resource, since each specific resource has a corresponding first ranking in its first ranking sequence, specific resources with corresponding overall preference values can be selected sequentially according to the ascending order of the first ranking for each type of resource as the specific resources to form the corresponding resource group. This allows all selected specific resources of each type to form a corresponding resource group, with the number of resources in each group equal to the sum of the overall preference values of all types of resources. For example, if the overall preference values for hotels, resorts, scenic spots, and UGC are N1, N2, N3, and N4 respectively, then the number of resources in a resource group is N = N1 + N2 + N3 + N4. Given the first ranking sequences corresponding to hotels, resorts, scenic spots, and UGC, N1 hotels, N2 resorts, N3 scenic spots, and N4 UGC items can be extracted sequentially from hotels, resorts, scenic spots, and UGC according to the first ranking to form a resource group.
[0053] As one possible implementation, the above resource recommendation method may further include:
[0054] Step A: Obtain the attributes of each type of resource and set the corresponding feature dimensions for each attribute.
[0055] Step B: Construct the feature vector corresponding to each resource in each resource group according to the feature dimension.
[0056] In this design, the number of elements in each feature vector is the same as the number of feature dimensions.
[0057] Because different types of resources have different attributes, for example, hotels have attributes such as price, star rating, and rating; UGC is mainly text description, including attributes such as title and body text; scenic spots have attributes such as scenic spot tickets and scenic spot star rating; vacations have attributes such as travel time, number of travel days, and number of travelers.
[0058] To standardize feature dimensions (since the input to the ranking model is a vector, the lengths of different vectors need to be consistent), a corresponding feature dimension can be defined for each attribute. For example, price, attraction tickets, and number of travel days can all have corresponding feature dimensions defined. This allows the feature values of each resource in each resource group to be determined according to the feature dimensions, and then the features of each resource in each resource group across all feature dimensions are concatenated to form a corresponding feature vector. For the feature vector corresponding to each resource in each resource group, features of types other than those corresponding to that resource have values of 0, while only features of the type corresponding to that resource have non-zero values. Taking resource types including hotels, scenic spots, resorts and UGC as examples, the features contained in the hotel resource feature vector are: [hotel features] + [0] * resort feature length + [0] * scenic spot feature length + [0] * UGC feature length; the features contained in the resort resource feature vector are: [0] * hotel feature length + [resort features] + [0] * scenic spot feature length + [0] * UGC feature length; the features contained in the scenic spot resource feature vector are: [0] * hotel feature length + [0] * resort feature length + [scenic spot features] + [0] * UGC feature length; the features contained in the UGC resource feature vector are: [0] * hotel feature length + [0] * resort feature length + [0] * scenic spot feature length + [UGC features].
[0059] For example, step B above can be performed as follows: for each resource in each resource group, each attribute of the resource is quantified, and a feature vector corresponding to the resource is constructed based on the quantified attribute values of the resource.
[0060] When constructing feature vectors, different attributes have their own corresponding data types. For example, attributes such as hotel prices, scenic spot tickets, and number of vacationers are numerical, while attributes such as scenic spot type, vacation type, and hotel type are categorical, and attributes such as scenic spot descriptions, UGC titles, and UGC text are text. Therefore, it is necessary to unify the data types of different attributes into a machine-understandable numerical type to obtain the machine-understandable numerical features corresponding to each attribute (i.e., feature-enhancing different attributes into a unified numerical feature). Table 2 illustrates the feature-enhancing methods for different data types.
[0061] Table 2. Examples of featureization methods for different data types.
[0062] Data types Characterization methods Sample Numerical Keep original value Hotel prices, attraction tickets, number of vacationers, etc. Category LabelEncoder Scenic spot type, resort type, hotel type, etc. Text type WordEmbedding Scenic area introduction, UGC title, UGC text, etc.
[0063] LabelEncoder refers to a data preprocessing technique primarily used to encode labels or categorical variables into numerical variables for use in machine learning algorithms. For example, if there is a color label column containing three unique values: red, green, and blue, then LabelEncoder maps that color label column to three integer values: 0, 1, and 2.
[0064] Word embedding refers to a technique that encodes words or phrases in text data into vectors in a low-dimensional real vector space. Word vectors with similar semantics are more closely related in the word embedding space. For example, word embedding can convert text data into m3e vectors, which are vector representations trained using multimodal deep learning.
[0065] Based on steps A and B above, step S106 above, which involves performing a preliminary ranking of all resources in each resource group based on all trajectory behavior data and a pre-trained ranking model, may include: inputting each obtained feature vector into the ranking model, so that the ranking model can predict the score of the resource corresponding to each feature vector based on the trajectory behavior data of the resources corresponding to all feature vectors, and ranking all resources in each resource group according to the score through the ranking model.
[0066] For example, the trajectory behavior data of each resource may include the number of times the corresponding resource is clicked by the user within a preset time period, and the above score may include the probability value of the corresponding resource being clicked by the user. Based on this, after inputting each feature vector into the ranking model, the following operations can be performed through the ranking model: for each feature vector, predict the probability value of the resource corresponding to the feature vector being clicked by the user based on the number of times the resource corresponding to the feature vector is clicked by the user within a preset time period; and sort all resources in each resource group in descending order of probability value.
[0067] For example, the sorting model uses the XGBoost model, and its sorting mode uses ListWise.
[0068] ListWise refers to an evaluation metric and ranking method used in machine learning for ranking and recommendation systems. For example, ListWise can be used to process a suggested list of items to determine which items are most suitable for recommendation to the user. ListWise uses a global optimization algorithm to optimize the order of many different items, so that more relevant items are recommended at the top of the list.
[0069] Furthermore, the sorting mode of the sorting model can also be changed to pairwise or pointwise, without any limitation.
[0070] The ranking model consists of two steps: offline training and online prediction.
[0071] 1) Offline training.
[0072] The offline training method involves constructing training and testing sets for the ranking model based on a large number of users' historical click resources. The ranking model is trained and its parameters are adjusted using the training set, and its performance is tested using the testing set. Specifically, within a set of candidate resources (i.e., a resource group), resources clicked by the user are assigned a score of 1, while resources not clicked by the user are assigned a score of 0.
[0073] Offline evaluation of the ranking model (i.e., evaluating the performance of the trained ranking model on the test set) uses the accuracy of determining whether a clicked resource is ranked first in its group. For example, when constructing the test set, it is also necessary to randomly sample exposure and click events of multiple different types of specific resources from the online application logs. If the online application displays 10 different types of resources, and the user clicks the third resource, then in this case, the ranking model should predict that the third resource has the highest probability of being clicked and rank the third resource first.
[0074] 2) Online prediction.
[0075] When using the ranking model for prediction online, the feature vector corresponding to each resource in each resource group is input into the ranking model that has been trained offline. The ranking model outputs the score corresponding to each resource (e.g., the probability value of each resource being clicked by the user). Based on the score, all resources in each resource group are ranked to obtain the preliminary ranking result of all resources contained in each resource group.
[0076] As one possible implementation, step S108 above, which involves performing a secondary sorting of all resources corresponding to each second sorting sequence based on preset rules and all first sorting sequences, may include:
[0077] Step a: Count the number of consecutive occurrences of the same type of resource corresponding to each second sorting sequence, so as to filter out the candidate resources whose consecutive occurrences exceed a preset number, and reduce the probability value of each candidate resource type according to the number of consecutive occurrences.
[0078] Step b: Sort all resources corresponding to each second sorting sequence according to the ascending order of the first sort and the decreasing probability value after decay.
[0079] To optimize the initial sorting of all resources in each resource group, the constraints of interval positions and the order preservation principle can be introduced to re-sort each resource group that has already undergone the initial sorting.
[0080] When introducing the constraint principle of interval positions, to ensure that resources of the same type do not appear consecutively to avoid users browsing too much of a single type of resource, the adjustable sorting model outputs a score for each resource in each resource group. For resource types that appear consecutively more than a preset number of times, the score is penalized (i.e., the score is multiplied by a small multiplier less than 1), and the multiplier decreases with each consecutive occurrence (the multiplier decays as the number of consecutive occurrences increases). For example, the score of each specific resource corresponding to a resource type that appears 3 times consecutively is multiplied by 1 / 2, the score of each specific resource corresponding to a resource type that appears 4 times consecutively is multiplied by 1 / 4, and so on. The score of each specific resource corresponding to a resource type that appears more than 3 times consecutively is penalized according to the number of consecutive occurrences. Since it is sorted within a resource group, the more consecutive occurrences a resource has, the lower it is ranked within the group, until the resource type with the most consecutive occurrences is ranked at the bottom of the group.
[0081] When introducing the order preservation principle, since each type of specific resource in each resource group has its own first order in the first sorting sequence, the business can restrict that the relative ordering position of all resources in each resource group cannot be modified during re-sorting. For example, for a resource group after preliminary sorting, the order of each resource type corresponding to each resource in the resource group (i.e., the first order) is obtained, and resources of the same type are filled into the resource group according to the first order preservation principle to ensure that the relative ordering relationship of resources of the same type in the corresponding single resource type remains unchanged.
[0082] To facilitate understanding, the operation of the above resource recommendation method is described below using hotels, resorts, scenic spots, and UGC as specific application examples.
[0083] See Figure 2 As shown, the above resource recommendation method can be performed as follows:
[0084] Step 1: Call the single-type resource recommendation service to obtain the original ranking results corresponding to each type of resource.
[0085] The single-type resource recommendation service uses the existing recall model to recall and rank resources of a single type, obtaining the original rankings of hotels, resorts, scenic spots, and UGC.
[0086] Step two, group recall.
[0087] By combining user trajectory data, the number of trajectory preferences for hotels, resorts, scenic spots, and UGC is obtained, and the corresponding number of business preferences is set for each of these categories. Then, the number of trajectory preferences and the number of business preferences for each category are added together to obtain the overall number of preferences for each category. Next, hotels, resorts, scenic spots, and UGC are grouped according to their respective overall number of preferences, resulting in groups for each category. The number of hotel groups, resort groups, scenic spot groups, and UGC groups are N1, N2, N3, and N4, respectively. The total number of resources in a mixed resource type group is defined as N = N1 + N2 + N3 + N4. Based on the total number of resources in a group, resources corresponding to the number of groups for each single type of resource are extracted from the original sorting of the single type of resource to form a group containing mixed resource types.
[0088] Step 3: Sort mixed resources.
[0089] Although the modeling objectives for different single-type resource recommendation services may differ, the modeling for mixed resource ranking is based on user click-through rate. Within the mixed ranking group (i.e., the group containing mixed resource types formed in step two), feature vectors are constructed and input into the LTR (Learning to Rank) model. The LTR model predicts the probability of different single-type resources being clicked within the group using the ListWise ranking mode, and the mixed resources within the mixed ranking group are ranked according to the probability values.
[0090] Step 4: Rearrange mixed resources.
[0091] The mixed resources within the mixed ranking group are rearranged through business strategy intervention. Specific operations may include: adjusting the LTR model score of each individual resource type; penalizing the LTR model score of resources corresponding to resource types that appear three or more times consecutively based on the number of consecutive occurrences; the more consecutive occurrences, the lower the ranking in the mixed ranking group, until the resource type with the most consecutive occurrences is ranked at the bottom of the mixed ranking group. This score adjustment method can avoid excessive consecutive recommendations of the same type of resources; obtaining the original ranking corresponding to each resource in the mixed ranking group, and filling the mixed ranking group with resources of the same resource type in the original ranking order.
[0092] To verify the effectiveness of the above resource recommendation method, an A / B experiment can be used to compare the above resource recommendation method with existing resource recommendation methods. The A / B experimental groups can be divided to statistically analyze the click-through rates of resources using the above resource recommendation method and the existing resource recommendation method within the same time period.
[0093] The existing resource recommendation method used in the A / B test can be as follows: based on rules defined by the business side, resources of different types are recommended sequentially in a certain proportion. For example, three hotels are displayed first, followed by two UGC items, then one resort, then one scenic spot, and so on, in a 3:2:1:1 ratio. After A / B testing, it was found that this resource recommendation method improves click-through rates compared to existing methods. Therefore, this resource recommendation method is particularly suitable for application scenarios such as WeChat mini-programs and app itinerary pages for tourism products.
[0094] The aforementioned resource recommendation method unifies the ranking modeling objective of different resource types to user click-through rate. It also unifies the feature dimensions of different resource types to combine the features of a resource corresponding to different resource types into a whole feature. Based on the original order returned by the single-type resource recommendation service, it combines trajectory preferences and business preferences to achieve mixed resource type grouping and mixed ranking. Furthermore, it achieves the rearrangement of mixed resource types through business strategy intervention. Moreover, the business strategy can be flexibly expanded according to the actual situation, which can ensure that the resource recommendations made using the rearrangement results are closer to the actual user preferences, thereby helping to improve the click-through rate, conversion rate, and user experience of resources.
[0095] Based on the above resource recommendation method, this invention also provides a resource recommendation device, see [link to device]. Figure 3 As shown, the device may include the following modules:
[0096] The acquisition module 302 is used to acquire the trajectory behavior data of users for each resource within a preset time period, and to acquire the first sorting sequence of each type of resource based on all trajectory behavior data; wherein, the resource type corresponding to the same first sorting sequence is the same, and each resource of the same type has a corresponding first sorting in its corresponding first sorting sequence.
[0097] The partitioning module 304 is used to partition at least one resource group from all resources based on all first sorted sequences, all trajectory behavior data and pre-set business preference quantities of each type of resource; wherein each resource group includes each type of resource.
[0098] The preliminary sorting module 306 is used to perform a preliminary sorting of all resources in each resource group based on all trajectory behavior data and a pre-trained sorting model to obtain a second sorting sequence for each resource group; wherein each resource in each resource group has a corresponding second sorting in its corresponding second sorting sequence.
[0099] The secondary sorting and recommendation module 308 is used to perform secondary sorting on all resources corresponding to each second sorting sequence based on preset rules and all first sorting sequences, and recommend resources to users based on all optimized sorting sequences obtained after secondary sorting.
[0100] This invention provides a resource recommendation device that can obtain single-type resource ranking results using trajectory data, and perform preliminary ranking of mixed-type resources using a ranking model by combining trajectory data and business preference data of single-type resources. Then, it introduces preset rules to perform secondary ranking of mixed-type resources in combination with the single-type resource ranking results, so as to ensure that the resource recommendation results obtained by using the mixed-type resource ranking results are closer to the actual user preferences, thereby improving the accuracy of resource recommendations and thus helping to improve the click-through rate, conversion rate and user experience of resources.
[0101] The aforementioned partitioning module 304 can also be used to: determine the overall preference of each type of resource based on all trajectory behavior data and the business preference of each type of resource; and partition at least one resource group from all resources based on all first sorting sequences and all overall preference.
[0102] The aforementioned segmentation module 304 can also be used to: determine the trajectory preference amount of each type of resource based on all trajectory behavior data; and determine the overall preference amount of each type of resource based on the trajectory preference amount and business preference amount of each type of resource.
[0103] The aforementioned segmentation module 304 can also be used to: statistically analyze the trajectory behavior quantity of each type of resource from all trajectory behavior data, and adjust the trajectory behavior quantity of each type of resource using the preset adjustment parameters of each type of resource to obtain the trajectory preference quantity of each type of resource.
[0104] See Figure 3 As shown, the device may further include:
[0105] The construction module 310 is used to: obtain the attributes of each type of resource and set the corresponding feature dimension for each attribute; construct the feature vector corresponding to each resource in each resource group according to the feature dimension; wherein the number of elements in each feature vector is consistent with the number of feature dimensions.
[0106] The aforementioned preliminary sorting module 306 can also be used to: input each obtained feature vector into the sorting model, so as to predict the score of each resource corresponding to each feature vector based on the trajectory behavior data of all resources corresponding to the feature vectors through the sorting model, and sort all resources in each resource group according to the score through the sorting model.
[0107] The aforementioned construction module 310 can also be used to: for each resource in each resource group, to quantify each attribute of the resource, and to construct the feature vector corresponding to the resource based on the quantified attribute values of the resource.
[0108] The trajectory behavior data of each resource may include the number of times the corresponding resource is clicked by the user within a preset time period; the above score may include the probability value of the corresponding resource being clicked by the user; based on this, the above preliminary sorting module 306 may also be used to perform the following operations through the sorting model: for each feature vector, predict the probability value of the resource corresponding to the feature vector being clicked by the user based on the number of times the resource corresponding to the feature vector is clicked by the user within a preset time period; sort all resources in each resource group in descending order of probability value.
[0109] The aforementioned secondary sorting and recommendation module 308 can also be used to: count the number of consecutive occurrences of the same type of resource corresponding to each second sorting sequence, so as to filter out candidate resources whose consecutive occurrences exceed a preset number, and attenuate the probability value of each candidate resource type according to the number of consecutive occurrences; and sort all resources corresponding to each second sorting sequence according to the ascending order of the first sorting and the probability value after attenuation from large to small.
[0110] The resource recommendation device provided in this embodiment of the invention has the same implementation principle and technical effect as the aforementioned resource recommendation method embodiment. For the sake of brevity, any parts not mentioned in the device embodiment can be referred to the corresponding content in the aforementioned method embodiment.
[0111] This invention also provides an electronic device, such as... Figure 4 The diagram shows the structure of the electronic device, which includes a processor 41 and a memory 40. The memory 40 stores computer-executable instructions that can be executed by the processor 41. The processor 41 executes the computer-executable instructions to implement the resource recommendation method described above.
[0112] exist Figure 4 In the illustrated embodiment, the electronic device further includes a bus 42 and a communication interface 43, wherein the processor 41, the communication interface 43, and the memory 40 are connected via the bus 42.
[0113] The memory 40 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 43 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc. The bus 42 may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The bus 42 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0114] Processor 41 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 41 or by software instructions. Processor 41 can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this invention can be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in the memory. The processor 41 reads the information in the memory and, in conjunction with its hardware, completes the steps of the resource recommendation method of the aforementioned embodiment.
[0115] Unless otherwise specifically stated, the relative steps, numerical expressions, and values of the components and steps described in these embodiments do not limit the scope of the invention.
[0116] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0117] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0118] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A resource recommendation method, characterized in that, include: The system acquires user trajectory behavior data for each resource within a preset time period, and obtains a first sorting sequence for each type of resource based on all trajectory behavior data; wherein, the resource type corresponding to the same first sorting sequence is the same, and each resource of the same type has a corresponding first sorting in its corresponding first sorting sequence; Based on all first sorted sequences and all trajectory behavior data, as well as the pre-set business preference quantities of each type of resource, at least one resource group is divided from all resources; wherein, each resource group includes each type of resource; Based on all trajectory behavior data and a pre-trained ranking model, all resources in each resource group are initially ranked to obtain a second ranking sequence for each resource group; wherein each resource in each resource group has a corresponding second ranking in its corresponding second ranking sequence. Based on preset rules and all first sorting sequences, all resources corresponding to each second sorting sequence are sorted a second time, and resources are recommended to users based on all optimized sorting sequences obtained after the second sorting. Specifically, based on all first sorted sequences and all trajectory behavior data, as well as pre-set business preference quantities for each type of resource, at least one resource group is divided from all resources, including: The trajectory behavior volume of each type of resource is statistically analyzed from all trajectory behavior data, and the trajectory behavior volume of each type of resource is adjusted using the preset adjustment parameters of each type of resource to obtain the trajectory preference volume of each type of resource. Based on the trajectory preference and business preference of each type of resource, the overall preference of each type of resource is determined. Based on all first sorted sequences and all overall preference values, at least one resource group is divided from all resources.
2. The method according to claim 1, characterized in that, The method further includes: Obtain the attributes of each type of resource and set the corresponding feature dimensions for each attribute; Construct a feature vector for each resource in each resource group according to the feature dimensions; wherein the number of elements in each feature vector is the same as the number of feature dimensions. Based on all trajectory behavior data and a pre-trained ranking model, a preliminary ranking of all resources in each resource group is performed, including: Each obtained feature vector is input into the ranking model, so that the ranking model predicts the score of the resource corresponding to each feature vector based on the trajectory behavior data of the resources corresponding to all feature vectors, and the ranking model sorts all resources in each resource group according to the score.
3. The method according to claim 2, characterized in that, Construct a feature vector for each resource in each resource group according to the feature dimensions, including: For each resource in each resource group, each attribute of the resource is quantified, and a feature vector corresponding to the resource is constructed based on the quantified attribute values.
4. The method according to claim 2, characterized in that, The trajectory behavior data for each resource includes the number of times the corresponding resource was clicked by the user within a preset time period; the score includes the probability value of the corresponding resource being clicked by the user. Based on the trajectory behavior data of all resource corresponding to all feature vectors, the score of the resource corresponding to each feature vector is predicted, including: For each feature vector, the probability value of the resource corresponding to the feature vector being clicked by the user is predicted based on the number of times the resource corresponding to the feature vector is clicked by the user within a preset time period; Sort all resources in each resource group according to their scores, including: Sort all resources in each resource group in descending order of probability value.
5. The method according to claim 4, characterized in that, Based on preset rules and all first sorting sequences, a secondary sort is performed on all resources corresponding to each second sorting sequence, including: The number of consecutive occurrences of the same type of resource corresponding to each second sorting sequence is counted to filter out candidate resources whose consecutive occurrences exceed a preset number, and the probability value of each candidate resource is decayed according to the number of consecutive occurrences. Sort all resources corresponding to each second sorting sequence according to the ascending order of the first sort and the decreasing probability value after decay.
6. A resource recommendation device, characterized in that, include: The acquisition module is used to acquire user trajectory behavior data for each resource within a preset time period, and to acquire a first sorting sequence for each type of resource based on all trajectory behavior data; wherein, the resource type corresponding to the same first sorting sequence is the same, and each resource of the same type has a corresponding first sorting in its corresponding first sorting sequence; The partitioning module is used to partition at least one resource group from all resources based on all first sorted sequences, all trajectory behavior data, and pre-set business preference quantities for each type of resource; wherein each resource group includes each type of resource; The preliminary sorting module is used to perform a preliminary sorting of all resources in each resource group based on all trajectory behavior data and a pre-trained sorting model, to obtain a second sorting sequence for each resource group; wherein each resource in each resource group has a corresponding second sorting in its corresponding second sorting sequence. The secondary sorting and recommendation module is used to perform secondary sorting on all resources corresponding to each secondary sorting sequence based on preset rules and all first sorting sequences, and recommend resources to users based on all optimized sorting sequences obtained after secondary sorting. The partitioning module is also used for: The trajectory behavior volume of each type of resource is statistically analyzed from all trajectory behavior data, and the trajectory behavior volume of each type of resource is adjusted using the preset adjustment parameters of each type of resource to obtain the trajectory preference volume of each type of resource. Based on the trajectory preference and business preference of each type of resource, the overall preference of each type of resource is determined. Based on all first sorted sequences and all overall preference values, at least one resource group is divided from all resources.
7. An electronic device, characterized in that, The method includes a processor and a memory, the memory storing computer-executable instructions executable by the processor, the processor executing the computer-executable instructions to implement the method of any one of claims 1 to 5.
Citation Information
Patent Citations
Media asset recommendation method, system and platform suitable for hotel service and storage medium
CN116932791A
Rough ranking method and device applied to recommendation system
CN117033453A
