Resource recommendation method, recommendation prediction model training method, device and equipment

By combining users' historical recommendation and search information to obtain recommendation and search interest features, the problem of poor accuracy in resource recommendations in existing technologies is solved, and more accurate resource recommendations are achieved.

CN116775915BActive Publication Date: 2026-03-31BEIJING DAJIA INTERNET INFORMATION TECH CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-28
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing technologies have poor accuracy in resource recommendations, mainly because they are based on users' historical recommendation information and fail to effectively consider users' interests in search scenarios.

Method used

By combining users' historical recommendation and search information, recommendation interest features and search interest features are obtained. Dimensionality reduction is then used to obtain recommendation probabilities, and resources are recommended to users based on these probabilities.

Benefits of technology

It improves the accuracy of resource recommendations, ensures that recommended resources match user interests, and enhances the recommendation effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116775915B_ABST
    Figure CN116775915B_ABST
Patent Text Reader

Abstract

The present disclosure provides a resource recommendation method, a recommendation prediction model training method, an apparatus and a device, and belongs to the technical field of multimedia. The resource recommendation method comprises: obtaining historical recommendation information and historical search information of an object; obtaining recommendation interest features and search interest features of the object based on a resource to be recommended, the historical recommendation information and the historical search information; performing dimension reduction processing on object features of the object, resource features of the resource, the recommendation interest features and the search interest features to obtain a recommendation probability of the resource; and recommending a target resource in a plurality of resources to the object based on the recommendation probability of the plurality of resources to be recommended. In the scheme provided by the present disclosure, it is ensured that the indication of the recommendation probability matches the interest of the object, the accuracy of the recommendation probability is ensured, and then the resource recommended to the object is the resource of interest to the object, so as to ensure the accuracy of the resource recommendation and then ensure the resource recommendation effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of multimedia technology, and in particular to a resource recommendation method, a recommendation prediction model training method, an apparatus, and a device. Background Technology

[0002] With the development of multimedia technology, resources are becoming increasingly abundant and diverse, including videos, images, and text. Due to the sheer volume of resources, recommendations are typically made to users based on their potential interests. Currently, new resources are recommended solely based on the user's historical recommendation information; however, this method suffers from poor accuracy. Summary of the Invention

[0003] This disclosure provides a resource recommendation method, a recommendation prediction model training method, an apparatus, and a device, which can improve the accuracy of recommended resources. The technical solution of this disclosure is as follows:

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

[0005] Obtain historical recommendation information and historical search information of an object. The historical recommendation information indicates historical recommended resources in which the object has performed interactive operations, and the historical search information indicates historical search text input by the object and historical search resources found based on the historical search text in which the object has performed interactive operations.

[0006] Based on the resource to be recommended, the historical recommendation information, and the historical search information, the recommendation interest features and search interest features of the object are obtained. The recommendation interest features indicate the degree of interest of the object in the resource in the recommendation scenario, and the search interest features indicate the degree of interest of the object in the resource in the search scenario.

[0007] The object features of the object, the resource features of the resource, the recommendation interest features, and the search interest features are subjected to dimensionality reduction processing to obtain the recommendation probability of the resource. The recommendation probability indicates the likelihood that the object will perform an interactive operation on the resource when the resource is recommended to the object.

[0008] Based on the recommendation probabilities of the multiple resources to be recommended, a target resource from the multiple resources is recommended to the object.

[0009] According to another aspect of the embodiments of this disclosure, a recommended prediction model training method is provided, the method further comprising:

[0010] The sample object, sample resource, sample recommendation probability of the sample resource, sample historical recommendation information and sample historical search information of the sample object are obtained. The sample historical recommendation information indicates the historical recommended resources in which the sample object has performed interactive operations. The sample historical search information indicates the historical search text input by the sample object and the historical search resources found based on the historical search text in which the sample object has performed interactive operations.

[0011] The recommendation prediction model to be trained is invoked, and based on the sample resources, the sample historical recommendation information, and the sample historical search information, the recommendation interest features and search interest features of the sample object are obtained. The recommendation interest features indicate the degree of interest of the sample object in the sample resources in the recommendation scenario, and the search interest features indicate the degree of interest of the sample object in the sample resources in the search scenario.

[0012] The recommendation prediction model to be trained is invoked to perform dimensionality reduction processing on the object features of the sample object, the resource features of the sample resource, the recommendation interest features, and the search interest features to obtain the predicted recommendation probability of the sample resource. The predicted recommendation probability indicates the probability that the sample object will perform an interactive operation on the sample resource when the sample resource is recommended to the sample object.

[0013] Based on the sample recommendation probability and the predicted recommendation probability, the recommendation prediction model to be trained is trained to obtain the target recommendation prediction model.

[0014] According to another aspect of the present disclosure, a resource recommendation apparatus is provided, the apparatus comprising:

[0015] The acquisition unit is configured to acquire historical recommendation information and historical search information of an object. The historical recommendation information indicates historical recommended resources in which the object has performed interactive operations, and the historical search information indicates historical search text input by the object and historical search resources found based on the historical search text in which the object has performed interactive operations.

[0016] The acquisition unit is further configured to acquire the recommendation interest features and search interest features of the object based on the resource to be recommended, the historical recommendation information, and the historical search information. The recommendation interest features indicate the degree of interest of the object in the resource in the recommendation scenario, and the search interest features indicate the degree of interest of the object in the resource in the search scenario.

[0017] The processing unit is configured to perform dimensionality reduction processing on the object features of the object, the resource features of the resource, the recommendation interest features and the search interest features to obtain the recommendation probability of the resource, wherein the recommendation probability indicates the likelihood that the object will perform an interactive operation on the resource when the resource is recommended to the object;

[0018] The recommendation unit is configured to perform a recommendation based on the recommendation probability of the plurality of resources to be recommended, and recommend a target resource among the plurality of resources to the object.

[0019] In some embodiments, the acquisition unit is configured to perform feature extraction on the historical recommendation information and the historical search information respectively to obtain historical recommendation features and historical search features. The historical recommendation features include sub-features for characterizing the historical recommended resources, and the historical search features include sub-features for characterizing the historical search text and the historical search resources corresponding to the historical search text. The sub-features in the historical recommendation features and the sub-features in the historical search features are classified respectively to obtain a first type of feature and a second type of feature included in the historical recommendation features, and a third type of feature and a fourth type of feature included in the historical search features. The similarity between the first type of feature and the historical search features is not less than a first similarity threshold, and the similarity between the second type of feature and the historical search features is not less than a first similarity threshold. The similarity of the historical search features is less than the first similarity threshold, the similarity between the third type of feature and the historical recommendation feature is not less than the second similarity threshold, and the similarity between the fourth type of feature and the historical recommendation feature is less than the second similarity threshold. Based on the similarity between the resource features of the resource and the historical recommendation feature, the first type of feature, and the second type of feature, the historical recommendation feature, the first type of feature, and the second type of feature are fused to obtain the recommendation interest feature. Based on the similarity between the resource features of the resource and the historical search feature, the third type of feature, and the fourth type of feature, the historical search feature, the third type of feature, and the fourth type of feature are fused to obtain the search interest feature.

[0020] In some embodiments, the acquisition unit is configured to perform feature extraction on each historical recommendation resource in the historical recommendation information to obtain resource features of each historical recommendation resource, and to construct the historical recommendation features from the resource features of each historical recommendation resource; to perform feature extraction on historical search texts and historical search resources in the historical search information to obtain text features of each historical search text and resource features of each historical search resource; to fuse the text features of each historical search text and the resource features of the corresponding historical search resource to obtain a first fused feature corresponding to each historical search text, and to construct the historical search features from the first fused feature corresponding to each historical search text.

[0021] In some embodiments, the acquisition unit is configured to acquire a first position feature of each historical recommended resource, the first position feature indicating the relative time order between the historical recommended resource and other historical recommended resources in the historical recommendation information; fuse the resource features of each historical recommended resource with the first position feature to obtain a fused feature corresponding to each historical recommended resource; update the fused feature corresponding to each historical recommended resource based on the fused features corresponding to multiple historical recommended resources, and construct the historical recommendation feature from the updated features of the multiple historical recommended resources.

[0022] In some embodiments, the acquisition unit is configured to acquire a second position feature and a search type feature for each historical search text, wherein the second position feature indicates the relative temporal order between the historical search text and other historical search texts in the historical search information, and the search type feature indicates the search type used when searching based on the historical search text; fuse the first fusion feature, the second position feature, and the search type feature corresponding to each historical search text to obtain a second fusion feature corresponding to each historical search text; and update the second fusion feature corresponding to each historical search text based on the second fusion features corresponding to multiple historical search texts, thereby constituting the historical search feature.

[0023] In some embodiments, the acquisition unit is configured to perform a comparison of the historical recommendation features and the historical search features to obtain first similarity information and second similarity information, wherein the first similarity information indicates the similarity between each sub-feature in the historical recommendation features and the historical search features, and the second similarity information indicates the similarity between each sub-feature in the historical search features and the historical recommendation features; based on the first similarity information, classify the sub-features in the historical recommendation features to obtain a first type of feature and a second type of feature; and based on the second similarity information, classify the sub-features in the historical search features to obtain a third type of feature and a fourth type of feature.

[0024] In some embodiments, the processing unit is configured to concatenate the object features of the object, the resource features of the resource, the recommendation interest features, and the search interest features to obtain concatenated features; and to perform dimensionality reduction processing on the concatenated features to obtain the recommendation probability.

[0025] According to another aspect of the present disclosure, a recommendation prediction model training apparatus is provided, the apparatus further comprising:

[0026] The acquisition unit is configured to acquire sample objects, sample resources, sample recommendation probabilities of the sample resources, sample historical recommendation information and sample historical search information of the sample objects. The sample historical recommendation information indicates historical recommended resources for which the sample objects have performed interactive operations. The sample historical search information indicates historical search text input by the sample objects and historical search resources found based on the historical search text for which the sample objects have performed interactive operations.

[0027] The acquisition unit is further configured to execute the call to the recommendation prediction model to be trained, and based on the sample resources, the sample historical recommendation information and the sample historical search information, acquire the recommendation interest features and search interest features of the sample object. The recommendation interest features indicate the degree of interest of the sample object in the sample resources in the recommendation scenario, and the search interest features indicate the degree of interest of the sample object in the sample resources in the search scenario.

[0028] The processing unit is configured to execute the call to the recommendation prediction model to be trained, perform dimensionality reduction processing on the object features of the sample object, the resource features of the sample resource, the recommendation interest features and the search interest features to obtain the predicted recommendation probability of the sample resource. The predicted recommendation probability indicates the probability that the sample object will perform an interactive operation on the sample resource when the sample resource is recommended to the sample object.

[0029] The training unit is configured to train the recommendation prediction model to be trained based on the sample recommendation probability and the predicted recommendation probability to obtain the target recommendation prediction model.

[0030] In some embodiments, the recommendation interest features of the sample object are obtained by fusing the resource features, the historical recommendation features of the sample's historical recommendation information, and the first and second types of features included in the historical recommendation features. The similarity between the first type of features and the historical search features of the sample's historical search information is not less than a first similarity threshold, and the similarity between the second type of features and the historical search features is less than the first similarity threshold. The first and second types of features are obtained by classifying the sub-features in the historical recommendation features, and the sub-features in the historical recommendation features are used to characterize the historical recommendation resources. The device further includes:

[0031] The determining unit is configured to perform the task of determining a first similarity between the historical recommendation features and the first type of features, and a second similarity between the historical recommendation features and the second type of features;

[0032] The training unit is configured to train the recommendation prediction model to be trained based on the sample recommendation probability, the predicted recommendation probability, the first similarity, and the second similarity, so as to increase the first similarity and decrease the second similarity, thereby obtaining the target recommendation prediction model.

[0033] In some embodiments, the search interest features of the sample object are obtained by fusing the resource features, the historical search features of the sample's historical search information, and the third and fourth types of features included in the historical search features. The similarity between the third type of features and the historical recommendation features of the sample's historical recommendation information is not less than a second similarity threshold, and the similarity between the fourth type of features and the historical recommendation features is less than the second similarity threshold. The third and fourth types of features are obtained by classifying the sub-features in the historical search features, and the sub-features in the historical search features are used to characterize the historical search text and the historical search resources corresponding to the historical search text. The device further includes:

[0034] The determining unit is configured to perform the determination of the third similarity between the historical search features and the third type of features, and the fourth similarity between the historical search features and the fourth type of features;

[0035] The training unit is configured to train the recommendation prediction model to be trained based on the sample recommendation probability, the predicted recommendation probability, the third similarity, and the fourth similarity, so as to increase the third similarity and decrease the fourth similarity, thereby obtaining the target recommendation prediction model.

[0036] In some embodiments, the historical search features are composed of fusion features corresponding to each historical search text in the sample historical search information, and the fusion features corresponding to the historical search text are obtained by fusing the text features of the historical search text and the features of the corresponding historical search resources; the apparatus further includes:

[0037] The determining unit is configured to perform a fifth similarity determination between the text features of the historical search text and the features of the corresponding historical search resources;

[0038] The training unit is configured to train the recommendation prediction model to be trained based on the sample recommendation probability, the predicted recommendation probability, the third similarity, the fourth similarity, and the fifth similarity, so that the third similarity increases, the fourth similarity decreases, and the fifth similarity increases, thereby obtaining the target recommendation prediction model.

[0039] In some embodiments, the apparatus further includes:

[0040] The determining unit is configured to perform the following operations from the sample historical search information: determining the negative sample resource of the historical search text and the negative sample text of the historical search resource corresponding to the historical search text, wherein the negative sample resource is any historical search resource in the sample historical search information other than the historical search resource corresponding to the historical search text, and the negative sample text is any historical search text in the sample historical search information other than the historical search text.

[0041] The determining unit is further configured to perform the determination of a sixth similarity between the historical search text and the negative sample resource, and a seventh similarity between the historical search resource corresponding to the historical search text and the negative sample text.

[0042] The training unit is configured to train the recommendation prediction model to be trained based on the sample recommendation probability, the predicted recommendation probability, the third similarity, the fourth similarity, the sixth similarity, and the seventh similarity, so that the third similarity increases, the fourth similarity decreases, the sixth similarity, and the seventh similarity decrease, thereby obtaining the target recommendation prediction model.

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

[0044] One or more processors;

[0045] Memory used to store the executable program code of the processor;

[0046] The processor is configured to execute the program code to implement the aforementioned resource recommendation method or recommendation prediction model training method.

[0047] According to another aspect of the present disclosure, a computer-readable storage medium is provided, which, when the program code in the computer-readable storage medium is executed by a processor of an electronic device, enables the electronic device to perform the above-described resource recommendation method or recommendation prediction model training method.

[0048] According to another aspect of the present disclosure, a computer program product is provided, including a computer program / instructions that, when executed by a processor, implement the above-described resource recommendation method or recommendation prediction model training method.

[0049] In the solution provided by this disclosure, considering that historical recommendation information and historical search information can respectively indicate which resources an object is interested in in recommendation scenarios and search scenarios, historical search information is used as auxiliary information in recommendation scenarios. By combining historical recommendation information and historical search information, the degree of interest of an object in the recommended resources in recommendation scenarios and search scenarios can be simulated. Based on this, combined with the object characteristics of the object and the resource characteristics of the resource to be recommended, the recommendation probability of the object performing an interactive operation on the resource is predicted when the resource is recommended to the object. This determines whether the object is interested in the recommended resource, and the resource is recommended to the object based on the recommendation probability. This ensures that the recommendation probability indication matches the object's interests, ensuring the accuracy of the recommendation probability, and thus ensuring that the resources recommended to the object are resources that the object is interested in, thereby ensuring the accuracy of resource recommendation and the effectiveness of resource recommendation.

[0050] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0051] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure, and are not intended to unduly limit this disclosure.

[0052] Figure 1 This is a schematic diagram illustrating an implementation environment according to an exemplary embodiment.

[0053] Figure 2 This is a flowchart illustrating a resource recommendation method according to an exemplary embodiment.

[0054] Figure 3 This is a flowchart illustrating another resource recommendation method according to an exemplary embodiment.

[0055] Figure 4This is a flowchart illustrating another resource recommendation method according to an exemplary embodiment.

[0056] Figure 5 This is a flowchart illustrating a method for training a recommendation prediction model according to an exemplary embodiment.

[0057] Figure 6 This is a flowchart illustrating another method for training a recommendation prediction model according to an exemplary embodiment.

[0058] Figure 7 This is a flowchart illustrating another method for training a recommendation prediction model according to an exemplary embodiment.

[0059] Figure 8 This is a block diagram illustrating a resource recommendation device according to an exemplary embodiment.

[0060] Figure 9 This is a block diagram of a recommendation prediction model training device according to an exemplary embodiment.

[0061] Figure 10 This is a block diagram of another recommendation prediction model training apparatus according to an exemplary embodiment.

[0062] Figure 11 This is a block diagram illustrating a terminal according to an exemplary embodiment.

[0063] Figure 12 This is a block diagram illustrating a server according to an exemplary embodiment. Detailed Implementation

[0064] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.

[0065] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0066] It should be noted that the information (including but not limited to object information, historical recommendation information, historical search information, etc.) and resources involved in this disclosure are all authorized by users or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions. For example, the object information involved in this disclosure was obtained with full authorization.

