Training method of sorting model, resource sorting method, device and equipment
By introducing a dynamic feature fusion mechanism of gated adapter and resource tower network in the sorting model, the balance between common characteristics and personalized characteristics in cross-scene recommendation is solved, and the prediction accuracy and personalized recommendation effect of the model are improved.
Patent Information
- Application Number
- CN202510405264.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-01
- Publication Date
- 2025-07-29
AI Technical Summary
The existing sorting model is difficult to take into account common generalization and personalization characteristics in cross-scene recommendations, resulting in a decrease in the model's ability to capture fine-grained user intentions.
The sorting model based on the dual-tower neural network is adopted, and the gated adapter is used to generate adaptation parameters based on the scene identification, dynamic feature fusion is performed through the resource tower network and the interaction layer, and the model parameters are updated based on the estimated value and the loss value of the actual results, so as to realize personalized recommendations across scenarios.
The prediction accuracy of the model in different scenarios is improved, ensuring the ability to generalize across scenarios, while accurately capturing local feature differences, and enhancing personalized recommendation capabilities.
Smart Images

Figure CN120387027A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technologies, and particularly to the fields of deep learning and intelligent recommendation technologies. Background Art
[0002] The core process of a resource recommendation system generally includes resource recall and resource ranking. When a user triggers a request, the client will first trigger a request to the resource aggregation module. Through multiple recall engines, according to different attributes of resources, corresponding strategies are adopted to recall resources, and a candidate set of millions of levels is quickly extracted from a massive resource pool. Subsequently, it enters the hierarchical ranking stage to score the resources. After the scoring is completed, the resources and their scores will be returned to the aggregation module, and finally, the global optimal integration is implemented by the aggregation layer to generate a recommended resource list to be issued. Summary of the Invention
[0003] The present disclosure provides a training method for a ranking model, a resource ranking method, an apparatus, a device, and a storage medium.
[0004] According to a first aspect of the present disclosure, there is provided a training method for a ranking model, including:
[0005] Using a gated adapter of a first ranking model, determining first adaptation parameters according to scene identifiers of multiple scenarios;
[0006] Using a resource tower network of the first ranking model, dynamically fusing a first representation vector and a second representation vector of multiple sample resources according to the first adaptation parameters to obtain sample resource features;
[0007] Using an interaction layer of the first ranking model, determining an estimated value of an interaction behavior generated by a sample subject for the multiple sample resources according to the sample resource features and sample subject features of the sample subject;
[0008] Updating model parameters of the first ranking model according to a loss value between the estimated value and an actual result of the interaction behavior to obtain a trained second ranking model.
[0009] According to a second aspect of the present disclosure, there is provided a resource ranking method, including:
[0010] Determining a target scene and multiple candidate resources to be ranked;
[0011] Using a ranking model, determining second adaptation parameters of a gated adapter according to a scene identifier of the target scene;
[0012] Dynamically fusing a first representation vector and a second representation vector of the multiple candidate resources according to the second adaptation parameters to obtain resource features;
[0013] Determine the sorting result of the multiple candidate resources according to the resource characteristics and the object characteristics of the target object;
[0014] Among them, the sorting model is obtained according to the training method provided in the first aspect.
[0015] According to the third aspect of the present disclosure, there is provided a training device for a sorting model, including:
[0016] A first parameter module, configured to use the gated adapter of the first sorting model to determine first adaptation parameters according to the scene identifiers of multiple scenarios;
[0017] A fusion module, configured to use the resource tower network of the first sorting model to dynamically fuse the first representation vector and the second representation vector of multiple sample resources according to the first adaptation parameters to obtain sample resource characteristics;
[0018] A prediction module, configured to use the interaction layer of the first sorting model to determine an estimated value of the interaction behavior of the sample subject with respect to the multiple sample resources according to the sample resource characteristics and the sample subject characteristics of the sample subject;
[0019] A training module, configured to update the model parameters of the first sorting model according to the loss value between the estimated value and the actual result of the interaction behavior to obtain a trained second sorting model.
[0020] According to the fourth aspect of the present disclosure, there is provided a resource sorting device, including:
[0021] An acquisition module, configured to determine a target scene and multiple candidate resources to be sorted;
[0022] A second parameter module, configured to use the sorting model to determine second adaptation parameters of the gated adapter according to the scene identifier of the target scene;
[0023] An adjustment module, configured to dynamically fuse the first representation vector and the second representation vector of the multiple candidate resources according to the second adaptation parameters to obtain resource characteristics;
[0024] An inference module, configured to determine the sorting result of the multiple candidate resources according to the resource characteristics and the object characteristics of the target object;
[0025] Among them, the sorting model is obtained according to the training method provided in the first aspect.
[0026] According to another 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 executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute any method in the embodiments of the present disclosure.
[0030] According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute any method in the embodiments of the present disclosure.
[0031] According to another aspect of the present disclosure, there is provided a computer program product including a computer program, and the computer program implements any method in the embodiments of the present disclosure when executed by a processor.
[0032] According to the present disclosure, the sorting model can dynamically adjust the output representation vector for various scenarios, improving the prediction accuracy of the model.
[0033] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it used 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
[0034] The drawings are used to better understand the solution and do not constitute a limitation to the present disclosure. Among them:
[0035] Figure 1 is a schematic flowchart of a method for training a sorting model provided by an embodiment of the present disclosure;
[0036] Figure 2 is a partial structural block diagram of a sorting model provided by an embodiment of the present disclosure;
[0037] Figure 3 is a schematic flowchart of a resource sorting method provided by an embodiment of the present disclosure;
[0038] Figure 4 is a schematic structural diagram of a training device for a sorting model provided by an embodiment of the present disclosure;
[0039] Figure 5 is a schematic structural diagram of a resource sorting device provided by an embodiment of the present disclosure;
[0040] Figure 6 is a block diagram of an electronic device that can implement the embodiments of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0041] The exemplary embodiments of the present disclosure will be described below with reference to the accompanying drawings. Various details of the embodiments of the present disclosure are included to facilitate understanding, and they should be considered merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0042] In the related art, the framework of the ranking model can use a two-tower neural network as the main network, jointly train data in different scenarios, and estimate the probability that a target object (a specific actor) has an interaction behavior in the current resource. In the resource tower network, a shared interaction general representation network is used, and the general expression of the actor's interaction behavior is strengthened through the method of model transfer learning. Starting from the fact that the behavior patterns of actors also have common characteristics in different scenarios, the generalization ability of the model in multiple scenarios is improved. In addition, cross-scenario learning can significantly reduce the resource overhead on the resource side with fewer resource vector dimensions. However, jointly training data in different scenarios brings many problems. For example, the personalized features of some scenarios will be ignored, reducing the model's ability to capture fine-grained user intentions.
[0043] To at least partially solve one or more of the above problems and other potential problems, the embodiments of the present disclosure provide a training method for a ranking model and a resource ranking method. By using the technical solutions of the embodiments of the present disclosure, the ranking model can dynamically adjust the output representation vector for various scenarios, avoid ignoring personalized features, and improve the estimation accuracy of the model.
[0044] Figure 1 It is a schematic flowchart of a training method for a ranking model provided by an embodiment of the present disclosure. As Figure 1 shown, the method at least includes the following steps:
[0045] S110. Using the gating adapter of the first ranking model, determine the first adaptation parameter according to the scenario identifiers of multiple scenarios.
[0046] In the embodiments of the present disclosure, the first sorting model may be based on a dual - tower neural network as the main network, where a gated adapter is used to generate corresponding first adaptation parameters according to different scenarios. Scenarios can be divided according to different dimensions. For example, they can be divided into video push scenarios / graphic - text push scenarios / live - channel recommendation scenarios according to business requirements. Or different pages corresponding to different channels or entrances on an application can be divided into different scenarios, such as the home page / detail page / activity page / flash - sale page. For another example, scenarios can be divided into day scenarios / night scenarios, etc. A unique identifier (SceneID) is generated for each scenario as the scenario identifier, and is mapped to a low - dimensional dense vector through an Embedding layer. The gated adapter can train to obtain corresponding first adaptation parameters according to different scenario identifiers. All scenarios share the same set of adapter network parameters and only achieve differential outputs through input scenario representations. Therefore, the gated adapter can also be understood as a dynamic parameter generator.
[0047] S120. Use the resource tower network of the first sorting model to dynamically fuse the first representation vectors and the second representation vectors of multiple sample resources according to the first adaptation parameters to obtain sample resource features.
[0048] In the embodiments of the present disclosure, multiple sample resources can be a batch of candidate resources obtained through recall, or a batch of candidate resources obtained after rough sorting or fine sorting. These candidate resources need to be sorted again to further screen out resources that match the preferences of a specific behavioral subject, so as to increase the possibility that the behavioral subject generates interactive behaviors for the recommended resources. Interactive behaviors can refer to interactive behaviors such as clicking, playing, liking, commenting, forwarding, collecting, downloading, etc. The first adaptation parameters can adjust the first representation vectors and the second representation vectors, so that the input signals of the same resource can be further activated or inhibited in different scenarios. After adjustment, the two are fused to obtain sample resource features. Since the first adaptation parameters for different scenarios are independent of each other, for different scenarios, the input signals of the same resource are dynamically adjusted and fused.
[0049] The first adaptation parameter scale can be understood as a weight parameter, which is used to perform weight scaling on the first representation vectors and the second representation vectors. For example, when scale = 1, it means to retain the original features; when scale>1, it means to enhance the importance of this dimension for the current scenario; when scale<1, it means to suppress non - critical dimensions.
[0050] S130. Use the interaction layer of the first sorting model to determine the estimated values of the interactive behaviors of the sample subject for multiple sample resources according to the sample resource features and the sample subject features of the sample subject.
[0051] In the embodiments of the present disclosure, the interaction layer is responsible for calculating the matching degree between the sample body representation of the sample body and the sample resource features after dynamic adjustment, so as to quantify the interaction tendency of the sample body with each sample resource, that is, the predicted value. Specifically:
[0052] The behavior body tower deeply encodes the attribute features (such as age, gender), historical behavior sequence, real-time interest, etc. of the sample body to generate a low-dimensional dense sample body representation vector.
[0053] The matching score between the sample body representation and the sample resource features is calculated by using the method of summing after vector dot product or Hadamard product.
[0054] For probability prediction tasks such as click-through rate, the score can be further mapped to a probability value in the range of 0 to 1 through the Sigmoid function, representing the click possibility of the sample body on the resource.
[0055] If multiple interaction behaviors (such as like, favorite) need to be predicted simultaneously, the interaction layer can introduce a multi-task learning mechanism, such as the Multi-gate Mixture-of-Experts (MMoE), and parallelly output multi-behavior predicted values through sharing underlying features and independent task heads.
[0056] S140. Update the model parameters of the first ranking model according to the loss value between the predicted value and the actual result of the interaction behavior, so as to obtain the trained second ranking model.
[0057] In the embodiments of the present disclosure, for binary classification tasks (such as click-through rate prediction), binary cross-entropy loss (BCE Loss) can be used to calculate the loss value, and the loss value can optimize one or more of the following model parameters through backpropagation:
[0058] Gating adapter: Adjust the generation logic of scene dynamic parameters;
[0059] Resource tower shared representation layer: Improve the cross-scene general feature extraction ability;
[0060] Sample body tower network: Enhance the fine-grained expression ability of behavior body interest modeling.
[0061] In the initial stage of training, the shared network parameters of the resource tower can be fixed, and the parameters of the gating adapter and the behavior body tower can be preferentially optimized to avoid premature destruction of cross-scene common features.
[0062] When the stopping conditions for model training are met, such as loss convergence or the number of iterations reaching a threshold, the updated model parameters are persisted as the second ranking model. The second ranking model inherits the structure of the first ranking model, but through dynamic scenario adaptation and multi-objective joint training, it has stronger personalized recommendation capabilities and scenario generalization.
[0063] According to the solution of the embodiments of the present disclosure, by dynamically adjusting feature weights according to different scenarios, the prediction accuracy is improved. The dynamic fusion mechanism driven by the gating adapter enables the model to accurately capture local feature differences in different scenarios while maintaining cross-scenario generalization.
[0064] In a possible implementation, step S120 uses the resource tower network of the first ranking model to dynamically fuse the first representation vectors and the second representation vectors of multiple sample resources according to the first adaptation parameter to obtain sample resource features, which further includes the steps of:
[0065] S121. Determine the first representation vector according to the common attribute information of multiple sample resources.
[0066] In the embodiments of the present disclosure, the common attribute information can be understood as the core features that are stable across scenarios for resources, including but not limited to:
[0067] Basic attributes: resource type (video / picture text), title semantics, cover visual features, author credibility, etc.;
[0068] Global statistical features: historical cross-scenario click-through rate, resource quality score, content classification labels (such as technology, entertainment).
[0069] As Figure 2 shown, the shared network layer of the resource tower extracts resource common features from the common attribute information through cross-scenario joint training to generate the first representation vector (common feature). The first representation vector can express the basic attractiveness of the resource in any scenario, ensuring cross-scenario generalization ability. The first representation vector can also be considered as common features, general features or shared features.
[0070] S122. Determine the second representation vector according to the personalized attribute information of multiple sample resources.
[0071] Personalized attributes can be understood as the dynamic performance features of resources in specific scenarios, including but not limited to:
[0072] Scene-sensitive statistics: current scene click volume, in-scene completion rate, real-time interaction heat;
[0073] Contextual association features: the matching degree of the resource with the scene interest category (such as "the relevance of technology resources in the technology channel scene").
[0074] The scene adaptation layer of the resource tower extracts scene-sensitive features and generates a second representation vector ( Figure 2 the uniquefeature in). The second representation vector is used to capture the local differences of resources in the current scene. For example, the exposure value differences of popular resources between "Home Page Recommendation" and "Activity Page". The second representation vector can enhance the competitiveness of resources in a specific scene. The second representation vector can also be regarded as personalized features or scene-sensitive features.
[0075] S123. Using the resource tower network of the first ranking model, according to the first adaptation parameter, dynamically fuse the first representation vector and the second representation vector to obtain sample resource features.
[0076] As Figure 2 shown, after the door adapter Gate NU obtains the scene representation domain feature, it outputs the first adaptation parameter. According to the first adaptation parameter, the first representation vector (common feature) and the second representation vector (uniquefeature) can be dynamically adjusted and fused, and a certain feature can be enhanced / suppressed to adjust the scene adaptability of the feature. The obtained sample resource features are re-input as new embedding parameters into the embedding layer of the upper prediction network ( Figure 2 the H1...Hn in).
[0077] In this way, on the basis of ensuring cross-scene generalization ability, scene-specific information is injected. Avoid the mutual interference between common features and individual features, and reduce the risk of model overfitting. On the other hand, the same resource can obtain different feature expressions in different scenes (for example, a certain video emphasizes cover attractiveness on the "Home Page" and content relevance on the "Details Page"). Thus, scene perception is enhanced, and the interest of the target object in the current scene (such as "travel category") is accurately matched with the resource scene attributes (such as "popular content on the travel channel").
[0078] According to the solution of the embodiment of the present disclosure, through the collaborative design of hierarchical feature decoupling-dynamic fusion, the problem that traditional recommendation models are difficult to balance common generalization and individual precision in cross-scene recommendation is solved. The sharing of network parameters for reuse avoids repeated calculations, achieving the characteristics of global sharing and local adaptation. The gating adapter adopts a modular design and can be seamlessly embedded into the two-tower structure.
[0079] In a possible implementation, step S120 uses the resource tower network of the first ranking model, according to the first adaptation parameter, to dynamically fuse the first representation vectors and the second representation vectors of multiple sample resources to obtain sample resource features, and further includes the steps of:
[0080] S124: Perform a weight scaling operation on the first characterization vectors and / or the second characterization vectors of the multiple sample resources according to the first adaptation parameter.
[0081] S125 : Fusing the scaled first representation vector and the second representation vector to obtain sample resource features.
[0082] In the disclosed embodiments, the first adaptation parameter may be applied to the first characterization vector or the second characterization vector, or to both of them simultaneously. The first adaptation parameter may have the same number of dimensions as the first characterization vector or the second characterization vector, thereby enabling differential adjustments to be made to both the first characterization vector and the second characterization vector simultaneously, thereby achieving dynamic adaptation.
[0083] In one example, the 64-dimensional first representation vector is:
[0084] e shared =[0.8,1.2,-0.5,...,0.6]
[0085] The gate adapter output for a scene:
[0086] scale=[0.3,-0.1,0.5,...,-0.2]
[0087] Each feature dimension in the first representation vector can be element-wise scaled. When the scaling factor of a dimension is greater than 0, it means that the contribution of the dimension to the current scene is strengthened. When the scale is less than 0, it means that the interference of features irrelevant to the scene is weakened.
[0088] The final personalized representation is:
[0089] e adapted =[0.8*(1+0.3),1.2*(1-0.1),-0.5*(1+0.5),...,0.6*(1-0.2)]=[1.04,1.08
[0090] ,-0.75,...,0.48]
[0091] The scaled general representation is concatenated with the scene-sensitive representation to avoid information loss caused by feature compression through concatenation or dynamic weighting.
[0092] According to the solution of the embodiment of the present disclosure, the feature expression priority of the resource is dynamically adjusted through the first adaptation parameter, so that the same resource activates different feature dimensions in different scenarios. The separation design of general representation and scenario-sensitive representation enables the model to inherit common knowledge across scenarios and quickly adapt to the personalized needs of new scenarios. The gated adapter has a small number of parameters, and the lightweight adapter helps to ensure that the computational overhead is controllable.
[0093] In a possible implementation, step S130 uses the interaction layer of the first ranking model to determine an estimated value of the interaction behavior of the sample subject with respect to multiple sample resources based on the sample resource features and the sample subject features of the sample subject, and further includes the steps of:
[0094] S131. Use the behavior subject tower network of the first ranking model to dynamically fuse the third representation vector and the fourth representation vector of the sample subject according to the first adaptation parameter to obtain the sample subject features.
[0095] S132. Use the interaction layer of the first ranking model to obtain interaction features based on the sample resource features and the sample subject features.
[0096] S133. Determine an estimated value of the interaction behavior of the sample subject with respect to multiple sample resources according to the interaction features.
[0097] In the embodiments of the present disclosure, the third representation vector is a common representation generated based on the long-term and stable features of the behavior subject, such as age, gender, historical long-term interests (such as "preference for technology content"), and cross-scenario behavior statistics (such as historical click-through rate). The fourth representation vector is a personalized representation generated based on the dynamic features of the behavior subject in the current scenario, such as: the real-time interest category of the user in the current scenario (such as "travel channel"), short-term behavior sequence (resource set clicked in the recent 30 minutes); the context state in the current scenario (such as residence duration, page scroll depth).
[0098] After the sample resource features and the sample subject features are both adjusted according to the first adaptation parameter, the two are summed by vector dot product or Hadamard product to obtain the interaction features.
[0099] Then, according to the interaction features, calculate the matching score between the sample subject representation and the sample resource features. The interaction features can be input into a multi-layer perceptron, and the estimated value is output through a non-linear transformation.
[0100] According to the solution of the embodiments of the present disclosure, the same behavior subject and resources can obtain different matching scores in different scenarios. For example, a certain product focuses on cost performance on the "home page" and focuses on discount strength on the "activity page". Through long-term-real-time feature fusion, the model can not only capture the stable preferences of the behavior subject but also quickly adapt to the short-term needs in different scenarios.
[0101] In a possible implementation, step S131 uses the behavior subject tower network of the first ranking model to dynamically fuse the third representation vector and the fourth representation vector of the sample subject according to the first adaptation parameter to obtain the sample subject features, and further includes the steps of:
[0102] S131-1. Determine the third representation vector according to the common attribute information of the sample subject.
[0103] S131-2. Determine the fourth representation vector according to the personalized attribute information of the sample subject.
[0104] S131-3. Dynamically fuse the third representation vector and the fourth representation vector according to the first adaptation parameter to obtain the resource feature.
[0105] In the embodiments of the present disclosure, similar to the common attribute information and personalized attribute information of the sample resource, the common attribute of the sample subject can be understood as cross-scenario stable features, such as age, gender, long-term interest tags (such as "technology enthusiasts"), and historical global behavior statistics (such as historical average click-through rate). The above common features are extracted through the shared network layer of the behavior subject tower to obtain the third representation vector, thereby constructing the basic portrait of the behavior subject and ensuring the consistency of cross-scenario recommendations.
[0106] The personalized attribute can be understood as the scenario-sensitive dynamic feature of the behavior subject, such as: the real-time behavior sequence of the current scenario (such as the list of resource IDs clicked in the recent 10 minutes), and the scenario context state (such as page stay duration, current interest category). The above dynamic features are extracted through the behavior subject tower to obtain the fourth representation vector, thereby capturing the preferences of the user's short-term intention strongly related to the scenario context.
[0107] According to the solution of the embodiments of the present disclosure, the common features ensure cross-scenario stability (such as long-term preferences), and the personalized features capture real-time intentions such as temporary search behaviors.
[0108] In a possible implementation manner, step S131 uses the behavior subject tower of the first ranking model to dynamically fuse the third representation vector and the fourth representation vector of the sample subject according to the first adaptation parameter to obtain the sample subject feature, and further includes the steps of:
[0109] S131-4. Perform a weight scaling operation on the third representation vector and / or the fourth representation vector according to the first adaptation parameter.
[0110] S131-5. Fuse the scaled third representation vector and the fourth representation vector to obtain the behavior subject feature.
[0111] In the embodiments of the present disclosure, the first adaptation parameter can act on the third representation vector or the fourth representation vector, or act on the third representation vector and the fourth representation vector at the same time. The first adaptation parameter can have the same number of dimensions as the third representation vector or the fourth representation vector, so as to simultaneously make differential adjustments to the third representation vector and the fourth representation vector. For example, element-wise scaling can be performed on each feature dimension of the third representation vector. When the scaling coefficient scale of a certain dimension > 0, it represents strengthening the contribution of this dimension to the current scenario, and when scale < 0, it represents weakening the interference of features irrelevant to the scenario.
[0112] The scaled third representation vector and the fourth representation vector are concatenated or dynamically weighted to obtain the behavioral subject feature, avoiding information loss caused by feature compression.
[0113] According to the solution of the embodiment of the present disclosure, the feature expression priority of the sample subject is dynamically adjusted through the first adaptation parameter, so that the sample subject activates different feature dimensions in different scenarios. Through the dynamic decoupling and fusion of common and individual features, the organic unity of "stable basic portrait" and "agile scenario response" is achieved.
[0114] In a possible implementation manner, step S110 uses the gated adapter of the first sorting model to determine the first adaptation parameter according to the scene identifiers of multiple scenarios, and further includes the steps of:
[0115] S111. Determine the scene representation vector of each scene according to the scene identifiers of multiple scenarios.
[0116] S112. Input the scene representation vector into the gated adapter to obtain the first adaptation parameter.
[0117] In the embodiment of the present disclosure, a unique identifier is generated for each scene (for example, the home page scene ID = 101, the live broadcast scene ID = 205). Complex scenes can be hierarchically split (such as the first-level category "video stream" and the second-level subclass "landscape short video stream"), and after being encoded by the Embedding layer and concatenated respectively, the scene semantic information is enhanced. The SceneID is input into the Embedding table and mapped to a low-dimensional dense vector (such as 128 dimensions) to capture the implicit semantic features of the scene.
[0118] According to the solution of the embodiment of the present disclosure, the same set of gated networks will generate different adapter parameters for different scene inputs. The scene representation vectors can be cluster-analyzed to verify the proximity of similar business scenarios in the vector space. Through hierarchical encoding and statistical features, reasonable representations can be quickly generated for new scenes without retraining the model.
[0119] In a possible implementation manner, step S112 inputs the scene representation vector into the gated adapter to obtain the first adaptation parameter, and further includes the steps of:
[0120] Input the scene representation vector into the first fully connected layer of the gated adapter to obtain an intermediate adaptation parameter.
[0121] Input the intermediate adaptation parameter into the second fully connected layer of the gated adapter to obtain the first adaptation parameter.
[0122] Among them, the dimension number of the first adaptation parameter is the same as the dimension number of the scene representation vector, and the dimension number of the intermediate adaptation parameter is less than the dimension number of the first adaptation parameter.
[0123] In the embodiments of the present disclosure, the gated adapter adopts a two-layer neural network, with the input being the scene representation vector and the output being the adaptation parameter vector. In one example, a two-layer fully connected network (including non-linear activation) is used as a universal approximator. The trainable parameters W1 and W2 of the gating network are shared by all scenes, and only the input scene representation vector is used to distinguish scene differences.
[0124] The gated adapter can use a Bottleneck structure, such as input 64 dimensions → compressed to 16 dimensions → restored to 64 dimensions. Compression stage (64 → 16 dimensions): Through a fully connected layer + ReLU activation, the common features across scenes are retained (such as the long-term interests of the actors and the category attributes of resources). Expansion stage (16 → 64 dimensions): Through a fully connected layer + Sigmoid activation, the dimensions are restored and the scene-sensitive features are dynamically weighted.
[0125] According to the solution of the embodiments of the present disclosure, a lightweight adapter network is shared across all scenes, ensuring that each feature dimension can be independently regulated, while reducing the number of parameters of the adapter, lowering the complexity of the adapter, and greatly reducing the storage overhead. The "global sharing ability" and "local adaptation ability" of the recommendation system under multi-scene requirements are efficiently unified.
[0126] Figure 3 It is a schematic flowchart of a resource sorting method provided by an embodiment of the present disclosure. As Figure 3 shown, the method at least includes the following steps:
[0127] S310. Determine the target scene and multiple candidate resources to be sorted.
[0128] In the embodiments of the present disclosure, the target scene is determined according to the current task scene (such as "home page information flow" or "search page"), and a set of candidate resources to be sorted is determined (such as products, videos, articles, advertisements, etc.).
[0129] S320. Use the sorting model to determine the second adaptation parameter of the gated adapter according to the scene identifier of the target scene.
[0130] According to the scene identifier of the target scene, the pre-trained gated adapter parameters are loaded from the sorting model to obtain the second adaptation parameter, which is used as the weight for dynamically adapting to the current scene.
[0131] S330. Dynamically fuse the first representation vector and the second representation vector of the multiple candidate resources according to the second adaptation parameter to obtain resource features.
[0132] Similar to the first and second representation vectors of the sample resources, the first and second representation vectors of the candidate resources respectively capture the resource's own attributes and scene-related attributes, which are usually generated by independent sub-networks. The first and second representation vectors of the candidate resources can be obtained by the same method as that for obtaining the first and second representation vectors of the sample resources.
[0133] Using the second adaptation parameter, perform weighted fusion on the first and second representation vectors of the candidate resources. Determine the importance of different features through gating weights (for example, statistical feature weights are higher in the home page scene, and semantic features are more critical in the search scene).
[0134] S340. Determine the sorting results of multiple candidate resources according to the resource features and the object features of the target object.
[0135] Among them, the sorting model is obtained according to the training method provided in any of the foregoing embodiments.
[0136] The target object can be understood as the behavior subject that currently initiates a resource request. The object features can be obtained by the same method as that for obtaining the sample subject features of the sample subject. Combine the resource features with the object features of the target object, calculate the scores of the candidate resources (such as click-through rate, conversion rate), and sort according to the scores to obtain the sorting results.
[0137] According to the solution of the embodiments of the present disclosure, through scene identification-driven dynamic parameter generation and multi-feature dynamic fusion, unified and efficient deployment of the sorting model in multiple scenarios and multiple tasks is achieved. Through the gating adapter, "model parameter sceneization" is realized, and the output representation vectors are dynamically adjusted for various scenarios, avoiding the neglect of personalized features and improving the prediction accuracy of the model. At the same time, there is no need to train a separate model for each scene. Only the corresponding adaptation parameters are generated by the gating adapter as dynamic weights, which only increases a small amount of computational overhead, reduces the deployment and maintenance costs, and the dynamic weight allocation enables the model to adaptively emphasize key features. On the other hand, it can also solve the problem of multi-scene data distribution differences (such as different behavior patterns in different scenes).
[0138] In a possible implementation manner, step S330 further includes steps of dynamically fusing the first and second representation vectors of multiple candidate resources according to the second adaptation parameter to obtain resource features:
[0139] Determine the first representation vector according to the common attribute information of multiple candidate resources.
[0140] Determine the second representation vector according to the personalized attribute information of multiple candidate resources.
[0141] Dynamically fuse the first and second representation vectors according to the second adaptation parameter to obtain resource features.
[0142] In the embodiments of the present disclosure, the first and second characterization vectors of the candidate resources can be obtained by the same method as that of the above S121 - S123, and the resource features can be obtained by further performing dynamic fusion according to the second adaptation parameter, which will not be elaborated here.
[0143] In a possible implementation manner, step S330 further includes steps of performing dynamic fusion on the first characterization vector and the second characterization vector of multiple candidate resources according to the second adaptation parameter to obtain resource features:
[0144] Perform a weight scaling operation on the first characterization vector and / or the second characterization vector of multiple candidate resources according to the second adaptation parameter.
[0145] Fuse the scaled first characterization vector and the second characterization vector to obtain resource features.
[0146] In the embodiments of the present disclosure, the first characterization vector and / or the second characterization vector can be weighted and scaled and fused according to the second adaptation parameter by the same method as that of the above S124 - S125 to obtain resource features, which will not be elaborated here.
[0147] In a possible implementation manner, step S340 further includes steps of determining the sorting result of multiple candidate resources according to the resource features and the object features of the target object:
[0148] S341. Determine a third characterization vector according to the common attribute information of the target object.
[0149] S342. Determine a fourth characterization vector according to the personalized attribute information of the target object.
[0150] S343. Perform dynamic fusion on the third characterization vector and the fourth characterization vector according to the second adaptation parameter to obtain object features.
[0151] S344. Determine the sorting result of multiple candidate resources according to the resource features and the object features of the target object.
[0152] In the embodiments of the present disclosure, the third and fourth characterization vectors of the target object can be obtained by the same method as that of the above S131 - 1 - S131 - 3, and the object features can be obtained by further performing dynamic fusion according to the second adaptation parameter, which will not be elaborated here.
[0153] In a possible implementation manner, step S343 further includes steps of performing dynamic fusion on the third characterization vector and the fourth characterization vector according to the second adaptation parameter to obtain object features:
[0154] Perform a weight scaling operation on the third characterization vector and / or the fourth characterization vector according to the second adaptation parameter.
[0155] Fuse the scaled third feature vector and fourth feature vector to obtain an object feature.
[0156] In an embodiment of the present disclosure, the third feature vector and / or the fourth feature vector can be weighted and scaled and fused according to the second adaptation parameter by the same method as in S131-4 to S131-5 above to obtain an object feature, which will not be elaborated here.
[0157] In a possible implementation, step S344 determines the sorting result of multiple candidate resources according to the resource feature and the object feature of the target object, and further includes the steps of:
[0158] According to the resource feature and the object feature of the target object, determine the probability that the target object generates an interaction behavior with multiple candidate resources in the target scenario.
[0159] Sort the multiple candidate resources according to the probability to obtain a sorting result.
[0160] In an embodiment of the present disclosure, the fused resource feature and object feature are input into a prediction module to calculate the probability value that each candidate resource is triggered by the target object to generate an interaction behavior in the target scenario.
[0161] The interaction behavior probability refers to the estimated probability that the target object generates a specific behavior (such as clicking, favoriting) for a candidate resource in a specific scenario, and is the core basis for sorting.
[0162] Sort the candidate resources from high to low according to the probability value, and directly output the Top-K result or re-sort in combination with business rules (such as diversity, fairness) to obtain a sorting result.
[0163] According to the solution of the embodiment of the present disclosure, through multi-modal feature cross-modeling and probability-driven sorting decision-making, the accurate matching of user intentions and resource values in complex scenarios is realized. The probability values of the same resource in different scenarios change dynamically, balancing the short-term effect and long-term goal of the recommendation system.
[0164] In a possible implementation, step S320 determines the second adaptation parameter of the gating adapter according to the scene identifier of the target scenario, and further includes the steps of:
[0165] Encode the scene identifier of the target scenario to obtain a scene feature vector.
[0166] Determine the second adaptation parameter from a preset relationship table according to the scene feature vector.
[0167] In the embodiments of the present disclosure, discrete scene identifiers (such as scene IDs and scene names) are mapped into low-dimensional continuous scene representation vectors through an encoder. The scene representation vector is used as a query (Query) to retrieve a matching set of adaptation parameters, i.e., the second adaptation parameters, in a preset relationship table (which can be regarded as a parameter matrix).
[0168] According to the solution of the embodiments of the present disclosure, through scene representation encoding and parameter relationship table retrieval, efficient and interpretable scene adaptation parameter allocation is achieved, which is particularly suitable for rapid deployment under a fixed set of scenes.
[0169] The above solution solves the problem of balancing common and individual characteristics in cross-scene recommendation through a hybrid architecture of dynamic gating and static sharing. The core of dynamically generating lightweight adapter parameters lies in driving parameter generation through scene features, and these parameters are completely obtained through model training. The adapter parameters are modeled as a function of scene features through a trainable gating network. By using a low-rank network + parameter sharing + residual connection, the computational overhead is controlled while ensuring dynamicity. Joint optimization enables the gating network to learn both cross-scene commonalities and capture scene specificities.
[0170] The adapter parameters are generated through model training, but their generation process is conditional and dynamic, rather than static parameter storage in the traditional sense, which helps the recommendation system solve the contradiction between large-scale scene personalization and computational efficiency.
[0171] Figure 4 It is a schematic structural diagram of a training device for a ranking model provided by an embodiment of the present disclosure. As Figure 4 shown, the device 400 includes:
[0172] A first parameter module 401, configured to use the gating adapter of the first ranking model to determine first adaptation parameters according to the scene identifiers of multiple scenes;
[0173] A fusion module 402, configured to use the resource tower network of the first ranking model to dynamically fuse the first representation vector and the second representation vector of multiple sample resources according to the first adaptation parameters to obtain sample resource features;
[0174] A prediction module 403, configured to use the interaction layer of the first ranking model to determine an estimated value of the interaction behavior of the sample subject with respect to multiple sample resources according to the sample resource features and the sample subject features of the sample subject;
[0175] A training module 404, configured to update the model parameters of the first ranking model according to the loss value between the estimated value and the actual result of the interaction behavior to obtain a trained second ranking model.
[0176] In a possible implementation manner, the fusion module 402 is configured to:
[0177] Perform a weight scaling operation on the first representation vectors and / or the second representation vectors of multiple sample resources according to the first adaptation parameter;
[0178] Fuse the scaled first representation vectors and second representation vectors to obtain sample resource features.
[0179] In a possible implementation, the fusion module 402 is used to:
[0180] Determine the first representation vector according to the common attribute information of multiple sample resources;
[0181] Determine the second representation vector according to the personalized attribute information of multiple sample resources;
[0182] Use the resource tower network of the first ranking model to dynamically fuse the first representation vector and the second representation vector according to the first adaptation parameter to obtain sample resource features.
[0183] In a possible implementation, the prediction module 403 is used to:
[0184] Use the actor tower network of the first ranking model to dynamically fuse the third representation vector and the fourth representation vector of the sample subject according to the first adaptation parameter to obtain sample subject features;
[0185] Use the interaction layer of the first ranking model to obtain interaction features according to the sample resource features and the sample subject features;
[0186] Determine the estimated value of the interaction behavior of the sample subject on multiple sample resources according to the interaction features.
[0187] In a possible implementation, the prediction module 403 is used to:
[0188] Perform a weight scaling operation on the third representation vector and / or the fourth representation vector according to the first adaptation parameter;
[0189] Fuse the scaled third representation vector and fourth representation vector to obtain sample subject features.
[0190] In a possible implementation, the prediction module 403 is used to:
[0191] Determine the third representation vector according to the common attribute information of the sample subject;
[0192] Determine the fourth representation vector according to the personalized attribute information of the sample subject;
[0193] Dynamically fuse the third representation vector and the fourth representation vector according to the first adaptation parameter to obtain sample subject features.
[0194] In a possible implementation, the first parameter module 401 is configured to:
[0195] Determine a scene representation vector for each scene according to the scene identifiers of multiple scenes;
[0196] Input the scene representation vector into a gated adapter to obtain first adaptation parameters.
[0197] In a possible implementation, the first parameter module 401 is configured to:
[0198] Input the scene representation vector into the first fully-connected layer of the gated adapter to obtain intermediate adaptation parameters;
[0199] Input the intermediate adaptation parameters into the second fully-connected layer of the gated adapter to obtain first adaptation parameters;
[0200] Wherein, the number of dimensions of the first adaptation parameters is the same as the number of dimensions of the scene representation vector, and the number of dimensions of the intermediate adaptation parameters is less than the number of dimensions of the first adaptation parameters.
[0201] Figure 5 It is a schematic structural diagram of a resource sorting device provided by an embodiment of the present disclosure. As Figure 5 shown, the device 500 includes:
[0202] An acquisition module 501, configured to determine a target scene and multiple candidate resources to be sorted;
[0203] A second parameter module 502, configured to use a sorting model to determine second adaptation parameters of a gated adapter according to the scene identifier of the target scene;
[0204] An adjustment module 503, configured to dynamically fuse the first representation vector and the second representation vector of the multiple candidate resources according to the second adaptation parameters to obtain resource features;
[0205] An inference module 504, configured to determine a sorting result of the multiple candidate resources according to the resource features and the object features of a target object;
[0206] Wherein, the sorting model is obtained according to the training method provided in any of the above embodiments.
[0207] In a possible implementation, the adjustment module 503 is configured to:
[0208] Determine a first representation vector according to the common attribute information of multiple candidate resources.
[0209] Determine a second representation vector according to the personalized attribute information of multiple candidate resources.
[0210] Dynamically fuse the first representation vector and the second representation vector according to the second adaptation parameter to obtain a resource feature.
[0211] In a possible implementation, the adjustment module 503 is configured to:
[0212] Perform a weight scaling operation on the first representation vector and / or the second representation vector of multiple candidate resources according to the second adaptation parameter.
[0213] Fuse the scaled first representation vector and the second representation vector to obtain a resource feature.
[0214] In a possible implementation, the inference module 504 is configured to:
[0215] Determine a third representation vector according to the common attribute information of the target object.
[0216] Determine a fourth representation vector according to the personalized attribute information of the target object.
[0217] Dynamically fuse the third representation vector and the fourth representation vector according to the second adaptation parameter to obtain an object feature.
[0218] Determine the sorting result of multiple candidate resources according to the resource feature and the object feature of the target object.
[0219] In a possible implementation, the inference module 504 is configured to:
[0220] Perform a weight scaling operation on the third representation vector and / or the fourth representation vector according to the second adaptation parameter.
[0221] Fuse the scaled third representation vector and the fourth representation vector to obtain an object feature.
[0222] In a possible implementation, the inference module 504 is configured to:
[0223] Determine the probability that the target object generates an interaction behavior with multiple candidate resources in the target scenario according to the resource feature and the object feature of the target object.
[0224] Sort multiple candidate resources according to the probability to obtain a sorting result.
[0225] In a possible implementation, the second parameter module 502 is configured to:
[0226] Encode the scene identifier of the target scenario to obtain a scene representation vector.
[0227] Determine the second adaptation parameter from a preset relationship table according to the scene representation vector.
[0228] For the specific functions and example descriptions of the modules and sub-modules of the device according to the embodiments of the present disclosure, reference may be made to the relevant descriptions of the corresponding steps in the above method embodiments, which will not be elaborated herein.
[0229] In the technical solution of the present disclosure, the acquisition, storage, and application of the user's personal information involved all comply with the provisions of relevant laws and regulations and do not violate public order and good customs.
[0230] 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.
[0231] Figure 6 FIG. shows a schematic block diagram of an exemplary electronic device 600 that can be used to implement the embodiments of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as, for example, a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, for example, a personal digital assistant, a cellular phone, a smart phone, a wearable device, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely exemplary and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0232] As Figure 6 shown, the device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0233] A plurality of components in the device 600 are connected to the I / O interface 605, including: an input unit 606, such as a keyboard, a mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a magnetic disk, an optical disk, etc.; and a communication unit 609, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0234] The computing unit 601 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 601 executes the various methods and processes described above, such as the training method of the sorting model or the resource sorting method. For example, in some embodiments, the training method of the sorting model or the resource sorting method can be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as the storage unit 608. In some embodiments, part or all of the computer program can be loaded and / or installed onto the device 600 via the ROM 602 and / or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the computing unit 601, one or more steps of the training method of the sorting model or the resource sorting method described above can be executed. Alternatively, in other embodiments, the computing unit 601 can be configured to execute the training method of the sorting model or the resource sorting method in any other suitable way (e.g., by means of firmware).
[0235] The various embodiments of the systems and techniques described above in this document can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a dedicated or general-purpose programmable processor, and can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit the data and instructions to the storage system, the at least one input device, and the at least one output device.
[0236] The program code for implementing the methods of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to the processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing devices, such that when the program codes are executed by the processor or controller, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The program codes can be executed entirely on the machine, partially on the machine, as an independent software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0237] In the context of this disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0238] For providing 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 a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds 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, speech input, or tactile input).
[0239] The systems and techniques described herein can 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 having a graphical user interface or a web browser through which the user can interact with an implementation 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 can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of a communication network include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0240] A computer system may include a client and a server. The client and the server are generally far away 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 respective computers and having a client-server relationship with each other. The server may be a cloud server, or a server of a distributed system, or a server incorporating a blockchain.
[0241] It should be understood that various forms of the processes shown above may be used, steps may be reordered, added or deleted. For example, the steps recited in the present disclosure may be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, and no limitation is imposed herein.
[0242] The above specific embodiments do not constitute a limitation on the protection scope of the present disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the principles of the present disclosure shall be included within the protection scope of the present disclosure.
Claims
1. A training method for a sorting model, comprising: Using the gating adapter of the first sorting model to determine first adaptation parameters according to the scenario identifiers of multiple scenarios; Using the resource tower network of the first sorting model to dynamically fuse the first representation vector and the second representation vector of multiple sample resources according to the first adaptation parameters to obtain sample resource features; Using the interaction layer of the first sorting model to determine an estimated value of the interaction behavior of the sample subject with respect to the multiple sample resources according to the sample resource features and the sample subject features of the sample subject; Updating the model parameters of the first sorting model according to the loss value between the estimated value and the actual result of the interaction behavior to obtain a trained second sorting model.
2. The method according to claim 1, wherein, The step of using the resource tower network of the first sorting model to dynamically fuse the first representation vector and the second representation vector of multiple sample resources according to the first adaptation parameters to obtain sample resource features includes: Performing a weight scaling operation on the first representation vector and / or the second representation vector of multiple sample resources according to the first adaptation parameters; Fusing the scaled first representation vector and the second representation vector to obtain sample resource features.
3. The method according to claim 1, wherein The step of using the resource tower network of the first sorting model to dynamically fuse the first representation vector and the second representation vector of multiple sample resources according to the first adaptation parameters to obtain sample resource features includes: Determining a first representation vector according to the common attribute information of multiple sample resources; Determining a second representation vector according to the personalized attribute information of the multiple sample resources; Using the resource tower network of the first sorting model to dynamically fuse the first representation vector and the second representation vector according to the first adaptation parameters to obtain sample resource features.
4. The method according to claim 1, wherein The step of using the interaction layer of the first sorting model to determine an estimated value of the interaction behavior of the sample subject with respect to the multiple sample resources according to the sample resource features and the sample subject features of the sample subject includes: Using the behavior subject tower network of the first sorting model to dynamically fuse the third representation vector and the fourth representation vector of the sample subject according to the first adaptation parameters to obtain sample subject features; Using the interaction layer of the first sorting model to obtain interaction features according to the sample resource features and the sample subject features; Determining an estimated value of the interaction behavior of the sample subject with respect to the multiple sample resources according to the interaction features.
5. The method according to claim 4, wherein, The step of using the behavior subject tower network of the first sorting model to dynamically fuse the third representation vector and the fourth representation vector of the sample subject according to the first adaptation parameters to obtain sample subject features includes: Performing a weight scaling operation on the third representation vector and / or the fourth representation vector according to the first adaptation parameters; Fusing the scaled third representation vector and the fourth representation vector to obtain behavior subject features.
6. The method according to claim 4, wherein: The step of using the behavior subject tower network of the first sorting model to dynamically fuse the third representation vector and the fourth representation vector of the sample subject according to the first adaptation parameters to obtain sample subject features includes: Determine a third representation vector according to the personalized attribute information of the sample subject; Determine a fourth representation vector according to the personalized attribute information of the sample subject; Dynamically fuse the third representation vector and the fourth representation vector according to the first adaptation parameter to obtain the sample subject feature.
7. The method according to claim 1, wherein The using of the gated adapter of the first sorting model to determine the first adaptation parameter according to the scene identifiers of multiple scenarios includes: Determine the scene representation vector of each scene according to the scene identifiers of multiple scenarios; Input the scene representation vector into the gated adapter to obtain the first adaptation parameter.
8. The method according to claim 7, wherein The inputting the scene representation vector into the gated adapter to obtain the first adaptation parameter includes: Input the scene representation vector into the first fully connected layer of the gated adapter to obtain an intermediate adaptation parameter; Input the intermediate adaptation parameter into the second fully connected layer of the gated adapter to obtain the first adaptation parameter; Wherein, the number of dimensions of the first adaptation parameter is the same as the number of dimensions of the scene representation vector, and the number of dimensions of the intermediate adaptation parameter is less than the number of dimensions of the first adaptation parameter.
9. A resource sorting method, including: Determine the target scene and multiple candidate resources to be sorted; Use the sorting model to determine the second adaptation parameter of the gated adapter according to the scene identifier of the target scene; Dynamically fuse the first representation vector and the second representation vector of the multiple candidate resources according to the second adaptation parameter to obtain the resource feature; Determine the sorting result of the multiple candidate resources according to the resource feature and the object feature of the target object; Wherein, the sorting model is obtained according to the training method provided in any one of claims 1 to 8.
10. The method according to claim 9, wherein, The dynamically fusing the first representation vector and the second representation vector of multiple candidate resources according to the second adaptation parameter to obtain the resource feature includes: Determine the first representation vector according to the personalized attribute information of multiple candidate resources; Determine the second representation vector according to the personalized attribute information of the multiple candidate resources; Dynamically fuse the first representation vector and the second representation vector according to the second adaptation parameter to obtain the resource feature.
11. The method according to claim 9, wherein, The dynamically fusing the first representation vector and the second representation vector of multiple candidate resources according to the second adaptation parameter to obtain the resource feature includes: Perform a weight scaling operation on the first representation vector and / or the second representation vector of multiple candidate resources according to the second adaptation parameter; Fuse the scaled first representation vector and the second representation vector to obtain the resource feature.
12. The method according to claim 9, wherein, The determining the sorting result of the multiple candidate resources according to the resource feature and the object feature of the target object includes: Determine the third representation vector according to the personalized attribute information of the target object; Determine the fourth representation vector according to the personalized attribute information of the target object; Dynamically fuse the third representation vector and the fourth representation vector according to the second adaptation parameter to obtain the object feature; The determining the sorting result of the multiple candidate resources according to the resource feature and the object feature of the target object.
13. The method according to claim 12, wherein, Dynamically fusing the third feature vector and the fourth feature vector according to the second adaptation parameter to obtain an object feature, including: Performing a weight scaling operation on the third feature vector and / or the fourth feature vector according to the second adaptation parameter; Fusing the scaled third feature vector and the fourth feature vector to obtain an object feature.
14. The method according to claim 9, wherein, Determining a sorting result of the multiple candidate resources according to the resource feature and the object feature of the target object, including: Determining the probability that the target object generates an interaction behavior with the multiple candidate resources in the target scenario according to the resource feature and the object feature of the target object; Sorting the multiple candidate resources according to the probability to obtain a sorting result.
15. The method according to claim 9, wherein Determining a second adaptation parameter of the gating adapter according to the scene identifier of the target scenario, including: Encoding the scene identifier of the target scenario to obtain a scene feature vector; Determining a second adaptation parameter from a preset relationship table according to the scene feature vector.
16. A training device for a sorting model, including: A first parameter module, configured to use a gating adapter of a first sorting model to determine a first adaptation parameter according to scene identifiers of multiple scenarios; A fusion module, configured to use a resource tower network of the first sorting model to dynamically fuse a first feature vector and a second feature vector of multiple sample resources according to the first adaptation parameter to obtain sample resource features; A prediction module, configured to use an interaction layer of the first sorting model to determine an estimated value of the interaction behavior of the sample subject with the multiple sample resources according to the sample resource features and the sample subject features of the sample subject; A training module, configured to update model parameters of the first sorting model according to a loss value between the estimated value and an actual result of the interaction behavior to obtain a trained second sorting model.
17. A resource sorting device, including: An acquisition module, configured to determine a target scenario and multiple candidate resources to be sorted; A second parameter module, configured to use a sorting model to determine a second adaptation parameter of a gating adapter according to the scene identifier of the target scenario; An adjustment module, configured to dynamically fuse a first feature vector and a second feature vector of the multiple candidate resources according to the second adaptation parameter to obtain resource features; An inference module, configured to determine a sorting result of the multiple candidate resources according to the resource features and the object features of the target object; wherein, the sorting model is obtained according to the training method provided in any one of claims 1 to 9.
18. An electronic device, including: 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 method according to any one of claims 1-15.
19. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to execute the method according to any one of claims 1-15.
20. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 15.