Resource recommendation method and device, equipment and storage medium

By fusing features from resource processing and location processing models, the problems of low efficiency and large location bias in recommendation systems are solved, resulting in more accurate and diverse recommendation results.

CN120849706APending Publication Date: 2025-10-28BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510962234.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-11
Publication Date
2025-10-28

AI Technical Summary

Technical Problem

Existing recommendation systems suffer from low efficiency, large positional bias, and insufficient diversity and accuracy of recommendation results during multi-level filtering.

Method used

By combining resource processing and location processing models, and through attention layers, feedforward neural networks, and low-rank matrix adaptation mechanisms, feature fusion of candidate resources and location information is performed to optimize multi-objective modeling and recommendation strategies.

Benefits of technology

It improves the efficiency of the recommendation system, reduces location bias, and enhances the accuracy and diversity of recommendation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120849706A_ABST
    Figure CN120849706A_ABST
Patent Text Reader

Abstract

The invention provides a resource recommendation method and device, equipment and a storage medium, and relates to the technical field of data processing, in particular to the technical field of neural networks and intelligent recommendation. The specific implementation scheme is as follows: inputting a candidate resource set into a resource processing model to obtain a first feature; wherein the candidate resource set comprises a plurality of candidate resources; and obtaining resource recommendation information corresponding to the candidate resource set according to the first feature. The method can be used for application scenes such as generative search, intelligent document editing, intelligent assistants, virtual assistants and intelligent e-commerce.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of data processing technology, and in particular to the fields of neural networks and intelligent recommendation technology. Background Technology

[0002] Recommendation systems typically employ a multi-level filtering paradigm. For example, a recommendation system can use a multi-stage funnel model to filter resources such as users, content, and items layer by layer. First, based on a series of preset filtering conditions and a shallow model, massive amounts of resources are filtered in multiple rounds to reduce the candidate resource set. Then, various models are used to score and rank the candidate resources, and combined with diversity strategies, the final resources are distributed. Summary of the Invention

[0003] This disclosure provides a resource recommendation method, apparatus, device, and storage medium.

[0004] According to one aspect of this disclosure, a resource recommendation method is provided, comprising:

[0005] The candidate resource set is input into the resource processing model to obtain the first feature; wherein, the candidate resource set includes multiple candidate resources;

[0006] Based on this first feature, resource recommendation information corresponding to the candidate resource set is obtained.

[0007] According to another aspect of this disclosure, a method for training a resource processing model is provided, comprising:

[0008] Input the sample resource set into the resource processing model to be trained to obtain the predicted resource level in the sample resource set and the predicted set level of the sample resource set.

[0009] The resource processing model is trained based on the loss function calculated at the predicted resource level and the predicted set level.

[0010] According to another aspect of this disclosure, a resource recommendation apparatus is provided, comprising:

[0011] The first processing module is used to input the candidate resource set into the resource processing model to obtain the first feature; wherein, the candidate resource set includes multiple candidate resources;

[0012] The recommendation module is used to obtain resource recommendation information corresponding to the candidate resource set based on the first feature.

[0013] According to another aspect of this disclosure, a resource processing model training apparatus is provided, comprising:

[0014] The second processing module is used to input the sample resource set into the resource processing model to be trained, and to obtain the predicted resource level in the sample resource set and the predicted set level of the sample resource set.

[0015] The training module is used to train the resource processing model based on the loss function calculated at the predicted resource level and the predicted set level.

[0016] According to another aspect of this disclosure, an electronic device is provided, comprising:

[0017] At least one processor; and

[0018] The memory is communicatively connected to the at least one processor; wherein,

[0019] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform any of the methods described in the present disclosure.

[0020] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are used to cause the computer to perform any of the methods according to embodiments of this disclosure.

[0021] According to another aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements any of the methods according to embodiments of this disclosure.

[0022] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0023] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:

[0024] Figure 1 This is a flowchart illustrating a resource recommendation method according to an embodiment of the present disclosure;

[0025] Figure 2 This is a schematic diagram of the resource processing model;

[0026] Figure 3 This is a diagram illustrating the scoring of different resources in different locations;

[0027] Figure 4 This is a schematic diagram of the position encoder.

[0028] Figure 5This is a flowchart illustrating a resource recommendation method according to another embodiment of the present disclosure;

[0029] Figure 6 This is a schematic diagram of the combination of the resource processing model and the location processing model;

[0030] Figure 7 This is a schematic diagram of the attention layer in the resource processing model;

[0031] Figure 8 This is a flowchart illustrating a resource processing model training method according to an embodiment of the present disclosure;

[0032] Figure 9 This is a flowchart illustrating a resource processing model training method according to another embodiment of the present disclosure;

[0033] Figure 10 This is a flowchart illustrating a resource processing model training method according to another embodiment of the present disclosure;

[0034] Figure 11 This is a schematic diagram of the structure of a resource recommendation device according to an embodiment of the present disclosure;

[0035] Figure 12 This is a schematic diagram of the structure of a resource recommendation device according to another embodiment of the present disclosure;

[0036] Figure 13 This is a schematic diagram of the structure of a resource processing model training device according to an embodiment of the present disclosure;

[0037] Figure 14 This is a schematic diagram of the structure of a resource processing model training device according to another embodiment of the present disclosure;

[0038] Figure 15 This is a schematic diagram illustrating the method of forming a sequence from a set of resources;

[0039] Figure 16 This is a schematic diagram of the neural network training process;

[0040] Figure 17 This is a schematic diagram of the overall recommendation system;

[0041] Figure 18 This is a schematic diagram of a multi-target attention mechanism based on low-rank matrix adaptation;

[0042] Figure 19 This is a block diagram of an electronic device used to implement embodiments of the present disclosure. Detailed Implementation

[0043] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0044] Figure 1 This is a flowchart illustrating a resource recommendation method 100 according to an embodiment of the present disclosure, the method comprising:

[0045] S110. Input the candidate resource set into the resource processing model to obtain the first feature; wherein, the candidate resource set includes multiple candidate resources;

[0046] S120. Based on the first feature, obtain the resource recommendation information corresponding to the candidate resource set.