[0067] The resource recommendation method or recommendation prediction model training method provided in this disclosure is executed by an electronic device. In some embodiments, the electronic device is provided as a terminal or a server. In some embodiments, the terminal 101 can be at least one of the following devices: a smartphone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 player (Moving Picture Experts Group Audio Layer IV), a laptop computer, a desktop computer, or a laptop computer. In some embodiments, the server 102 can be at least one of a server, multiple servers, a cloud computing platform, or a virtualization center.

[0068] Figure 1 This is a schematic diagram illustrating an implementation environment for a resource recommendation method according to an exemplary embodiment. Taking an electronic device provided as a server as an example, see [link to example]. Figure 1 The implementation environment specifically includes: terminal 101 and server 102. Terminal 101 is connected to server 102 via wireless network or wired network.

[0069] Server 102 is used to recommend resources to the object identified by the object that the terminal 101 has logged in. After obtaining the resources to be recommended to the object, server 102 sends the recommended resources to the logged-in terminal 101 so that the object can view the recommended resources through the terminal 101.

[0070] In some embodiments, an application provided by server 102 is installed on terminal 101. This application has a resource viewing function; for example, it is a resource sharing application. Objects can view shared resources or share resources with other objects through the resource sharing application installed on terminal 102. Currently, the resource sharing application may also have other functions, such as instant messaging and navigation. Terminal 101 logs into the application using an object identifier. After server 102 obtains the resources to be recommended for the object indicated by the object identifier, it determines the recommendation probability of each resource and sends the recommended resources to terminal 101 according to the recommendation probability. Terminal 101 then displays the recommended resources for objects to view through the application.

[0071] In some embodiments, server 102 is configured with a trained recommendation prediction model. Server 102 obtains resources to be recommended to an object, determines the recommendation probability of each resource to be recommended by calling the recommendation prediction model, and then recommends resources to terminal 101 according to the recommendation probability.

[0072] Figure 2 This is a flowchart illustrating a resource recommendation method according to an exemplary embodiment, such as... Figure 2 As shown, the method is performed by an electronic device and includes the following steps:

[0073] In step S201, the object's historical recommendation information and historical search information are obtained. The historical recommendation information indicates the historical recommended resources for which the object has performed interactive operations, and the historical search information indicates the historical search text entered by the object and the historical search resources found based on the historical search text and for which the object has performed interactive operations.

[0074] In this embodiment, the object has historical recommendation information and historical search information. The historical recommendation information indicates which historical recommended resources the object has interacted with in the recommendation scenario, reflecting which historical recommended resources the object is interested in. The historical search information indicates the historical search text entered by the object in the search scenario, that is, which historical search text the object has entered to search for resources, and which historical search resources the object has interacted with in the historical search resources found based on the historical search text, reflecting which historical search resources the object is interested in. In other words, both historical recommendation information and historical search information can reflect the object's interests. Therefore, by combining historical recommendation information and historical search information, the object's degree of interest in multiple resources to be recommended can be determined, and resources can be recommended to the object based on this, thereby improving the accuracy of resource recommendations.

[0075] Here, "object" can be any object, such as a user. "Interactive action" can be any action, such as a favorite, view, like, share, or play action. "Historical search text" is the text entered by the object when searching for resources. This historical search text can be any text, and the historical search resources found based on it are similar to the content indicated by the historical search text. For example, if the historical search text is "songs sung by xxx," the audio or video content found based on the historical search text might contain content about songs sung by "xxx." "Historical recommended resources" or "historical search resources" can be any resource, such as images, videos, text, or product links.

[0076] In step S202, based on the resources to be recommended, historical recommendation information, and historical search information, the object's recommendation interest features and search interest features are obtained. The recommendation interest features indicate the object's degree of interest in the resources in the recommendation scenario, and the search interest features indicate the object's degree of interest in the resources in the search scenario.

[0077] In this embodiment of the disclosure, for any resource to be recommended to an object, since historical recommendation information can reflect which historical recommended resources the object is interested in, and historical search information can reflect which historical search resources the object is interested in, the combination of historical recommendation information and historical search information can determine the object's degree of interest in the recommended resource in the recommendation scenario, and the object's degree of interest in the recommended resource in the search scenario. That is, the recommendation interest features and search interest features are determined, so that the object can be predicted to be interested in the recommended resource based on the recommendation interest features and search interest features.

[0078] The resource to be recommended is any resource to be recommended to the target audience, such as an image, video, text, or product link. Recommendation interest features or search interest features can be represented in any form; for example, they can be represented as feature vectors.

[0079] In step S203, the object features of the object, the resource features of the resource, the recommendation interest features, and the search interest features are reduced in dimensionality to obtain the recommendation probability of the resource. The recommendation probability indicates the likelihood that the object will perform an interactive operation on the resource when it is recommended to the object.

[0080] In this embodiment of the disclosure, since the recommendation interest feature indicates the degree of interest of an object in the resource to be recommended in the recommendation scenario, and the search interest feature indicates the degree of interest of an object in the resource to be recommended in the search scenario, both the recommendation interest feature and the search interest feature can reflect the degree of interest of an object in the resource to be recommended. Therefore, by using the object features and resource features, and combining the degree of interest of the object in the resource to be recommended in the search scenario and the recommendation scenario, the probability of the object performing an interactive operation on the resource is predicted when the resource is recommended to the object. This ensures that the recommendation probability indication matches the object's interests, thereby ensuring the accuracy of the recommendation probability.

[0081] Among them, the object features of an object are used to characterize the object, and the resource features of a resource are used to represent the resource. Both object features and resource features can be represented in any form. For example, both object features and resource features can be represented in the form of feature vectors.

[0082] In step S204, based on the recommendation probabilities of the multiple resources to be recommended, the target resource among the multiple resources is recommended to the object.

[0083] In this embodiment of the disclosure, the recommendation probability of multiple resources to be recommended can be obtained in the above manner. The recommendation probability of each resource can reflect the possibility that the object will perform an interactive operation on the resource when it is recommended to the object, and can also reflect whether the object is interested in the resource. Based on the recommendation probability of multiple resources to be recommended, the target resource among the multiple resources is recommended to the object to ensure that the target resources recommended to the object are all resources that the object is interested in, so as to ensure the accuracy of resource recommendation.

[0084] In the solution provided by this disclosure, considering that historical recommendation information and historical search information can respectively indicate which resources an object is interested in in recommendation scenarios and search scenarios, historical search information is used as auxiliary information in recommendation scenarios. By combining historical recommendation information and historical search information, the degree of interest of an object in the recommended resources in recommendation scenarios and search scenarios can be simulated. Based on this, combined with the object characteristics of the object and the resource characteristics of the resource to be recommended, the recommendation probability of the object performing an interactive operation on the resource is predicted when the resource is recommended to the object. This determines whether the object is interested in the recommended resource, and the resource is recommended to the object based on the recommendation probability. This ensures that the recommendation probability indication matches the object's interests, ensuring the accuracy of the recommendation probability, and thus ensuring that the resources recommended to the object are resources that the object is interested in, thereby ensuring the accuracy of resource recommendation and the effectiveness of resource recommendation.

[0085] In some embodiments, based on the resource to be recommended, historical recommendation information, and historical search information, the recommendation interest features and search interest features of the object are obtained, including:

[0086] Feature extraction is performed on historical recommendation information and historical search information respectively to obtain historical recommendation features and historical search features. Historical recommendation features include sub-features used to characterize historical recommendation resources, and historical search features include sub-features used to characterize historical search text and the historical search resources corresponding to the historical search text.

[0087] The sub-features in the historical recommendation features and the sub-features in the historical search features are classified separately to obtain the first and second categories of features contained in the historical recommendation features and the third and fourth categories of features contained in the historical search features. The similarity between the first category of features and the historical search features is not less than the first similarity threshold, the similarity between the second category of features and the historical search features is less than the first similarity threshold, the similarity between the third category of features and the historical recommendation features is not less than the second similarity threshold, and the similarity between the fourth category of features and the historical recommendation features is less than the second similarity threshold.

[0088] Based on the similarity between resource features and historical recommendation features, first-type features, and second-type features, the historical recommendation features, first-type features, and second-type features are fused to obtain recommendation interest features.

[0089] Based on the similarity between resource features and historical search features, third-type features, and fourth-type features, the historical search features, third-type features, and fourth-type features are fused to obtain search interest features.

[0090] In this embodiment, resource features are used to characterize resources, historical recommendation features reflect the historical recommended resources that an object is interested in during the recommendation scenario, and the first type of features matches the object's interests in both the recommendation and search scenarios, while the second type of features only matches the object's interests during the recommendation scenario. By fusing the resource features, historical recommendation features, the first type of features, and the second type of features, not only is the similarity between the resource to be recommended during the recommendation scenario and the historical recommended resources that the object is interested in during the recommendation scenario considered, but also the influence of the search scenario on which historical recommended resources the object is more interested in. This allows for the simulation of the object's level of interest in the recommended resources during the recommendation scenario, thereby ensuring the accuracy of the determined recommendation interest features. Furthermore, the third type of feature aligns with the object's interests in both recommendation and search scenarios, while the fourth type of feature only aligns with the object's interests in search scenarios. By fusing resource features, historical search features, the third type of feature, and the fourth type of feature, we not only consider the similarity between the resource to be recommended in the search scenario and the historical recommended resources that the object is interested in in the search scenario, but also consider which historical search resources the object is more interested in under the influence of the recommendation scenario. This allows us to simulate the object's level of interest in the recommended resources in the search scenario, thereby ensuring the accuracy of the determined search interest features.

[0091] In some embodiments, feature extraction is performed on historical recommendation information and historical search information respectively to obtain historical recommendation features and historical search features, including:

[0092] Feature extraction is performed on each historical recommended resource in the historical recommendation information to obtain the resource features of each historical recommended resource, and the resource features of each historical recommended resource are used to form the historical recommendation features;

[0093] Feature extraction is performed on the historical search text and historical search resources in the historical search information to obtain the text features of each historical search text and the resource features of each historical search resource.

[0094] The text features of each historical search text and the resource features of the corresponding historical search resources are fused to obtain the first fused feature corresponding to each historical search text. The first fused feature corresponding to each historical search text constitutes the historical search feature.

[0095] In the solution provided by this disclosure, when historical recommendation information includes multiple historical recommendation resources and historical search information includes multiple historical search texts, historical search features are obtained based on multiple historical search resources, and historical recommendation features are obtained based on multiple historical search texts and the historical search resources corresponding to each historical search text, so as to enrich the amount of information contained in the historical search features or historical recommendation features, thereby ensuring the accuracy of the historical search features and historical recommendation features.

[0096] In some embodiments, the resource characteristics of each historical recommended resource constitute historical recommendation characteristics, including:

[0097] Obtain the first position feature of each historical recommended resource. The first position feature indicates the relative temporal order between the historical recommended resource and other historical recommended resources in the historical recommendation information.

[0098] The resource features and first position features of each historical recommended resource are fused to obtain the fused features corresponding to each historical recommended resource;

[0099] Based on the fusion features corresponding to multiple historical recommendation resources, the fusion features corresponding to each historical recommendation resource are updated respectively, and the updated features of multiple historical recommendation resources are used to form historical recommendation features.

[0100] In this embodiment of the disclosure, considering that the interests of an object may change over time, the first position feature of each historical recommended resource is obtained, and the resource features of each historical recommended resource are fused with the first position feature. Based on the fused features corresponding to multiple historical recommended resources, the fused features corresponding to each historical recommended resource are updated respectively. The updated features of multiple historical recommended resources constitute historical recommendation features, so that the historical recommendation features can reflect the changes in the historical recommended resources that the object is interested in over time, thereby reflecting the changes in the object's interests over time. It also integrates the resource features of other historical recommended resources into the updated features of each historical recommended resource, thereby enhancing the correlation between multiple historical recommended resources and ensuring the accuracy of the historical recommendation features.

[0101] In some embodiments, the first fusion feature corresponding to each historical search text constitutes the historical search feature, including:

[0102] Obtain the second position feature and search type feature for each historical search text. The second position feature indicates the relative time order between the historical search text and other historical search texts in the historical search information, and the search type feature indicates the search type used when searching based on the historical search text.

[0103] The first fusion feature, the second position feature, and the search type feature corresponding to each historical search text are fused to obtain the second fusion feature corresponding to each historical search text.

[0104] Based on the second fusion features corresponding to multiple historical search texts, the second fusion features corresponding to each historical search text are updated respectively, and the updated features of multiple historical search texts constitute the historical search features.

[0105] In this embodiment of the disclosure, considering that the interests of an object may change over time, and different search types can reflect different intentions of the object, the first position feature and search type feature of each historical search text are obtained, the first fusion feature, second position feature and search type feature corresponding to the historical search text are fused, and the second fusion feature corresponding to each historical search text is updated based on the second fusion feature corresponding to multiple historical search texts. The updated features of multiple historical search texts constitute historical search features, so that the historical search features can reflect the changes in the historical search resources that the object is interested in over time, thereby reflecting the changes in the object's interests over time. It also integrates the updated features of each historical search text with the features of other historical search texts to enhance the correlation between multiple historical search texts, thereby ensuring the accuracy of the historical search texts.

[0106] In some embodiments, the sub-features in the historical recommendation features and the sub-features in the historical search features are classified respectively to obtain the first type and second type of features included in the historical recommendation features and the third type and fourth type of features included in the historical search features, including:

[0107] By comparing historical recommendation features and historical search features, first similarity information and second similarity information are obtained. The first similarity information indicates the similarity between each sub-feature in the historical recommendation features and the historical search features, and the second similarity information indicates the similarity between each sub-feature in the historical search features and the historical recommendation features.

[0108] Based on the first similarity information, the sub-features in the historical recommendation features are classified to obtain the first type of features and the second type of features;

[0109] Based on the second similarity information, the sub-features in the historical search features are classified to obtain the third and fourth types of features.

[0110] In this embodiment of the disclosure, by comparing the sub-features in the historical search features with the sub-features in the historical recommendation features, the sub-features in the historical search features and the sub-features in the historical recommendation features are classified according to the obtained similarity information, so as to obtain a first type of features similar to the historical search features and a second type of features that are not similar, as well as a third type of features similar to the historical recommendation features and a fourth type of features that are not similar, so as to ensure the accuracy of classification.

[0111] In some embodiments, dimensionality reduction is performed on the object features of the object, the resource features of the resource, the recommendation interest features, and the search interest features to obtain the recommendation probability of the resource, including:

[0112] The object features, resource features, recommendation interest features, and search interest features of an object are concatenated to obtain the concatenated features.

[0113] The dimensionality of the spliced ​​features is reduced to obtain the recommendation probability of the resource.

[0114] In this embodiment of the disclosure, object features, resource features, recommendation interest features, and search interest features are concatenated to enrich the information contained in the concatenated features. The concatenated features are then subjected to dimensionality reduction processing so that the features contained in the concatenated features can be fully integrated. This allows the probability of an object performing an interactive operation on the resource when it is recommended to an object in the recommendation scenario and the search scenario to be determined based on the object's interest in the resource. This ensures the accuracy of the obtained recommendation probability.

[0115] The above Figure 2 The diagram shown is merely the basic process of this disclosure. The following section will further elaborate on the solution provided in this disclosure based on a specific implementation method. Figure 3 This is a flowchart illustrating another resource recommendation method according to an exemplary embodiment, such as... Figure 3 As shown, the method is performed by an electronic device and includes the following steps:

[0116] In step S301, the object's historical recommendation information and historical search information are obtained. The historical recommendation information indicates the historical recommended resources for which the object has performed interactive operations, and the historical search information indicates the historical search text entered by the object and the historical search resources found based on the historical search text and for which the object has performed interactive operations.

[0117] In some embodiments, step S301 includes: obtaining multiple historical recommendation information and multiple historical search information of the object.

[0118] Each historical recommendation record indicates at least one historical recommended resource for which the object has performed an interactive operation. In some embodiments, the historical recommendation record indicates one historical recommended resource for which the object has performed an interactive operation. For example, when recommending resources to an object, if the object performs an interactive operation on any resource, a historical recommendation record is generated. In some embodiments, each historical recommendation record corresponds to one recommendation action, indicating a historical recommended resource recommended to the object once and for which the object has performed an interactive operation; multiple historical recommendation records indicate historical recommended resources recommended to the object multiple times and for which the object has performed interactive operations. For example, if an electronic device recommends 100 resources to a user for the first time, and the user only interacts with 5 of those 100 resources, then those 5 resources are considered historical recommendations, generating the first historical recommendation message. This first historical recommendation message indicates the 5 historical recommended resources that the user interacted with. After a certain interval, if the electronic device recommends 50 resources to the user for the second time, and the user only interacts with 10 of those 50 resources, then those 10 resources are considered historical recommendations, generating the second historical recommendation message. This second historical recommendation message indicates the 10 historical recommended resources that the user interacted with.

[0119] Each historical search record corresponds to a single search action by the user, while multiple historical recommendations correspond to multiple search actions by the user. Each historical search record indicates a historical search resource found based on a historical search text, for which the user has performed an interactive action. Each historical search record indicates at least one historical search resource. For example, if a user inputs a first search text through an electronic device, and the electronic device finds multiple resources based on the first search text, and the user interacts with two of the found resources, then the first search text is used as the historical search text, and the two found resources are used as historical search resources. A first historical search record is generated based on this historical search text and the two historical search resources. Similarly, if a user inputs a second search text through an electronic device, and the electronic device finds multiple resources based on the second search text, and the user interacts with three of the found resources, then the second search text is used as the historical search text, and the three found resources are used as historical search resources. A second historical search record is generated based on this historical search text and the three historical search resources.

