Resource recommendation and resource allocation model training method and device, equipment and medium
Generating resource allocation ratios through deep learning technology solves the problem that existing resource recommendation systems are difficult to provide personalized and efficient resource recommendations, achieves more accurate and efficient resource recommendations, and improves user experience.
Patent Information
- Application Number
- CN202411304268.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-18
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2044-09-18
AI Technical Summary
When existing resource recommendation systems deal with complex and changeable user needs and resource characteristics, they are difficult to provide personalized and efficient resource recommendations, and they cannot effectively distinguish low-quality resources, resulting in waste of resources and degraded user experience.
By obtaining the object characteristics, resource characteristic sequence and record characteristic sequence of the target object, deep learning technology is used to generate resource allocation proportions of multiple resource types, thereby determining the resource recommendation list and recommending personalized resources to the target object.
It improves the rationality and accuracy of the proportion of resource distribution, meets the needs of the personalized resource preferences of the target object, and enhances the accuracy and user experience of resource recommendation.
Smart Images

Figure CN119336985A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of AI (Artificial Intelligence), specifically to technical fields such as NLP (Natural Language Processing), deep learning, big data, and especially to training methods, devices, equipment and media for resource recommendation and resource allocation models. Background Art
[0002] With the rapid development of information technology and the explosive growth of Internet data, people have gradually moved from an era of information scarcity to an era of information overload. Against this background, resource recommendation systems have emerged. They aim to intelligently analyze user behaviors and interests, recommend personalized resources that meet users' personal preferences, and thus effectively alleviate the problem of information overload and improve users' experience in resource recommendation scenarios. Summary of the invention
[0003] The present disclosure provides a method, apparatus, device and medium for training a resource recommendation and resource allocation model.
[0004] According to a first aspect of the present disclosure, a resource recommendation method is provided, comprising:
[0005] Obtaining object features and a resource feature sequence of a target object; wherein the resource feature sequence includes resource features of candidate resources of multiple resource types in a candidate resource set;
[0006] Acquire a record feature sequence; wherein the record feature sequence includes the record features of at least one resource interaction record of the target object within a set time period;
[0007] Generate resource allocation ratios of the multiple resource types according to the object characteristics, the resource characteristic sequence and the record characteristic sequence;
[0008] According to the resource allocation proportions of the multiple resource types, a resource recommendation list is determined from the candidate resource set to recommend the resource recommendation list to the target object.
[0009] According to a second aspect of the present disclosure, a method for training a resource allocation model is provided, comprising:
[0010] Acquire a first sample; wherein the first sample includes a first object feature of a first sample object, a first resource feature sequence, and a first record feature sequence; the first resource feature sequence includes resource features of candidate resources of multiple resource types in a candidate resource set; the first record feature sequence includes record features of at least one resource interaction record of the first sample object within a first sample period;
[0011] Using the generator of the resource allocation model to generate resource allocation proportions of the multiple resource types according to the first sample;
[0012] Determining a resource recommendation list from the candidate resource set according to resource allocation proportions of the multiple resource types;
[0013] Using the discriminator of the resource allocation model to predict, based on the resource recommendation list, a first satisfaction level of the first sample object with respect to the resource allocation mode of the resource recommendation list;
[0014] The resource allocation model is trained based on the first satisfaction level.
[0015] According to a third aspect of the present disclosure, a resource recommendation device is provided, comprising:
[0016] A first acquisition module is used to acquire object features and a resource feature sequence of a target object; wherein the resource feature sequence includes resource features of candidate resources of multiple resource types in a candidate resource set;
[0017] A second acquisition module is used to acquire a record feature sequence; wherein the record feature sequence includes the record features of at least one resource interaction record of the target object within a set time period;
[0018] A generating module, configured to generate resource allocation ratios of the plurality of resource types according to the object characteristics, the resource characteristic sequence and the record characteristic sequence;
[0019] A determination module is used to determine a resource recommendation list from the candidate resource set according to the resource allocation proportions of the multiple resource types, so as to recommend the resource recommendation list to the target object.
[0020] According to a fourth aspect of the present disclosure, a training device for a resource allocation model is provided, comprising:
[0021] A first acquisition module is used to acquire a first sample; wherein the first sample includes a first object feature of a first sample object, a first resource feature sequence, and a first record feature sequence; the first resource feature sequence includes resource features of candidate resources of multiple resource types in a candidate resource set; the first record feature sequence includes record features of at least one resource interaction record of the first sample object within a first sample period;
[0022] A generating module, configured to generate resource allocation ratios of the plurality of resource types according to the first sample by using the generator of the resource allocation model;
[0023] A determination module, configured to determine a resource recommendation list from the candidate resource set according to resource allocation proportions of the multiple resource types;
[0024] A first prediction module, configured to use the discriminator of the resource allocation model to predict a first satisfaction of the first sample object with respect to a resource allocation method of the resource recommendation list according to the resource recommendation list;
[0025] The first training module is used to train the resource allocation model based on the first satisfaction level.
[0026] According to a fifth aspect of the present disclosure, there is provided an electronic device, including:
[0027] at least one processor; and
[0028] a memory communicatively connected to the at least one processor; wherein,
[0029] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the resource recommendation method proposed in the first aspect of the present disclosure, or execute the resource allocation model training method proposed in the second aspect of the present disclosure.
[0030] According to the sixth aspect of the present disclosure, a non-transitory computer-readable storage medium of computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the resource recommendation method proposed in the first aspect of the present disclosure, or to execute the resource allocation model training method proposed in the second aspect of the present disclosure.
[0031] According to the seventh aspect of the present disclosure, a computer program product is provided, including a computer program, which, when executed by a processor, implements the resource recommendation method proposed in the first aspect of the present disclosure, or, when executed, implements the resource allocation model training method proposed in the second aspect of the present disclosure.
[0032] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0034] Figure 1 A schematic diagram of a process flow of a resource recommendation method provided in Embodiment 1 of the present disclosure;
[0035] Figure 2A flowchart of a resource recommendation method provided in Embodiment 2 of the present disclosure;
[0036] Figure 3 A schematic diagram of a flow chart of a resource recommendation method provided in Embodiment 3 of the present disclosure;
[0037] Figure 4 A flowchart of a resource recommendation method provided in Embodiment 4 of the present disclosure;
[0038] Figure 5 A flowchart of a method for training a resource allocation model provided in Embodiment 5 of the present disclosure;
[0039] Figure 6 A flowchart of a method for training a resource allocation model provided in Embodiment 6 of the present disclosure;
[0040] Figure 7 A flowchart of a method for training a resource allocation model provided in Embodiment 7 of the present disclosure;
[0041] Figure 8 A flowchart of a method for training a resource allocation model provided in Embodiment 8 of the present disclosure;
[0042] Fig. 9 A schematic diagram of the implementation principle of the resource preference estimation algorithm provided in the embodiment of the present disclosure;
[0043] Fig.10 This is a schematic diagram of the structure of a resource recommendation device provided in Embodiment 9 of the present disclosure;
[0044] Fig.11 A schematic diagram of the structure of a training device for a resource allocation model provided in Embodiment 10 of the present disclosure;
[0045] Fig.12 A schematic block diagram of an example electronic device that can be used to implement embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0046] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0047] At present, resource recommendation systems recommend resources to users based on simple user behavior statistics or rule-based matching strategies. In other words, resource preference estimation methods often rely on simple user behavior statistics or rule-based matching strategies. These methods are unable to cope with complex and changing user needs and resource characteristics. For example, user resource preferences are not static, but are affected by many factors, including personal characteristics, historical behavior, and real-time context. At the same time, the diversity and dynamics of resources also require resource recommendation systems to be able to capture and respond to these changes in real time.
[0048] Existing resource preference modeling methods have begun to try to use user characteristics and resource consumption characteristics as feature inputs of neural network models, in order to use the powerful feature extraction and pattern recognition capabilities of deep learning to achieve accurate estimation of user preferences. Although this resource preference modeling method can estimate user resource preferences to a certain extent, it still has many shortcomings, which seriously restricts the recommendation effect and user experience of the resource recommendation system.
[0049] First, existing resource preference modeling methods mainly focus on estimating user resource preferences, but ignore the quality differences of resources in the candidate resource set. In practical applications, the candidate resource set may contain a large number of low-quality resources, and existing methods often cannot effectively distinguish low-quality resources, resulting in these low-quality resources also being allocated the same amount of resource quotas, thereby wasting precious recommendation resources and reducing recommendation efficiency.
[0050] Secondly, there is a deviation between the target estimation of existing resource preference modeling methods and actual application needs. The model usually predicts the proportion of various resources in the display stage. However, in the actual operation of the resource recommendation system, the more critical issue is how to reasonably allocate resources in the funnel links such as coarse sorting and fine sorting to optimize user experience and conversion efficiency. This inconsistent goal makes it difficult to directly apply the model's prediction results to actual business scenarios.
[0051] In addition, the feature dimensions of existing resource preference modeling methods are relatively limited and cannot fully capture the complex factors that affect user preferences. In the digital age, user behavior and preferences are affected by many factors, including personal characteristics, historical behavior, and real-time context. Existing methods often only consider some of these factors, resulting in limited prediction accuracy of the model.
[0052] Finally, as one of the core technologies of existing resource preference modeling methods, the multi-layer fully connected neural network has insufficient feature extraction capabilities. Although NN (Neural Network) has strong advantages in feature extraction and pattern recognition, its extraction capabilities still need to be improved when faced with complex and changeable user data and resource data. This limits the model's ability to mine potential information from the data, which in turn affects the overall performance of the resource recommendation system.
[0053] Therefore, in order to address at least one of the above problems, the present disclosure proposes a method, device, equipment and medium for training a resource recommendation and resource allocation model.
[0054] The following describes the resource recommendation and resource allocation model training method, apparatus, device and medium of the embodiments of the present disclosure with reference to the accompanying drawings.
[0055] Figure 1 This is a flowchart of the resource recommendation method provided in the first embodiment of the present disclosure.
[0056] The embodiment of the present disclosure is illustrated by taking the resource recommendation method configured in a resource recommendation device as an example. The resource recommendation device can be applied to any electronic device so that the electronic device can perform a resource recommendation function.
[0057] Among them, the electronic device can be any device with computing capabilities, such as a personal computer, a mobile terminal, a server, etc. The mobile terminal can be, for example, a mobile phone, a tablet computer, a personal digital assistant, a wearable device, and other hardware devices with various operating systems, touch screens and / or display screens.
[0058] Exemplarily, the resource recommendation method can be applied to a service end (or server, cloud end).
[0059] like Figure 1 As shown, the resource recommendation method may include the following steps S101 to S104:
[0060] Step S101 , obtaining object features and a resource feature sequence of a target object; wherein the resource feature sequence includes resource features of candidate resources of multiple resource types in a candidate resource set.
[0061] Among them, resource types include but are not limited to: long videos, short videos, dynamic (among which, dynamic resources include images and texts, and the text contains a smaller number of characters and a larger number of images), graphics and text (among which, graphics and text resources include images and texts, and the text contains a larger number of characters and a smaller number of images), etc.
[0062] The target object may be any user object, and the object feature of the target object is used to characterize the resource preference of the target object.
[0063] The resource feature sequence is obtained by extracting features from candidate resources of multiple resource types in the candidate resource set to obtain resource features of the candidate resources of multiple resource types, and is generated based on the resource features of the candidate resources of multiple resource types.
[0064] Step S102, obtaining a record feature sequence; wherein the record feature sequence includes record features of at least one resource interaction record of the target object within a set time period.
[0065] The set period is a pre-set time period, the end time of the set period may be the current time, and the time difference between the end time and the start time of the set period is pre-set, that is, the set period may be a recent time period.
[0066] Among them, resource interaction records (or resource consumption records) are used to record the resources that the target object has interacted with historically, as well as the target object's interaction information on the resource (including but not limited to: browsing time, comment information, sharing information, like information, etc.).
[0067] In the disclosed embodiment, the resource interaction records of the target object within a set time period can be obtained, features of each resource interaction record can be extracted to obtain the record features of each resource interaction record, and a record feature sequence can be generated based on the record features of each resource interaction record.
[0068] Step S103, generating resource allocation ratios of multiple resource types according to the object features, resource feature sequences and record feature sequences.
[0069] In the embodiments of the present disclosure, deep learning technology can be used to predict the resource allocation proportions of multiple resource types preferred by the target object based on the object characteristics, resource feature sequence and record feature sequence of the target object.
[0070] Step S104: determining a resource recommendation list from the candidate resource set according to resource allocation proportions of the multiple resource types, so as to recommend the resource recommendation list to the target object.
[0071] In the disclosed embodiment, a resource recommendation list can be determined from the candidate resource set according to the resource allocation ratio of multiple resource types. For example, if the resource allocation ratio of long videos is 20%, the resource allocation ratio of short videos is 30%, the resource allocation ratio of dynamic resources is 40%, and the resource allocation ratio of graphics and text is 10%, then the resource recommendation list includes 20% of long video resources, 30% of short video resources, 40% of dynamic resources, and 10% of graphics and text resources.
[0072] In the embodiment of the present disclosure, after determining the resource recommendation list, the resource recommendation list may be recommended to the target object, so that the target object browses or consumes recommended resources of various resource types in the resource recommendation list.
[0073] The resource recommendation method of the disclosed embodiment combines the object characteristics of the target object, the resource characteristics of candidate resources of multiple resource types, and the record characteristics of the resource interaction records that characterize the user's resource preferences or immediate preferences within a set time period to predict the resource allocation ratios of multiple resource types preferred by the target object. This can improve the rationality and reliability of the resource allocation ratio prediction, and then recommend a resource recommendation list to the target object based on the reliable resource allocation ratio. This can ensure that the resource allocation method of the recommended resource recommendation list can meet the personalized resource preference needs of the target object, and improve the accuracy of resource recommendations in the resource recommendation list, thereby improving the user's usage experience in the resource recommendation scenario.
[0074] It should be noted that in the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information are all carried out with the user's consent, and are in compliance with relevant laws and regulations and do not violate public order and good morals.
[0075] In order to clearly explain how to generate resource allocation ratios of multiple resource types according to object features, resource feature sequences and record feature sequences in any embodiment of the present disclosure, the present disclosure also proposes a resource recommendation method.
[0076] Figure 2 This is a flowchart of the resource recommendation method provided in the second embodiment of the present disclosure.
[0077] like Figure 2 As shown, the resource recommendation method may include the following steps S201 to S207:
[0078] Step S201 , obtaining object features and a resource feature sequence of a target object; wherein the resource feature sequence includes resource features of candidate resources of multiple resource types in a candidate resource set.
[0079] For the explanation of step S201, reference may be made to the relevant description in any embodiment of the present disclosure, and no further details will be given here.
[0080] In any embodiment of the present disclosure, the candidate resource set may be obtained by screening from massive resources according to the object characteristics of the target object.
[0081] As an example, first, resource features of multiple initial resources can be obtained, wherein the resource features are obtained by extracting features from resource information of the initial resources. Afterwards, a trained resource recommendation model can be used to predict resource scores of the multiple initial resources based on object features of the target object and resource features of the multiple initial resources, wherein the resource score of each initial resource is used to indicate the quality of the initial resource and the degree of preference of the target object for the initial resource. Thus, in the present disclosure, a set of candidate resources can be determined from the multiple initial resources based on the resource scores of the multiple initial resources.
[0082] As an example, the total number of candidate resources in the marked candidate resource set is M. In the present disclosure, multiple initial resources can be sorted from high to low according to the values of the resource scores to obtain a sorted sequence, and a candidate resource set can be generated based on the first M initial resources in the sorted sequence.
[0083] As another example, the total number of candidate resources in the marked candidate resource set is M. In the present disclosure, the screening ratio of each resource type can be configured, and the screening number of each resource type can be determined based on M and the screening ratio, so that the candidate resource set can be determined from multiple initial resources based on the screening number of each resource type and the resource score of the initial resources under each resource type.
[0084] For example, for any resource type, the number of screenings for marking the resource type is M. i , where i is a positive integer and the value of i is not greater than the number of resource types (or the number of species), then in the present disclosure, the initial resources under the resource type can be sorted from high to low according to the resource score value to obtain a sorting sequence, and the M ranked at the top of the sorting sequence is selected. i initial resources, so in the present disclosure, a candidate resource set can be generated according to the initial resources selected under each resource type.
[0085] In summary, based on deep learning technology, predicting the resource scores of massive initial resources (characterizing the quality of the initial resources and the target object's preference for the initial resources) can improve the prediction efficiency and the accuracy of the prediction results, and then based on the resource scores of massive initial resources, perform resource screening to obtain a candidate resource set, so that the screened candidate resource set can take into account both resource quality and the target object's resource preference.
[0086] Step S202, obtaining a record feature sequence; wherein the record feature sequence includes record features of at least one resource interaction record of the target object within a set time period.
[0087] For the explanation of step S202, reference may be made to the relevant description in any embodiment of the present disclosure, and no further details will be given here.
[0088] Step S203, obtaining a resource score of each candidate resource in the candidate resource set; wherein the resource score is used to indicate the quality of the candidate resource and the target object's preference for the candidate resource.
[0089] In the embodiment of the present disclosure, the resource score of each candidate resource in the candidate resource set may be obtained; wherein the resource score of each candidate resource is used to indicate the quality of the candidate resource and the degree of preference of the target object for the candidate resource.
[0090] As an example, a trained resource recommendation model can be used to predict the resource score of each candidate resource. For example, for any candidate resource, the resource recommendation model can be used to predict the resource score of the candidate resource based on the object characteristics of the target object and the resource characteristics of the candidate resource.
[0091] Step S204: determining a type score of the same resource type according to the average of the resource scores of the candidate resources belonging to the same resource type.
[0092] Exemplarily, for any resource type, the average of the resource scores of multiple candidate resources belonging to the resource type can be used as the score of the resource type (referred to as the type score in this disclosure); wherein the type score is used to indicate the target object's preference for the resource type.
[0093] Step S205 , generating resource allocation ratios of multiple resource types according to the object features, resource feature sequences, record feature sequences, and type scores of multiple resource types.
[0094] In the disclosed embodiments, deep learning technology may be used to predict the resource allocation proportions of multiple resource types preferred by the target object based on the object features, resource feature sequences, record feature sequences, and type scores of multiple resource types of the target object.
[0095] Step S206: determining a resource recommendation list from the candidate resource set according to resource allocation proportions of the various resource types.
[0096] For the explanation of step S206, reference may be made to the relevant description in any embodiment of the present disclosure, which will not be repeated here.
[0097] In any one of the embodiments of the present disclosure, a method for determining a resource recommendation list is, for example, first, obtaining the number of resources recommended to the target object, and then calculating the recommended number of each resource type based on the number of resources and the resource allocation ratio of the multiple resource types. Thus, in the present application, a resource recommendation list can be determined from candidate resources of multiple types of resources based on the recommended numbers of multiple resource types and the resource scores of the candidate resources of the multiple resource types.
[0098] As an example, the number of marked resources is S, and the resource allocation proportion of any resource type is q%, then the recommended number of this resource type can be S*q%. In the present disclosure, the candidate resources can be concentrated on the candidate resources of this resource type, and sorted from high to low according to the value of the resource score to obtain a sorted sequence, so as to generate a resource recommendation list based on the S*q% candidate resources ranked at the top in the sorted sequence.
[0099] In summary, the resource allocation ratio of each resource type and the resource scores of each candidate resource under each resource type are comprehensively considered to determine the resource recommendation list recommended to the target object. This can not only improve the resource quality in the resource recommendation list, but also make the resource allocation method of the recommended resource recommendation list meet the user's personalized resource preference needs and improve the user's resource consumption experience.
[0100] Step S207: recommend a resource recommendation list to the target object.
[0101] In an embodiment of the present disclosure, the resource recommendation list may be recommended to the target object. Exemplarily, the resource recommendation list may be pushed to an account bound to the target object.
[0102] The resource recommendation method of the disclosed embodiment predicts the resource allocation ratios of multiple resource types preferred by the target object based on the object characteristics of the target object, the resource characteristics and resource scores of candidate resources of multiple resource types (characterizing the quality of the candidate resources and the target object's preference for the candidate resources), and the record characteristics of the resource interaction records that characterize the target object's resource preference or immediate preference within a set time period. This can improve the rationality and accuracy of the resource allocation ratio prediction, thereby further meeting the personalized resource allocation needs and resource preference needs of the target object, and improving the accuracy of resource recommendations in the resource recommendation list, thereby improving the user experience in the resource recommendation scenario.
[0103] In order to clearly explain how the resource allocation ratios of multiple resource types are generated according to the object features of the target object, the resource feature sequence, the record feature sequence and the type scores of the multiple resource types in the above embodiment, the present disclosure also proposes a resource recommendation method.
[0104] Figure 3 This is a flowchart of the resource recommendation method provided in Embodiment 3 of the present disclosure.
[0105] like Figure 3 As shown, the resource recommendation method may include the following steps S301 to S308:
[0106] Step S301, obtaining object features, resource feature sequences and record feature sequences of a target object.
[0107] The resource feature sequence includes resource features of candidate resources of various resource types in the candidate resource set.
[0108] The record feature sequence includes the record features of at least one resource interaction record of the target object within a set time period.
[0109] Step S302: Obtain the resource score of each candidate resource in the candidate resource set.
[0110] The resource score of any candidate resource is used to indicate the quality of the candidate resource and the target object's preference for the candidate resource.
[0111] Step S303: Determine the type score of the same resource type according to the average of the resource scores of the candidate resources belonging to the same resource type.
[0112] For explanations of steps S301 to S303, reference may be made to the relevant descriptions in any embodiment of the present disclosure, and will not be repeated here.
[0113] Step S304: use the first encoding network in the generator of the resource allocation model to encode the object feature and resource feature sequence to obtain the object resource feature.
[0114] Among them, the resource allocation model may be a generative artificial intelligence model, which may include a generator and a discriminator (or discriminator).
[0115] There is no limitation on the network structure of the first coding network. Exemplarily, the first coding network may be a Transformer-based coding network.
[0116] In the disclosed embodiment, the first encoding network in the generator in the resource allocation model may be used to encode the object features and resource feature sequences of the target object to obtain object resource features that fuse the object features and resource features.
[0117] Exemplarily, the first encoding network may use an attention mechanism to encode the object features and resource feature sequences of the target object to obtain object resource features.
[0118] Step S305: Use the second encoding network in the generator to encode the record feature sequence to obtain resource common features.
[0119] There is no restriction on the network structure of the second coding network. For example, the second coding network may also be a Transformer-based coding network. It should be noted that the network structure of the second coding network may be the same as or different from the network structure of the first coding network, and the embodiments of the present disclosure do not restrict this.
[0120] Among them, the resource common characteristics refer to the common characteristics between multiple record characteristics in the record feature sequence. The resource common characteristics are used to characterize the immediate preferences of the target object within a set time period, or to characterize the development trend and potential needs of the target object's preferences.
[0121] In the embodiment of the present disclosure, the second encoding network in the generator can be used to encode the record feature sequence to obtain common features between multiple record features, which are recorded as resource common features in the present disclosure.
[0122] Step S306, concatenating the object resource features, the resource common features and the type scores of the multiple resource types to obtain concatenated features.
[0123] In the disclosed embodiment, the object resource features, resource common features and type scores of multiple resource types may be sequentially spliced together to obtain spliced features.
[0124] Step S307: Use the prediction network in the generator to process the splicing features to obtain resource allocation ratios of multiple resource types.
[0125] There is no restriction on the network structure of the prediction network. Exemplarily, the prediction network may be a DNN (Deep Neural Network).
[0126] In the disclosed embodiment, the prediction network in the generator may be used to process the splicing features to obtain resource allocation ratios of various resource types.
[0127] Exemplarily, the prediction network may include multiple DNN networks (wherein the number of DNN networks is consistent with the number of resource types), and the spliced features may be input into multiple DNN networks for processing. The output of each DNN network passes through a softmax (normalized exponential function or exponential normalization function) layer to obtain a quota ratio that should be allocated to a resource type, which is recorded as the resource allocation ratio in this disclosure.
[0128] Step S308 , determining a resource recommendation list from the candidate resource set according to the resource allocation ratios of the multiple resource types, so as to recommend the resource recommendation list to the target object.
[0129] For the explanation of step S308, reference may be made to the relevant description in any embodiment of the present disclosure, and no further details will be given here.
[0130] The resource recommendation method of the disclosed embodiment adopts deep learning technology, and predicts the resource allocation proportions of multiple resource types preferred by the target object based on the object characteristics of the target object, the resource characteristics and resource scores of candidate resources of multiple resource types (characterizing the quality of the candidate resources and the target object's preference for the candidate resources), and the record characteristics of the resource interaction records that characterize the target object's resource preference or immediate preference within a set time period, thereby improving the efficiency, rationality and accuracy of the resource allocation proportion prediction.
[0131] In order to clearly illustrate any embodiment of the present disclosure, the present disclosure also proposes a resource recommendation method.
[0132] Figure 4 This is a flowchart of the resource recommendation method provided in Embodiment 4 of the present disclosure.
[0133] like Figure 4 As shown, the resource recommendation method may include the following steps S401 to S407:
[0134] Step S401: Acquire the object characteristics and resource characteristic sequence of the target object.
[0135] The resource feature sequence includes resource features of candidate resources of various resource types in the candidate resource set.
[0136] For the explanation of step S401, reference may be made to the relevant description in any embodiment of the present disclosure, and no further details will be given here.
[0137] In any embodiment of the present disclosure, the object features of the target object can be obtained by following steps A to C:
[0138] Step A: Obtain historical behavior information and preference setting information associated with the target object.
[0139] Among them, historical behavior information is used to indicate the records of the target object's interaction with resources or products in the historical period, search records, etc., such as the resources that the target object has browsed, the links clicked, the products purchased, the videos watched, the keywords searched, etc.
[0140] Among them, preference setting information refers to the preference options actively set or selected by the target object, such as language preference, interface style, notification settings, content filtering conditions, etc.
[0141] Step B: Obtain object information and context information of the target object.
[0142] The target information includes, but is not limited to, basic information such as the target's age, gender, occupation, and education level.
[0143] The context information includes, but is not limited to, the current situation information (such as time and location) of the target object, device information, network status, geographic location, etc.
[0144] Step C: Extract features from historical behavior information, preference setting information, object information, and context information to obtain object features of the target object.
[0145] Exemplarily, feature extraction technology may be used to extract features from historical behavior information, preference setting information, object information, and context information of the target object to obtain object features of the target object.
[0146] In summary, by constructing rich object features, we can fully understand the needs, preferences, and contexts of the target objects, thereby providing more personalized and accurate resource recommendation services, which can not only improve the satisfaction of the target objects, but also enhance the competitiveness and market share of the enterprise.
[0147] Step S402: obtaining at least one resource interaction record of the target object within a set time period.
[0148] It should be noted that the explanations on setting the time period and resource interaction record in the aforementioned embodiment are also applicable to this embodiment and will not be repeated here.
[0149] Step S403: determining the target object's interaction satisfaction with the resource indicated by each resource interaction record according to the interaction information of multiple dimensions in each resource interaction record.
[0150] Among them, interactive information includes but is not limited to: browsing information (or playback information), comment information, sharing information, like information, etc.
[0151] In an embodiment of the present disclosure, for any resource interaction record, interaction indicators of multiple dimensions can be calculated based on the interaction information of multiple dimensions in the resource interaction record, and the satisfaction of the target object with the resource indicated by the resource interaction record (referred to as interaction satisfaction in the present disclosure) can be calculated based on the interaction indicators of multiple dimensions.
[0152] As an example, the weighted sum, average, and sum of the interaction indicators in multiple dimensions may be used as the target object's interaction satisfaction with the resource indicated by the resource interaction record.
[0153] Step S404: determining a target interaction record from each resource interaction record according to the interaction satisfaction level of each resource interaction record.
[0154] In the embodiment of the present disclosure, resource interaction records whose interaction satisfaction level is greater than a satisfaction level threshold may be regarded as target interaction records that satisfy the target object.
[0155] Step S405: extract features from each target interaction record to obtain a record feature sequence.
[0156] In the disclosed embodiment, feature extraction can be performed on each target interaction record based on a feature extraction algorithm to obtain the record features of each target interaction record, and a record feature sequence is generated based on the record features of each target interaction record; wherein the record feature sequence includes the record features of each target interaction record.
[0157] Step S406: Generate resource allocation ratios of multiple resource types according to the object features, resource feature sequences, and record feature sequences.
[0158] Step S407 , determining a resource recommendation list from the candidate resource set according to the resource allocation ratios of the multiple resource types, so as to recommend the resource recommendation list to the target object.
[0159] The explanation of steps S406 to S407 can be found in the relevant description in any embodiment of the present disclosure, and will not be repeated here.
[0160] The resource recommendation method of the embodiment of the present disclosure calculates the target object's interaction satisfaction with the resources indicated by each resource interaction record based on the target object's actual interaction information with the resources, which can improve the accuracy and rationality of the interaction satisfaction calculation, and thus determine the target interaction records that satisfy the target object from each resource interaction record based on the accurate interaction satisfaction. It can accurately screen out the target interaction records that satisfy the target object from a large number of resource interaction records, and then generate a record feature sequence based on the record features of the target interaction records that satisfy the target object, so that the record feature sequence can accurately represent the target object's personalized resource preference needs, so as to improve the accuracy and efficiency of subsequent resource recommendations.
[0161] The above are various embodiments corresponding to the application method of the resource allocation model (ie, the resource recommendation method). The present disclosure also proposes a training method for the resource allocation model.
[0162] Figure 5 This is a flowchart of the training method of the resource allocation model provided in Embodiment 5 of the present disclosure.
[0163] like Figure 5 As shown, the training method of the resource allocation model may include the following steps S501 to S505:
[0164] Step S501, obtaining a first sample; wherein the first sample includes a first object feature, a first resource feature sequence and a first record feature sequence of a first sample object; the first resource feature sequence includes resource features of candidate resources of multiple resource types in a candidate resource set; the first record feature sequence includes record features of at least one resource interaction record of the first sample object within a first sample period.
[0165] Among them, resource types include but are not limited to: long videos, short videos, dynamics, pictures and texts, etc.
[0166] The first sample object may be any user object, and the method for acquiring the first object feature of the first sample object is similar to the method for acquiring the object feature of the target object, which will not be elaborated herein.
[0167] The first resource feature sequence is generated by extracting features from candidate resources of multiple resource types in the candidate resource set to obtain resource features of the candidate resources of multiple resource types, and based on the resource features of the candidate resources of multiple resource types.
[0168] Among them, the first sample period is a pre-set time period, and each resource interaction record (or resource consumption record) of the first sample object within the first sample period is used to record the resources that the first sample object has historically interacted with, as well as the first sample object's interaction information with the resource (including but not limited to: browsing time, comment information, sharing information, like information, etc.).
[0169] It should be noted that the implementation principle of step S501 is similar to the implementation principle of steps S101 to S102, and will not be elaborated here.
[0170] Step S502: Using a generator of a resource allocation model to generate resource allocation ratios of multiple resource types according to the first sample.
[0171] Among them, the resource allocation model may be a generative artificial intelligence model, which may include a generator and a discriminator (or discriminator).
[0172] In an embodiment of the present disclosure, a generator of a resource allocation model may be used to generate resource allocation ratios of multiple resource types based on a first sample.
[0173] Step S503: determining a resource recommendation list from the candidate resource set according to resource allocation proportions of the various resource types.
[0174] It should be noted that the implementation principle of step S503 is similar to that of step S206, which will not be described in detail here.
[0175] Step S504: using the discriminator of the resource allocation model to predict the first satisfaction of the first sample object with respect to the resource allocation mode of the resource recommendation list according to the resource recommendation list.
[0176] In the embodiment of the present disclosure, the discriminator of the resource allocation model can be used to predict the satisfaction (or satisfaction probability, referred to as the first satisfaction level in the present disclosure) of the first sample object with the resource allocation method of the resource recommendation list based on the resource recommendation list.
[0177] Step S505: training a resource allocation model based on the first satisfaction level.
[0178] In the embodiment of the present disclosure, the resource allocation model may be trained based on the first satisfaction level.
[0179] In any embodiment of the present disclosure, the discriminator in the resource allocation model may be a pre-trained discriminator. In this case, the generator of the resource allocation model may be trained based on the first satisfaction. For example, the first satisfaction output by the discriminator may be used as a reward value, and the model parameters in the generator may be adjusted using optimization algorithms such as reinforcement learning or gradient descent. Through continuous iterative training, the generator may gradually learn how to generate a resource allocation method that can maximize user satisfaction (or satisfaction probability), thereby improving the prediction accuracy of the resource allocation model and satisfying the personalized resource preference needs of different users.
[0180] The training method of the resource allocation model of the embodiment of the present disclosure introduces a generator + discriminator training paradigm. This paradigm decouples the resource generation and evaluation processes, allowing the resource allocation model to more flexibly adapt to complex and changeable user preferences. This not only improves the prediction accuracy of the resource allocation model, but also enhances the adaptability and robustness of the resource allocation model in practical applications.
[0181] In order to clearly illustrate how a resource allocation model generator is used in any embodiment of the present disclosure to generate resource allocation ratios of multiple resource types based on a first sample, the present disclosure also proposes a resource allocation model training method.
[0182] Figure 6 A flowchart of a method for training a resource allocation model provided in Embodiment 6 of the present disclosure.
[0183] like Figure 6 As shown, the training method of the resource allocation model may include the following steps S601 to S606:
[0184] Step S601: obtain a first sample, and obtain a resource score of each candidate resource in a candidate resource set.
[0185] Among them, the first sample includes the first object feature, the first resource feature sequence and the first record feature sequence of the first sample object; the first resource feature sequence contains resource features of candidate resources of multiple resource types in the candidate resource set; the first record feature sequence contains record features of at least one resource interaction record of the first sample object within the first sample period.
[0186] The resource score of any candidate resource is used to indicate the quality of the candidate resource and the preference of the first sample object for the candidate resource.
[0187] It should be noted that the implementation principle of step S601 is similar to the implementation principle of steps S201 to S203, and will not be elaborated here.
[0188] Step S602: Determine a first score of the same resource type according to the average of the resource scores of the candidate resources belonging to the same resource type.
[0189] It should be noted that the implementation principle of step S602 is similar to that of step S204, and will not be elaborated here.
[0190] Step S603: using a generator to generate resource allocation ratios of multiple resource types according to the first object feature, the first resource feature sequence, the first record feature sequence, and the first scores of the multiple resource types.
[0191] It should be noted that the implementation principle of step S603 is similar to that of step S205, and will not be elaborated here.
[0192] In any embodiment of the present disclosure, the generator may include a first coding network, a second coding network and a first prediction network. In the present disclosure, the first coding network in the generator may be used to encode the first object feature and the first resource feature sequence to obtain a first coding feature; the second coding network in the generator may be used to encode the first record feature sequence to obtain a second coding feature; the first coding feature, the second coding feature and the first scores of multiple resource types are spliced to obtain a first spliced feature; the first prediction network in the generator is used to process the first spliced feature to obtain the resource allocation ratio of multiple resource types. Its implementation principle is similar to that of steps S304 to S307, and will not be repeated here.
[0193] Therefore, by adopting deep learning technology, the resource allocation proportions of multiple resource types preferred by the first sample object are predicted based on the first object characteristics of the first sample object, the resource characteristics and resource scores of candidate resources of multiple resource types (characterizing the quality of the candidate resources and the degree of preference of the first sample object for the candidate resources), and the record characteristics of the resource interaction records that characterize the resource preference or immediate preference of the first sample object within a set time period, thereby improving the efficiency, rationality and accuracy of the resource allocation proportion prediction.
[0194] Step S604: determining a resource recommendation list from the candidate resource set according to resource allocation proportions of the various resource types.
[0195] Step S605 : using the discriminator of the resource allocation model to predict the first satisfaction of the first sample object with respect to the resource allocation mode of the resource recommendation list according to the resource recommendation list.
[0196] Step S606: training the resource allocation model based on the first satisfaction level.
[0197] For explanations of steps S604 to S606, reference may be made to the relevant descriptions in any embodiment of the present disclosure, and will not be repeated here.
[0198] The training method of the resource allocation model of the disclosed embodiment predicts the resource allocation proportions of multiple resource types preferred by the first sample object based on the first object characteristics of the first sample object, the resource characteristics and resource scores of candidate resources of multiple resource types (characterizing the quality of the candidate resources and the degree of preference of the first sample object to the candidate resources), and the record characteristics of the resource interaction records that characterize the resource preference or immediate preference of the first sample object within a set time period. This can improve the rationality and accuracy of the resource allocation proportion prediction, thereby improving the prediction accuracy of the resource allocation model, meeting the personalized resource allocation needs and resource preference needs of different users, and thereby improving the user experience in the resource recommendation scenario.
[0199] In order to clearly illustrate how the discriminator of the resource allocation model in any embodiment of the present disclosure is used to predict the first satisfaction of the first sample object with the resource allocation method of the resource recommendation list based on the resource recommendation list, the present disclosure also proposes a training method for the resource allocation model.
[0200] Figure 7 A flowchart of a method for training a resource allocation model provided in Embodiment 7 of the present disclosure.
[0201] like Figure 7 As shown, the training method of the resource allocation model may include the following steps S701 to S706:
[0202] Step S701: obtain a first sample, and use a generator of a resource allocation model to generate resource allocation ratios of multiple resource types according to the first sample.
[0203] Among them, the first sample includes the first object feature, the first resource feature sequence and the first record feature sequence of the first sample object; the first resource feature sequence contains resource features of candidate resources of multiple resource types in the candidate resource set; the first record feature sequence contains record features of at least one resource interaction record of the first sample object within the first sample period.
[0204] Step S702: determining a resource recommendation list from the candidate resource set according to resource allocation ratios of multiple resource types.
[0205] The explanation of steps S701 to S702 can refer to the relevant description in any embodiment of the present disclosure and will not be repeated here.
[0206] Step S703: Obtain a resource score of each recommended resource in the resource recommendation list, and determine a second score of the same resource type according to an average of the resource scores of the recommended resources belonging to the same resource type.
[0207] The resource score of any recommended resource is used to indicate the quality of the recommended resource and the preference of the first sample object for the recommended resource.
[0208] It should be noted that the implementation principle of step S703 is similar to the implementation principle of steps S601 to S602, and will not be elaborated here.
[0209] Step S704, obtaining a second resource feature sequence; wherein the second resource feature sequence includes resource features of each recommended resource in the resource recommendation list.
[0210] It should be noted that the method for obtaining the second resource feature sequence is similar to the method for obtaining the first resource feature sequence, and will not be elaborated here.
[0211] Step S705: input the second scores of the multiple resource types, the second resource feature sequence, the first record feature sequence and the first object feature into a discriminator to obtain a first satisfaction level output by the discriminator.
[0212] The first satisfaction level is used to indicate the probability that the first sample object is satisfied with the resource allocation method in the resource recommendation list.
[0213] In the disclosed embodiment, the second scores, second resource feature sequences, first record feature sequences and first object features of multiple resource types may be input into the discriminator for processing to obtain a first satisfaction level output by the discriminator.
[0214] In any embodiment of the present disclosure, the discriminator may include a third encoding network, a fourth encoding network, and a second prediction network. In the present disclosure, the discriminator may adopt the following steps a to d to predict the first satisfaction of the first sample object with respect to the resource allocation method of the resource recommendation list:
[0215] Step a: Use the third encoding network of the discriminator to encode the first object feature and the second resource feature sequence to obtain a third encoding feature. The implementation principle is similar to step S304 and will not be repeated here.
[0216] There is no restriction on the network structure of the third coding network. For example, the third coding network may be a Transformer-based coding network.
[0217] Step b: Encode the first record feature sequence using the fourth encoding network of the discriminator to obtain a fourth encoding feature, wherein the fourth encoding feature refers to a common feature between multiple record features in the first record feature sequence, and the fourth encoding feature is used to characterize the instantaneous preference of the first sample object in the first sample period, or to characterize the development trend and potential demand of the preference of the first sample object. Its implementation principle is similar to step S305, and will not be repeated here.
[0218] There is no restriction on the network structure of the fourth coding network. For example, the fourth coding network may also be a Transformer-based coding network. It should be noted that the network structure of the fourth coding network may be the same as or different from the network structure of the third coding network, and the embodiments of the present disclosure do not restrict this.
[0219] Step c: concatenate the third coding feature, the fourth coding feature and the second scores of the multiple resource types to obtain a second concatenated feature. The implementation principle is similar to step S306 and will not be described in detail here.
[0220] Step d: Processing the second concatenated features using a second prediction network of the discriminator to obtain a first satisfaction score.
[0221] Exemplarily, the second prediction network can be a DNN network, and the second splicing feature can be input into the DNN network for processing. The output of the DNN network passes through the softmax layer to obtain the satisfaction probability of the first sample object with the resource allocation method of the resource recommendation list, which is recorded as the first satisfaction in this disclosure.
[0222] In summary, by using deep learning technology, the first satisfaction of the first sample object with the resource allocation methods of various recommended resources is predicted based on the first object characteristics of the first sample object, the resource characteristics and resource scores of recommended resources of multiple resource types (characterizing the quality of the recommended resources and the degree of preference of the first sample object for the recommended resources), and the record characteristics of the resource interaction records that characterize the resource preference or immediate preference of the first sample object in the first sample period, thereby improving the efficiency, rationality and accuracy of the first satisfaction prediction.
[0223] Step S706: training the resource allocation model based on the first satisfaction level.
[0224] For the explanation of step S706, reference may be made to the relevant description in any embodiment of the present disclosure, and no further details will be given here.
[0225] The training method of the resource allocation model of the disclosed embodiment predicts the first satisfaction of the first sample object with the resource allocation method in the resource recommendation list based on the first object characteristics of the first sample object, the resource characteristics and resource scores of various recommended resources in the resource recommendation list (characterizing the quality of the recommended resources and the degree of preference of the first sample object for the recommended resources), and the record characteristics of the resource interaction records that characterize the resource preference or immediate preference of the first sample object in the first sample period, thereby improving the rationality and accuracy of the first satisfaction prediction.
[0226] In any one of the embodiments of the present disclosure, the discriminator in the resource allocation model may be a trained discriminator. In order to clearly explain how the discriminator is trained in any one of the embodiments of the present disclosure, the present disclosure also proposes a method for training a resource allocation model.
[0227] Figure 8 A flowchart of a method for training a resource allocation model provided in Embodiment 8 of the present disclosure.
[0228] like Figure 8 As shown, the discriminator in the resource allocation model can be trained by following steps S801 to S803:
[0229] Step S801, obtaining a second sample; wherein the second sample includes a second object feature, a third resource feature sequence, and a second record feature sequence of a second sample object; the third resource feature sequence includes resource features of interactive resources of multiple resource types in an interactive resource set; and the second record feature sequence includes record features of at least one resource interaction record of the second sample object within a second sample period.
[0230] The second sample object and the first sample object may be the same user object, or may be different user objects, which is not limited in the embodiment of the present disclosure.
[0231] It should be noted that the implementation principle of step S801 is similar to that of step S501 and will not be elaborated here.
[0232] Step S802: using a discriminator to predict a second satisfaction level of a second sample object with respect to a resource allocation mode of an interactive resource set according to a second sample.
[0233] In the embodiment of the present disclosure, the second sample may be input into the discriminator so that the discriminator can predict the satisfaction (or satisfaction probability, referred to as second satisfaction in the present disclosure) of the second sample object with respect to the resource allocation mode of the interactive resource set.
[0234] In any embodiment of the present disclosure, the discriminator may adopt the following steps 1 to 3 to predict the second satisfaction of the second sample object with respect to the resource allocation mode of the interactive resource set:
[0235] Step 1: Obtain the resource score of each interactive resource in the interactive resource set; wherein the resource score of any interactive resource is used to indicate the quality of the interactive resource and the preference of the second sample object for the interactive resource. The implementation principle is similar to step S203 and will not be described here.
[0236] Step 2: Determine the third score of the same resource type according to the average of the resource scores of the interactive resources belonging to the same resource type. The implementation principle is similar to step S204 and will not be described in detail here.
[0237] Step 3: Input the third scores, third resource feature sequences, second record feature sequences and second object features of multiple resource types into the discriminator to obtain the second satisfaction level output by the discriminator. The implementation principle is similar to step S705 and will not be described in detail here.
[0238] Therefore, based on the second object characteristics of the second sample object, the resource characteristics and resource scores of various interactive resources in the interactive resource set (characterizing the quality of the interactive resources and the degree of preference of the second sample object for the interactive resources), and the record characteristics of the resource interaction records that characterize the resource preference or immediate preference of the second sample object in the second sample period, the second satisfaction of the second sample object with the resource allocation method of the interactive resource set is predicted, which can improve the rationality and accuracy of the second satisfaction prediction.
[0239] As an example, the discriminator may include a third encoding network, a fourth encoding network, and a second prediction network. In the present disclosure, the discriminator may adopt the following steps 3.1 to 3.4 to predict the second satisfaction of the second sample object with respect to the resource allocation mode of the interactive resource set:
[0240] Step a: The third encoding network of the discriminator is used to encode the second object feature and the third resource feature sequence to obtain a fifth encoding feature. The implementation principle is similar to step S304 and will not be repeated here.
[0241] There is no restriction on the network structure of the third coding network. For example, the third coding network may be a Transformer-based coding network.
[0242] Step b: The fourth coding network of the discriminator is used to encode the second record feature sequence to obtain a sixth coding feature, wherein the sixth coding feature refers to a common feature between multiple record features in the second record feature sequence, and the sixth coding feature is used to characterize the instantaneous preference of the second sample object in the second sample period, or to characterize the development trend and potential demand of the preference of the second sample object. Its implementation principle is similar to that of step S305, and will not be repeated here.
[0243] There is no restriction on the network structure of the fourth coding network. For example, the fourth coding network may also be a Transformer-based coding network. It should be noted that the network structure of the fourth coding network may be the same as or different from the network structure of the third coding network, and the embodiments of the present disclosure do not restrict this.
[0244] Step c: concatenate the fifth coding feature, the sixth coding feature and the third scores of the multiple resource types to obtain a third concatenated feature. The implementation principle is similar to step S306 and will not be described in detail here.
[0245] Step d: Processing the third concatenated feature using the second prediction network of the discriminator to obtain a second satisfaction score.
[0246] Exemplarily, the second prediction network can be a DNN network, and the third splicing feature can be input into the DNN network for processing. The output of the DNN network passes through the softmax layer to obtain the satisfaction probability of the second sample object with the resource allocation method of the interactive resource set, which is recorded as the second satisfaction in this disclosure.
[0247] In summary, the encoding technology in deep learning technology is used to encode the second object characteristics of the second sample object, the resource characteristics of interactive resources of multiple resource types, and the record characteristics of the resource interaction records that characterize the resource preference or immediate preference of the second sample object in the second sample period, and the encoded characteristics are fused with the third scores of multiple resource types determined based on the resource scores of multiple interactive resources (characterizing the quality of the interactive resources and the degree of preference of the second sample object for the interactive resources) to obtain the third splicing feature. The third splicing feature is processed to obtain the second satisfaction of the second sample object with the resource allocation methods of various interactive resources, which can improve the efficiency, effectiveness, rationality and accuracy of the second satisfaction prediction.
[0248] Step S803: training the discriminator according to the difference between the second satisfaction level and the real satisfaction level annotated by the second sample.
[0249] The real satisfaction level is determined based on the actual interaction situation of the second sample object with respect to the interactive resources in the interactive resource set, and is used to indicate the actual satisfaction probability of the second sample object with respect to the resource allocation mode of the interactive resource set.
[0250] In an embodiment of the present disclosure, the value of the loss function (referred to as the loss value in the present disclosure) can be determined based on the difference between the second satisfaction level and the true satisfaction level annotated by the second sample, so that the discriminator can be trained based on the loss value to minimize the loss value.
[0251] Among them, the loss value is positively correlated with the above difference, that is, the larger the difference, the larger the loss value, and conversely, the smaller the difference, the smaller the loss value.
[0252] It should be noted that the above only uses the training termination condition of the discriminator as an example of minimizing the loss value. In actual application, other training termination conditions can also be set. For example, the training termination condition can also be: the training time reaches a set time, the number of training times reaches a set number of times, etc. The present disclosure does not limit this.
[0253] The training method of the resource allocation model of the embodiment of the present disclosure pre-trains the discriminator based on a supervised training method, which can improve the prediction accuracy of the discriminator, thereby improving the prediction accuracy of the resource allocation model and enhancing the robustness of the resource allocation model in practical applications.
[0254] In any one of the embodiments of the present disclosure, the present disclosure proposes a resource preference modeling technology, which constructs a more accurate, efficient, and practical application-oriented resource preference estimation model (referred to as a resource allocation model in the present disclosure) by comprehensively considering the resource quality of the candidate resource set, adjusting the estimation target of the model, enriching the feature dimensions, and using a model structure with stronger feature extraction capabilities. This will help improve the resource recommendation effect and user experience of the resource recommendation system and create greater value for the enterprise. The present disclosure aims to solve the problem of how to accurately capture and model the user's resource preferences in a highly interactive and immersive environment, so as to provide a more accurate basis for the resource allocation of the resource recommendation system. This technology is of great significance for improving user experience, optimizing resource utilization efficiency, and enhancing the degree of personalization of the resource recommendation system.
[0255] As an example, in order to solve the deficiencies in the prior art, the present disclosure proposes an improved resource preference estimation algorithm, the implementation principle of which can be as follows: Fig. 9 As shown, it mainly includes the following two parts:
[0256] Part 1: Training of the Evaluator: The Evaluator can be trained based on actual user interaction data on resources, where the Evaluator is used to evaluate the quality of the generated resource recommendation list (or resource recommendation sequence).
[0257] At the beginning of the algorithm, we first need to train an Evaluator, which is used to evaluate the user's satisfaction with the resource allocation method of a given candidate resource set. The training of the Evaluator is based on the following key features:
[0258] 1. Representation of the candidate resource set, recorded as a resource feature sequence in this disclosure: The N1 candidate resources in the candidate resource set can be encoded by the encoder structure of the Transformer, and key information such as the content, type, and quality of the candidate resources can be extracted as resource features. Based on the resource features of all candidate resources, a resource feature sequence is generated.
[0259] 3. User representation, referred to as object features in this disclosure: Based on the user's historical behavior information, personal information, preference setting information, etc., a comprehensive representation of the user (i.e., object features) is constructed.
[0260] 4. A sequence representation containing the user's N2 satisfactory resource interaction records, recorded as a record feature sequence in this disclosure: special attention is paid to the user's recent satisfactory resource interaction (or consumption) records, and the common features of these resource interaction records are extracted through sequence modeling technology to reflect the user's immediate preferences.
[0261] The goal of the Evaluater is to predict whether the resource allocation method of a given set of candidate resources meets the user's playback or consumption satisfaction. To this end, a large amount of labeled sample data can be used to train the Evaluater so that it can accurately evaluate the user's satisfaction with different resource allocation methods.
[0262] The second part is the training of the Generator. The Generator can generate the resource allocation ratio preferred by the user. Then, the Evaluater scores the resource recommendation sequence determined based on this resource allocation ratio and uses it as the reward. Finally, the Generator adjusts the model parameters according to the reward to generate a more accurate resource allocation ratio preferred by the user.
[0263] The Generator is responsible for generating a list of resource recommendations that the user may prefer and optimizing the resource allocation ratio. Its training process includes the following steps:
[0264] 1. Encode the object features and the resource feature sequence: Through the first encoding network, the object features and the resource feature sequence of the resource features containing N candidate resources are encoded to obtain the encoded features that integrate context information, user personalization information, and resource information. These features include, but are not limited to, the user's historical behavior patterns, current context information (such as time, location), the type and quality of candidate resources, etc.
[0265] 2. Encode the record feature sequence: Model the record features of the user's recently satisfied resource interactions through the second encoding network to obtain the resource common features (reflecting the development trend and potential needs of the user's preferences).
[0266] 3. Estimate the resource allocation ratio: Concatenate the output of the first encoding network, the output of the second encoding network, and the scores of various resource types ( Fig. 9 denoted as the refined ranking Q in Fig. 9 taking the prediction network including multiple DNNs as an example), and then process it through the prediction network (
[0267] After passing through the softmax layer for the output of each DNN, the quota ratio of a resource type to be allocated is obtained.
[0268] 5. Model parameter update: According to the reward value output by the Evaluator, the model parameters of the Generator are adjusted using optimization algorithms such as reinforcement learning or gradient descent. Through continuous iterative training, the Generator gradually learns how to generate resource allocation methods that can maximize user satisfaction.
[0269] It should be noted that Fig. 9 X in cls Refers to the CLS (Classification) label. In the field of deep learning, especially in the fields of NLP and computer vision, CLS is often used as an identifier or label for classification tasks. cls It uses the attention mechanism to cls The H cls User information and resource information have been integrated; X user refers to the object characteristics, H user It uses the attention mechanism to user The H user It also integrates resource information; X nid1 To X nidN1 Refers to the N1 resource features in the resource feature sequence (or the first resource feature sequence).
[0270] It should be noted that C cls The meaning of X cls Similar, I will not repeat it here; C nid1 To C nidN2 refers to the N2 record features in the record feature sequence; X nid1 To X nidN3 It refers to the N3 resource features in the resource feature sequence after quota allocation (referred to as the second resource feature sequence in this disclosure).
[0271] In summary, by deeply analyzing the user's historical behavior information and contextual information, an accurate user preference model (referred to as a resource allocation model in this disclosure) is constructed and applied to multiple key stages of the resource recommendation system. In the funnel link from coarse sorting to fine sorting, and in the funnel link between fine sorting and re-sorting, the resource allocation ratios of various resource types are allocated based on user preferences to achieve efficient resource allocation and personalized recommendations.
[0272] Moreover, by introducing the Generator+Evaluator training paradigm, this paradigm decouples the resource generation and evaluation process, allowing the model to adapt to complex and changing user preferences more flexibly. Among them, the Generator is responsible for generating resource allocation ratios based on the user's historical behavior information and current context information, and generating a resource recommendation list based on the resource allocation ratio, while the Evaluator focuses on evaluating the potential attractiveness and quality of the recommended resources in the resource recommendation list, thereby screening out the resources that best meet the user's preferences. This division of labor and cooperation model not only improves the prediction accuracy of the model, but also enhances its adaptability and robustness in practical applications. In addition, the Transformer's Encoder can be used to capture the changes and long-term trends of the user's historical satisfactory resource interaction records, and by building a rich object feature system, the model can more accurately understand the user's resource preference needs.
[0273] With the above Figures 1 to 4 Corresponding to the resource recommendation method provided in the embodiment, the present disclosure also provides a resource recommendation device. Figures 1 to 4 The resource recommendation method provided in the embodiment corresponds to the resource recommendation method, so the implementation of the resource recommendation method is also applicable to the resource recommendation device provided in the embodiment of the present disclosure, and will not be described in detail in the embodiment of the present disclosure.
[0274] Fig.10 This is a schematic diagram of the structure of the resource recommendation device provided in Embodiment 9 of the present disclosure.
[0275] like Fig.10 As shown, the resource recommendation device 1000 may include: a first acquisition module 1010 , a second acquisition module 1020 , a generation module 1030 and a determination module 1040 .
[0276] The first acquisition module 1010 is used to acquire the object features and resource feature sequence of the target object; wherein the resource feature sequence includes resource features of candidate resources of multiple resource types in the candidate resource set;
[0277] The second acquisition module 1020 is used to acquire a record feature sequence; wherein the record feature sequence includes the record feature of at least one resource interaction record of the target object within a set period of time;
[0278] A generating module 1030, for generating resource allocation ratios of multiple resource types according to object features, resource feature sequences and record feature sequences;
[0279] The determination module 1040 is used to determine a resource recommendation list from the candidate resource set according to resource allocation proportions of multiple resource types, so as to recommend the resource recommendation list to the target object.
[0280] In a possible implementation of the embodiment of the present disclosure, the generation module 1030 is used to: obtain the resource score of each candidate resource in the candidate resource set; wherein the resource score is used to indicate the quality of the candidate resource and the degree of preference of the target object for the candidate resource; determine the type score of the same resource type based on the mean of the resource scores of the candidate resources belonging to the same resource type; generate the resource allocation ratio of multiple resource types based on object features, resource feature sequences, record feature sequences and type scores of multiple resource types.
[0281] In a possible implementation of the embodiment of the present disclosure, the generation module 1030 is used to: use the first encoding network in the generator of the resource allocation model to encode the object feature and the resource feature sequence to obtain the object resource feature; use the second encoding network in the generator to encode the record feature sequence to obtain the resource common feature; splice the object resource feature, the resource common feature and the type scores of multiple resource types to obtain the spliced feature; use the prediction network in the generator to process the spliced feature to obtain the resource allocation ratio of multiple resource types.
[0282] In a possible implementation of the embodiment of the present disclosure, the determination module 1040 is used to: obtain the number of resources recommended to the target object; determine the recommended number of multiple resource types based on the number of resources and the resource allocation ratio of the multiple resource types; determine a resource recommendation list from the candidate resources of the multiple types of resources based on the recommended number of multiple resource types and the resource scores of the candidate resources of the multiple resource types.
[0283] In a possible implementation of the embodiment of the present disclosure, the second acquisition module 1020 is used to: obtain at least one resource interaction record of the target object within a set time period; determine the target object's interaction satisfaction with the resources indicated by each resource interaction record based on the interaction information of multiple dimensions in each resource interaction record; determine the target interaction record from each resource interaction record based on the interaction satisfaction of each resource interaction record; and perform feature extraction on each target interaction record to obtain a record feature sequence.
[0284] In a possible implementation of the embodiment of the present disclosure, the candidate resource set is determined by using the following modules:
[0285] A third acquisition module is used to acquire resource characteristics of multiple initial resources;
[0286] A prediction module, for predicting resource scores of the plurality of initial resources based on the object characteristics and the resource characteristics of the plurality of initial resources using a resource allocation model;
[0287] The screening module is used to determine a candidate resource set from the multiple initial resources according to the resource scores of the multiple initial resources.
[0288] In a possible implementation of the embodiments of the present disclosure, the first acquisition module 1010 is used to: obtain historical behavior information and preference setting information associated with the target object; obtain object information and context information of the target object; perform feature extraction on the historical behavior information, preference setting information, object information and context information to obtain object features of the target object.
[0289] The resource recommendation device of the disclosed embodiment combines the object characteristics of the target object, the resource characteristics of candidate resources of multiple resource types, and the record characteristics of the resource interaction records that characterize the user's resource preferences or immediate preferences within a set time period to predict the resource allocation ratios of multiple resource types preferred by the target object. This can improve the rationality and reliability of the resource allocation ratio prediction, and then recommend a resource recommendation list to the target object based on the reliable resource allocation ratio. This can ensure that the resource allocation method of the recommended resource recommendation list can meet the personalized resource preference needs of the target object, and improve the accuracy of resource recommendations in the resource recommendation list, thereby improving the user's usage experience in the resource recommendation scenario.
[0290] With the above Figures 5 to 8 Corresponding to the training method of the resource allocation model provided in the embodiment, the present disclosure also provides a training device for a resource allocation model. Figures 5 to 8 The training method of the resource allocation model provided in the embodiment corresponds to the embodiment, so the implementation method of the resource allocation model training method is also applicable to the training device of the resource allocation model provided in the embodiment of the present disclosure, and will not be described in detail in the embodiment of the present disclosure.
[0291] Fig.11 This is a structural diagram of a training device for a resource allocation model provided in Embodiment 10 of the present disclosure.
[0292] like Fig.11 As shown, the training device 1100 for the resource allocation model may include: a first acquisition module 1110 , a generation module 1120 , a determination module 1130 , a first prediction module 1140 and a first training module 1150 .
[0293] The first acquisition module 1110 is used to acquire a first sample; wherein the first sample includes a first object feature of a first sample object, a first resource feature sequence, and a first record feature sequence; the first resource feature sequence includes resource features of candidate resources of multiple resource types in a candidate resource set; the first record feature sequence includes record features of at least one resource interaction record of the first sample object within a first sample period;
[0294] A generating module 1120, configured to generate resource allocation ratios of multiple resource types according to the first sample using a generator of a resource allocation model;
[0295] A determination module 1130, configured to determine a resource recommendation list from the candidate resource set according to resource allocation ratios of multiple resource types;
[0296] A first prediction module 1140 is configured to predict a first satisfaction level of a first sample object with respect to a resource allocation method in the resource recommendation list by using a discriminator of a resource allocation model according to the resource recommendation list;
[0297] The first training module 1150 is used to train the resource allocation model based on the first satisfaction level.
[0298] In a possible implementation of the embodiments of the present disclosure, the generation module 1120 is used to: obtain a resource score for each candidate resource in the candidate resource set; wherein the resource score is used to indicate the quality of the candidate resource and the degree of preference of the first sample object for the candidate resource; determine a first score for the same resource type based on the mean of the resource scores of the candidate resources belonging to the same resource type; and use a generator to generate resource allocation ratios for multiple resource types based on the first object feature, the first resource feature sequence, the first record feature sequence, and the first scores of multiple resource types.
[0299] In a possible implementation of the embodiment of the present disclosure, the generation module 1120 is used to: use the first encoding network in the generator to encode the first object feature and the first resource feature sequence to obtain a first encoding feature; use the second encoding network in the generator to encode the first record feature sequence to obtain a second encoding feature; splice the first encoding feature, the second encoding feature and the first scores of multiple resource types to obtain a first spliced feature; use the first prediction network in the generator to process the first spliced feature to obtain the resource allocation ratio of multiple resource types.
[0300] In a possible implementation of the embodiment of the present disclosure, the first prediction module 1140 is used to: obtain a resource score for each recommended resource in the resource recommendation list, and determine a second score for the same resource type based on the average of the resource scores of the recommended resources belonging to the same resource type; obtain a second resource feature sequence; wherein the second resource feature sequence includes resource features of each recommended resource in the resource recommendation list; input the second scores of multiple resource types, the second resource feature sequence, the first record feature sequence, and the first object feature into a discriminator to obtain a first satisfaction level output by the discriminator.
[0301] In a possible implementation of the embodiment of the present disclosure, the first prediction module 1140 is used to: use the third encoding network of the discriminator to encode the first object feature and the second resource feature sequence to obtain a third encoded feature; use the fourth encoding network of the discriminator to encode the first record feature sequence to obtain a fourth encoded feature; splice the third encoded feature, the fourth encoded feature and the second scores of multiple resource types to obtain a second spliced feature; use the second prediction network of the discriminator to process the second spliced feature to obtain a first satisfaction level.
[0302] In a possible implementation of the embodiment of the present disclosure, the discriminator is a trained discriminator, and the discriminator is trained using the following modules:
[0303] A second acquisition module is used to acquire a second sample; wherein the second sample includes a second object feature of a second sample object, a third resource feature sequence, and a second record feature sequence; the third resource feature sequence includes resource features of interactive resources of multiple resource types in the interactive resource set; and the second record feature sequence includes record features of at least one resource interaction record of the second sample object in the second sample period;
[0304] A second prediction module is used to predict a second satisfaction degree of a second sample object to a resource allocation mode of an interactive resource set according to a second sample by using a discriminator;
[0305] The second training module is used to train the discriminator according to the difference between the second satisfaction level and the real satisfaction level annotated by the second sample.
[0306] In a possible implementation of the embodiment of the present disclosure, the second prediction module is used to: obtain the resource score of each interactive resource in the interactive resource set; determine the third score of the same resource type based on the average of the resource scores of the interactive resources belonging to the same resource type; input the third scores of multiple resource types, the third resource feature sequence, the second record feature sequence and the second object feature into the discriminator to obtain a second satisfaction level output by the discriminator.
[0307] In a possible implementation of the embodiment of the present disclosure, the second prediction module is used to: use the third encoding network of the discriminator to encode the second object feature and the third resource feature sequence to obtain a fifth encoding feature; use the fourth encoding network of the discriminator to encode the second record feature sequence to obtain a sixth encoding feature; splice the fifth encoding feature, the sixth encoding feature and the third scores of multiple resource types to obtain a third spliced feature; use the second prediction network of the discriminator to process the third spliced feature to obtain a second satisfaction level.
[0308] In a possible implementation of the embodiment of the present disclosure, the first training module 1150 is used to train a generator of a resource allocation model using a first satisfaction level.
[0309] The training device for the resource allocation model of the disclosed embodiment introduces a generator + discriminator training paradigm. This paradigm decouples the resource generation and evaluation processes, allowing the resource allocation model to more flexibly adapt to complex and changeable user preferences, thereby not only improving the prediction accuracy of the resource allocation model, but also enhancing the adaptability and robustness of the resource allocation model in practical applications.
[0310] In order to implement the above embodiments, the present disclosure also provides an electronic device, which may include at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the resource recommendation method or the resource allocation model training method proposed in any of the above embodiments of the present disclosure.
[0311] In order to implement the above embodiments, the present disclosure also provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the resource recommendation method or resource allocation model training method proposed in any of the above embodiments of the present disclosure.
[0312] In order to implement the above embodiments, the present disclosure further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the resource recommendation method or resource allocation model training method proposed in any of the above embodiments of the present disclosure.
[0313] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0314] Fig.12 A schematic block diagram of an example electronic device that can be used to implement an embodiment of the present disclosure is shown. Among them, the electronic device may include the server and client in the above-mentioned embodiment. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0315] like Fig.12As shown, the electronic device 1200 includes a computing unit 1201, which can perform various appropriate actions and processes according to a computer program stored in a ROM (Read-Only Memory) 1202 or a computer program loaded from a storage unit 1207 to a RAM (Random Access Memory) 1203. In the RAM 1203, various programs and data required for the operation of the device 1200 can also be stored. The computing unit 1201, the ROM 1202, and the RAM 1203 are connected to each other via a bus 1204. An I / O (Input / Output) interface 1205 is also connected to the bus 1204.
[0316] A number of components in the device 1200 are connected to the I / O interface 1205, including: an input unit 1206, such as a keyboard, a mouse, etc.; an output unit 1207, such as various types of displays, speakers, etc.; a storage unit 1208, such as a disk, an optical disk, etc.; and a communication unit 1209, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 1209 allows the device 1200 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0317] The computing unit 1201 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 1201 include, but are not limited to, a CPU (Central Processing Unit), a GPU (Graphic Processing Units), various dedicated AI (Artificial Intelligence) computing chips, various computing units that run machine learning model algorithms, a DSP (Digital Signal Processor), and any appropriate processor, controller, microcontroller, etc. The computing unit 1201 performs the various methods and processes described above, such as the resource recommendation method or the resource allocation model training method described above. For example, in some embodiments, the resource recommendation method or the resource allocation model training method described above may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 1208. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 1200 via the ROM 1202 and / or the communication unit 1209. When the computer program is loaded into RAM 1203 and executed by computing unit 1201, one or more steps of the resource recommendation method or resource allocation model training method described above may be performed. Alternatively, in other embodiments, computing unit 1201 may be configured to perform the resource recommendation method or resource allocation model training method described above in any other appropriate manner (e.g., by means of firmware).
[0318] Various embodiments of the systems and techniques described above herein may be implemented in digital electronic circuit systems, integrated circuit systems, FPGAs (Field Programmable Gate Arrays), ASICs (Application-Specific Integrated Circuits), ASSPs (Application Specific Standard Products), SOCs (System On Chips), CPLDs (Complex Programmable Logic Devices), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs that may be executed and / or interpreted on a programmable system including at least one programmable processor that may be a dedicated or general-purpose programmable processor that may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0319] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0320] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include electrical connections based on one or more lines, portable computer disks, hard disks, RAM, ROM, EPROM (Electrically Programmable Read-Only-Memory) or flash memory, optical fiber, CD-ROM (Compact Disc Read-Only Memory), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0321] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0322] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: LAN (Local Area Network), WAN (Wide Area Network), the Internet, and blockchain networks.
[0323] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services (Virtual Private Server). The server may also be a server of a distributed system, or a server combined with a blockchain.
[0324] It should be noted that artificial intelligence is a discipline that studies how computers can simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.), and includes both hardware-level and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing; artificial intelligence software technologies mainly include computer vision technology, speech recognition technology, natural language processing technology, as well as machine learning / deep learning, big data processing technology, knowledge graph technology, and other major directions.
[0325] According to the technical solution of the embodiment of the present disclosure, the resource allocation ratios of the multiple resource types preferred by the target object are predicted by combining the object characteristics of the target object, the resource characteristics of the candidate resources of multiple resource types, and the record characteristics of the resource interaction records that characterize the user's resource preferences or immediate preferences within a set time period. This can improve the rationality and reliability of the resource allocation ratio prediction, and then recommend a resource recommendation list to the target object based on the reliable resource allocation ratio. This can ensure that the resource allocation method of the recommended resource recommendation list can meet the personalized resource preference needs of the target object, and improve the accuracy of the resource recommendation in the resource recommendation list, thereby improving the user's usage experience in the resource recommendation scenario.
[0326] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0327] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A resource recommendation method, comprising: Obtaining object features and a resource feature sequence of a target object; wherein the resource feature sequence includes resource features of candidate resources of multiple resource types in a candidate resource set; Acquire a record feature sequence; wherein the record feature sequence includes the record features of at least one resource interaction record of the target object within a set time period; Generate resource allocation ratios of the multiple resource types according to the object characteristics, the resource characteristic sequence and the record characteristic sequence; According to the resource allocation proportions of the multiple resource types, a resource recommendation list is determined from the candidate resource set to recommend the resource recommendation list to the target object.
2. The method according to claim 1, wherein: Generating resource allocation proportions of the multiple resource types according to the object features, the resource feature sequence, and the record feature sequence includes: Obtaining a resource score of each of the candidate resources in the candidate resource set; wherein the resource score is used to indicate the quality of the candidate resource and the degree of preference of the target object for the candidate resource; Determining a type score of the same resource type according to an average of resource scores of candidate resources belonging to the same resource type; Resource allocation proportions of the multiple resource types are generated according to the object features, the resource feature sequence, the record feature sequence, and the type scores of the multiple resource types.
3. The method according to claim 2, wherein: Generating resource allocation proportions of the multiple resource types according to the object features, the resource feature sequence, the record feature sequence, and the type scores of the multiple resource types includes: Using a first encoding network in a generator of a resource allocation model to encode the object feature and the resource feature sequence to obtain object resource features; Using the second encoding network in the generator to encode the record feature sequence to obtain resource common features; splicing the object resource feature, the resource common feature and the type scores of the multiple resource types to obtain a spliced feature; The prediction network in the generator is used to process the splicing features to obtain resource allocation ratios of the multiple resource types.
4. The method according to claim 2, wherein: The determining of a resource recommendation list from the candidate resource set according to the resource allocation proportions of the multiple resource types includes: Obtaining the number of resources recommended to the target object; Determining the recommended quantities of the multiple resource types according to the resource quantity and the resource allocation ratios of the multiple resource types; The resource recommendation list is determined from the candidate resources of the multiple types of resources according to the recommended quantities of the multiple types of resources and the resource scores of the candidate resources of the multiple types of resources.
5. The method according to claim 1, wherein: The step of obtaining a record feature sequence comprises: Acquire at least one resource interaction record of the target object within the set time period; Determining the target object's interaction satisfaction with the resource indicated by each resource interaction record according to the interaction information of multiple dimensions in each resource interaction record; Determining a target interaction record from each of the resource interaction records according to the interaction satisfaction level of each of the resource interaction records; Feature extraction is performed on each of the target interaction records to obtain the record feature sequence.
6. The method according to any one of claims 1 to 5, wherein: The candidate resource set is determined by the following steps: Obtain resource characteristics of multiple initial resources; Using a resource recommendation model to predict resource scores of the multiple initial resources based on the object features and resource features of the multiple initial resources; The candidate resource set is determined from the multiple initial resources according to the resource scores of the multiple initial resources.
7. The method according to any one of claims 1 to 5, wherein: The object features of the target object are obtained by following the steps below: Acquire historical behavior information and preference setting information associated with the target object; Acquire object information and context information of the target object; Feature extraction is performed on the historical behavior information, the preference setting information, the object information, and the context information to obtain object features of the target object.
8. A method for training a resource allocation model, comprising: Acquire a first sample; wherein the first sample includes a first object feature of a first sample object, a first resource feature sequence, and a first record feature sequence; the first resource feature sequence includes resource features of candidate resources of multiple resource types in a candidate resource set; the first record feature sequence includes record features of at least one resource interaction record of the first sample object within a first sample period; Using the generator of the resource allocation model to generate resource allocation proportions of the multiple resource types according to the first sample; Determining a resource recommendation list from the candidate resource set according to resource allocation proportions of the multiple resource types; Using the discriminator of the resource allocation model to predict, based on the resource recommendation list, a first satisfaction level of the first sample object with respect to the resource allocation mode of the resource recommendation list; The resource allocation model is trained based on the first satisfaction level.
9. The method according to claim 8, wherein: The generator adopting the resource allocation model generates resource allocation proportions of the multiple resource types according to the first sample, including: Obtaining a resource score of each of the candidate resources in the candidate resource set; wherein the resource score is used to indicate the quality of the candidate resource and the preference of the first sample object for the candidate resource; Determining a first score of the same resource type according to an average of resource scores of candidate resources belonging to the same resource type; The generator is used to generate resource allocation proportions of the multiple resource types according to the first object feature, the first resource feature sequence, the first record feature sequence, and the first scores of the multiple resource types.
10. The method according to claim 9, wherein: The using the generator to generate resource allocation proportions of the multiple resource types according to the first object feature, the first resource feature sequence, the first record feature sequence, and the first scores of the multiple resource types includes: Using a first encoding network in the generator to encode the first object feature and the first resource feature sequence to obtain a first encoding feature; Using a second encoding network in the generator to encode the first record feature sequence to obtain a second encoding feature; Concatenate the first coding feature, the second coding feature, and the first scores of the multiple resource types to obtain a first concatenated feature; The first prediction network in the generator is used to process the first splicing feature to obtain resource allocation proportions of the multiple resource types.
11. The method according to claim 8, wherein: The discriminator using the resource allocation model predicts, according to the resource recommendation list, a first satisfaction degree of the first sample object with respect to the resource allocation mode of the resource recommendation list, including: Obtaining a resource score of each recommended resource in the resource recommendation list, and determining a second score of the same resource type according to an average of the resource scores of the recommended resources belonging to the same resource type; Acquire a second resource feature sequence; wherein the second resource feature sequence includes resource features of each of the recommended resources in the resource recommendation list; The second scores of the multiple resource types, the second resource feature sequence, the first record feature sequence, and the first object feature are input into the discriminator to obtain a first satisfaction level output by the discriminator.
12. The method according to claim 11, wherein: The step of inputting the second scores of the plurality of resource types, the second resource feature sequence, the first record feature sequence, and the first object feature into the discriminator to obtain a first satisfaction level output by the discriminator includes: Using a third encoding network of the discriminator to encode the first object feature and the second resource feature sequence to obtain a third encoding feature; encoding the first record feature sequence using a fourth encoding network of the discriminator to obtain a fourth encoding feature; Concatenate the third coding feature, the fourth coding feature, and the second scores of the multiple resource types to obtain a second concatenated feature; The second concatenated feature is processed using a second prediction network of the discriminator to obtain the first satisfaction level.
13. The method according to any one of claims 8 to 12, wherein: The discriminator is a trained discriminator, and the discriminator is trained by the following steps: Acquire a second sample; wherein the second sample includes a second object feature of a second sample object, a third resource feature sequence, and a second record feature sequence; the third resource feature sequence includes resource features of interactive resources of multiple resource types in an interactive resource set; and the second record feature sequence includes record features of at least one resource interaction record of the second sample object within a second sample period; using the discriminator to predict, based on the second sample, a second satisfaction degree of the second sample object with respect to the resource allocation mode of the interactive resource set; The discriminator is trained according to the difference between the second satisfaction level and the true satisfaction level annotated by the second sample.
14. The method according to claim 13, wherein: The step of using the discriminator to predict, based on the second sample, a second satisfaction level of the second sample object with respect to the resource allocation mode of the interactive resource set includes: Obtaining a resource score of each of the interactive resources in the interactive resource set; Determining a third score of the same resource type according to an average of resource scores of interactive resources belonging to the same resource type; The third scores of the multiple resource types, the third resource feature sequence, the second record feature sequence and the second object feature are input into the discriminator to obtain a second satisfaction level output by the discriminator.
15. The method according to claim 14, wherein: The step of inputting the third scores of the plurality of resource types, the third resource feature sequence, the second record feature sequence, and the second object feature into the discriminator to obtain a second satisfaction level output by the discriminator includes: encoding the second object feature and the third resource feature sequence using a third encoding network of the discriminator to obtain a fifth encoding feature; encoding the second record feature sequence using a fourth encoding network of the discriminator to obtain a sixth encoding feature; Concatenate the fifth coding feature, the sixth coding feature, and the third scores of the multiple resource types to obtain a third concatenated feature; The third concatenated feature is processed using a second prediction network of the discriminator to obtain the second satisfaction level.
16. The method according to claim 13, wherein: The training of the resource allocation model according to the first satisfaction level includes: The first satisfaction level is used to train a generator of the resource allocation model.
17. A resource recommendation device, comprising: A first acquisition module is used to acquire object features and a resource feature sequence of a target object; wherein the resource feature sequence includes resource features of candidate resources of multiple resource types in a candidate resource set; A second acquisition module is used to acquire a record feature sequence; wherein the record feature sequence includes the record features of at least one resource interaction record of the target object within a set time period; A generating module, configured to generate resource allocation ratios of the plurality of resource types according to the object characteristics, the resource characteristic sequence and the record characteristic sequence; A determination module is used to determine a resource recommendation list from the candidate resource set according to the resource allocation proportions of the multiple resource types, so as to recommend the resource recommendation list to the target object.
18. The device according to claim 17, wherein: The generating module is used for: Obtaining a resource score of each of the candidate resources in the candidate resource set; wherein the resource score is used to indicate the quality of the candidate resource and the degree of preference of the target object for the candidate resource; Determining a type score of the same resource type according to an average of resource scores of candidate resources belonging to the same resource type; Resource allocation proportions of the multiple resource types are generated according to the object features, the resource feature sequence, the record feature sequence, and the type scores of the multiple resource types.
19. The device according to claim 18, wherein: The generating module is used for: Using a first encoding network in a generator of a resource allocation model to encode the object feature and the resource feature sequence to obtain object resource features; Using the second encoding network in the generator to encode the record feature sequence to obtain resource common features; splicing the object resource feature, the resource common feature and the type scores of the multiple resource types to obtain a spliced feature; The prediction network in the generator is used to process the splicing features to obtain resource allocation ratios of the multiple resource types.
20. The device according to claim 18, wherein The determining module is used to: Obtaining the number of resources recommended to the target object; Determining the recommended quantities of the multiple resource types according to the resource quantity and the resource allocation ratios of the multiple resource types; The resource recommendation list is determined from the candidate resources of the multiple types of resources according to the recommended quantities of the multiple types of resources and the resource scores of the candidate resources of the multiple types of resources.
21. The device according to claim 17, wherein: The second acquisition module is used to: Acquire at least one resource interaction record of the target object within the set time period; Determining the target object's interaction satisfaction with the resource indicated by each resource interaction record according to the interaction information of multiple dimensions in each resource interaction record; Determining a target interaction record from each of the resource interaction records according to the interaction satisfaction level of each of the resource interaction records; Feature extraction is performed on each of the target interaction records to obtain the record feature sequence.
22. The device according to any one of claims 17 to 21, wherein: The candidate resource set is determined by the following modules: A third acquisition module is used to acquire resource characteristics of multiple initial resources; A prediction module, configured to predict resource scores of the multiple initial resources based on the object features and the resource features of the multiple initial resources using a resource recommendation model; A screening module is used to determine the candidate resource set from the multiple initial resources according to the resource scores of the multiple initial resources.
23. The device according to any one of claims 17 to 21, wherein: The first acquisition module is used to: Acquire historical behavior information and preference setting information associated with the target object; Acquire object information and context information of the target object; Feature extraction is performed on the historical behavior information, the preference setting information, the object information, and the context information to obtain object features of the target object.
24. A training device for a resource allocation model, comprising: A first acquisition module is used to acquire a first sample; wherein the first sample includes a first object feature of a first sample object, a first resource feature sequence, and a first record feature sequence; the first resource feature sequence includes resource features of candidate resources of multiple resource types in a candidate resource set; the first record feature sequence includes record features of at least one resource interaction record of the first sample object within a first sample period; A generating module, configured to generate resource allocation ratios of the plurality of resource types according to the first sample by using the generator of the resource allocation model; A determination module, configured to determine a resource recommendation list from the candidate resource set according to resource allocation proportions of the multiple resource types; A first prediction module, configured to use the discriminator of the resource allocation model to predict a first satisfaction of the first sample object with respect to a resource allocation method of the resource recommendation list according to the resource recommendation list; The first training module is used to train the resource allocation model based on the first satisfaction level.
25. The device according to claim 24, wherein: The generating module is used for: Obtaining a resource score of each of the candidate resources in the candidate resource set; wherein the resource score is used to indicate the quality of the candidate resource and the preference of the first sample object for the candidate resource; Determining a first score of the same resource type according to an average of resource scores of candidate resources belonging to the same resource type; The generator is used to generate resource allocation proportions of the multiple resource types according to the first object feature, the first resource feature sequence, the first record feature sequence, and the first scores of the multiple resource types.
26. The device according to claim 25, wherein The generating module is used for: Using a first encoding network in the generator to encode the first object feature and the first resource feature sequence to obtain a first encoding feature; Using a second encoding network in the generator to encode the first record feature sequence to obtain a second encoding feature; Concatenate the first coding feature, the second coding feature, and the first scores of the multiple resource types to obtain a first concatenated feature; The first prediction network in the generator is used to process the first splicing feature to obtain resource allocation proportions of the multiple resource types.
27. The device according to claim 24, wherein: The first prediction module is used to: Obtaining a resource score of each recommended resource in the resource recommendation list, and determining a second score of the same resource type according to an average of the resource scores of the recommended resources belonging to the same resource type; Acquire a second resource feature sequence; wherein the second resource feature sequence includes resource features of each of the recommended resources in the resource recommendation list; The second scores of the multiple resource types, the second resource feature sequence, the first record feature sequence, and the first object feature are input into the discriminator to obtain a first satisfaction level output by the discriminator.
28. The device according to claim 27, wherein The first prediction module is used to: Using a third encoding network of the discriminator to encode the first object feature and the second resource feature sequence to obtain a third encoding feature; encoding the first record feature sequence using a fourth encoding network of the discriminator to obtain a fourth encoding feature; Concatenate the third coding feature, the fourth coding feature, and the second scores of the multiple resource types to obtain a second concatenated feature; The second concatenated feature is processed using a second prediction network of the discriminator to obtain the first satisfaction level.
29. The device according to any one of claims 24 to 28, wherein: The discriminator is a trained discriminator, and the discriminator is trained using the following modules: A second acquisition module is used to acquire a second sample; wherein the second sample includes a second object feature of a second sample object, a third resource feature sequence, and a second record feature sequence; the third resource feature sequence includes resource features of interactive resources of multiple resource types in an interactive resource set; and the second record feature sequence includes record features of at least one resource interaction record of the second sample object within a second sample period; A second prediction module, configured to use the discriminator to predict, based on the second sample, a second satisfaction level of the second sample object with respect to the resource allocation mode of the interactive resource set; The second training module is used to train the discriminator according to the difference between the second satisfaction level and the real satisfaction level annotated by the second sample.
30. The device according to claim 29, wherein The second prediction module is used to: Obtaining a resource score of each of the interactive resources in the interactive resource set; Determining a third score of the same resource type according to an average of resource scores of interactive resources belonging to the same resource type; The third scores of the multiple resource types, the third resource feature sequence, the second record feature sequence and the second object feature are input into the discriminator to obtain a second satisfaction level output by the discriminator.
31. The device according to claim 30, wherein The second prediction module is used to: encoding the second object feature and the third resource feature sequence using a third encoding network of the discriminator to obtain a fifth encoding feature; encoding the second record feature sequence using a fourth encoding network of the discriminator to obtain a sixth encoding feature; Concatenate the fifth coding feature, the sixth coding feature, and the third scores of the multiple resource types to obtain a third concatenated feature; The third concatenated feature is processed using a second prediction network of the discriminator to obtain the second satisfaction level.
32. The device according to claim 29, wherein: The first training module is used to: The first satisfaction level is used to train a generator of the resource allocation model.
33. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the resource recommendation method described in any one of claims 1-7, or execute the resource allocation model training method described in any one of claims 8-16.
34. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to enable the computer to execute the resource recommendation method according to any one of claims 1-7, or to execute the resource allocation model training method according to any one of claims 8-16.
35. A computer program product, comprising a computer program, which, when executed by a processor, implements the steps of the resource recommendation method according to any one of claims 1 to 7, or, when executed, implements the training method of the resource allocation model according to any one of claims 8 to 16.
Citation Information
Patent Citations
Reading resource comment pushing method and system
CN107798012A
Model training method and device, resource recommendation method and device, electronic equipment and storage medium
CN114564644A
Recommendation model training method and device
CN116541610A
Resource classification model training method, resource recommendation method and device
CN116932790A
Resource recommendation method, and multi-target fusion model training method and apparatus
WO2023040494A1