[0047] In this embodiment of the disclosure, the candidate resource set may include candidate resources. The types of candidate resources may include various types, such as video resources, audio resources, image resources, web page resources, etc. Candidate resources may also be referred to as resources to be recommended, resources to be selected, input resources, etc. For example, a candidate resource set A including candidate resource 1, candidate resource 2, and candidate resource 3 can be represented as "candidate resource set A = {candidate resource 1, candidate resource 2, candidate resource 3}". The resource processing model can be a model pre-trained based on samples from the resource set. There can be various model architectures; for example, a neural network model such as a Transformer model can be used as the basic architecture of the resource processing model. In one example, such as... Figure 2As shown, the resource processing model may include an attention layer 201, one or more normalization layers 202 and 204, and a feed-forward neural network (FFN, also known as FNN or FFNN) layer 203. The candidate resource set is processed by a linear projection layer and then input into the resource processing model. The resource processing model can be a multi-head attention layer, or other types of attention layers such as multi-head attention mechanisms and low-rank matrix adaptation (LoRA) attention layers. After processing by the attention layer, further processing can be performed through the FFN layer. The FFN layer can be a general FFN layer, or it can include a Mixture of Experts (MOE) FFN layer, which includes multiple FFNs corresponding to different objectives. The attention layer and FFN layer can optimize multi-objective modeling and output the first feature of the candidate resource set. The specific objectives in multi-objective modeling can be flexibly set according to specific needs, resource types, etc. For example, if the resource types include video, audio, and images, the resource processing objectives can include likes, shares, clicks, views, etc.

[0048] In this embodiment of the disclosure, the resource processing model obtains a first feature, which may include intermediate features during the model processing or output features of the model. Based on the output features, resource recommendation information can be obtained. For example, the resource recommendation information may include the scores of each candidate resource, and / or the recommended resources finally selected from the candidate resource set. For example, if the candidate resource set includes 300 resources, 10 resources may be recommended in the end.

[0049] According to embodiments of this disclosure, batch processing of resources in the candidate resource set using a resource processing model can improve recommendation efficiency.

[0050] In one embodiment, the method further includes: inputting location information into a location processing model to obtain a second feature. Further, step S120 may include obtaining the candidate resource set and resource recommendation information corresponding to the location information based on the first feature and the second feature.

[0051] In this embodiment of the disclosure, location information may include multiple locations where resources are permitted to be displayed. For example, a webpage may display multiple locations, each of which may display one resource. Figure 3 As shown, a page contains 8 locations, numbered {0, 1, 2, 3, 4, 5, 6, 7}. The sequence of location numbers in the example above can be used as location information input to a location processing model. The location processing model can include a position encoder. The position encoder can also use a neural network model as its architecture. For example, ... Figure 4 As shown, the position encoder may include a multi-head attention layer 401, one or more normalization layers 402 and 404, a cross-attention layer 403, and a feedforward neural network layer 405. Position information is processed by a linear projection layer and then input into the position processing model. It is further processed through a multi-head attention mechanism introduced by the attention layer of the position processing model. Then, it is fused with intermediate features from the resource processing model through a cross-attention mechanism. After further processing by a normalization layer and a feedforward neural network layer, a second feature relating to the fusion of position and resources can be output.

[0052] In this embodiment, the resource recommendation information may include the discriminative scores of each candidate resource at different positions, and / or the recommended resources corresponding to different positions. First, the first feature and the second feature can be fused again, for example, by performing matrix multiplication on the first feature and the second feature, to obtain the discriminative scores of each candidate resource in the candidate resource set at different positions. This discriminative score can be understood as a kind of resource recommendation information. Further, based on the discriminative scores of each candidate resource at different positions, the recommended resources corresponding to different positions can be obtained. For example, see [link to relevant documentation]. Figure 3 Candidate resource S1 scores 0.1 at position 0, 0.15 at position 1, 0.04 at position 2, and 0.11 at position 3; candidate resource S2 scores 0.01 at position 0, 0.07 at position 1, 0.02 at position 2, and 0.06 at position 3; candidate resource S3 scores 0.02 at position 0, 0.04 at position 1, 0.31 at position 2, and 0.03 at position 3. Based on the combined scores of each resource at different positions, it is recommended to place candidate resource S1 at position 1, candidate resource S2 at position 3, and candidate resource S3 at position 2.

[0053] According to embodiments of this disclosure, feature fusion can be performed on candidate resource sets and location information through resource processing models and location processing models to obtain resource recommendation information corresponding to location information, which can improve recommendation efficiency, reduce location bias, and improve the diversity and accuracy of recommendation results.

[0054] Figure 5 This is a flowchart illustrating a resource recommendation method 500 according to another embodiment of the present disclosure. Method 500 can be used to implement step S110 in resource recommendation method 100. In one embodiment, method 500 includes: inputting a candidate resource set into a resource processing model to obtain a first feature, and further includes:

[0055] S510. Input the candidate resource set into the resource processing model to obtain the first intermediate feature;

[0056] S520. Process the first intermediate feature to obtain the first output feature.

[0057] In one implementation, the method further includes: S530, inputting the first intermediate feature into the location processing model.

[0058] In this embodiment of the disclosure, intermediate features of the candidate resource set processed by the resource processing model can be input into the location processing model and fused with location information. See also Figure 6 The candidate resource set can be processed by a linear projection layer and then input into the resource processing model 610. After processing by the attention layer 611 and the first normalization layer 612 of the resource processing model, the first intermediate feature is obtained. The attention layer 611 can be a multi-head attention layer or a low-rank matrix can be introduced. For example, the first normalization layer can perform addition and normalization based on the input and output features of the attention layer. On one hand, the first intermediate feature can be input into the cross-attention layer 623 of the location processing model 620 and fused with location information; on the other hand, the first intermediate feature can be further processed by the FFN layer 613 and the second normalization layer 614 of the resource processing model to obtain the first output feature. The FFN layer 613 can have one or more FFNs. For example, the second normalization layer can perform addition and normalization based on the input and output features of the FFN layer.

[0059] According to embodiments of this disclosure, by further fusing the first intermediate features of the resource processing model with the features of the location processing model, the two models can achieve a deeper fusion of resource and location features, thereby reducing location bias and improving the accuracy of recommendation results.

[0060] In one implementation, step S510 inputs the candidate resource set into the resource processing model to obtain a first intermediate feature, and further includes: obtaining the first intermediate feature through the attention layer of the resource processing model based on the candidate resource set; wherein the attention layer is used to fuse the shared attention feature and the target attention feature corresponding to the candidate resource set.

[0061] In this embodiment, the attention layer of the resource processing model can introduce a low-rank matrix, combined with a multi-head attention mechanism, to process the features of the candidate resource set according to different objectives, obtaining target attention features. Furthermore, the attention layer can also process the features of the candidate resource set using a shared approach, obtaining shared attention features. Then, fusing the shared features with the target features yields the first intermediate features of the candidate resource set. For example, the attention targets of the attention layer may include clicks, duration, and sharing; corresponding target attention features can be obtained for different attention targets, and these target features are then fused with the shared features.