[0120] In some embodiments, each piece of historical recommendation information includes resource information of the historical recommended resource, the recommendation time of the historical recommended resource, and the interactive operation performed by the object on the historical recommended resource. The recommendation time in the historical recommendation information indicates when the historical recommended resource was recommended to the object. The interactive operation in the historical recommendation information indicates what kind of interactive operation the object performed on the historical recommended resource. In some embodiments, the interactive operation in the historical recommendation information is represented by an operation identifier, which is used to identify the corresponding interactive operation. The resource information of the historical recommended resource is used to characterize the historical recommended resource; for example, the resource information includes the resource name, the type of resource, a brief description of the resource, the publisher, etc.

[0121] In some embodiments, each piece of historical search information includes the search time, historical search text, resource information of the historical search resource, and interactive operations performed by the object on the historical search resource. The search time in the historical search information indicates the time when the resource was searched based on the historical search text, which is the text entered by the object when searching for the resource. The interactive operations in the historical search information indicate which interactive operation the object performed on the historical search resource. In some embodiments, the interactive operations in the historical search information are represented by operation identifiers, which are used to identify the corresponding interactive operations. The resource information of the historical search resource is used to characterize the historical search resource; for example, the resource information includes the resource name, the type of resource, a brief description of the resource, and the publisher.

[0122] In step S302, feature extraction is performed on historical recommendation information and historical search information to obtain historical recommendation features and historical search features. The historical recommendation features include sub-features used to characterize historical recommendation resources, and the historical search features include sub-features used to characterize historical search text and the historical search resources corresponding to the historical search text.

[0123] Among them, historical recommendation features are used to represent historical recommendation information, and historical search features are used to characterize historical search information.

[0124] In this embodiment of the disclosure, the historical recommendation feature includes at least one sub-feature for characterizing historical recommendation resources, each sub-feature characterizing one historical recommendation resource, and the number of sub-features in the historical recommendation feature is equal to the number of historical recommendation resources in the historical recommendation information. Similarly, the historical search feature includes at least one sub-feature for characterizing historical search text and the historical search resources corresponding to the historical search text, each sub-feature characterizing one historical search text and the historical search resources corresponding to the historical search text, and the number of sub-features in the historical search feature is equal to the number of historical search texts in the historical search information.

[0125] In step S303, the sub-features in the historical recommendation features and the sub-features in the historical search features are classified respectively to obtain the first type of features and the second type of features contained in the historical recommendation features, and the third type of features and the fourth type of features contained in the historical search features. The similarity between the first type of features and the historical search features is not less than the first similarity threshold, the similarity between the second type of features and the historical search features is less than the first similarity threshold, the similarity between the third type of features and the historical recommendation features is not less than the second similarity threshold, and the similarity between the fourth type of features and the historical recommendation features is less than the second similarity threshold.

[0126] In this embodiment, the first and second types of features are obtained by classifying sub-features from historical recommendation features; that is, the first and second types of features can constitute historical recommendation features. Similarly, the third and fourth types of features are obtained by classifying sub-features from historical search features; these can constitute historical search features. By classifying the sub-features of historical recommendation features and historical search features, first-type features similar to historical search features or dissimilar second-type features are identified from historical recommendation features, and third-type features similar to historical recommendation features or dissimilar fourth-type features are identified from historical search features. This allows for the subsequent determination of object interests based on the first, second, third, and fourth types of features.

[0127] Since the first type of features in historical recommendation features are similar to historical search features, and the third type of features in historical search features are similar to historical recommendation features, the first and third types of features match the object's interests in both recommendation and search scenarios. In other words, the first and third types of features are better able to characterize which resources the object is interested in. However, the second type of features in historical recommendation features are not similar to historical search features, and the fourth type of features in historical search features are not similar to historical recommendation features. Therefore, the second type of features only matches the object's interests in recommendation scenarios, while the fourth type of features only matches the object's interests in search scenarios.

[0128] The similarity between the first type of feature and the historical search features can be determined in any way; for example, the similarity between the first type of feature and the historical search features can be determined using Euclidean distance. The similarity between the second, third, and fourth types of features can also be determined in any way.

[0129] In some embodiments, determining the first similarity threshold and the second similarity threshold includes: determining a first sum of similarities corresponding to multiple sub-features in historical recommendation features; determining the ratio between the first sum and the number of multiple sub-features in historical recommendation features as the first similarity threshold; determining a second sum of similarities corresponding to multiple sub-features in historical search features; and determining the ratio between the second sum and the number of multiple sub-features in historical search features as the second similarity threshold.

[0130] In this embodiment, the historical recommendation feature includes multiple sub-features. Each sub-feature represents a historical recommendation resource in the historical recommendation information. Different sub-features in the historical recommendation feature correspond to different historical recommendation resources. The similarity between any sub-feature in the historical recommendation feature is the similarity between that sub-feature and the historical search feature. Similarly, the historical search feature includes multiple sub-features. Each sub-feature represents a historical search text in the historical search information and the historical search resource corresponding to that historical search text. Different sub-features in the historical search feature correspond to different historical search texts. The similarity between any sub-feature in the historical search feature is the similarity between that sub-feature and the historical recommendation feature.

[0131] In this embodiment of the disclosure, the average similarity of multiple sub-features in the historical recommendation features is used as the first similarity threshold to ensure that the first type of features similar to the historical search features and the second type of features dissimilar to the historical search features can be distinguished from the historical recommendation features, thereby ensuring the accuracy of the determined first type of features and second type of features.

[0132] In this embodiment of the disclosure, the average similarity of multiple sub-features in the historical search features is used as the second similarity threshold to ensure that a third type of feature similar to the historical recommendation features and a fourth type of feature dissimilar to the historical search features can be distinguished from the historical search features, thereby ensuring the accuracy of the determined third and fourth types of features.

[0133] In some embodiments, the similarity of multiple sub-features in the historical recommendation features is obtained by normalization, the similarity of multiple sub-features in the historical search features is obtained by normalization, the sum of the similarities of multiple sub-features in the historical recommendation features is 1, and the sum of the similarities of multiple sub-features in the historical search features is 1. Therefore, the determined first similarity threshold is the reciprocal of the number of multiple sub-features in the historical recommendation features, and the determined second similarity threshold is the reciprocal of the number of multiple sub-features in the historical search features.

[0134] For example, if the number of historical recommended resources corresponding to a historical recommendation feature is 20, and the sum of the similarities of multiple sub-features within the historical recommendation feature is 1, then 1 / 20 is determined as the first similarity threshold. The similarity between the first type of historical recommendation feature and the historical search feature is no less than 1 / 20, and the similarity between the second type of historical recommendation feature and the historical search feature is less than 1 / 20. If the number of historical search texts corresponding to a historical search feature is 10, then 1 / 10 is determined as the second similarity threshold. The similarity between the third type of historical search feature and the historical recommendation feature is no less than 1 / 10, and the similarity between the fourth type of historical search feature and the historical recommendation feature is less than 1 / 10.

[0135] In some embodiments, step S303 includes steps 1-3.

[0136] Step 1: Compare the historical recommendation features and historical search features to obtain the first similarity information and the second similarity information. The first similarity information indicates the similarity between each sub-feature in the historical recommendation features and the historical search features, and the second similarity information indicates the similarity between each sub-feature in the historical search features and the historical recommendation features.

[0137] Here, the historical search resources corresponding to the historical search text are those resources found based on that historical search text, and for which the object has performed interactive operations. Both the first similarity information and the second similarity information can be represented in any form; for example, both the first similarity information and the second similarity information can be represented in the form of feature vectors.

[0138] In this embodiment of the disclosure, during the comparison process, each sub-feature in the historical recommendation features is compared with the historical search features to obtain the similarity between each sub-feature and the historical search features, and the obtained similarity constitutes the first similarity information; each sub-feature in the historical search features is compared with the historical recommendation features to obtain the similarity between each sub-feature and the historical recommendation features, and the obtained similarity constitutes the second similarity information.

[0139] In some embodiments, the process of obtaining the first similarity information and the second similarity information includes: fusing historical recommendation features and historical search features according to weights to obtain affinity features, which indicate the correlation between historical recommendation features and historical search features; fusing historical recommendation features and affinity features to obtain the first similarity information; and fusing historical search features and affinity features to obtain the second similarity information.

[0140] The weights are constants. In this embodiment, considering the correlation between historical recommendation features and historical search features, a co-attention mechanism is used to compare the historical recommendation features and historical search features to obtain first similarity information and second similarity information, so as to ensure the accuracy of the obtained similarity information.

[0141] In some embodiments, the first similarity information and the second similarity information satisfy the following relationship:

[0142] A = tanh(H) s W l (H r ) T )

[0143]

[0144]

[0145] Where A represents the affinity feature, H s H is used to represent historical search features. r W is used to represent historical recommendation features. l Let be the weight matrix, tanh(·) denote the hyperbolic tangent function, T denote the transpose of the matrix, and a r W is used to represent the first similarity information. s The constant matrix is ​​used to represent the matrix, and softmax(·) is used to represent the normalization function; a s W is used to represent the second similarity information. r Used to represent constant matrices.

[0146] Step 2: Based on the first similarity information, classify the sub-features in the historical recommendation features to obtain the first type of features and the second type of features.

[0147] In this embodiment of the disclosure, the first similarity information indicates the similarity between each sub-feature in the historical recommendation features and the historical search features. Based on the first similarity information, sub-features with a similarity of not less than the first similarity threshold are selected from the historical recommendation features to form a first type of feature, and sub-features with a similarity of not less than the first similarity threshold are selected to form a second type of feature.

[0148] Step 3: Based on the second similarity information, classify the sub-features in the historical search features to obtain the third and fourth types of features.

[0149] In this embodiment of the disclosure, the second similarity information indicates the similarity between each sub-feature in the historical search features and the historical recommendation features. Based on the second similarity information, sub-features with a similarity not less than the second similarity threshold are classified as third-class features from the historical search features, and sub-features with a similarity less than the second similarity threshold are classified as fourth-class features.

[0150] In this embodiment of the disclosure, by comparing the sub-features in the historical search features with the sub-features in the historical recommendation features, the sub-features in the historical search features and the sub-features in the historical recommendation features are classified according to the obtained similarity information, so as to obtain a first type of features similar to the historical search features and a second type of features that are not similar, as well as a third type of features similar to the historical recommendation features and a fourth type of features that are not similar, so as to ensure the accuracy of the obtained class features.

[0151] In step S304, based on the similarity between the resource features and the historical recommendation features, the first type of features and the second type of features, the historical recommendation features, the first type of features and the second type of features are fused to obtain the recommendation interest features, which indicate the degree of interest of the object in the resource in the recommendation scenario.

[0152] In this embodiment, resource features are used to characterize resources, historical recommendation features reflect the historical recommended resources that an object is interested in during the recommendation scenario, and the first type of features matches the object's interests in both the recommendation and search scenarios, while the second type of features only matches the object's interests during the recommendation scenario. By comparing the resource features with the historical recommendation features, the first type of features, and the second type of features, the historical recommendation features, the first type of features, and the second type of features are fused. This not only considers the similarity between the resource to be recommended during the recommendation scenario and the historical recommended resources that the object is interested in during the recommendation scenario, but also considers which historical recommended resources the object is more interested in during the search scenario. This allows for the simulation of the object's level of interest in the recommended resources during the recommendation scenario, thereby ensuring the accuracy of the determined recommendation interest features.

[0153] In some embodiments, step S304 includes: fusing historical recommendation features, first-type features, and second-type features with resource features of the resource respectively to obtain the similarity between the resource features of the resource and historical recommendation features, first-type features, and second-type features respectively; determining the product of historical recommendation features and their corresponding similarities, the product of first-type features and their corresponding similarities, and the product of second-type features and their corresponding similarities; and concatenating the product of historical recommendation features and their corresponding similarities, the product of first-type features and their corresponding similarities, and the product of second-type features and their corresponding similarities to obtain the recommendation interest feature.

[0154] In this embodiment of the disclosure, the resource features of the resource are fused with historical recommendation features, first type features and second type features respectively, so that the obtained similarity can reflect the correlation between the historical recommendation features, first type features and second type features and the resource features of the resource, thereby enabling the recommendation interest features to reflect the degree of interest of the object in the recommendation scenario and ensuring the accuracy of the recommendation interest features.

[0155] For the methods of fusing historical recommendation features, first-type features, and second-type features with resource features, a multi-head attention mechanism can be adopted for fusion. That is, a self-attention mechanism is adopted to fuse historical recommendation features with resource features to obtain the similarity between resource features and historical recommendation features; a self-attention mechanism is adopted to fuse first-type features with resource features to obtain the similarity between resource features and first-type features; a self-attention mechanism is adopted to fuse second-type features with resource features to obtain the similarity between resource features and second-type features.

[0156] In step S305, based on the similarity between the resource features and the historical search features, the third type of features and the fourth type of features, the historical search features, the third type of features and the fourth type of features are fused to obtain the search interest features.

[0157] In this embodiment, resource features are used to characterize resources, historical search features reflect the historical search resources that an object is interested in during a search scenario, the third type of features match the object's interests in both recommendation and search scenarios, and the fourth type of features only match the object's interests during a search scenario. By using the similarity between the resource features and historical search features, the third type of features, and the fourth type of features, the resource features, historical search features, the third type of features, and the fourth type of features are fused. This not only considers the similarity between the resource to be recommended during a search scenario and the historical recommended resources that the object is interested in during a search scenario, but also considers which historical search resources the object is more interested in under the influence of the recommendation scenario. This allows for the simulation of the object's level of interest in the recommended resources during a search scenario, thereby ensuring the accuracy of the determined search interest features.

[0158] In some embodiments, step S305 includes: fusing historical search features, third-type features, and fourth-type features with resource features of the resource respectively to obtain the similarity between the resource features of the resource and historical search features, third-type features, and fourth-type features respectively; determining the product of historical search features and their corresponding similarities, the product of third-type features and their corresponding similarities, and the product of fourth-type features and their corresponding similarities; and concatenating the product of historical search features and their corresponding similarities, the product of third-type features and their corresponding similarities, and the product of fourth-type features and their corresponding similarities to obtain the search interest feature.

[0159] For the methods of fusing historical search features, third-type features, and fourth-type features with resource features, a multi-head attention mechanism can be adopted for fusion. That is, a self-attention mechanism is adopted to fuse historical search features with resource features to obtain the similarity between resource features and historical search features; a self-attention mechanism is adopted to fuse third-type features with resource features to obtain the similarity between resource features and third-type features; and a self-attention mechanism is adopted to fuse fourth-type features with resource features to obtain the similarity between resource features and fourth-type features.

[0160] It should be noted that the embodiments disclosed herein take the acquisition of historical recommendation features corresponding to historical recommendation information and historical search features corresponding to historical search information as an example, and use historical recommendation features and historical search features to obtain recommendation interest features and search history features. In another embodiment, it is not necessary to perform the above steps S302-S305, but other methods are adopted to obtain the recommendation interest features and search interest features of the object based on the resource to be recommended, historical recommendation information and historical search information.

[0161] In step S306, the object features, resource features, recommendation interest features, and search interest features of the object are concatenated to obtain the concatenated features.

[0162] In this embodiment of the disclosure, object features are used to characterize the object, resource features are used to characterize the resource, and recommendation interest features and search features can reflect the degree of interest of the object in the resource in recommendation or search scenarios, respectively. The object features, resource features, recommendation interest features and search interest features are concatenated to enrich the information contained in the concatenated features so that the recommendation probability can be predicted based on the concatenated features in the future.

[0163] In this disclosure, the object features, resource features, recommendation interest features and search interest features can be concatenated in any order, and no limitation is imposed on this.

[0164] In some embodiments, object features are obtained by extracting features from the object information of the object. The object information is used to characterize the object. For example, if the object is a user, the object information is the user information.

[0165] In step S307, the spliced ​​features are subjected to dimensionality reduction processing to obtain the recommendation probability of the resource. The recommendation probability indicates the likelihood that the object will perform an interactive operation on the resource when it is recommended to the object.

[0166] In this embodiment of the disclosure, object features, resource features, recommendation interest features, and search interest features are concatenated to enrich the information contained in the concatenated features. The concatenated features are then subjected to dimensionality reduction processing so that the features contained in the concatenated features can be fully integrated. This allows the probability of an object performing an interactive operation on the resource when it is recommended to an object in the recommendation scenario and the search scenario to be determined based on the object's interest in the resource. This ensures the accuracy of the obtained recommendation probability.

[0167] For example, a concatenated feature is a multi-dimensional vector, such as a 1×64 vector. By transforming the concatenated feature to reduce the number of dimensions it contains, a numerical value is obtained, which is the recommendation probability.

[0168] It should be noted that the embodiments disclosed herein are only used as an example to illustrate obtaining the recommendation probability of any resource to be recommended. According to the above steps S304-S307, the recommendation probabilities of multiple resources to be recommended can be obtained.

[0169] It should be noted that the embodiments disclosed herein use the concatenation of object features, resource features, recommendation interest features, and search interest features as an example to obtain the recommendation probability using the concatenated features. However, in another embodiment, it is not necessary to perform the above steps S306-S307. Instead, other methods are used to process the object features, resource features, recommendation interest features, and search interest features of the object to obtain the recommendation probability of the resource.

[0170] In step S308, based on the recommendation probabilities of the multiple resources to be recommended, the target resource among the multiple resources is recommended to the object.

[0171] In some embodiments, step S308 includes the following two methods.

[0172] The first method involves selecting the first number of target resources with the highest recommendation probability from among the multiple resources to be recommended, and then recommending the selected target resources to the object.

[0173] The first quantity can be any quantity, for example, the first quantity can be 3 or 5, etc.

[0174] In this embodiment of the disclosure, for multiple resources to be recommended, the recommendation probability of the selected target resource is greater than that of the unselected resources, so as to ensure that the recommendation probability of the selected target resource is high enough, thereby ensuring that the selected target resource is the resource that the object is interested in, and thus ensuring the accuracy of resource recommendation.

[0175] Taking a quantity of 3 as an example, the number of resources to be recommended this time is 20. After obtaining the recommendation probability of each resource to be recommended, the 20 resources are sorted in descending order of recommendation probability, and the top 3 resources are recommended to the target.

[0176] The second approach involves selecting a target resource from among the multiple resources to be recommended, based on the recommendation probability of each resource, if the recommendation probability is greater than a probability threshold, and then recommending the selected target resource to the object.

[0177] The probability threshold is an arbitrary value. If the recommendation probability of any resource is greater than the probability threshold, it means that the object is sufficiently interested in the resource. Therefore, only resources with a recommendation probability greater than the probability threshold are recommended to the object to ensure that the resources recommended to the object are all resources that the object is interested in, thereby ensuring the accuracy of resource recommendations.

[0178] It should be noted that the embodiments disclosed herein are illustrated using the example of a recommendation probability greater than a probability threshold. In another embodiment, when the recommendation probability is not greater than the probability threshold, it means that when a resource is recommended to an object, the object is unlikely to perform an interactive operation on the resource, reflecting that the object is not interested in the resource, and therefore the resource will no longer be recommended to the object.

[0179] It should be noted that this disclosure is only used as an example of any one resource to be recommended. In another embodiment, if multiple resources to be recommended are obtained, then after step S303, according to steps S304-S307, the recommendation probability corresponding to each of the multiple resources to be recommended is obtained, and resources with a recommendation probability greater than a probability threshold are selected from the multiple resources to be recommended. The selected resources are then recommended to the object so that the recommendation probability corresponding to each resource recommended to the object is greater than the probability threshold.

[0180] In the solution provided by this disclosure, considering that historical recommendation information and historical search information can respectively indicate which resources an object is interested in in recommendation scenarios and search scenarios, historical search information is used as auxiliary information in recommendation scenarios. By combining historical recommendation information and historical search information, the degree of interest of an object in the recommended resources in recommendation scenarios and search scenarios can be simulated. Based on this, combined with the object characteristics of the object and the resource characteristics of the resource to be recommended, the recommendation probability of the object performing an interactive operation on the resource is predicted when the resource is recommended to the object. This determines whether the object is interested in the recommended resource, and the resource is recommended to the object based on the recommendation probability. This ensures that the recommendation probability indication matches the object's interests, ensuring the accuracy of the recommendation probability, and thus ensuring that the resources recommended to the object are resources that the object is interested in, thereby ensuring the accuracy of resource recommendation and the effectiveness of resource recommendation.

[0181] In this embodiment, resource features are used to characterize resources, historical recommendation features reflect the historical recommended resources that an object is interested in during the recommendation scenario, and the first type of features matches the object's interests in both the recommendation and search scenarios, while the second type of features only matches the object's interests during the recommendation scenario. By fusing the resource features, historical recommendation features, the first type of features, and the second type of features, not only is the similarity between the resource to be recommended during the recommendation scenario and the historical recommended resources that the object is interested in during the recommendation scenario considered, but also the influence of the search scenario on which historical recommended resources the object is more interested in. This allows for the simulation of the object's level of interest in the recommended resources during the recommendation scenario, thereby ensuring the accuracy of the determined recommendation interest features.

[0182] In this embodiment of the disclosure, resource features are used to characterize resources, historical search features can reflect the historical search resources that an object is interested in during the search scenario, the third type of features conforms to the object's interests in both the recommendation and search scenarios, and the fourth type of features only conforms to the object's interests during the search scenario. By fusing the resource features, historical search features, the third type of features, and the fourth type of features, not only is the similarity between the resource to be recommended during the search scenario and the historical recommended resources that the object is interested in during the search scenario considered, but also which historical search resources the object is more interested in under the influence of the recommendation scenario. This allows for the simulation of the object's degree of interest in the recommended resources during the search scenario, thereby ensuring the accuracy of the determined search interest features.

[0183] In the above Figure 3Based on the embodiments shown, this disclosure can also take historical recommendation information including multiple historical recommendation resources and historical search information including multiple historical search texts as examples, obtain historical search features based on multiple historical search resources, and obtain historical recommendation features based on multiple historical search texts and the historical search resources corresponding to each historical search text. For details of the process, please refer to the following embodiments.

[0184] Figure 4 This is a flowchart illustrating a resource recommendation method according to an exemplary embodiment, such as... Figure 4 As shown, the method is performed by an electronic device and includes the following steps:

[0185] In step S401, feature extraction is performed on each historical recommended resource in the historical recommendation information to obtain the resource features of each historical recommended resource, and the resource features of each historical recommended resource constitute the historical recommendation features.

[0186] In this approach, the resource features of each historical recommended resource are used to characterize the corresponding historical recommended resource. These resource features can be represented in any form; for example, they can be represented as feature vectors. The historical recommendation features, composed of the resource features of multiple historical recommended resources included in the historical recommendation information, are represented as a feature matrix, where each row of the feature vector represents a resource feature of a historical recommended resource. By employing feature extraction, the highly discrete historical recommended resources are mapped to a dense feature space, thus obtaining the resource features of the historical recommended resources.

[0187] In some embodiments, if each piece of historical recommendation information indicates one or more historical recommendation resources, then the resource characteristics of the historical recommendation resources indicated by multiple pieces of historical recommendation information constitute historical recommendation features.

[0188] In some embodiments, before step S401, duplicate historical recommendation resources in the historical recommendation information are filtered out. That is, the method further includes filtering duplicate historical recommendation resources in the historical recommendation information.

[0189] In this embodiment of the disclosure, an object may have one or more historical recommendation information, each historical recommendation information indicating one or more historical recommendation resources. Since the same historical recommendation resources may exist in different historical recommendation information, or the same historical recommendation resources may exist in the same historical recommendation information, the duplicate historical recommendation resources in the historical recommendation information are filtered so that the filtered historical recommendation resources do not have duplicate resources, so that the resource features of the filtered historical recommendation resources can be used to construct historical recommendation features, thereby ensuring the accuracy of the historical recommendation features.

[0190] In some embodiments, the process of obtaining the resource features of each historical recommended resource includes: for any historical recommended resource, performing feature extraction on the resource information of the historical recommended resource to obtain the resource features of the historical recommended resource.

[0191] The resource information includes the resource name, the type of resource, and a brief description. In some embodiments, the resource information of historical recommended resources also includes a number, which is used to distinguish different historical recommended resources in the historical recommendation information. The number can be represented in any form; for example, the number can be represented by numbers. For example, multiple historical recommended resources can be coded as 1, 2, 3, etc. In this embodiment, a code is set for each historical recommended resource in the historical recommendation information to distinguish different historical recommended resources, thereby enabling the extracted resource features to be distinguished as well, and ensuring the accuracy of the resource features.

[0192] In some embodiments, the process of constructing historical recommendation features from the resource features of each historical recommended resource includes the following steps 1-3:

[0193] Step 1: Obtain the first position feature of each historical recommended resource. The first position feature indicates the relative time order between the historical recommended resource and other historical recommended resources in the historical recommendation information.

[0194] The first positional feature can be represented in any form, such as a feature vector. In the historical recommendation information, each historical recommendation resource is one that has been previously recommended to the object, and the timing of these recommendations may differ. By assigning a first positional feature to each historical recommendation resource, the chronological order in which these resources were recommended to the object can be determined.

[0195] In some embodiments, step 1 includes: assigning a serial number to each historical recommendation resource according to the order of recommendation time of multiple historical recommendation resources in the historical recommendation information, extracting features from the serial number corresponding to each historical recommendation resource, and obtaining the first position feature of each historical recommendation resource.

[0196] The serial number can be represented by any string. For example, according to the order of recommendation time corresponding to multiple historical recommended resources from latest to earliest, the first historical recommended resource is assigned the serial number 0001, the second historical recommended resource is assigned the serial number 0002, and so on, assigning a serial number to each historical recommended resource. The later the recommendation time, the closer the recommendation time is to the current time.

[0197] Step 2: Fuse the resource features and first position features of each historical recommended resource to obtain the fused features corresponding to each historical recommended resource.

[0198] In this embodiment of the disclosure, the first position feature of multiple historical recommended resources can reflect the chronological order of recommendation of multiple historical recommended resources. For each historical recommended resource, the resource feature of the historical recommended resource is fused with the corresponding first position feature to enrich the information contained in the fused feature, so that the fused feature of multiple historical recommended resources can reflect the chronological order of recommendation of multiple historical recommended resources, and can also reflect the changes of historical recommended resources of interest to the object over time, thereby ensuring the accuracy of the fused feature.

[0199] Step 3: Based on the fusion features corresponding to multiple historical recommendation resources, update the fusion features corresponding to each historical recommendation resource respectively, and combine the updated features of multiple historical recommendation resources to form historical recommendation features.

[0200] In this embodiment of the disclosure, considering that the interests of an object may change over time, the first position feature of each historical recommended resource is obtained, and the resource features of each historical recommended resource are fused with the first position feature. Based on the fused features corresponding to multiple historical recommended resources, the fused features corresponding to each historical recommended resource are updated respectively. The updated features of multiple historical recommended resources constitute historical recommendation features, so that the historical recommendation features can reflect the changes in the historical recommended resources that the object is interested in over time, thereby reflecting the changes in the object's interests over time. It also integrates the resource features of other historical recommended resources into the updated features of each historical recommended resource, thereby enhancing the correlation between multiple historical recommended resources and ensuring the accuracy of the historical recommendation features.

[0201] In some embodiments, step 3 includes: multiplying the fusion feature corresponding to each historical recommendation resource with the fusion feature corresponding to the first historical recommendation resource to determine the weight corresponding to each historical recommendation resource; fusing the fusion features corresponding to multiple historical recommendation resources based on the weight corresponding to each historical recommendation resource; and fusing the fused features with the fusion features corresponding to the first historical recommendation resource to obtain the updated features of the first historical recommendation resource.

[0202] The first historical recommendation resource is any one of multiple historical recommendation resources. The above explanation uses the first historical recommendation resource as an example. Following the above method, the fusion features corresponding to each historical recommendation resource are updated to obtain the updated features of each historical recommendation resource.

[0203] In this embodiment of the disclosure, a self-attention mechanism is used to update the fusion features corresponding to multiple historical recommendation resources, so as to enhance the correlation between the fusion features corresponding to multiple historical recommendation resources and thus ensure the accuracy of the historical recommendation features.

[0204] In step S402, feature extraction is performed on the historical search texts and historical search resources in the historical search information to obtain the text features of each historical search text and the resource features of each historical search resource.

[0205] Among them, the text features of historical search text are used to characterize the historical search text, and the resource features of historical search resources are used to characterize the historical search resources. Both text features and resource features can be represented in any form, for example, both text features and resource features can be represented in the form of feature vectors.

[0206] In some embodiments, historical search information may include one or more historical search texts and one or more historical search resources corresponding to each historical search text. Feature extraction is performed on each historical search text and each historical search resource in the historical search information to obtain the text features of each historical search text and the resource features of each historical search resource.

[0207] In some embodiments, before step S401, duplicate historical search texts in the historical search information are also filtered out. That is, the method further includes: filtering duplicate historical search texts in the historical search information and filtering duplicate historical search resources in the historical search resources corresponding to the same historical search text.

[0208] In this embodiment of the disclosure, an object may have one or more historical search information entries, each indicating one or more historical search text entries. Since the same historical search text may exist in different historical search information entries, or the same historical search text may exist in the same historical search information entry, duplicate historical search text entries are filtered to avoid duplicate historical search text entries. For the filtered historical search text, duplicate historical search resources corresponding to the same historical search text are also filtered to avoid duplicate historical search resources. This allows for the subsequent construction of historical search features based on the text features of the filtered historical search text and the resource features of the corresponding historical search resources, thereby ensuring the accuracy of the historical search features.

[0209] In some embodiments, the process of obtaining the text features of each historical search text includes: for any historical search text, performing feature extraction on the historical search text to obtain the text features of the historical search text.

[0210] In some embodiments, the process of obtaining the resource features of each historical search resource includes: for any historical search resource, performing feature extraction on the resource information of the historical search resource to obtain the resource features of the historical search resource.

[0211] The resource information includes the resource name, the type of resource, and a brief description of the resource. In some embodiments, the resource information of historical search resources also includes a number, which is used to distinguish different historical search resources in the historical search information. The number can be represented in any form; for example, the number can be represented as a number. For example, multiple historical search resources can be coded as 1, 2, 3, etc. In this embodiment of the disclosure, a code is set for each historical search resource in the historical search information so that different historical search resources can be distinguished, and the extracted resource features can also distinguish different historical search resources, thereby ensuring the accuracy of the resource features.

[0212] In step S403, the text features of each historical search text and the resource features of the corresponding historical search resources are fused to obtain the first fused feature corresponding to each historical search text, and the first fused feature corresponding to each historical search text constitutes the historical search feature.

[0213] In this embodiment of the disclosure, each historical search text and the historical search resource corresponding to the historical search text can reflect the object's interest in the historical search. Therefore, for any historical search text, the text features of the historical search text and the features of the historical search resource corresponding to the historical search text are fused to obtain the first fused feature corresponding to the historical search text. The first fused feature is used to characterize the object's interest performance in a historical search. Then, the first fused features corresponding to multiple historical search texts are combined to form historical search features, so that the historical search features can represent the object's interest in the search scenario.

[0214] Each historical search text corresponds to one or more historical search resources. These resources are those found based on that historical search text and for which the object has performed interactive operations. Text features or resource features can be represented in any form. For example, if text features or resource features are represented as feature vectors, then the first fusion feature is also represented as a feature vector. Historical search features are represented as a feature matrix, where each row of feature vectors in the feature matrix represents a first fusion feature corresponding to a historical search text.

[0215] In some embodiments, the first fusion feature corresponding to each historical search text constitutes a historical search feature, including the following steps 1-3.

[0216] Step 1: Obtain the second position feature and search type feature of each historical search text. The second position feature indicates the relative time order between the historical search text and other historical search texts in the historical search information, and the search type feature indicates the search type used when searching based on the historical search text.

[0217] The second positional feature can be represented in any form, such as a feature vector. Since each historical search text in the historical search information is the text input by the object, and the input time of different historical search texts may be different (i.e., the search time corresponding to each historical search text is different), by setting a second positional feature for each historical search text, the temporal order in which the object searched for resources based on multiple historical search texts can be determined through the second positional features of multiple historical search texts.

[0218] In this embodiment of the disclosure, the search type feature indicates the search type used by an object when searching based on historical search text. Different search types indicate different search entry points, thus reflecting which search entry point the object uses to search based on historical search text. Searching from different search entry points can reflect different intentions of the object, and thus reflect different interests of the object. For example, searching from the search entry point on the application's homepage indicates that the object wants to search based on search text, while searching from the search entry point on the comments interface indicates that the object wants to search for resources related to the comment information on the comments interface based on search text.

[0219] In some embodiments, the process of obtaining the second position feature of each historical search text includes: assigning a serial number to each historical search text according to the chronological order of the search times corresponding to multiple historical search texts in the historical search information, extracting features from the serial number corresponding to each historical search text, and obtaining the second position feature of each historical search text.

[0220] The sequence number can be represented by any string. For example, according to the search time corresponding to multiple historical search texts in ascending order, the first historical search text is assigned the sequence number 0001, the second historical search text is assigned the sequence number 0002, and so on, assigning a sequence number to each historical search text. The later the search time, the closer the search time is to the current time.

[0221] In some embodiments, the process of obtaining the search type feature of each historical search text includes: obtaining the search type identifier corresponding to any historical search text from the historical search information, and determining the search type feature corresponding to the search type identifier as the search type feature of the historical search text.

[0222] The search type identifier can be represented in any form, such as a string. The search type features corresponding to the search type identifier can be obtained by feature extraction from the search type identifier, or by retrieving the search type features corresponding to each search type identifier from the configured search type features.

[0223] Step 2: Fuse the first fusion feature, the second position feature, and the search type feature corresponding to each historical search text to obtain the second fusion feature corresponding to each historical search text.

[0224] In this embodiment of the disclosure, the second position feature of multiple historical search texts can reflect the chronological order of the search time of the multiple historical search texts, and the search type feature indicates the search type used when searching based on the historical search texts. For each historical search text, the first fusion feature corresponding to the historical search text is fused with the corresponding first position feature and search type feature to enrich the information contained in the obtained second fusion feature, so that the second fusion feature of multiple historical search texts can reflect the chronological order of the search time of the multiple historical search texts and the search type used, and can also reflect the change of the object's interest over time, thereby ensuring the accuracy of the second fusion feature.