[0062] According to embodiments of this disclosure, shared features and target features are obtained by processing the candidate resource set through a low-rank matrix and a multi-head attention mechanism. By fusing the shared features and target features, the adaptive ability of the recommendation system to multiple task objectives can be improved, and the accuracy of the recommendation results can be increased.

[0063] In one implementation, based on the candidate resource set, a first intermediate feature is obtained through the attention layer of the resource processing model, further comprising: performing linear projection processing on the resource set features of the candidate resource set to obtain linear projection features; processing the linear projection features through the attention layer of the resource processing model to obtain attention features; and processing the attention features through the first normalization layer of the resource processing model to obtain the first intermediate feature.

[0064] In this embodiment, resource set features can be extracted from the candidate resource set. These features can be linearly projected using a linear projection layer to obtain linear projection features. This linear projection layer can be part of the resource processing model or independent of it. Linear projection can map the original input features to multiple subspaces and can also change the dimensionality of the input features, for example, by reducing the dimensionality. After inputting the resource set features corresponding to the candidate resource set into the linear projection layer, the resource set features can be mapped to a new feature space, resulting in linear projection features. Next, the linear projection features can be input into the attention layer of the resource processing model. A low-rank matrix-adapted multi-target attention mechanism transforms the linear projection features into features in a multi-dimensional subspace. The multi-dimensional subspace can include a shared subspace module and a target subspace module. The features of the target subspace module can correspond to attention representations of multiple specific targets, and the features of the shared subspace module can correspond to shared attention representations. Merging the attention representations of each subspace yields attention features. Then, the attention features are input into the first normalization layer of the resource processing model for normalization processing to obtain first intermediate features. For example, the first normalization layer can be processed by adding and normalizing linear projection features and attention features to obtain the first intermediate features.

[0065] According to embodiments of this disclosure, features in the candidate resource set can be effectively extracted through linear projection, attention, normalization, and other processing methods, so as to facilitate location feature fusion and recommend suitable resources for different locations, thereby improving the accuracy of the recommendation results.

[0066] In one implementation, see Figure 7 The attention layer includes a shared subspace module 701 and multiple target subspace modules 702. The shared subspace module can perform shared processing on the linear projection features to obtain shared features, while each target subspace module can process the linear projection features separately according to its own target to obtain target features. The shared subspace module can include its own shared feature processing method and attention mechanism. Different target subspace modules can include their own target feature processing methods and attention mechanisms. For example, the target feature processing method can include processing the input features using a low-rank matrix to obtain the target features.

[0067] In one implementation, the attention layer based on the resource processing model processes the linear projection feature to obtain attention features, further including:

[0068] The linear projection feature is processed by the shared subspace module 701 of the attention layer to obtain the shared feature, and the shared feature is sent to the multiple target subspace modules 702; wherein, each target subspace module corresponds to one target.

[0069] The shared feature is processed by the attention mechanism corresponding to the shared subspace module 701 to obtain the shared attention feature;

[0070] The target features are obtained by processing the linear projection features based on the low-rank matrix using the target subspace module 702.

[0071] The target feature is fused with the shared feature by the target subspace module 702, and the fused feature is processed by the attention mechanism corresponding to the target subspace module 702 to obtain the target attention feature.

[0072] In one example, the feature processing method for shared subspace modules can be seen in the following formula:

[0073] W A =N(0, σ 2 ) formula (1),

[0074] Among them, W A Let N(0, σ) represent the fully connected parameters q, k, v, etc. 2 ) represents W AThe input features {q, k, v} conform to a normal distribution, and σ represents the standard deviation. Formula (1) can be used to initialize the input features {q, k, v} to conform to a normal distribution.

[0075] In one example, the feature processing method for the target subspace module can be seen from the following formula:

[0076] A a =N(0, σ 2 ) formula (2),

[0077] B a =0 formula (3),

[0078] Among them, A a B represents a reduced-dimensional, low-rank matrix. a Let represent a low-rank matrix of increased dimension. Formula (2) allows for fully connected processing of the input features {q, k, v} using a normally distributed initialization. Formula (3) allows for initialization of the fully connected output with all zeros. The low-rank matrix helps the target part (target subspace module) adapt to multiple targets. The shared part (shared subspace module) can learn the overall data distribution and introduce a specific part for each target, thereby capturing the unique data distribution information of each target. Furthermore, the normally distributed initialization allows the model to more closely approximate the data distribution of a specific target after learning.

[0079] In this embodiment, the attention mechanism corresponding to the shared subspace module is usually different from the attention mechanism corresponding to the target subspace module, but it can also be the same as that of a certain target subspace module. The attention mechanisms corresponding to different target subspace modules are usually different.

[0080] In this embodiment, after receiving the shared features from the shared subspace module, the target subspace module can fuse them with its own target features. Each module then uses its own attention mechanism, such as ScaledDot product attention, to process the fused features to obtain target attention features. The target attention features output by each target subspace module are then merged with the shared attention features output by the shared subspace module. The merged features are then input into the first normalization layer of the resource processing model to obtain the first intermediate features.

[0081] For example, see Figure 7After inputting N-dimensional linear projection features into the shared subspace module 701 and each target subspace module 702, the shared subspace module 701 and each target subspace module 702 can output M-dimensional attention features respectively; N and M can be set according to requirements. If there are 3 target subspace modules, after processing by the attention layer, 4M-dimensional attention features can be output. After processing the 4M-dimensional attention features by the first normalization layer, the first 4M-dimensional intermediate features can be obtained.

[0082] According to embodiments of this disclosure, by processing the features of the candidate resource set through the low-rank matrix of multiple target subspace modules, the computational complexity of the model can be significantly reduced and the adaptability to multiple targets can be improved.

[0083] In one implementation, the method 500 further includes inputting location information into a location processing model to obtain a second feature, and further includes:

[0084] S540. Input the location information into the location processing model to obtain the second intermediate feature;

[0085] S550. The first intermediate feature and the second intermediate feature are processed by the cross-attention layer of the position processing model to obtain the fused feature;

[0086] S560. The fused feature is processed by the location processing model to obtain the second output feature.