[0225] Step 3: Based on the second fusion features corresponding to multiple historical search texts, update the second fusion features corresponding to each historical search text respectively, and construct the historical search features from the updated features of multiple historical search texts.

[0226] In this embodiment of the disclosure, considering that the interests of an object may change over time, and different search types can reflect different intentions of the object, the first position feature and search type feature of each historical search text are obtained, the first fusion feature, second position feature and search type feature corresponding to the historical search text are fused, and the second fusion feature corresponding to each historical search text is updated based on the second fusion feature corresponding to multiple historical search texts. The updated features of multiple historical search texts constitute historical search features, so that the historical search features can reflect the changes in the historical search resources that the object is interested in over time, thereby reflecting the changes in the object's interests over time. It also integrates the updated features of each historical search text with the features of other historical search texts to enhance the correlation between multiple historical search texts, thereby ensuring the accuracy of the historical search texts.

[0227] In some embodiments, step 3 includes: multiplying the second fusion feature corresponding to each historical search text with the second fusion feature corresponding to the first historical search text to determine the weight corresponding to each historical search text; fusing the second fusion features corresponding to multiple historical search texts based on the weight corresponding to each historical search text; and fusing the fused features with the second fusion feature corresponding to the first historical search text to obtain the updated features of the first historical search text.

[0228] Here, the first historical search text is any one of multiple historical search texts. The above is only an example using the first historical search text. Following the above method, the fusion features corresponding to each historical search text are updated to obtain the updated features of each historical search text.

[0229] In this embodiment of the disclosure, a self-attention mechanism is used to update the fusion features corresponding to multiple historical search texts, so as to enhance the correlation between the fusion features corresponding to multiple historical search texts and thus ensure the accuracy of historical recommendation features.

[0230] In the solution provided by this disclosure, when historical recommendation information includes multiple historical recommendation resources and historical search information includes multiple historical search texts, historical search features are obtained based on multiple historical search resources, and historical recommendation features are obtained based on multiple historical search texts and the historical search resources corresponding to each historical search text, so as to enrich the amount of information contained in the historical search features or historical recommendation features, thereby ensuring the accuracy of the historical search features and historical recommendation features.

[0231] It should be noted that, in the above Figures 2 to 4 Based on the illustrated embodiments, this disclosure also allows the invocation of a recommendation prediction model to perform the process of obtaining recommendation probabilities. That is, the recommendation prediction model is invoked to execute steps S202-S203, or steps S302-S307, or steps S401-S403. Before invoking the recommendation prediction model to obtain the recommendation probability of any resource for any object, the recommendation prediction model needs to be trained. The training process is detailed in the following embodiments.

[0232] Figure 5 This is a flowchart illustrating a recommendation prediction model training method according to an exemplary embodiment, such as... Figure 5 As shown, the method is performed by an electronic device and includes the following steps:

[0233] In step S501, the sample object, sample resource, sample recommendation probability of sample resource, sample historical recommendation information and sample historical search information of sample object are obtained. The sample historical recommendation information indicates the historical recommended resources for which the sample object has performed interactive operations. The sample historical search information indicates the historical search text entered by the sample object and the historical search resources found based on the historical search text and for which the sample object has performed interactive operations.

[0234] The sample recommendation probability refers to whether a sample object performs an interactive operation on the sample resource when it is recommended to the sample resource. In some embodiments, the sample recommendation probability is 0 or 1; 0 indicates that the sample object does not perform an interactive operation on the sample resource when it is recommended to the sample resource; 1 indicates that the sample object performs an interactive operation on the sample resource when it is recommended to the sample resource.

[0235] In some embodiments, sample resources and sample recommendations for sample resources are determined based on historical recommendation records or historical search records of sample objects.

[0236] The historical recommendation record indicates which historical recommended resources were recommended to the sample object, and which historical recommended resources the sample object interacted with and which it did not. The historical search record indicates the historical search text entered by the sample object, the historical search resources found based on the historical search text, and which historical search resources the sample object interacted with and which it did not. The sample object's historical recommendation information and historical search information are determined based on its historical recommendation record.

[0237] The sample resource is any resource in the historical recommendation records or historical search records. The sample recommendation probability of the sample resource is determined based on the interaction operations performed by the sample object on that sample resource in the historical recommendation records or historical search records. Given a sample resource, historical recommendation information is determined from the historical recommendation records, and historical search information is determined from the historical search records, based on the historical search time or historical recommendation time corresponding to the sample resource.

[0238] For example, taking any resource in the historical recommendation record as a sample resource, determine the historical recommendation time corresponding to the sample resource, and generate historical recommendation information based on historical recommendation resources in the historical recommendation record whose recommendation time was before the historical recommendation time and on which the sample object performed interactive operations; determine historical search text from the historical search record whose search time was before the historical recommendation time, and generate historical search information based on the historical search resources corresponding to the determined historical search text, the historical search resources on which the sample object performed interactive operations, and the determined historical search text.

[0239] In step S502, the recommendation prediction model to be trained is invoked. Based on sample resources, sample historical recommendation information, and sample historical search information, the recommendation interest features and search interest features of the sample objects are obtained. The recommendation interest features indicate the degree of interest of the sample objects in the sample resources in the recommendation scenario, and the search interest features indicate the degree of interest of the sample objects in the sample resources in the search scenario.

[0240] The recommendation prediction model to be trained can be any network model. For example, the recommendation prediction model to be trained is SESRec (a Search-Enhanced framework for Sequential Recommendation).

[0241] Step S502 is the same as step S202 above, and will not be described again here.

[0242] In step S503, the recommendation prediction model to be trained is invoked to perform dimensionality reduction on the object features of the sample object, the resource features of the sample resource, the recommendation interest features, and the search interest features to obtain the predicted recommendation probability of the sample resource. The predicted recommendation probability indicates the likelihood that the sample object will perform an interactive operation on the sample resource when the sample resource is recommended to the sample object.

[0243] Step S503 is the same as step S203 above, and will not be repeated here.

[0244] In step S504, the recommendation prediction model to be trained is trained based on the sample recommendation probability and the predicted recommendation probability to obtain the target recommendation prediction model.

[0245] In this embodiment of the disclosure, the sample recommendation probability can reflect the actual situation of the sample object performing interactive operations on the sample resource, while the predicted recommendation probability is the situation of the sample object performing interactive operations on the sample resource based on the prediction model. The difference between the sample recommendation probability and the predicted recommendation probability can reflect the accuracy of the recommendation prediction model. Based on the sample recommendation probability and the predicted recommendation probability, the recommendation prediction model is trained to improve the accuracy of the recommendation prediction model to be trained.

[0246] Among them, the target recommendation prediction model is a trained recommendation prediction model, which is then followed according to the above... Figures 2 to 4 The example shown calls the target recommendation prediction model to perform the process of obtaining recommendation probabilities.

[0247] In the solution provided by this disclosure, considering that historical recommendation information and historical search information can respectively indicate which resources an object is interested in in recommendation scenarios and search scenarios, historical search information is used as auxiliary information in recommendation scenarios. By combining historical recommendation information and historical search information, the degree of interest of an object in recommended resources in recommendation scenarios and search scenarios can be simulated. By combining sample objects, sample resources, sample recommendation probabilities of sample resources, sample historical recommendation information of sample objects, and sample historical search information, the recommendation prediction model to be trained is trained to improve the accuracy of the recommendation prediction model. In order to use the trained target recommendation prediction model, the recommendation probability of an object performing an interaction operation on a resource when any resource is recommended to any object can be obtained, thereby ensuring the resource recommendation effect.

[0248] In some embodiments, the recommendation interest features of the sample object are obtained by fusing resource features, historical recommendation features of the sample's historical recommendation information, and first and second types of features contained in the historical recommendation features. The similarity between the first type of features and the historical search features of the sample's historical search information is not less than a first similarity threshold, and the similarity between the second type of features and the historical search features is less than the first similarity threshold. The first and second types of features are obtained by classifying the sub-features in the historical recommendation features, and the sub-features in the historical recommendation features are used to represent historical recommendation resources. Before training the recommendation prediction model to be trained based on the sample recommendation probability and the predicted recommendation probability to obtain the target recommendation prediction model, the method further includes:

[0249] Determine the first similarity between historical recommendation features and first-class features, and the second similarity between historical recommendation features and second-class features;

[0250] Based on the sample recommendation probability and the predicted recommendation probability, the recommendation prediction model to be trained is trained to obtain the target recommendation prediction model, including:

[0251] Based on the sample recommendation probability, predicted recommendation probability, first similarity, and second similarity, the recommendation prediction model to be trained is trained to increase the first similarity and decrease the second similarity, thereby obtaining the target recommendation prediction model.

[0252] In this embodiment, the historical recommendation features, the first type of features, and the second type of features are all obtained based on the recommendation prediction model. The first type of features and the second type of features are obtained by classifying the sub-features from the historical recommendation features. The similarity between the first type of features and the historical search features is not less than a first similarity threshold, and the similarity between the second type of features and the historical search features is less than the first similarity threshold. Based on the first similarity and the second similarity, the recommendation prediction model is trained to increase the first similarity and decrease the second similarity. That is, to make the historical recommendation features obtained based on the recommendation prediction model more similar to the first type of features and less similar to the second type of features, so that the historical recommendation features obtained based on the recommendation prediction model can better reflect the interests of the sample objects, thereby improving the accuracy of the recommendation prediction model.

[0253] In some embodiments, the search interest features of the sample object are obtained by fusing resource features, historical search features of the sample's historical search information, and third and fourth types of features included in the historical search features. The similarity between the third type of features and the historical recommendation features of the sample's historical recommendation information is not less than a second similarity threshold, and the similarity between the fourth type of features and the historical recommendation features is less than the second similarity threshold. The third and fourth types of features are obtained by classifying sub-features in the historical search features. The sub-features in the historical search features are used to represent the historical search text and the historical search resources corresponding to the historical search text. Before training the recommendation prediction model to be trained based on the sample recommendation probability and the predicted recommendation probability to obtain the target recommendation prediction model, the method further includes:

[0254] Determine the third similarity between historical search features and third-category features, and the fourth similarity between historical search features and fourth-category features;

[0255] Based on the sample recommendation probability and the predicted recommendation probability, the recommendation prediction model to be trained is trained to obtain the target recommendation prediction model, including:

[0256] Based on the sample recommendation probability, predicted recommendation probability, third similarity, and fourth similarity, the recommendation prediction model to be trained is trained to increase the third similarity and decrease the fourth similarity, thereby obtaining the target recommendation prediction model.

[0257] In this embodiment, the historical search features, the third type of features, and the fourth type of features are all obtained based on the recommendation prediction model. The third type of features and the fourth type of features are obtained by classifying the sub-features from the historical recommendation features. The similarity between the third type of features and the historical recommendation features is not less than a second similarity threshold, and the similarity between the fourth type of features and the historical recommendation features is less than the second similarity threshold. Based on the third and fourth similarities, the recommendation prediction model is trained to increase the third similarity and decrease the fourth similarity. That is, to make the historical search features obtained based on the recommendation prediction model more similar to the third type of features and less similar to the fourth type of features, so that the historical search features obtained based on the recommendation prediction model can better reflect the interests of the sample objects, thereby improving the accuracy of the recommendation prediction model.

[0258] In some embodiments, the historical search features are composed of the fusion features corresponding to each historical search text in the sample historical search information, and the fusion features corresponding to the historical search text are obtained by fusing the text features of the historical search text and the features of the corresponding historical search resources; before training the recommendation prediction model to be trained based on the sample recommendation probability, predicted recommendation probability, third similarity, and fourth similarity, the method further includes:

[0259] The fifth similarity is determined between the textual features of historical search texts and the features of the corresponding historical search resources;

[0260] Based on sample recommendation probability, predicted recommendation probability, third similarity, and fourth similarity, the recommendation prediction model to be trained is trained to increase the third similarity and decrease the fourth similarity, resulting in the target recommendation prediction model, including:

[0261] Based on the sample recommendation probability, predicted recommendation probability, third similarity, fourth similarity, and fifth similarity, the recommendation prediction model to be trained is trained so that the third similarity increases, the fourth similarity decreases, and the fifth similarity increases, thus obtaining the target recommendation prediction model.

[0262] In this embodiment, the historical search resources corresponding to the historical search text are found based on the historical search text, reflecting the similarity between the historical search text and the corresponding historical search resources. The fifth similarity is calculated by comparing the text features of the historical search text with the features of the corresponding historical search resources. Since both the text features and the features of the historical search resources are obtained based on the recommendation prediction model, the fifth similarity reflects the accuracy of the text features and features of the historical search resources obtained based on the recommendation prediction model, thereby reflecting the accuracy of the recommendation prediction model. Therefore, the recommendation prediction model is trained based on the fifth similarity to increase the fifth similarity and improve the accuracy of the recommendation prediction model.

[0263] In some embodiments, before training the recommendation prediction model to be trained based on sample recommendation probability, predicted recommendation probability, third similarity, and fourth similarity, the method further includes:

[0264] From the sample historical search information, determine the negative sample resources of the historical search text and the negative sample text of the historical search resources corresponding to the historical search text. The negative sample resources are any historical search resources in the sample historical search information other than the historical search resources corresponding to the historical search text, and the negative sample text is any historical search text in the sample historical search information other than the historical search text.

[0265] Determine the sixth similarity between historical search text and negative sample resources, and the seventh similarity between the historical search resources corresponding to the historical search text and negative sample text;

[0266] Based on sample recommendation probability, predicted recommendation probability, third similarity, and fourth similarity, the recommendation prediction model to be trained is trained to increase the third similarity and decrease the fourth similarity, resulting in the target recommendation prediction model, including:

[0267] Based on the sample recommendation probability, predicted recommendation probability, third similarity, fourth similarity, sixth similarity, and seventh similarity, the recommendation prediction model to be trained is trained so that the third similarity increases, the fourth similarity decreases, and the sixth and seventh similarities decrease, thus obtaining the target recommendation prediction model.

[0268] In this embodiment, by using historical search text and its corresponding historical search resources as positive samples and determining negative samples for historical search text and its corresponding historical search resources, the recommendation prediction model is trained using the similarity between the positive samples and the negative samples. This reduces the distance between historical search text and positive sample resources, and between historical search resources and positive sample text in the feature space, while increasing the distance between historical search text and negative sample resources, and between historical search resources and negative sample text in the feature space. This achieves a self-supervised training method and improves the accuracy of the recommendation prediction model.

[0269] In the above Figure 5 Based on the embodiments shown, the embodiments of this disclosure can also employ various losses to train the recommendation prediction model, and the training process is detailed in the following embodiments.

[0270] Figure 6 This is a flowchart illustrating a recommendation prediction model training method according to an exemplary embodiment, such as... Figure 6 As shown, the method is performed by an electronic device and includes the following steps:

[0271] In step S601, the sample object, sample resource, sample recommendation probability of sample resource, sample historical recommendation information and sample historical search information of sample object are obtained. The sample historical recommendation information indicates the historical recommended resources for which the sample object has performed interactive operations. The sample historical search information indicates the historical search text entered by the sample object and the historical search resources found based on the historical search text and for which the sample object has performed interactive operations.

[0272] Step S601 is the same as step S501 above, and will not be repeated here.

[0273] In step S602, the recommendation prediction model to be trained is invoked to extract features from the historical recommendation information and historical search information of the samples, respectively, to obtain the historical recommendation features of the historical recommendation information and the historical search features of the historical search information of the samples.

[0274] Step S602 is the same as step S302 above, and will not be described again here.

[0275] In step S603, the recommendation prediction model to be trained is invoked to classify the sub-features in the historical recommendation features and the sub-features in the historical search features, thereby obtaining the first type of features and the second type of features contained in the historical recommendation features, as well as the third type of features and the fourth type of features contained in the historical search features. The similarity between the first type of features and the historical search features is not less than the first similarity threshold, the similarity between the second type of features and the historical search features is less than the first similarity threshold, the similarity between the third type of features and the historical recommendation features is not less than the second similarity threshold, and the similarity between the fourth type of features and the historical recommendation features is less than the second similarity threshold.

[0276] Step S603 is the same as step S303 above, and will not be repeated here.

[0277] In step S604, the recommendation prediction model to be trained is invoked. Based on the similarity between the resource features of the sample resources and the historical recommendation features, the first type of features and the second type of features, the resource features, historical recommendation features, the first type of features and the second type of features are fused to obtain the recommendation interest features of the sample objects. The recommendation interest features indicate the degree of interest of the sample objects in the sample resources in the recommendation scenario.

[0278] Step S604 is the same as step S304 above, and will not be repeated here.

[0279] In step S605, based on the similarity between the resource features of the sample resource and the historical search features, the third type of features and the fourth type of features, the resource features, historical search features, the third type of features and the fourth type of features of the sample resource are fused to obtain the search interest features of the sample object. The search interest features indicate the degree of interest of the sample object in the sample resource in the search scenario.

[0280] Step S605 is the same as step S305 above, and will not be repeated here.

[0281] It should be noted that the embodiments disclosed herein take the acquisition of historical recommendation features corresponding to historical recommendation information and historical search features corresponding to historical search information as an example, and use historical recommendation features and historical search features to obtain recommendation interest features and search history features. In another embodiment, it is not necessary to perform the above steps S602-S605, but other methods are adopted to call the recommendation prediction model and obtain the recommendation interest features and search interest features of the sample object based on sample resources, sample historical recommendation information and sample historical search information.