[0087] In this disclosure embodiment, see Figure 6 Location information, such as location sequences, can be input into a linear projection layer to obtain linear projection features. This linear projection layer can be part of the location processing model or independent of it. The linear projection features are then input into the multi-head attention layer 621 of the location processing model 620 to obtain attention features; these attention features are then input into the first normalization layer 622 of the location processing model to obtain the second intermediate features. For example, the first normalization layer can perform addition and normalization based on the linear projection features and attention features to obtain the second intermediate features. Next, after receiving the first intermediate features from the resource processing model 610, the location processing model 620 can fuse its own second intermediate features with the received first intermediate features through the cross-attention layer 623 of the location processing model to obtain fused features. Then, the location processing model can normalize the fused features and the second intermediate features through the second normalization layer 624 and input them into the FFN layer 625 to obtain the second output features. For example, the second normalization layer can perform addition and normalization based on the first intermediate features and the fused features to obtain the second output features.

[0088] According to embodiments of this disclosure, a location processing model is used to fuse resource-related features, such as a first intermediate feature, with location-related features, such as a second intermediate feature. The resulting second output feature can reflect the relationship between location and resources, promote deep integration of location and resources, eliminate location bias of resources in the candidate resource set, and improve the accuracy of recommendation results.

[0089] In one embodiment, processing the first intermediate feature to obtain a first output feature further includes: processing the first intermediate feature through a hybrid expert network of the resource processing model to obtain the first output feature; wherein the hybrid expert network includes multiple feedforward neural networks, each feedforward neural network corresponding to a target; the input feature of each feedforward neural network includes the first intermediate feature, and the output features of the multiple feedforward neural networks constitute the first output feature.

[0090] In this embodiment of the disclosure, the first intermediate feature can be processed by a hybrid expert network of the resource processing model. The hybrid expert network predicts the fusion value of different targets such as click-through rate (ctr) and share in the first intermediate feature. After the fusion value is normalized and processed, the first output feature is obtained.

[0091] According to embodiments of this disclosure, by processing the first intermediate features through a hybrid expert network to obtain the first output features, the recommendation performance of the model can be improved, resulting in more accurate recommendation results.

[0092] In one implementation, step S120, based on the first feature and the second feature, obtains the candidate resource set and resource recommendation information corresponding to the location information, further including:

[0093] Based on the first feature and the second feature, the score corresponding to each position of each resource in the candidate resource set in the location information is obtained;

[0094] Based on the score of each resource in the candidate resource set corresponding to each position in the location information, the recommended resource set corresponding to the location information is obtained through evolutionary strategy correction.

[0095] In this embodiment of the disclosure, the score corresponding to each position in the location information for each resource in the candidate resource set can be calculated based on the first output feature of the resource processing model and the second output feature of the location processing model. For example, performing matrix multiplication on the first output feature and the second output feature yields, as shown below. Figure 3 The distinguishing scores for different resources in different locations are shown.

[0096] In this embodiment, a TopK sampling algorithm is used to select the top K samples from the candidate resource set based on the score of each resource at each location in the location information. For example, K samples can be selected for each location separately, or a total of K samples can be selected. The selected samples are then input into the Evolutionary Strategy module (ES Reward) for correction. The Evolutionary Strategy module can reorder the final recommendation sequence of the model based on real-time user feedback and business metrics to obtain the final delivery sequence. That is, the recommendation resource set can include the final delivery sequence. For example, for the location sequence {0, 1, 2, 3, 4, 5, 6, 7}, the final delivery sequence is {S1, S3, S5, S6, S2, S4, S10, S13}. In this case, resource S1 is recommended for location 0, resource S3 is recommended for location 1, and so on.

[0097] According to embodiments of this disclosure, by scoring and evolving multiple resources at multiple locations, recommendation results can be generated in batches, which can improve the recommendation efficiency of the recommendation system and effectively enhance its real-time performance.

[0098] Figure 8 This is a flowchart illustrating a resource processing model training method 800 according to an embodiment of the present disclosure, the method comprising:

[0099] S810. Input the sample resource set into the resource processing model to be trained to obtain the predicted resource level in the sample resource set and the predicted set level of the sample resource set.

[0100] S820. The resource processing model is trained based on the loss function calculated by the predicted resource level and the predicted set level.

[0101] In this embodiment of the disclosure, the training samples may include a set of sample resources. The set of sample resources may include multiple sample resources. Each resource may have its own label (label) resource level. The label resource level may include label resource level and label set level, etc. By inputting the set of sample resources and its set representation into the resource processing model, predicted resource level and predicted set level can be obtained. The set representation can be a [set] token; the initial set representation can be empty and used for set representation learning.

[0102] In this embodiment, the resource level can include the level of an individual resource, used to reflect the characteristics of that individual resource; the set level can include the overall level of a set of sample resources, used to reflect the characteristics of the set as a whole. The resource level can reflect user behavior and interest in resources. The resource level can be determined based on some focus targets, such as whether clicks, viewing duration, following, sharing, liking, collecting, commenting, etc. The resource level can reflect user behavior and interest in individual resources. The set level can indicate whether the set is being followed, such as whether there are clicks or interactions. The set level can be used to evaluate the attractiveness and user engagement of the entire candidate set. A resource level loss function can be calculated based on the target resource level and the predicted resource level; a set level loss function can be calculated based on the target set level and the predicted set level. A total loss function can be calculated based on the two loss functions, and a resource processing model can be trained based on the total loss function. For example, if the total loss function does not converge, the parameters of the resource processing model are adjusted. The adjusted model is then trained using training samples until the total loss function converges, resulting in the trained model. There are no restrictions on the specific formula for calculating the loss function; it can be determined based on general loss functions such as ordinal loss.

[0103] In this embodiment of the disclosure, the structure of the resource processing model can be found in the relevant description in the above-mentioned recommended method and... Figure 2 and Figure 7 The details will not be elaborated here. Each resource in the sample resource set can be processed through the attention layer, normalization layer, and FFN layer of the resource processing model to obtain the first output feature. The first output feature may include resource level and / or set level, or resource level and / or set level can be obtained from the first output feature.

[0104] In this embodiment, the resource processing model can be trained independently or jointly with the location processing model. If jointly trained, the training samples may include a set of sample resources and location information. The set of sample resources and its set representation are then input into the resource processing model to be trained, and the location features are input into the location processing model to obtain the predicted resource level and set level. Furthermore, referring to the above-described method of training the model using a loss function, the resource processing model and / or the location processing model are trained to obtain the trained resource processing model and / or location processing model. The resource processing model and the location processing model can also be collectively referred to as a resource recommendation model, a resource location recommendation model, etc. The resource processing model can output the score for each resource individually, while the resource recommendation model can output the score for each resource at different locations.

[0105] In this embodiment of the disclosure, the structure of the location processing model, and the connection relationship between the resource processing model and the location processing model, can be found in the relevant descriptions in the above-mentioned recommended methods. Figure 4 and Figure 6 The details are omitted here. Each resource in the sample resource set can be processed through the attention layer, normalization layer, and FFN layer of the resource processing model to obtain the first intermediate feature and the first output feature. Furthermore, the first intermediate feature can be sent to the location processing model. The location processing model can process the location information to obtain the second intermediate feature, and combine the first and second intermediate features to obtain the second output feature. The first and second output features can be fused to obtain the total output feature. The total output feature can include resource level and / or set level, or resource level and / or set level can be derived from the total output feature.

[0106] According to embodiments of this disclosure, using the resource level and set level of the sample resource set to train the resource processing model is beneficial to improving the accuracy of the training results of the resource processing model.

[0107] Figure 9 This is a flowchart illustrating a resource processing model training method 900 according to another embodiment of the present disclosure. Method 900 can be used to implement step S810 in resource recommendation method 800. In one embodiment, method 900 includes: inputting a sample resource set into a resource processing model to be trained, obtaining predicted resource levels in the sample resource set and predicted set levels of the sample resource set, further including:

[0108] S910. Input each resource in the sample resource set into the resource processing model to be trained to obtain the predicted resource level of one or more resources.

[0109] S920. Input the set representation of the sample resource set into the resource processing model to be trained to obtain the prediction set level of the sample resource set.

[0110] In this embodiment, the sample resource set and set representation can refer to the relevant descriptions in any of the resource processing model training methods described in the above embodiments, and will not be repeated here. For example, after each resource in the sample resource set is processed by the resource processing model, the output can be the predicted resource level of all or some resources in each resource. By comparing the label resource level of each resource, such as whether it was clicked, favorited, duration, etc., with the predicted resource level, a resource level loss function can be obtained. The set representation of the sample resource set can be empty initially, or it can include label resource levels. After learning, a predicted set level can be learned. Label resource levels can include that one resource in the set has a corresponding label such as clicked or favorited. By comparing the predicted set level and / or label resource level, a set level loss function can be obtained. Based on the above two loss functions, a total loss function can be calculated, and then the model can be trained.

[0111] According to embodiments of this disclosure, the resource processing model processes the resources in the set to obtain the resource level and set level. The model can be trained from multiple dimensions to improve the training effect of the resource processing model, enabling the resource processing model to output more accurate prediction results.

[0112] Figure 10 This is a flowchart illustrating a resource processing model training method 1000 according to another embodiment of the present disclosure. Method 1000 can be used to implement step S820 in resource recommendation method 800. In one embodiment, method 1000 includes: training the resource processing model based on a loss function calculated using the predicted resource level and the predicted set level, further including:

[0113] S1010. Calculate the resource level loss function based on the predicted resource level;

[0114] S1020. Calculate the set-level loss function based on the predicted set level;

[0115] S1030. Calculate the total loss function based on the resource-level loss function and the set-level loss function;

[0116] S1040. Adjust the parameters of the resource processing model based on the total loss function until convergence.

[0117] In this embodiment of the disclosure, at the resource level, duration resources can be selected from multiple resources, and the loss function of the duration target can be calculated based on the duration resources.

[0118] In this embodiment of the disclosure, at the set level, resource sets with click behavior can be filtered from multiple sets, and the loss function of the interactive target in the resource set can be calculated.

[0119] In this embodiment, the parameters of the resource processing model to be trained can be adjusted according to the loss function for the duration target and the loss function for the interaction target until the loss function converges and the model training is complete. According to this embodiment, training the resource processing model using multiple loss functions can improve the model training effect.

[0120] Figure 11 This is a schematic diagram of a resource recommendation device 1100 according to an embodiment of the present disclosure. The device 1100 may include:

[0121] The first processing module 1110 is used to input the candidate resource set into the resource processing model to obtain the first feature; wherein, the candidate resource set includes multiple candidate resources;

[0122] The recommendation module 1120 is used to obtain resource recommendation information corresponding to the candidate resource set based on the first feature.

[0123] In one embodiment, the device may further include a first processing module 1110, which is further configured to input location information into a location processing model to obtain a second feature; and a recommendation module 1120, which is further configured to obtain the candidate resource set and resource recommendation information corresponding to the location information based on the first feature.

[0124] Figure 12 This is a schematic diagram of the structure of a resource recommendation device 1200 according to another embodiment of the present disclosure. The device 1200 includes a first processing module 1210 and a recommendation module 1220. The functions of these modules are the same as those of the modules in the resource recommendation device of the above embodiment. In one embodiment, the first processing module 1210 may include:

[0125] The first intermediate feature acquisition submodule 1211 is used to input the candidate resource set into the resource processing model to obtain the first intermediate feature;

[0126] The first intermediate feature input submodule 1212 is used to input the first intermediate feature into the processing model at this location;

[0127] The processing submodule 1213 is used to process the first intermediate feature to obtain the first output feature.

[0128] In one implementation, the first intermediate feature acquisition submodule 1211 is used to obtain a first intermediate feature based on the candidate resource set through the attention layer of the resource processing model; wherein, the attention layer is used to fuse the shared features and target features corresponding to the candidate resource set.

[0129] In one implementation, the first intermediate feature acquisition submodule 1211 is used to perform linear projection processing on the resource set features of the candidate resource set to obtain linear projection features; process the linear projection features through the attention layer of the resource processing model to obtain attention features; and process the attention features through the first normalization layer of the resource processing model to obtain first intermediate features.

[0130] In one embodiment, the attention layer includes a shared subspace module and multiple target subspace modules. The shared subspace module can perform shared processing on linear projection features to obtain shared features, and each target subspace module can process the linear projection features according to its respective target to obtain target features. A first intermediate feature acquisition submodule 1211 is used to process the linear projection features through the shared subspace module of the attention layer to obtain shared features, and send the shared features to the multiple target subspace modules. Each target subspace module corresponds to one target. The shared features are processed through the attention mechanism corresponding to the shared subspace module to obtain shared attention features. The linear projection features are processed based on a low-rank matrix by the target subspace module to obtain target features. The target features are fused with the shared features by the target subspace module, and the fused features are processed through the attention mechanism corresponding to the target subspace module to obtain target attention features.

[0131] In one embodiment, the first processing module 1210 further includes:

[0132] The second intermediate feature acquisition module 1214 is used to input the location information into the location processing model to obtain the second intermediate feature;

[0133] The fusion feature acquisition module 1215 is used to process the first intermediate feature and the second intermediate feature through the cross attention layer of the processing model at this location to obtain the fusion feature;