[0282] In step S606, the recommendation prediction model to be trained is called to concatenate the object features of the sample objects, the resource features of the sample resources, the recommendation interest features, and the search interest features to obtain the sample concatenation features.

[0283] In step S607, the recommendation prediction model to be trained is called to perform dimensionality reduction on the sample splicing features to obtain the predicted recommendation probability of the sample resource. The predicted recommendation probability indicates the likelihood that the sample object will perform an interactive operation on the sample resource when the sample resource is recommended to the sample object.

[0284] Steps S606-S607 are the same as steps S306-S307 above, and will not be repeated here.

[0285] It should be noted that the embodiments disclosed herein take the concatenation of object features of sample objects, resource features of sample resources, recommendation interest features, and search interest features as an example to obtain the predicted recommendation probability using the concatenated sample features. However, in another embodiment, it is not necessary to perform the above steps S606-S607. Instead, other methods are adopted to process the object features of sample objects, resource features of sample resources, recommendation interest features, and search interest features to obtain the predicted recommendation probability of sample resources.

[0286] In step S608, the recommendation prediction model to be trained is trained based on the sample recommendation probability and the predicted recommendation probability to obtain the target recommendation prediction model.

[0287] In some embodiments, step S608 includes: determining a first loss value based on the sample recommendation probability and the predicted recommendation probability, and training the recommendation prediction model based on the first loss value.

[0288] In this embodiment of the disclosure, a first loss value is determined using the cross-entropy loss method, and the recommendation prediction model is trained based on the first loss value to improve the accuracy of the recommendation prediction model.

[0289] In some embodiments, step S607 includes the following three methods.

[0290] The first approach involves determining the first similarity between historical recommendation features and first-class features, and the second similarity between historical recommendation features and second-class features. Based on the sample recommendation probability, predicted recommendation probability, first similarity, and second similarity, the recommendation prediction model to be trained is trained to increase the first similarity and decrease the second similarity, thereby obtaining the target recommendation prediction model.

[0291] In this embodiment of the disclosure, the recommended interest features of the sample object are obtained by fusing the resource features of the sample resource, the historical recommendation features of the sample historical recommendation information, and the first type of features and the second type of features contained in the historical recommendation features. The similarity between the first type of features and the historical search features of the sample historical search information is not less than a first similarity threshold, and the similarity between the second type of features and the historical search features is less than the first similarity threshold.

[0292] Here, the first similarity score represents the degree of similarity between historical recommended features and features of the first category, and the second similarity score represents the degree of similarity between historical recommended features and features of the second category. Both the first and second similarity scores can be obtained in any manner; for example, they can be obtained using Euclidean distance.

[0293] In this embodiment, the historical recommendation features, the first type of features, and the second type of features are all obtained based on the recommendation prediction model. The first type of features and the second type of features are obtained by classifying the sub-features from the historical recommendation features. The similarity between the first type of features and the historical search features is not less than a first similarity threshold, and the similarity between the second type of features and the historical search features is less than the first similarity threshold. Based on the first similarity and the second similarity, the recommendation prediction model is trained to increase the first similarity and decrease the second similarity. That is, to make the historical recommendation features obtained based on the recommendation prediction model more similar to the first type of features and less similar to the second type of features, so that the historical recommendation features obtained based on the recommendation prediction model can better reflect the interests of the sample objects, thereby improving the accuracy of the recommendation prediction model.

[0294] In some embodiments, the first approach includes: determining a first loss value based on sample probability and predicted recommendation probability; determining a second loss value based on first similarity and second similarity; and training the recommendation prediction model to be trained based on the first loss value and the second loss value.

[0295] In this embodiment, a triplet loss function is used, with historical recommendation features as anchors, the first type of features as positives, and the second type of features as negatives, to train the recommendation prediction model.

[0296] In this embodiment, a cross-entropy loss method and a contrastive learning training method are adopted. By constructing a first type of feature and a second type of feature as similar and dissimilar instances of historical recommendation features, the recommendation prediction model is trained using similar and dissimilar instances. This enables the recommendation prediction model to narrow the distance between historical recommendation features and similar instances in the feature space, and widen the distance between historical recommendation features and dissimilar instances in the feature space, thus realizing a self-supervised training method and improving the accuracy of the recommendation prediction model.

[0297] The second approach involves determining the third similarity between historical search features and third-category features, and the fourth similarity between historical search features and fourth-category features. Based on the sample recommendation probability, predicted recommendation probability, third similarity, and fourth similarity, the recommendation prediction model to be trained is trained to increase the third similarity and decrease the fourth similarity, thereby obtaining the target recommendation prediction model.

[0298] In this embodiment of the disclosure, the search interest features of the sample object are obtained by fusing resource features, historical search features of sample historical search information, and third and fourth types of features included in the historical search features. The similarity between the third type of features and the historical recommendation features of the sample historical recommendation information is not less than the second similarity threshold, and the similarity between the fourth type of features and the historical recommendation features is less than the second similarity threshold.

[0299] In this embodiment of the disclosure, the search interest features of the sample object are obtained by fusing the resource features of the sample resource, the historical search features of the sample historical search information, and the third and fourth types of features contained in the historical search features. The similarity between the third type of feature and the historical recommendation features of the sample historical recommendation information is not less than the second similarity threshold, and the similarity between the fourth type of feature and the historical recommendation features is less than the second similarity threshold.

[0300] The third similarity score represents the degree of similarity between historical recommended features and features of the first category, while the fourth similarity score represents the degree of similarity between historical recommended features and features of the second category. Both the third and fourth similarities can be obtained in any manner; for example, they can be obtained using Euclidean distance.

[0301] In this embodiment, the historical search features, the third type of features, and the fourth type of features are all obtained based on the recommendation prediction model. The third type of features and the fourth type of features are obtained by classifying the sub-features from the historical recommendation features. The similarity between the third type of features and the historical recommendation features is not less than a second similarity threshold, and the similarity between the fourth type of features and the historical recommendation features is less than the second similarity threshold. Based on the third and fourth similarities, the recommendation prediction model to be trained is trained to increase the third similarity and decrease the fourth similarity. That is, to make the historical search features obtained based on the recommendation prediction model more similar to the third type of features and less similar to the fourth type of features, so that the historical search features obtained based on the recommendation prediction model can better reflect the interests of the sample objects, thereby improving the accuracy of the recommendation prediction model.

[0302] In some embodiments, the second approach includes: determining a first loss value based on sample probability and predicted recommendation probability, determining a third loss value based on third similarity and fourth similarity, and training the recommendation prediction model to be trained based on the first loss value and the third loss value.

[0303] In this embodiment, a cross-entropy loss method and a contrastive learning training method are adopted. By constructing third-class and fourth-class features as similar and dissimilar instances of historical search features, the recommendation prediction model is trained using similar and dissimilar instances to narrow the distance between historical search features and similar instances in the feature space, and widen the distance between historical search features and dissimilar instances in the feature space. This achieves a self-supervised training method and improves the accuracy of the recommendation prediction model.

[0304] The third approach involves using historical search features composed of fused features corresponding to each historical search text in the sample's historical search information. These fused features are obtained by fusing the text features of the historical search text with the features of the corresponding historical search resources. The approach involves determining the fifth similarity between the text features of the historical search text and the features of the corresponding historical search resources. Based on the sample recommendation probability, predicted recommendation probability, third similarity, fourth similarity, and fifth similarity, the recommendation prediction model to be trained is trained to increase the third similarity, decrease the fourth similarity, and increase the fifth similarity, thus obtaining the target recommendation prediction model.

[0305] In this embodiment, the historical search resources corresponding to the historical search text are found based on the historical search text, reflecting the similarity between the historical search text and the corresponding historical search resources. The fifth similarity is calculated by comparing the text features of the historical search text with the features of the corresponding historical search resources. Since both the text features and the features of the historical search resources are obtained based on the recommendation prediction model, the fifth similarity reflects the accuracy of the text features and features of the historical search resources obtained based on the recommendation prediction model, thereby reflecting the accuracy of the recommendation prediction model. Therefore, the recommendation prediction model is trained based on the fifth similarity to increase the fifth similarity and improve the accuracy of the recommendation prediction model.

[0306] In some embodiments, the third approach includes: determining a first loss value based on sample probability and predicted recommendation probability; determining a third loss value based on third similarity and fourth similarity; determining a fourth loss value based on fifth similarity; and training the recommendation prediction model based on the first loss value, third loss value, and fourth loss value.

[0307] In this embodiment of the disclosure, considering the similarity between the same historical search text and the corresponding historical search resource, the recommendation prediction model is trained by using the fifth similarity between the text features of the historical search text and the features of the corresponding historical search resource, so that the text features of the historical search text obtained based on the recommendation prediction model are similar to the features of the corresponding historical search resource, thereby improving the accuracy of the recommendation prediction model.

[0308] In some embodiments, the third approach includes: determining, from the sample historical search information, the negative sample resources of the historical search text and the negative sample text of the historical search resources corresponding to the historical search text, wherein the negative sample resources are any historical search resources other than the historical search resources corresponding to the historical search text in the sample historical search information, and the negative sample text is any historical search text other than the historical search text in the sample historical search information; determining the sixth similarity between the historical search text and the negative sample resources, and the seventh similarity between the historical search resources corresponding to the historical search text and the negative sample text; and training the recommendation prediction model to be trained based on the sample recommendation probability, the predicted recommendation probability, the third similarity, the fourth similarity, the sixth similarity, and the seventh similarity, so as to increase the third similarity, decrease the fourth similarity, and decrease the sixth and seventh similarities, thereby obtaining the target recommendation prediction model.

[0309] In this embodiment, the sample historical search information reflects the correspondence between historical search text and historical search resources. Historical search text with a correspondence is similar to historical search resources, while historical search text without a correspondence is dissimilar to historical search resources. Historical search text with a correspondence is used as positive sample text of historical search resources, and historical search text in the sample historical search information that does not have a correspondence with historical search resources is used as negative samples of historical search resources. Similarly, positive and negative sample resources of historical search text are determined.

[0310] The sixth similarity score represents the similarity between the textual features of historical search text obtained from the recommendation prediction model and the features of negative sample resources, while the seventh similarity score represents the similarity between the resource features of historical search resources obtained from the recommendation prediction model and the features of negative sample text. Both the sixth and seventh similarity scores reflect the accuracy of the features extracted by the recommendation prediction model, and thus reflect the accuracy of the recommendation prediction model itself.

[0311] In this embodiment, by using historical search text and its corresponding historical search resources as positive samples and determining negative samples for historical search text and its corresponding historical search resources, the recommendation prediction model is trained using the similarity between the positive samples and the negative samples. This reduces the distance between historical search text and positive sample resources, and between historical search resources and positive sample text in the feature space, while increasing the distance between historical search text and negative sample resources, and between historical search resources and negative sample text in the feature space. This achieves a self-supervised training method and improves the accuracy of the recommendation prediction model.

[0312] In some embodiments, the process of training the recommendation prediction model includes: determining a first loss value based on the sample probability and the predicted recommendation probability; determining a third loss value based on the third and fourth similarities; determining a fourth loss value based on the fifth, sixth, and seventh similarities; and training the recommendation prediction model to be trained based on the first, third, and fourth loss values.

[0313] In this embodiment of the disclosure, the features of historical search text and historical search resources can be aligned using contrastive learning loss (InfoNCE loss). A fourth loss value is determined based on the fifth similarity, sixth similarity, and seventh similarity. This allows the recommendation prediction model to be trained using the similarity corresponding to positive samples and the similarity corresponding to negative samples, thereby narrowing the distance between historical search text and positive sample resources, and between historical search resources and positive sample text in the feature space, while widening the distance between historical search text and negative sample resources, and between historical search resources and negative sample text in the feature space.

[0314] In this embodiment of the disclosure, considering the similarity between the same historical search text and the corresponding historical search resource, the recommendation prediction model is trained by using the fifth similarity between the text features of the historical search text and the features of the corresponding historical search resource, so that the text features of the historical search text obtained based on the recommendation prediction model are similar to the features of the corresponding historical search resource, thereby improving the accuracy of the recommendation prediction model.

[0315] It should be noted that the above is only an example of any one of the three methods. In another embodiment, the three methods can be combined arbitrarily. For example, the three methods can be combined and used to train the recommendation prediction model.

[0316] In the solution provided by this disclosure, considering that historical recommendation information and historical search information can respectively indicate which resources an object is interested in in recommendation scenarios and search scenarios, historical search information is used as auxiliary information in recommendation scenarios. By combining historical recommendation information and historical search information, the degree of interest of an object in recommended resources in recommendation scenarios and search scenarios can be simulated. The recommendation prediction model is trained by combining sample objects, sample resources, sample recommendation probabilities of sample resources, sample historical recommendation information of sample objects, and sample historical search information to improve the accuracy of the recommendation prediction model. This allows the trained recommendation prediction model to obtain the recommendation probability that an object will perform an interaction operation on a resource when any resource is recommended to any object, thereby ensuring the effectiveness of resource recommendation.

[0317] Furthermore, in this embodiment, resource features are used to characterize resources, historical recommendation features reflect the historical recommended resources that an object is interested in during the recommendation scenario, and the first type of features matches the object's interests in both the recommendation and search scenarios, while the second type of features only matches the object's interests during the recommendation scenario. By fusing the resource features, historical recommendation features, the first type of features, and the second type of features, not only is the similarity between the resource to be recommended during the recommendation scenario and the historical recommended resources that the object is interested in during the recommendation scenario considered, but also the influence of the search scenario on which historical recommended resources the object is more interested in. This allows for the simulation of the object's level of interest in the recommended resources during the recommendation scenario, thereby ensuring the accuracy of the determined recommendation interest features.

[0318] In this embodiment of the disclosure, resource features are used to characterize resources, historical search features can reflect the historical search resources that an object is interested in during the search scenario, the third type of features conforms to the object's interests in both the recommendation and search scenarios, and the fourth type of features only conforms to the object's interests during the search scenario. By fusing the resource features, historical search features, the third type of features, and the fourth type of features, not only is the similarity between the resource to be recommended during the search scenario and the historical recommended resources that the object is interested in during the search scenario considered, but also which historical search resources the object is more interested in under the influence of the recommendation scenario. This allows for the simulation of the object's degree of interest in the recommended resources during the search scenario, thereby ensuring the accuracy of the determined search interest features.

[0319] It should be noted that the above Figure 5 or Figure 6 This explanation only uses one iteration of training the recommendation prediction model as an example. In another embodiment, the same procedure can also be followed. Figure 6 In the illustrated embodiment, the recommendation prediction model to be trained is trained iteratively multiple times. When the number of iterations reaches a first threshold or the difference between the sample recommendation probability and the predicted recommendation probability in the current iteration round is less than a second threshold, the training of the recommendation prediction model is stopped, and the recommendation prediction model at this time is determined as the target recommendation prediction model.

[0320] Based on the above Figures 5 to 6 The embodiment shown in this disclosure also provides a flowchart of a method for training a recommendation prediction model, such as... Figure 7 As shown, the method includes:

[0321] Step 1: Obtain sample objects, sample resources, sample recommendation probabilities of sample resources, sample historical recommendation information of sample objects, and sample historical search information.

[0322] Step 2: Call the recommendation prediction model to be trained, extract features from the historical recommendation information of the samples to obtain a recommendation resource feature matrix, which includes the resource features of each historical recommendation resource; extract features from the historical search text of the samples to obtain a text feature matrix, which includes the text features of each historical search text; extract features from the historical search resources of the samples to obtain a search resource feature matrix, which includes the resource features of each historical search resource.

[0323] Step 3: Call the recommendation prediction model to be trained, use bias coding to fuse each resource feature in the recommendation resource feature matrix with the corresponding first position feature, and obtain the updated recommendation resource feature matrix.

[0324] Step 4: Call the recommendation prediction model to be trained. Based on the historical search resources corresponding to each historical search text, determine the resource features corresponding to each text feature in the text feature matrix in the search resource feature matrix. Use bias coding to fuse each text feature in the text feature matrix with the corresponding resource features, the second position features corresponding to the resource features, and the search type features to obtain the updated text feature matrix.

[0325] Step 5: Call the first attention sub-model in the recommendation prediction model to be trained, and update each sub-feature based on multiple sub-features in the updated recommendation resource feature matrix to obtain the recommendation feature matrix; call the second attention sub-model in the recommendation prediction model, and update each sub-feature based on multiple sub-features in the updated text feature matrix to obtain the search feature matrix.

[0326] The recommendation feature matrix is ​​the historical recommendation feature in the above embodiment, and the search feature matrix is ​​the historical search feature in the above embodiment. Both the first attention sub-model and the second attention sub-model are arbitrary network models. For example, both the first attention sub-model and the second attention sub-model can be Transformer (a network model), RNN (Recurrent Neural Network), GRU unit (sequence recommendation model), etc., but the model parameters in the first attention sub-model and the second attention sub-model are different.

[0327] Step 6: Call the common attention sub-model in the recommendation prediction model to be trained, compare the recommendation feature matrix and the search feature matrix to obtain the first similarity information and the second similarity information; based on the first similarity information, segment the recommendation feature matrix to obtain the first type of features and the second type of features contained in the recommendation feature matrix; based on the second similarity information, segment the search feature matrix to obtain the third type of features and the fourth type of features contained in the search feature matrix.

[0328] The common attention sub-model can be any network model, for example, the common attention sub-model is Co-Attention.

[0329] Step 7: Call the multi-head attention sub-model in the recommendation prediction model to be trained, and adopt the multi-head attention mechanism to fuse the historical recommendation features, the first type of features and the second type of features with the resource features of the resource respectively, to obtain the similarity between the resource features of the resource and the historical recommendation features, the first type of features and the second type of features respectively. Determine the product of the historical recommendation features and the corresponding similarity, the product of the first type of features and the corresponding similarity, and the product of the second type of features and the corresponding similarity. Concatenate the products of the historical recommendation features and the corresponding similarity, the product of the first type of features and the corresponding similarity, and the product of the second type of features and the corresponding similarity to obtain the recommendation interest feature matrix.

[0330] The multi-head attention sub-model can be any network model, for example, the multi-head attention sub-model is Multi-interest Extraction.

[0331] Step 8: Call the multi-head attention sub-model in the recommendation prediction model, adopt the multi-head attention mechanism, and fuse the historical search features, third-type features, and fourth-type features with the resource features of the resource respectively to obtain the similarity between the resource features of the resource and the historical search features, third-type features, and fourth-type features respectively. Determine the product of the historical search features and their corresponding similarities, the product of the third-type features and their corresponding similarities, and the product of the fourth-type features and their corresponding similarities. Concatenate the products of the historical search features and their corresponding similarities, the product of the third-type features and their corresponding similarities, and the product of the fourth-type features and their corresponding similarities to obtain the search interest feature matrix.

[0332] Step 9: Call the recommendation prediction model to be trained, and concatenate the object features of the sample objects, the resource features of the sample resources, the recommendation interest feature matrix, and the search interest feature matrix to obtain the sample concatenated features; call the feature transformation sub-model in the recommendation prediction model to perform dimensionality reduction processing on the sample concatenated features to obtain the predicted recommendation probability of the sample resources.

[0333] The feature transformation sub-model can be any network model, such as a multilayer perceptron (MLP).

[0334] Step 10: From the historical search information, identify the negative sample resources of the historical search text and the negative sample text of the corresponding historical search resources; call the recommendation prediction model to be trained to obtain the features of the negative sample resources and the features of the negative sample text; determine the fifth similarity between the text features of the historical search text and the features of the corresponding historical search resources; determine the sixth similarity between the historical search text and the negative sample resources, and the seventh similarity between the corresponding historical search resources and the negative sample text; based on the fifth, sixth, and seventh similarities, determine the fourth loss value; determine the first similarity between the historical recommendation features and the first type of features, and the second similarity between the historical recommendation features and the second type of features; based on the first and second similarities, determine the second loss value; determine the third similarity between the historical search features and the third type of features, and the fourth similarity between the historical search features and the third type of features; based on the third and fourth similarities, determine the third loss value; based on the sample probability and the predicted recommendation probability, determine the first loss value; based on the first, second, third, and fourth loss values, train the recommendation prediction model to be trained to obtain the target recommendation prediction model.

[0335] Based on the recommendation prediction model training method provided in the above embodiments, the performance of the target recommendation prediction model is improved after training the recommendation prediction model. For example, for the performance metric NDCG (Normalized Discounted Cumulative Gain), considering the top 5 resources in the test, NDCG@5 is improved by 4.97%, and considering the top 10 resources in the test, NDCG@10 is improved by 7.05%. For the performance metric HIT (Hit Rate), considering the top 1 resource in the test, HIT@1 is improved by 6.20%, considering the top 5 resources in the test, HIT@5 is improved by 4.23%, considering the top 10 resources in the test, HIT@10 is improved by 7.48%, and MRR (Mean Reciprocal Rank) is improved by 6.49%.

[0336] It should be noted that all the above technical solutions can be combined in any way to form optional embodiments of this disclosure, and will not be described in detail here.

[0337] Figure 8 This is a block diagram illustrating a resource recommendation apparatus according to an exemplary embodiment, such as... Figure 8 As shown, the device includes:

[0338] The acquisition unit 801 is configured to acquire the historical recommendation information and historical search information of the object. The historical recommendation information indicates the historical recommended resources in which the object has performed interactive operations, and the historical search information indicates the historical search text entered by the object and the historical search resources found based on the historical search text in which the object has performed interactive operations.

[0339] The acquisition unit 801 is also configured to perform the acquisition of the object's recommendation interest features and search interest features based on the resource to be recommended, historical recommendation information and historical search information. The recommendation interest features indicate the object's interest in the resource in the recommendation scenario, and the search interest features indicate the object's interest in the resource in the search scenario.

[0340] The processing unit 802 is configured to perform dimensionality reduction processing on the object features of the object, the resource features of the resource, the recommendation interest features and the search interest features of the resource to obtain the recommendation probability of the resource. The recommendation probability indicates the likelihood that the object will perform an interactive operation on the resource when the resource is recommended to the object.

[0341] Recommendation unit 803 is configured to perform recommendation probabilities based on multiple resources to be recommended, and recommend the target resource among the multiple resources to the object.

[0342] In some embodiments, the acquisition unit 801 is configured to perform feature extraction on historical recommendation information and historical search information respectively to obtain historical recommendation features and historical search features. The historical recommendation features include sub-features for characterizing historical recommendation resources, and the historical search features include sub-features for characterizing historical search text and the historical search resources corresponding to the historical search text. The sub-features in the historical recommendation features and the sub-features in the historical search features are classified respectively to obtain a first type of feature and a second type of feature contained in the historical recommendation features, and a third type of feature and a fourth type of feature contained in the historical search features. The similarity between the first type of feature and the historical search feature is not less than the first similarity. The similarity thresholds are as follows: the similarity between the second type of feature and the historical search feature is less than the first similarity threshold; the similarity between the third type of feature and the historical recommendation feature is not less than the second similarity threshold; and the similarity between the fourth type of feature and the historical recommendation feature is less than the second similarity threshold. Based on the similarity between resource features and historical recommendation features, the first type of feature, and the second type of feature, the historical recommendation features, the first type of feature, and the second type of feature are fused to obtain recommendation interest features. Based on the similarity between resource features and historical search features, the third type of feature, and the fourth type of feature, the historical search features, the third type of feature, and the fourth type of feature are fused to obtain search interest features.

[0343] In some embodiments, the acquisition unit 801 is configured to perform feature extraction on each historical recommendation resource in the historical recommendation information to obtain resource features of each historical recommendation resource, and to construct historical recommendation features from the resource features of each historical recommendation resource; to perform feature extraction on historical search text and historical search resources in the historical search information to obtain text features of each historical search text and resource features of each historical search resource; to fuse the text features of each historical search text and the resource features of the corresponding historical search resource to obtain a first fused feature corresponding to each historical search text, and to construct historical search features from the first fused feature corresponding to each historical search text.

[0344] In some embodiments, the acquisition unit 801 is configured to acquire a first position feature of each historical recommended resource, the first position feature indicating the relative time order between the historical recommended resource and other historical recommended resources in the historical recommended information; fuse the resource feature of each historical recommended resource with the first position feature to obtain a fused feature corresponding to each historical recommended resource; update the fused feature corresponding to each historical recommended resource based on the fused features corresponding to multiple historical recommended resources, and construct historical recommended features by combining the updated features of multiple historical recommended resources.

[0345] In some embodiments, the acquisition unit 801 is configured to acquire a second position feature and a search type feature for each historical search text. The second position feature indicates the relative temporal order between the historical search text and other historical search texts in the historical search information, and the search type feature indicates the search type used when searching based on the historical search text. The unit then fuses the first fusion feature, the second position feature, and the search type feature corresponding to each historical search text to obtain a second fusion feature corresponding to each historical search text. Based on the second fusion features corresponding to multiple historical search texts, the unit updates the second fusion features corresponding to each historical search text, and the updated features of the multiple historical search texts constitute the historical search features.

[0346] In some embodiments, the acquisition unit 801 is configured to perform a comparison of historical recommendation features and historical search features to obtain first similarity information and second similarity information. The first similarity information indicates the similarity between each sub-feature in the historical recommendation features and the historical search features, and the second similarity information indicates the similarity between each sub-feature in the historical search features and the historical recommendation features. Based on the first similarity information, the sub-features in the historical recommendation features are classified to obtain a first type of feature and a second type of feature. Based on the second similarity information, the sub-features in the historical search features are classified to obtain a third type of feature and a fourth type of feature.

[0347] In some embodiments, the processing unit 802 is configured to concatenate the object features of the object, the resource features of the resource, the recommendation interest features, and the search interest features to obtain concatenated features; and to perform dimensionality reduction processing on the concatenated features to obtain the recommendation probability.

[0348] It should be noted that the apparatus provided in the above embodiments is only illustrative of the division of the above functional units. In practical applications, the above functions can be assigned to different functional units as needed, that is, the internal structure of the electronic device can be divided into different functional units to complete all or part of the functions described above. In addition, the recommendation prediction model training apparatus and the recommendation prediction model training method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.

[0349] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0350] Figure 9 This is a block diagram illustrating a recommendation prediction model training apparatus according to an exemplary embodiment, such as... Figure 9 As shown, the device includes:

[0351] The acquisition unit 901 is configured to acquire sample objects, sample resources, sample recommendation probabilities of sample resources, sample historical recommendation information of sample objects, and sample historical search information. The sample historical recommendation information indicates the historical recommended resources for which the sample object has performed interactive operations, and the sample historical search information indicates the historical search text input by the sample object and the historical search resources found based on the historical search text for which the sample object has performed interactive operations.

[0352] The acquisition unit 901 is also configured to execute the call to the recommendation prediction model to be trained, and based on the sample resources, sample historical recommendation information and sample historical search information, acquire the recommendation interest features and search interest features of the sample objects. The recommendation interest features indicate the degree of interest of the sample objects in the sample resources in the recommendation scenario, and the search interest features indicate the degree of interest of the sample objects in the sample resources in the search scenario.

[0353] The processing unit 902 is configured to execute the call to the recommendation prediction model to be trained, perform dimensionality reduction processing on the object features of the sample object, the resource features of the sample resource, the recommendation interest features and the search interest features of the sample resource, and obtain the predicted recommendation probability of the sample resource. The predicted recommendation probability indicates the probability that the sample object will perform an interactive operation on the sample resource when the sample resource is recommended to the sample object.

[0354] Training unit 903 is configured to train the recommendation prediction model to be trained based on the sample recommendation probability and the predicted recommendation probability, so as to obtain the target recommendation prediction model.

[0355] In some embodiments, the recommended interest features of the sample object are obtained by fusing resource features, historical recommended features of the sample's historical recommended information, and first and second types of features contained in the historical recommended features. The similarity between the first type of features and the historical search features of the sample's historical search information is not less than a first similarity threshold, and the similarity between the second type of features and the historical search features is less than the first similarity threshold. The first and second types of features are obtained by classifying the sub-features in the historical recommended features, and the sub-features in the historical recommended features are used to represent the historical recommended resources; such as Figure 10 As shown, the device also includes:

[0356] The determining unit 904 is configured to perform the determination of a first similarity between historical recommendation features and first-class features, and a second similarity between historical recommendation features and second-class features;

[0357] Training unit 903 is configured to train the recommendation prediction model to be trained based on sample recommendation probability, predicted recommendation probability, first similarity and second similarity, so as to increase the first similarity and decrease the second similarity, thereby obtaining the target recommendation prediction model.

[0358] In some embodiments, the search interest features of the sample object are obtained by fusing resource features, historical search features of the sample's historical search information, and third and fourth types of features included in the historical search features. The similarity between the third type of features and the historical recommendation features of the sample's historical recommendation information is not less than a second similarity threshold, and the similarity between the fourth type of features and the historical recommendation features is less than the second similarity threshold. The third and fourth types of features are obtained by classifying the sub-features in the historical search features, and the sub-features in the historical search features are used to represent the historical search text and the historical search resources corresponding to the historical search text; such as Figure 10 As shown, the device also includes:

[0359] The determining unit 904 is configured to perform the determination of the third similarity between historical search features and third-class features, and the fourth similarity between historical search features and fourth-class features;

[0360] Training unit 903 is configured to train the recommendation prediction model to be trained based on sample recommendation probability, predicted recommendation probability, third similarity and fourth similarity, so as to increase the third similarity and decrease the fourth similarity, thereby obtaining the target recommendation prediction model.

[0361] In some embodiments, historical search features are composed of fused features corresponding to each historical search text in the sample historical search information. The fused features corresponding to the historical search text are obtained by fusing the text features of the historical search text and the features of the corresponding historical search resources; such as Figure 10 As shown, the device also includes:

[0362] The determining unit 904 is configured to perform a fifth similarity determination between the text features of the historical search text and the features of the corresponding historical search resources;

[0363] Training unit 903 is configured to train the recommendation prediction model to be trained based on sample recommendation probability, predicted recommendation probability, third similarity, fourth similarity, and fifth similarity, so that the third similarity increases, the fourth similarity decreases, and the fifth similarity increases, thereby obtaining the target recommendation prediction model.

[0364] In some embodiments, such as Figure 10 As shown, the device also includes:

[0365] The determining unit 904 is configured to perform the following operations from the sample historical search information: determining the negative sample resource of the historical search text and the negative sample text of the historical search resource corresponding to the historical search text. The negative sample resource is any historical search resource in the sample historical search information other than the historical search resource corresponding to the historical search text, and the negative sample text is any historical search text in the sample historical search information other than the historical search text.

[0366] The determining unit 904 is also configured to perform the determination of the sixth similarity between the historical search text and the negative sample resource, and the seventh similarity between the historical search resource corresponding to the historical search text and the negative sample text.

[0367] Training unit 903 is configured to train the recommendation prediction model to be trained based on sample recommendation probability, predicted recommendation probability, third similarity, fourth similarity, sixth similarity and seventh similarity, so as to increase the third similarity, decrease the fourth similarity, and decrease the sixth similarity and seventh similarity, thereby obtaining the target recommendation prediction model.

[0368] It should be noted that the apparatus provided in the above embodiments is only illustrative of the division of the above functional units. In practical applications, the above functions can be assigned to different functional units as needed, that is, the internal structure of the electronic device can be divided into different functional units to complete all or part of the functions described above. In addition, the recommendation prediction model training apparatus and the recommendation prediction model training method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.

[0369] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0370] When an electronic device is provided as a terminal, Figure 11 This is a block diagram illustrating a terminal 1100 according to an exemplary embodiment. The terminal... Figure 11 A structural block diagram of a terminal 1100 provided in an exemplary embodiment of the present disclosure is shown. Typically, the terminal 1100 includes a processor 1101 and a memory 1102.

[0371] Processor 1101 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 1101 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 1101 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 1101 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 1101 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.

[0372] The memory 1102 may include one or more computer-readable storage media, which may be non-transitory. The memory 1102 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 1102 are used to store at least one program code, which is executed by the processor 1101 to implement the resource recommendation method or recommendation prediction model training method provided in the method embodiments of this disclosure.

[0373] In some embodiments, the terminal 1100 may also optionally include a peripheral device interface 1103 and at least one peripheral device. The processor 1101, memory 1102, and peripheral device interface 1103 can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface 1103 via a bus, signal line, or circuit board. Specifically, the peripheral device includes at least one of the following: a radio frequency circuit 1104, a display screen 1105, a camera assembly 1106, an audio circuit 1107, and a power supply 1108.

[0374] Peripheral device interface 1103 can be used to connect at least one I / O (Input / Output) related peripheral device to processor 1101 and memory 1102. In some embodiments, processor 1101, memory 1102 and peripheral device interface 1103 are integrated on the same chip or circuit board; in some other embodiments, any one or two of processor 1101, memory 1102 and peripheral device interface 1103 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.

[0375] The radio frequency (RF) circuit 1104 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 1104 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 1104 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals back into electrical signals. Optionally, the RF circuit 1104 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The RF circuit 1104 can communicate with other terminals via at least one wireless communication protocol. This wireless communication protocol includes, but is not limited to: metropolitan area networks (MANs), various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks (WLANs), and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit 1104 may also include circuitry related to NFC (Near Field Communication), which is not limited in this disclosure.

[0376] Display screen 1105 is used to display a UI (User Interface). This UI may include graphics, text, icons, videos, and any combination thereof. When display screen 1105 is a touch display screen, it also has the ability to collect touch signals on or above its surface. These touch signals can be input as control signals to processor 1101 for processing. In this case, display screen 1105 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there may be one display screen 1105, which serves as the front panel of terminal 1100; in other embodiments, there may be at least two display screens, respectively disposed on different surfaces of terminal 1100 or in a folded design; in still other embodiments, display screen 1105 may be a flexible display screen, disposed on a curved or folded surface of terminal 1100. Furthermore, display screen 1105 may also be configured as a non-rectangular, irregular shape, i.e., a non-rectangular screen. The display screen 1105 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).

[0377] The camera assembly 1106 is used to acquire images or videos. Optionally, the camera assembly 1106 includes a front-facing camera and a rear-facing camera. Typically, the front-facing camera is located on the front panel of the terminal, and the rear-facing camera is located on the back of the terminal. In some embodiments, there are at least two rear-facing cameras, which are any one of a main camera, a depth-sensing camera, a wide-angle camera, and a telephoto camera, to achieve background blurring by fusion of the main camera and the depth-sensing camera, panoramic shooting by fusion of the main camera and the wide-angle camera, VR (Virtual Reality) shooting, or other fusion shooting functions. In some embodiments, the camera assembly 1106 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm-light flash and a cool-light flash, which can be used for light compensation at different color temperatures.