[0134] The second output feature acquisition module 1216 is used to process the fused feature through the position processing model to obtain the second output feature.

[0135] In one embodiment, the processing submodule 1213 is used to process the first intermediate feature through a hybrid expert network of the resource processing model to obtain a first output feature; wherein, the hybrid expert network includes multiple feedforward neural networks, each feedforward neural network corresponding to a target; the input feature of each feedforward neural network includes the first intermediate feature, and the output features of the multiple feedforward neural networks constitute the first output feature.

[0136] In one implementation, the recommendation module 1220 includes:

[0137] The score submodule 1221 is used to obtain the score of each resource in the candidate resource set corresponding to each position in the location information based on the first feature and the second feature.

[0138] The correction submodule 1222 is used to obtain the recommended resource set corresponding to the location information by correcting the score of each resource in the candidate resource set at each position in the location information through an evolutionary strategy.

[0139] Figure 13 This is a schematic diagram of a resource processing model training device 1300 according to an embodiment of the present disclosure. The device 1300 may include:

[0140] The second processing module 1310 is used to input the candidate resource set into the resource processing model to be trained, and obtain the resource level of each resource in the candidate resource set and the set level of the candidate resource set.

[0141] Training module 1320 is used to train the resource processing model based on the loss function calculated at the resource level and the set level.

[0142] Figure 14 This is a schematic diagram of the structure of a resource processing model training device 1400 according to another embodiment of the present disclosure. The device 1400 includes a second processing module 1410 and a training module 1420. The functions of these modules are the same as those of the modules in the resource processing model training device of the above embodiment. In one embodiment, the second processing module 1410 may include:

[0143] The resource level submodule 1411 is used to input the candidate resource set into the resource processing model to be trained, and obtain the resource level of each resource in the candidate resource set;

[0144] The set-level submodule 1412 is used to input the input representation into the resource processing model to be trained, and obtain the set-level of the candidate resource set.

[0145] In one implementation, the training module 1420 includes:

[0146] The duration loss function submodule 1421 is used to calculate the loss function of the duration resource based on this resource level;

[0147] Interaction loss function 1422 is used to calculate the loss function of the interactive targets in the clicked set based on the set level;

[0148] The parameter tuning submodule 1423 is used to adjust the parameters of the resource processing model until convergence based on the loss function of the resource for that duration and the loss function of the interaction.

[0149] In some application scenarios, recommendation systems employ multi-stage funnel models. Based on massive user behavior and multimodal content, they can construct high cardinality and heterogeneous features for deep model training. However, this model structure is sparsity-dependent and memory-oriented, making it difficult to significantly improve recommendation efficiency. Recommendation results often lag behind users' real-time needs and cannot flexibly adapt to changes in user interests. For example, recommendation systems first use a series of preset filtering conditions and shallow models to perform multiple rounds of filtering on massive items to reduce the candidate item set. Subsequently, pointwise or pairwise models are used to score and rank the candidate resources, and a final delivery sequence is generated by combining diversity strategies. The solution of this disclosure, by modeling the overall user feedback on the recommendation result set, achieves global perspective optimization using setwise comparison, constructs a new generative fusion paradigm for recommendation systems, and directly generates candidate sets from the resource pool end-to-end, improving recommendation performance and user experience.

[0150] In the field of recommender systems, a single-point prediction approach is typically used, which independently predicts a user's clicks, duration, or interaction behavior with a single candidate resource. However, this single-point prediction model cannot capture the overall user satisfaction with the set of recommended results from a global perspective, nor can it effectively model the user's preference relationships among multiple candidate resources.

[0151] To address this issue, embodiments of this disclosure propose a generative set-to-set (Set2Set) model. By introducing a neural network, such as a Transformer architecture, it treats individual candidate resources as "words" and the set of candidate resources as "paragraphs" or "articles," thereby achieving global modeling of multi-dimensional and multi-level user feedback. Specifically, the solution of embodiments of this disclosure transforms the recommendation problem into a sequence generation task. The model uses the self-attention mechanism of the Transformer, employing two encoders to model candidate resources and user historical behavior respectively, capturing the inherent correlation between candidate resources, and dynamically generating a set of recommendation results by combining user historical behavior data. The recommendation system of embodiments of this disclosure is described in detail below.

[0152] I. Setwise Modeling

[0153] In traditional recommendation systems, the pointwise approach simplifies the recommendation problem into an independent prediction task for individual items. Its model design only focuses on the interaction between the user and a single item, failing to capture the inherent relationships between items. Furthermore, because it independently predicts the score of each item, it is easily affected by data distribution bias, leading to over-scoring of certain categories of items, thereby reducing the diversity and fairness of the recommendation results.

[0154] While pairwise comparisons alleviate this problem to some extent by modeling the relative preference relationships between item pairs, their model complexity increases quadratically with the number of item pairs and is difficult to extend to higher-order interaction scenarios. Pairwise methods, by modeling the relative preference relationships between item pairs, alleviate the limitations of pointwise methods to some extent, but they still rely on pairwise comparisons in essence and cannot optimize recommendation results from a global perspective. Therefore, they are also unable to solve the category bias problem.

[0155] This disclosure employs a setwise modeling approach, transforming the recommendation problem into a global optimization task between users and a set of items. By directly modeling the interaction between users and the entire set of items, it can more efficiently capture higher-order dependencies and synergistic effects within the set, thereby significantly improving the model's expressive power and recommendation performance. This set-based scoring mechanism not only avoids the problem of excessively high scores for a single category but also dynamically selects the optimal item combination from the candidate set, significantly improving the diversity, fairness, and user satisfaction of recommendations.

[0156] like Figure 15 As shown, the resource set contains resources with high click-through rates, long durations, and high interactions. When selecting three types of resources (e.g., high click-through rates, long durations, and high interactions), the point-by-point method can only obtain some resources, such as high click-through rates; the pairwise comparison method can only obtain some resources, such as high click-through rates and long durations; the set comparison method can combine high click-through rates, long durations, and high interactions to form a sequence.

[0157] II. Recommendation System

[0158] This disclosure embodiment combines user behavior quantification coding, autoregressive modeling, and sampling optimization to create a comprehensive refeed recommendation system. Through user behavior quantification coding, user preferences can be accurately analyzed, transforming complex behaviors into quantifiable data. Autoregressive modeling predicts future interests based on historical behavior, enhancing the forward-looking nature of recommendations and upgrading the system to a generative fusion recommendation system based on Transformer sequence modeling.