[0378] The audio circuit 1107 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, converting the sound waves into electrical signals that are input to the processor 1101 for processing, or input to the radio frequency circuit 1104 for voice communication. For stereo sound acquisition or noise reduction purposes, multiple microphones may be used, each positioned at a different location on the terminal 1100. The microphone may also be an array microphone or an omnidirectional microphone. The speaker is used to convert electrical signals from the processor 1101 or the radio frequency circuit 1104 into sound waves. The speaker may be a conventional diaphragm speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can convert electrical signals not only into audible sound waves but also into inaudible sound waves for purposes such as distance measurement. In some embodiments, the audio circuit 1107 may also include a headphone jack.

[0379] Power supply 1108 is used to power the various components in terminal 1100. Power supply 1108 can be AC ​​power, DC power, a disposable battery, or a rechargeable battery. When power supply 1108 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.

[0380] Those skilled in the art will understand that Figure 11 The structure shown does not constitute a limitation on terminal 1100 and may include more or fewer components than shown, or combine certain components, or use different component arrangements.

[0381] When electronic devices are provided as servers, Figure 12 This is a block diagram illustrating a server 1200 according to an exemplary embodiment. The server 1200 can vary significantly due to differences in configuration or performance. It may include one or more Central Processing Units (CPUs) 1201 and one or more memories 1202. The memories 1202 store at least one line of program code, which is loaded and executed by the processor 1201 to implement the resource recommendation method or recommendation prediction model training method provided in the various method embodiments described above. Of course, the server may also have wired or wireless network interfaces, a keyboard, and input / output interfaces for input and output. The server 1200 may also include other components for implementing device functions, which will not be elaborated here.

[0382] In an exemplary embodiment, a computer-readable storage medium is also provided, which, when executed by a processor of an electronic device, enables the electronic device to perform the resource recommendation method or the recommendation prediction model training method in the above embodiments.

[0383] In an exemplary embodiment, a computer program product is also provided, including a computer program / instruction that, when executed by a processor, implements the resource recommendation method or the recommendation prediction model training method in the above embodiments.

[0384] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.

[0385] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. A resource recommendation method, characterized by, The method comprises: obtaining historical recommendation information and historical search information of an object, the historical recommendation information indicating historical recommendation resources on which the object has performed interactive operations, and the historical search information indicating historical search texts input by the object and historical search resources searched based on the historical search texts and on which the object has performed interactive operations; performing feature extraction on the historical recommendation information and the historical search information respectively to obtain historical recommendation features and historical search features, the historical recommendation features comprising sub-features for representing the historical recommendation resources; classifying the sub-features in the historical recommendation features to obtain first-type features and second-type features contained in the historical recommendation features, the first-type features having a similarity to the historical search features not less than a first similarity threshold, and the second-type features having a similarity to the historical search features less than the first similarity threshold; based on similarities between resource features of a resource to be recommended and the historical recommendation features, the first-type features and the second-type features, fusing the historical recommendation features, the first-type features and the second-type features to obtain recommendation interest features, the recommendation interest features indicating a degree of interest of the object in the resource in a recommendation scenario; based on the resource to be recommended, the historical recommendation information and the historical search information, obtaining search interest features of the object, the search interest features indicating a degree of interest of the object in the resource in a search scenario; performing dimension reduction processing on object features of the object, resource features of the resource, the recommendation interest features and the search interest features to obtain a recommendation probability of the resource, the recommendation probability indicating a possibility of the object performing an interactive operation on the resource in a case where the resource is recommended to the object; based on recommendation probabilities of a plurality of the resources to be recommended, recommending a target resource in the plurality of the resources to the object.

2. The method of claim 1, wherein, The method comprises: the historical search features comprise sub-features for representing the historical search texts and historical search resources corresponding to the historical search texts; performing classification on the sub-features in the historical search features respectively to obtain third-type features and fourth-type features contained in the historical search features, the third-type features having a similarity to the historical recommendation features not less than a second similarity threshold, and the fourth-type features having a similarity to the historical recommendation features less than the second similarity threshold; based on similarities between resource features of the resource and the historical search features, the third-type features and the fourth-type features, fusing the historical search features, the third-type features and the fourth-type features to obtain the search interest features.

3. The method of claim 1, wherein, The method comprises: characteristics of each historical recommendation resource are obtained by feature extraction on each historical recommendation resource in the historical recommendation information, and the resource characteristics of each historical recommendation resource constitute the historical recommendation characteristics; text characteristics of each historical search text and resource characteristics of each historical search resource are obtained by feature extraction on historical search texts and historical search resources in the historical search information; first fusion characteristics corresponding to each historical search text are obtained by fusing the text characteristics of each historical search text and the resource characteristics of the corresponding historical search resource, and the first fusion characteristics corresponding to each historical search text constitute the historical search characteristics.

4. The method of claim 3, wherein, The resource characteristics of each historical recommendation resource constitute the historical recommendation characteristics, including: a first position characteristic of each historical recommendation resource is obtained, the first position characteristic indicating a relative time sequence between the historical recommendation resource and other historical recommendation resources in the historical recommendation information; fusion characteristics corresponding to each historical recommendation resource are obtained by fusing the resource characteristics of each historical recommendation resource and the first position characteristic; based on the fusion characteristics corresponding to multiple historical recommendation resources, the fusion characteristics corresponding to each historical recommendation resource are updated respectively, and updated characteristics of the multiple historical recommendation resources constitute the historical recommendation characteristics.

5. The method of claim 3, wherein, The first fusion characteristics corresponding to each historical search text constitute the historical search characteristics, including: a second position characteristic and a search type characteristic of each historical search text are obtained, the second position characteristic indicating a relative time sequence between the historical search text and other historical search texts in the historical search information, and the search type characteristic indicating a search type adopted when searching based on the historical search text; second fusion characteristics corresponding to each historical search text are obtained by fusing the first fusion characteristics corresponding to each historical search text, the second position characteristic, and the search type characteristic; based on the second fusion characteristics corresponding to multiple historical search texts, the second fusion characteristics corresponding to each historical search text are updated respectively, and updated characteristics of the multiple historical search texts constitute the historical search characteristics.

6. The method of claim 2, wherein, The sub-features in the historical recommendation characteristics and the sub-features in the historical search characteristics are classified respectively to obtain first and second types of characteristics contained in the historical recommendation characteristics and third and fourth types of characteristics contained in the historical search characteristics, including: a comparison is made between the historical recommendation characteristics and the historical search characteristics to obtain first and second similarity information, the first similarity information indicating a similarity between each sub-feature in the historical recommendation characteristics and the historical search characteristics, and the second similarity information indicating a similarity between each sub-feature in the historical search characteristics and the historical recommendation characteristics; based on the first similarity information, the sub-features in the historical recommendation characteristics are classified to obtain the first and second types of characteristics; Classify sub-features in the historical search features based on the second similarity information to obtain third type features and fourth type features.

7. The method according to any one of claims 1 to 6, characterized in that, The dimensionality reduction processing on the object features of the object, the resource features of the resource, the recommendation interest features and the search interest features comprises: The dimensionality reduction processing on the object features of the object, the resource features of the resource, the recommendation interest features and the search interest features comprises: The dimensionality reduction processing on the object features of the object, the resource features of the resource, the recommendation interest features and the search interest features comprises: 8.A method for recommending a predictive model training, the method comprising: The method further comprises: obtaining a sample object, a sample resource, a sample recommendation probability of the sample resource, sample historical recommendation information of the sample object and sample historical search information, the sample historical recommendation information indicating historical recommendation resources on which the sample object has performed interactive operations, and the sample historical search information indicating historical search texts input by the sample object and historical search resources searched based on the historical search texts and on which the sample object has performed interactive operations; calling a recommendation prediction model to be trained, and obtaining recommendation interest features and search interest features of the sample object based on the sample resource, the sample historical recommendation information and the sample historical search information, the recommendation interest features indicating a degree of interest of the sample object in the sample resource in a recommendation scenario, and the search interest features indicating a degree of interest of the sample object in the sample resource in a search scenario; calling the recommendation prediction model to be trained, and performing dimensionality reduction processing on object features of the object, resource features of the resource, the recommendation interest features and the search interest features to obtain a predicted recommendation probability of the sample resource, the predicted recommendation probability indicating a possibility of the sample object performing an interactive operation on the sample resource in a case where the sample resource is recommended to the sample object; training the recommendation prediction model to be trained based on the sample recommendation probability and the predicted recommendation probability to obtain a target recommendation prediction model; The recommendation interest features of the sample object are obtained by fusing historical recommendation features of the sample historical recommendation information, first type features contained in the historical recommendation features and second type features contained in the historical recommendation features based on similarity between the resource features and the historical recommendation features, similarity between the first type features and historical search features of the sample historical search information being not less than a first similarity threshold, similarity between the second type features and the historical search features being less than the first similarity threshold, and the first type features and the second type features being obtained by classifying sub-features in the historical recommendation features, the sub-features in the historical recommendation features being used to represent the historical recommendation resources.

9. The method of claim 8, wherein, Before the training of the recommendation prediction model to be trained based on the sample recommendation probability and the predicted recommendation probability to obtain a target recommendation prediction model, the method further comprises: determine a first similarity between the historical recommendation feature and the first type of feature, and a second similarity between the historical recommendation feature and the second type of feature; the training of the to-be-trained recommendation prediction model based on the sample recommendation probability and the predicted recommendation probability to obtain a target recommendation prediction model, comprising: training of the to-be-trained recommendation prediction model based on the sample recommendation probability, the predicted recommendation probability, the first similarity and the second similarity, so as to increase the first similarity and decrease the second similarity, to obtain the target recommendation prediction model.

10. The method of claim 8, wherein, The search interest feature of the sample object is obtained by fusing the resource feature, the historical search feature of the sample historical search information, a third type of feature and a fourth type of feature contained in the historical search feature. The similarity between the third type of feature and the historical recommendation feature of the sample historical recommendation information is not less than a second similarity threshold. The similarity between the fourth type of feature and the historical recommendation feature is less than the second similarity threshold. The third type of feature and the fourth type of feature are obtained by classifying sub-features in the historical search feature. The sub-features in the historical search feature are used to represent the historical search text and the historical search resource corresponding to the historical search text. Before the training of the to-be-trained recommendation prediction model based on the sample recommendation probability and the predicted recommendation probability to obtain a target recommendation prediction model, the method further comprises: determining a third similarity between the historical search feature and the third type of feature, and a fourth similarity between the historical search feature and the fourth type of feature; the training of the to-be-trained recommendation prediction model based on the sample recommendation probability and the predicted recommendation probability to obtain a target recommendation prediction model, comprising: training of the to-be-trained recommendation prediction model based on the sample recommendation probability, the predicted recommendation probability, the third similarity and the fourth similarity, so as to increase the third similarity and decrease the fourth similarity, to obtain the target recommendation prediction model.

11. The method of claim 10, wherein, The historical search feature is composed of a fusion feature corresponding to each historical search text in the sample historical search information. The fusion feature corresponding to the historical search text is obtained by fusing the text feature of the historical search text and the feature of the corresponding historical search resource. Before the training of the to-be-trained recommendation prediction model based on the sample recommendation probability, the predicted recommendation probability, the third similarity and the fourth similarity, the method further comprises: determining a fifth similarity between the text feature of the historical search text and the feature of the corresponding historical search resource; the training of the to-be-trained recommendation prediction model based on the sample recommendation probability, the predicted recommendation probability, the third similarity and the fourth similarity, so as to increase the third similarity and decrease the fourth similarity, to obtain the target recommendation prediction model, comprising: The recommendation prediction model to be trained is trained based on the sample recommendation probability, the predicted recommendation probability, the third similarity, the fourth similarity, and the fifth similarity, so that the third similarity increases, the fourth similarity decreases, and the fifth similarity increases, to obtain the target recommendation prediction model.

12. The method of claim 10, wherein, Before the recommendation prediction model to be trained is trained based on the sample recommendation probability, the predicted recommendation probability, the third similarity, and the fourth similarity, the method further includes: determining, from the sample historical search information, a negative sample resource of the historical search text and a negative sample text corresponding to a historical search resource of the historical search text, the negative sample resource being any historical search resource in the sample historical search information except the historical search resource corresponding to the historical search text, and the negative sample text being any historical search text in the sample historical search information except the historical search text; determining a sixth similarity between the historical search text and the negative sample resource, and a seventh similarity between the historical search resource corresponding to the historical search text and the negative sample text; The recommendation prediction model to be trained is trained based on the sample recommendation probability, the predicted recommendation probability, the third similarity, and the fourth similarity, so that the third similarity increases and the fourth similarity decreases, to obtain the target recommendation prediction model. The recommendation prediction model to be trained is trained based on the sample recommendation probability, the predicted recommendation probability, the third similarity, the fourth similarity, the sixth similarity, and the seventh similarity, so that the third similarity increases, the fourth similarity decreases, the sixth similarity decreases, and the seventh similarity decreases, to obtain the target recommendation prediction model.

13. A resource recommendation apparatus, characterized by comprising: The apparatus includes: an acquisition unit configured to acquire historical recommendation information of an object and historical search information, the historical recommendation information indicating a historical recommendation resource on which the object has performed an interactive operation, and the historical search information indicating a historical search text input by the object and a historical search resource searched based on the historical search text and on which the object has performed an interactive operation; The acquisition unit is further configured to perform feature extraction on the historical recommendation information and the historical search information respectively to obtain historical recommendation features and historical search features, the historical recommendation features including sub-features for representing the historical recommendation resources; classify the sub-features in the historical recommendation features to obtain first-type features and second-type features contained in the historical recommendation features, the first-type features having a similarity to the historical search features not less than a first similarity threshold, and the second-type features having a similarity to the historical search features less than the first similarity threshold; and perform fusion on the historical recommendation features, the first-type features and the second-type features based on similarities between a resource feature of a resource to be recommended and the historical recommendation features, the first-type features and the second-type features respectively to obtain a recommendation interest feature, the recommendation interest feature indicating a degree of interest of the object in the resource in a recommendation scenario. The acquisition unit is further configured to acquire a search interest feature of the object based on the resource to be recommended, the historical recommendation information and the historical search information, the search interest feature indicating a degree of interest of the object in the resource in a search scenario. The processing unit is configured to perform dimension reduction processing on an object feature of the object, a resource feature of the resource, the recommendation interest feature and the search interest feature to obtain a recommendation probability of the resource, the recommendation probability indicating a possibility of the object performing an interactive operation on the resource in a case where the resource is recommended to the object. The recommendation unit is configured to recommend a target resource in a plurality of the resources to the object based on recommendation probabilities of the plurality of the resources. 14.A recommendation prediction model training apparatus, characterized by comprising: The apparatus further includes: The acquisition unit is configured to acquire a sample object, a sample resource, a sample recommendation probability of the sample resource, sample historical recommendation information of the sample object and sample historical search information, the sample historical recommendation information indicating historical recommendation resources on which the sample object has performed an interactive operation, and the sample historical search information indicating historical search texts input by the sample object and historical search resources searched based on the historical search texts and on which the sample object has performed an interactive operation. The acquisition unit is further configured to invoke a recommendation prediction model to be trained to acquire a recommendation interest feature and a search interest feature of the sample object based on the sample resource, the sample historical recommendation information and the sample historical search information, the recommendation interest feature indicating a degree of interest of the sample object in the sample resource in a recommendation scenario, and the search interest feature indicating a degree of interest of the sample object in the sample resource in a search scenario. The processing unit is configured to execute the recommendation prediction model to be trained, and perform dimension reduction processing on the object features of the sample object, the resource features of the sample resource, the recommendation interest features, and the search interest features, to obtain a predicted recommendation probability of the sample resource, the predicted recommendation probability indicating a possibility that the sample object performs an interactive operation on the sample resource in a case where the sample resource is recommended to the sample object. The training unit is configured to execute the sample recommendation probability and the predicted recommendation probability, and train the recommendation prediction model to be trained to obtain a target recommendation prediction model. The recommendation interest features of the sample object are obtained by fusing the historical recommendation features of the sample historical recommendation information, first-type features, and second-type features contained in the historical recommendation features based on similarities between the resource features and the historical recommendation features, the first-type features, and the second-type features, the similarity between the first-type features and the historical search features of the sample historical search information being not less than a first similarity threshold, the similarity between the second-type features and the historical search features being less than the first similarity threshold, and the first-type features and the second-type features being obtained by classifying sub-features in the historical recommendation features, the sub-features being used to represent the historical recommended resources.

15. An electronic device, comprising: The electronic device comprises: one or more processors; a memory for storing program codes executable by the processors; The processors are configured to execute the program codes to implement the resource recommendation method according to any one of claims 1 to 7, or to implement the recommendation prediction model training method according to any one of claims 8 to 12.

16. A computer-readable storage medium, characterized in that, When the instructions in the computer-readable storage medium are executed by the processors of the electronic device, the electronic device can execute the resource recommendation method according to any one of claims 1 to 7, or implement the recommendation prediction model training method according to any one of claims 8 to 12.

Citation Information

Patent Citations

  • Information recommendation method and device based on artificial intelligence, equipment and storage medium

    CN111310056A

  • Multimedia resource recommendation method and device, electronic equipment and storage medium

    CN113886609A

  • Resource recommendation model training method, resource recommendation method and equipment

    CN115329844A