[0159] See the overall structure of the model. Figure 16The system uses Transformer as the basic framework to model candidate sequences (candidate resource set), introduces Low-Rank Adaptation (LoRA) attention mechanism and Mixture of Experts (MOE) feedforward neural network to optimize multi-objective modeling; introduces PositionEncoder structure for position-specific modeling to balance position bias; and finally, when operating online, it combines EvolutionStrategy (ES) to correct the final output sequence.

[0160] Model input: Part of it is a candidate set X of resources (which can be represented by an item), containing multiple items X to be recommended. i .For example, Figure 16 The values ​​nid1 to nid350 in the model can represent 350 items. Each of these items has different characteristics and attributes. After model processing, h1 to h... can be generated. i The other part is set representations (e.g., [set]token), which function similarly to [cls]token, specifically for learning representations of candidate sets, generating h. set The [set]token can be seen as an abstract representation of the entire candidate set. Through it, the model can capture overall information at the set level, providing a foundation for subsequent processing and analysis.

[0161] Training objectives: (1) Item level: The objectives include whether the item is clicked, the viewing time, whether it is followed, shared, liked, favorited, or commented. These objectives can comprehensively reflect the user's behavior and interest in a single item. (2) Set level: The objectives are mainly whether the set has click behavior and whether it has interactive behavior. This helps to evaluate the attractiveness and user engagement of the entire candidate set.

[0162] Loss function: Ordinal loss is used. For example, at the set level, the loss for the interaction objective is calculated only in sets with clicks, and at the item level, the loss for the duration objective is calculated only in clicked items.

[0163] like Figure 16 As shown, during the training process of the neural network, the input set item X iThe input includes nid1-nid350, and the output is h1-hi; the input [set] token is Xset, and the output is hset. Based on h1-hi and hset, the predicted values ​​predi and predset can be obtained. After training, when used online, the predicted values ​​output by the model can be sorted using the TopKsample algorithm to obtain an initial sequence, and then corrected by the evolutionary strategy (ES Reward) to obtain the final distribution sequence.

[0164] III. Location-based modeling

[0165] This disclosure also provides a position encoder module whose input is position-related features (position information). This module interacts with the attention weights output by the MOE Transformer through cross-attention, deeply fusing feature information from the candidate set at the underlying level. In this way, the model can discriminately score resources in the set at different locations, thereby effectively eliminating position bias.

[0166] like Figure 17 As shown, the input features of the candidate set after processing by the linear projection layer are input into the neural network model. After processing by the multi-head attention layer and normalization layer, intermediate features are obtained. These intermediate features are then input into the MoE layer of the Transformer model for processing and sent to the cross-attention layer of the position encoder. The intermediate features are then processed by the MoE layer and normalization layer to obtain the output features.

[0167] The input features, after the location information is processed by the linear projection layer, are input into the position encoder. After being processed by the multi-head attention layer and the normalization layer, they are fused with the intermediate features sent by the Transformer model in the cross-attention layer. The fusion result is processed by the normalization layer and then processed by the feedforward neural network layer (FFN) to obtain the output features.

[0168] By performing matrix multiplication on the output features of the attention layer and the FFN layer, the discriminative score matrix of the final set can be obtained.

[0169] IV. Hybrid Expert Multi-Objective Modeling Based on Low-Rank Matrix Adaptive Attention Mechanism

[0170] This disclosure proposes a multi-objective attention mechanism based on low-rank matrix adaptation. For example... Figure 18As shown, the attention layer of the Transformer model can decompose the complex multi-objective optimization problem into multiple low-dimensional subspaces using low-rank matrix factorization, with each subspace corresponding to the attention representation of a specific objective. Specifically, the low-rank adaptation mechanism can effectively capture shared information and task relevance between different objectives, while significantly reducing the computational complexity of the model.

[0171] In one example, the attention layer of a Transformer model can include a shared subspace module and a target subspace module. For instance, the feature processing method for the shared subspace module can be seen in the following formula:

[0172] W A =N(0, σ 2 ) Formula (1)

[0173] Among them, W A Let N(0, σ) represent the fully connected parameters q, k, v, etc. 2 ) represents W A The input features {q, k, v} conform to a normal distribution, and σ represents the standard deviation. Formula (1) can be used to initialize the input features {q, k, v} to conform to a normal distribution.

[0174] The feature processing method for the target subspace module can be found in the following formula:

[0175] A a =N(0, σ 2 ) Formula (2)

[0176] B a =0 Formula (3)

[0177] Among them, A a B represents a reduced-dimensional, low-rank matrix. a Let represent a low-rank matrix of increased dimension. Equation (2) allows for the application of a fully connected layer initialized with a normal distribution to the input features {q, k, v}. Equation (3) allows for the full-connection output to be initialized with all zeros.

[0178] Each subspace module processes the input N-dimensional features and transforms them into M-dimensional features using its own Scaled Dotproduct Attention mechanism. These M and N features are then merged and output to the normalization layer. M and N are customizable. For example, taking an attention layer consisting of one shared subspace module and three target subspace modules, the attention layer processes the N-dimensional features to obtain four M-dimensional features. The merged features output to the normalization layer have a dimension of 4M. The normalized features input to the FFN of the feedforward neural network also have a dimension of 4M.

[0179] This disclosure introduces a sparse MoE layer to replace the feedforward neural network (FFN) in the traditional Transformer architecture. The MoE layer consists of multiple expert modules, each of which is an independent feedforward neural network (FFN), improving the adaptability to multiple targets. Each subspace module corresponds to an FFN, where p is the weight coefficient and pred is the target. For example, clicking the target = 0.85 * FFN1 output + 0.2 * FFN2 output, ..., and these weight coefficients can be learned by the model.

[0180] V. Online Functions

[0181] During the online phase, the final distribution sequence is determined by combining model scoring with an evolutionary strategy (ES Reward) mechanism. Specifically, ES Reward reorders the model's final recommendation sequence based on real-time user feedback and business metrics, thereby optimizing the final distribution result. This method not only effectively improves the real-time performance of the recommendation system but also dynamically adjusts the recommendation strategy based on user behavior, further enhancing user experience and achieving business goals.

[0182] The specific functions and examples of each module and submodule of the apparatus in this disclosure can be found in the relevant descriptions of the corresponding steps in the above method embodiments, and will not be repeated here.

[0183] The acquisition, storage, and application of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0184] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0185] Figure 19 A schematic block diagram of an example electronic device 1900 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0186] like Figure 19As shown, device 1900 includes a computing unit 1901, which can perform various appropriate actions and processes according to a computer program stored in read-only memory (ROM) 1902 or a computer program loaded into random access memory (RAM) 1903 from storage unit 1908. The RAM 1903 may also store various programs and data required for the operation of device 1900. The computing unit 1901, ROM 1902, and RAM 1903 are interconnected via bus 1904. Input / output (I / O) interface 1905 is also connected to bus 1904.

[0187] Multiple components in device 1900 are connected to I / O interface 1905, including: input unit 1906, such as keyboard, mouse, etc.; output unit 1907, such as various types of monitors, speakers, etc.; storage unit 1908, such as disk, optical disk, etc.; and communication unit 1909, such as network card, modem, wireless transceiver, etc. Communication unit 1909 allows device 1900 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0188] The computing unit 1901 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 1901 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose 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 1901 performs the various methods and processes described above, such as the resource recommendation method. For example, in some embodiments, the resource recommendation method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 19019. In some embodiments, part or all of the computer program may be loaded and / or installed on device 1900 via ROM 1902 and / or communication unit 1909. When the computer program is loaded into RAM 1903 and executed by the computing unit 1901, one or more steps of the resource recommendation method described above may be performed. Alternatively, in other embodiments, the computing unit 1901 may be configured to perform the resource recommendation method by any other suitable means (e.g., by means of firmware).

[0189] Various embodiments of the systems and techniques described above herein 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-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0190] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0191] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction 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 be, 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 machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0192] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, 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 sound input, voice input, or tactile input).

[0193] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0194] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.

[0195] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0196] The specific embodiments described above do not constitute a limitation on the scope of protection of this 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 this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A resource recommendation method, comprising: The candidate resource set is input into the resource processing model to obtain the first feature; wherein, the candidate resource set includes multiple candidate resources; Based on the first feature, resource recommendation information corresponding to the candidate resource set is obtained.

2. The method according to claim 1, wherein, The candidate resource set is input into the resource processing model to obtain the first feature, which includes: The candidate resource set is input into the resource processing model to obtain the first intermediate feature; The first intermediate feature is processed to obtain the first output feature.

3. The method according to claim 2, wherein, The candidate resource set is input into the resource processing model to obtain the first intermediate features, including: Based on the candidate resource set, a first intermediate feature is obtained through the attention layer of the resource processing model; wherein, the attention layer is used to fuse the shared features and target features corresponding to the candidate resource set.

4. The method according to claim 3, wherein, Based on the candidate resource set, a first intermediate feature is obtained through the attention layer of the resource processing model, including: The resource set features of the candidate resource set are subjected to linear projection processing to obtain linear projection features; Attention features are obtained by processing the linear projection features through the attention layer of the resource processing model; The attention features are processed by the first normalization layer of the resource processing model to obtain the first intermediate features.

5. The method according to claim 4, wherein, The attention layer includes a shared subspace module and multiple target subspace modules; The linear projection features are processed by the attention layer of the resource processing model to obtain attention features, including: The linear projection features are processed by the shared subspace module of the attention layer to obtain shared features, and the shared features are sent to the multiple target subspace modules; wherein, each target subspace module corresponds to one target. The shared features are processed by the attention mechanism corresponding to the shared subspace module to obtain shared attention features; The target features are obtained by processing the linear projection features based on the low-rank matrix using the target subspace module. The target feature is fused with the shared feature by the target subspace module, and the fused feature is processed by the attention mechanism corresponding to the target subspace module to obtain the target attention feature.

6. The method according to any one of claims 2 to 5, wherein, The first intermediate feature is processed to obtain the first output feature, including: The first intermediate feature is processed by the hybrid expert network of the resource processing model to obtain the first output feature; wherein, the hybrid expert network includes multiple feedforward neural networks, each feedforward neural network corresponding to a target; the input feature of each feedforward neural network includes the first intermediate feature, and the output features of the multiple feedforward neural networks constitute the first output feature.

7. The method according to any one of claims 1 to 6, further comprising: The location information is input into the location processing model to obtain the second feature; Based on the first feature, resource recommendation information corresponding to the candidate resource set is obtained, including: based on the first feature and the second feature, resource recommendation information corresponding to the candidate resource set and the location information is obtained.

8. The method according to claim 7, wherein, The location information is input into the location processing model to obtain the second feature, including: The location information is input into the location processing model to obtain the second intermediate feature; The first intermediate feature and the second intermediate feature from the resource processing model are processed by the cross-attention layer of the location processing model to obtain the fused feature; The fused features are processed by the location processing model to obtain the second output feature.

9. The method according to claim 7 or 8, wherein, Based on the first feature and the second feature, resource recommendation information corresponding to the candidate resource set and the location information is obtained, including: Based on the first feature and the second feature, the score corresponding to each position of each resource in the candidate resource set in the location information is obtained; Based on the score of each resource in the candidate resource set corresponding to each position in the location information, a recommended resource set corresponding to the location information is obtained through an evolutionary strategy.

10. A method for training a resource processing model, comprising: Input the sample resource set into the resource processing model to be trained to obtain the predicted resource level in the sample resource set and the predicted set level of the sample resource set. The resource processing model is trained based on the loss function calculated using the predicted resource level and the predicted set level.

11. The method according to claim 10, wherein, Inputting a sample resource set into the resource processing model to be trained yields the predicted resource level in the sample resource set and the predicted set level of the sample resource set, including: Each resource in the sample resource set is input into the resource processing model to be trained to obtain the predicted resource level of one or more resources. The set representation of the sample resource set is input into the resource processing model to be trained to obtain the prediction set level of the sample resource set.

12. The method according to claim 10 or 11, wherein, The resource processing model is trained based on the loss function calculated at the resource level and the set level, including: Calculate the resource level loss function based on the predicted resource level; Calculate the set-level loss function based on the predicted set level; The total loss function is calculated based on the resource-level loss function and the set-level loss function. The parameters of the resource processing model are adjusted based on the total loss function until convergence.

13. A resource recommendation device, comprising: The first processing module is used to input the candidate resource set into the resource processing model to obtain the first feature; wherein, the candidate resource set includes multiple candidate resources; The recommendation module is used to obtain resource recommendation information corresponding to the candidate resource set based on the first feature.

14. A resource processing model training device, comprising: The second processing module is used to input the sample resource set into the resource processing model to be trained, and to obtain the predicted resource level in the sample resource set and the predicted set level of the sample resource set. The training module is used to train the resource processing model based on the loss function calculated based on the predicted resource level and the predicted set level.

15. 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 that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-9.

16. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-9.

17. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-9.