Resource recommendation method and device, computer device, and storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2024-12-25
- Publication Date
- 2026-06-26
AI Technical Summary
Existing technologies struggle to capture dynamic changes in user interests, resulting in low accuracy in resource recommendations.
By acquiring candidate resource features and object resource feature sequences, and based on historical resource features and interest features in historical interaction records, a gated recurrent network is used to mine the retention degree and evolution process of interests, and to determine the recommendation parameters of resources.
It improves the accuracy of resource recommendations, captures the time evolution of user interests, and enhances the matching degree of recommendations.
Smart Images

Figure CN122285984A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a resource recommendation method, apparatus, computer device, and storage medium. Background Technology
[0002] With the rapid development of computer technology, artificial intelligence technology is being applied more and more widely in the field of recommendation. For example, it can recommend resources such as items, props, and videos to users. Users will provide feedback on the resources they receive, and the feedback data can be used as the basis for the recommendation system to make recommendations to users.
[0003] In related technologies, the user's historical interaction records are obtained, and resources with higher similarity to the historical interaction resources are recommended to the user based on the various historical interaction resources in the historical interaction records.
[0004] However, users' interests change dynamically, and the above methods are difficult to capture these changes, resulting in low accuracy in resource recommendations. Summary of the Invention
[0005] This application provides a resource recommendation method, apparatus, computer device, and storage medium, which can improve the accuracy of resource recommendations. The technical solution is as follows:
[0006] On the one hand, a resource recommendation method is provided, the method comprising:
[0007] Obtain candidate resource features and a sequence of resource features of an object. The candidate resource features represent candidate resources to be recommended to the object. The sequence of resource features includes historical resource features of historical resources that the object interacted with at each of M time points, where M time points are time points before the current time point and M is an integer greater than 1.
[0008] For the i-th time among the M time points, based on the historical resource characteristics of the i-th time point and the first interest characteristics of the object at the (i-1)-th time point, the first retention characteristic of the object at the i-th time point is determined. The first retention characteristic at the i-th time point represents the degree to which the interest at the (i-1)-th time point is retained at the i-th time point. The first interest characteristic at the (i-1)-th time point represents the interest at the (i-1)-th time point, where i is an integer greater than 1 and not greater than M.
[0009] Based on the first interest feature at time i-1, the first retention feature at time i, and the historical resource feature at time i, the first interest feature of the object at time i is determined, and the first interest feature at time i represents the interest at time i.
[0010] Based on the object's first interest feature at the last time of the M time points and the candidate resource features, recommendation parameters for the candidate resources are determined, and the recommendation parameters are used to determine whether to recommend the candidate resources to the object.
[0011] On the other hand, a resource recommendation device is provided, the device comprising:
[0012] The first acquisition module is used to acquire candidate resource features and a resource feature sequence of an object. The candidate resource features represent candidate resources to be recommended to the object. The resource feature sequence includes historical resource features of historical resources that the object interacted with at each of M time points. The M time points are the time points before the current time point, and M is an integer greater than 1.
[0013] The first determining module is used to determine, for the i-th time among the M time points, the first retention feature of the object at the i-th time point based on the historical resource features at the i-th time point and the first interest feature of the object at the (i-1)-th time point. The first retention feature at the i-th time point represents the degree to which the interest at the (i-1)-th time point is retained at the i-th time point. The first interest feature at the (i-1)-th time point represents the interest at the (i-1)-th time point, where i is an integer greater than 1 and not greater than M.
[0014] The first determining module is further configured to determine the first interest feature of the object at the i-th time based on the first interest feature at the (i-1)-th time, the first retention feature at the i-th time, and the historical resource feature at the i-th time, wherein the first interest feature at the i-th time represents the interest at the i-th time;
[0015] The recommendation parameter determination module is used to determine the recommendation parameters of the candidate resource based on the first interest feature of the object at the last time of the M time points and the candidate resource features. The recommendation parameters are used to determine whether to recommend the candidate resource to the object.
[0016] Optionally, the first determining module is configured to:
[0017] The first interest feature at time i-1 is adjusted using the first preserved feature at time i-1 to obtain the first reference interest feature at time i.
[0018] Based on the first reference interest feature at time i and the historical resource feature at time i, the first interest feature at time i is determined.
[0019] Optionally, the first determining module is further configured to determine the first proportional feature of the object at the i-th time based on the historical resource features at the i-th time and the first interest features of the object at the (i-1)-th time, wherein the first proportional feature at the i-th time represents the fusion ratio of the interest at the (i-1)-th time and the interest at the i-th time at the i-th time;
[0020] The first determining module is used for:
[0021] Based on the first reference interest feature at time i and the historical resource feature at time i, the first candidate interest feature at time i is determined;
[0022] Based on the first proportional feature at time i, the first interest feature at time i-1 and the first candidate interest feature at time i are fused to obtain the first interest feature at time i.
[0023] Optionally, the resource recommendation model includes a first gated recurrent network, which includes a first reset gate, a first update gate, a first hidden layer, and a first fusion layer. The network structure of the first reset gate is the same as that of the first update gate, but the model parameters of the first reset gate are different from those of the first update gate.
[0024] The first retained feature is determined by the first reset gate, the first proportional feature is determined by the first update gate, the first candidate interest feature is determined by the first hidden layer, and the first interest feature is determined by the first fusion layer.
[0025] Optionally, the first determining module is further configured to determine the first retention feature of the object at the first time based on the historical resource features and the first preset interest features of the first time among the M time moments;
[0026] The first determining module is further configured to determine the first interest feature of the object at the first time based on the first preset interest feature, the first retention feature at the first time, and the historical resource feature at the first time.
[0027] Optionally, the device further includes:
[0028] The second determining module is used to determine the second retained feature of the object at the i-th time based on the first interest feature at the i-th time and the second interest feature at the (i-1)-th time.
[0029] The second determining module is further configured to determine the second interest feature of the object at the i-th time based on the second interest feature at the (i-1)-th time, the second retained feature at the i-th time, and the first interest feature at the i-th time;
[0030] The recommendation parameter determination module is used to determine the recommendation parameters of the candidate resources based on the second interest feature of the object at the last time of the M time points and the candidate resource features.
[0031] Optionally, the second determining module is configured to:
[0032] The second interest feature at time i-1 is adjusted using the second preserved feature at time i-1 to obtain the second reference interest feature at time i.
[0033] Based on the second reference interest feature at time i and the first interest feature at time i, the second interest feature of the object at time i is determined.
[0034] Optionally, the second determining module is further configured to determine the second proportional feature of the object at the i-th time based on the first interest feature at the i-th time and the second interest feature at the (i-1)-th time;
[0035] The second determining module is used for:
[0036] Based on the second reference interest feature at time i and the first interest feature at time i, the second candidate interest feature of the object at time i is determined;
[0037] Based on the second proportional feature at time i, the second interest feature at time i-1 and the second candidate interest feature at time i are fused to obtain the second interest feature at time i.
[0038] Optionally, the device further includes:
[0039] The weight determination module is used to determine the weight corresponding to each of the M time points based on the first interest features at the M time points;
[0040] The second determining module is used for:
[0041] Using the weights corresponding to the i-th time, the second proportional feature at the i-th time is weighted to obtain the weighted second proportional feature at the i-th time;
[0042] Based on the weighted second proportional feature at time i, the second interest feature at time i-1 and the second candidate interest feature at time i are fused to obtain the second interest feature at time i.
[0043] Optionally, the weight determination module is used to:
[0044] Determine the correlation between the first interest feature at each time step and the candidate resource feature;
[0045] For any given moment, determine the ratio of the correlation degree corresponding to that moment to the sum of the correlation degrees corresponding to the M moments, and obtain the weight corresponding to that moment.
[0046] Optionally, the resource recommendation model includes a second gated recurrent network, which includes a second reset gate, a second update gate, a second hidden layer, and a second fusion layer. The network structure of the second reset gate is the same as that of the second update gate, but the model parameters of the second reset gate are different from those of the second update gate.
[0047] The second retained feature is determined by the second reset gate, the second proportional feature is determined by the second update gate, the second candidate interest feature is determined by the second hidden layer, and the second interest feature is determined by the second fusion layer.
[0048] Optionally, the second determining module is further configured to determine the second retained feature of the object at the first time based on the first interest feature and the second preset interest feature at the first time of the M time points;
[0049] The second determining module is further configured to determine the second interest feature of the object at the first time based on the second preset interest feature, the second retained feature at the first time, and the first interest feature at the first time.
[0050] Optionally, the resource recommendation model includes a feature fusion network and a feature mapping network; the recommendation parameter determination module is used for:
[0051] Obtain association features, wherein the association features include at least one of the object features of the object, the interaction features of the object, or the historical resource features at the M time points;
[0052] The target recommendation features are obtained by fusing the first interest features, the candidate resource features, and the association features at the last time step through the feature fusion network.
[0053] The target recommendation features are mapped to the recommendation parameters through the feature mapping network.
[0054] Optionally, the device further includes a model training module for:
[0055] The sample candidate resource features, interaction parameters, and sample resource feature sequence of the sample object are obtained. The sample resource feature sequence includes the sample historical resource features of the historical resources interacted by the sample object at each of the N time points. The sample candidate resource features represent the sample candidate resources recommended to the sample object after the N time points. The interaction parameters indicate whether the sample object interacts with the sample candidate resources.
[0056] For the k-th time among the N time points, the resource recommendation model determines the first sample retention feature of the sample object at the k-th time point based on the sample historical resource features at the k-th time point and the first sample interest features of the sample object at the (k-1)-th time point.
[0057] Based on the resource recommendation model, the first sample interest feature of the sample object at time k is determined at time k, the first sample retention feature at time k is determined, and the sample historical resource feature at time k is determined.
[0058] Based on the first sample interest features of the sample object at the last time of the N time points and the sample candidate resource features, the sample recommendation parameters of the sample candidate resource are determined by the resource recommendation model.
[0059] The resource recommendation model is trained based on the sample recommendation parameters and the interaction parameters.
[0060] Optionally, the device further includes:
[0061] The second acquisition module is used to acquire positive sample resource features and negative sample resource features. The positive sample resource features represent resources recommended to the sample object and interacted with after the N time points, and the negative sample resource features represent resources recommended to the sample object and not interacted with after the N time points.
[0062] The model training module is used for:
[0063] The resource recommendation model is trained based on the sample recommendation parameters and the interaction parameters, the first sample interest features and the positive sample resource features at the last moment, and the first sample interest features and the negative sample resource features at the last moment.
[0064] Optionally, the model training module is used for:
[0065] Based on the first similarity between the sample recommendation parameters and the interaction parameters, a first loss parameter is determined, wherein the first loss parameter is negatively correlated with the first similarity.
[0066] A second loss parameter is determined based on the second similarity between the first sample interest feature and the positive sample resource feature at the last time step, and the third similarity between the first sample interest feature and the negative sample resource feature at the last time step. The second loss parameter is negatively correlated with the second similarity and positively correlated with the third similarity.
[0067] The resource recommendation model is trained based on the first loss parameter and the second loss parameter.
[0068] On the other hand, a computer device is provided, the computer device including a processor and a memory, the memory storing at least one computer program, the at least one computer program being loaded and executed by the processor to perform the operations performed by the resource recommendation method as described above.
[0069] On the other hand, a computer-readable storage medium is provided that stores at least one computer program, which is loaded and executed by a processor to perform the operations performed by the resource recommendation method as described above.
[0070] On the other hand, a computer program product is provided, including a computer program that is loaded and executed by a processor to perform the operations performed by the resource recommendation method as described above.
[0071] The solution provided in this application provides historical resources of historical resources that an object interacts with at multiple historical moments. For any given historical moment, based on the historical resource characteristics of that historical moment and the interest characteristics of the previous historical moment, the degree of retention of the interest from the previous historical moment is mined at this historical moment. Then, based on the retention degree of that historical moment, the interest characteristics of the previous historical moment, and the historical resource characteristics of that historical moment, the interest characteristics of that historical moment are mined, and so on. Thus, the interest of each historical moment mined retains the interest of previous historical moments to a certain extent, thereby capturing the evolution of the object's interest over time. Based on the interest characteristics of the last historical moment and the candidate resource characteristics, it is determined whether to recommend candidate resources to the object, which can improve the accuracy of resource recommendation. Attached Figure Description
[0072] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0073] Figure 1This is a schematic diagram of a computer system provided in an embodiment of this application;
[0074] Figure 2 This is a flowchart of a resource recommendation method provided in an embodiment of this application;
[0075] Figure 3 This is a schematic diagram of the structure of a resource recommendation model provided in an embodiment of this application;
[0076] Figure 4 This is a schematic diagram of another resource recommendation model provided in an embodiment of this application;
[0077] Figure 5 This is a flowchart of a resource recommendation method provided in an embodiment of this application;
[0078] Figure 6 This is a flowchart of another resource recommendation method provided in an embodiment of this application;
[0079] Figure 7 This is a schematic diagram of an interest feature determination method provided in an embodiment of this application;
[0080] Figure 8 This is a schematic diagram of a resource recommendation method provided in an embodiment of this application;
[0081] Figure 9 This is a flowchart illustrating a training method for a resource recommendation model provided in an embodiment of this application;
[0082] Figure 10 This is a schematic diagram of a loss parameter determination method provided in an embodiment of this application;
[0083] Figure 11 This is a flowchart of a virtual item recommendation method provided in an embodiment of this application;
[0084] Figure 12 This is a schematic diagram of a game interface provided in an embodiment of this application;
[0085] Figure 13 This is a schematic diagram of an item recommendation interface provided in an embodiment of this application;
[0086] Figure 14 This is a comparison diagram of experimental results provided in an embodiment of this application;
[0087] Figure 15 This is a schematic diagram of the structure of a resource recommendation device provided in an embodiment of this application;
[0088] Figure 16 This is a schematic diagram of another resource recommendation device provided in an embodiment of this application;
[0089] Figure 17 This is a schematic diagram of the structure of a terminal provided in an embodiment of this application;
[0090] Figure 18 This is a schematic diagram of the structure of a server provided in an embodiment of this application. Detailed Implementation
[0091] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.
[0092] It is understood that the terms "first," "second," etc., used in this application may be used to describe various concepts herein, but unless otherwise stated, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of this application, a first interest feature may be referred to as a second interest feature, and similarly, a second interest feature may be referred to as a first interest feature.
[0093] "At least one" refers to one or more resources. For example, at least one resource can be one resource, two resources, three resources, or any integer number of resources greater than or equal to one. "Multiple" refers to two or more resources. For example, multiple resources can be two resources, three resources, or any integer number of resources greater than or equal to two. "Each" refers to each of the at least one resources. For example, each resource refers to each of the multiple resources. If the multiple resources are three resources, then each resource refers to each of the three resources.
[0094] It should be noted that all information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals (including but not limited to signals transmitted between user terminals and other devices) involved in this application have been fully authorized by the user or relevant 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 resource feature sequences, candidate resource features, and association features involved in this application have all been fully authorized by the user or relevant 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.
[0095] The resource recommendation method provided in this application can be used in computer devices. Optionally, the computer device is a terminal or a server. This application can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation, and assisted driving.
[0096] Figure 1 This is a schematic diagram of a computer system provided in an embodiment of this application. See also... Figure 1The computer system includes a terminal 101 and a server 102. The terminal 101 and the server 102 are connected via a wireless or wired network.
[0097] Terminal 101 has a client 111 installed and running. This client 111 can be a game client, social application client, online payment client, online shopping client, video client, etc. When terminal 101 runs client 111, the user interface of client 111 is displayed on the screen of terminal 101. Terminal 101 is the terminal used by user 121.
[0098] Optionally, terminal 101 may refer to one of a number of terminals, including: smartphones, tablets, laptops, desktop computers, smart speakers, smartwatches, smart voice interaction devices, smart home appliances, in-vehicle terminals, aircraft, VR (Virtual Reality) devices, AR (Augmented Reality) devices, etc., but not limited to these.
[0099] Those skilled in the art will understand that the number of terminals described above can be more or less. For example, there may be only one terminal, or there may be six, eight, or more terminals. This application does not limit the number of terminals or the type of device.
[0100] Figure 1 Only one terminal is shown in the diagram, but in different embodiments, multiple other terminals 103 can access the server 102. Optionally, one or more terminals 103 may also be terminals corresponding to developers, on which a client development and editing platform is installed. Developers can edit and update the client on the terminal 103 and transmit the updated client installation package to the server 102 via wired or wireless network. Terminal 101 can download the client installation package from the server 102 to update the client.
[0101] Terminal 101 and other terminals 103 are connected to server 102 via wired or wireless networks.
[0102] Server 102 includes at least one of the following: a single server, multiple servers, a cloud computing platform, and a virtualization center. Optionally, the server is an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. Server 102 is used to provide backend services to clients. Optionally, server 102 undertakes the main computing work, and terminal 101 undertakes the secondary computing work; or, server 102 undertakes the secondary computing work, and terminal 101 undertakes the main computing work; or, server 102 and terminal 101 use a distributed computing architecture for collaborative computing.
[0103] In this embodiment, terminal 101 sends a resource recommendation request for an object to server 102. Upon receiving the request, server 102 uses the method provided in this embodiment to determine recommendation parameters for multiple candidate resources, and based on these parameters, determines which resources to recommend to the object. Server 102 then returns the recommended resources to terminal 101.
[0104] It should be noted that the above implementation environment is only an example. The method provided in this application embodiment can also be executed by terminal 101 or server 102 alone, or by other computer devices. This application embodiment does not limit this.
[0105] Figure 2 This is a flowchart of a resource recommendation method provided in an embodiment of this application. This embodiment is executed by a computer device. See also... Figure 2 The method includes:
[0106] 201. The computer device acquires candidate resource features and the resource feature sequence of the object. The candidate resource features represent the candidate resources to be recommended to the object. The resource feature sequence includes the historical resource features of the historical resources that the object interacted with at each of the M time points.
[0107] Here, M are the moments before the current moment, and M is an integer greater than 1.
[0108] This application embodiment is used to determine whether to recommend candidate resources to an object. A computer device obtains candidate resource information and extracts features from the candidate resource information to obtain candidate resource features. For example, the candidate resource information includes the identifier of the candidate resource. The candidate resource can be any type of resource, such as game items, goods, videos, or music. The object can be an account, such as a logged-in account on this device.
[0109] A computer device acquires a sequence of resource information about an object, including historical resource information about the object's interactions with historical resources at M time points prior to the current time. Features are extracted from the historical resource information in the sequence to obtain a resource feature sequence, which includes multiple historical resource features. For example, the historical resource information includes identifiers of the historical resources. The M time points refer to the historical moments when the object interacted with the historical resources.
[0110] Optionally, the computer device determines M historical resources that the object interacted with before the current time. Each historical resource corresponds to its own interaction time. The historical resource features of the M historical resources are arranged in chronological order of their interaction with the object to form a resource feature sequence.
[0111] 202. For time i among M time points, the computer device determines the first retention feature of the object at time i based on the historical resource characteristics at time i and the first interest feature of the object at time i-1. The first retention feature at time i represents the degree of retention of the interest at time i-1 at time i.
[0112] Here, the first interest feature at time i-1 represents the interest at time i-1, where i is an integer greater than 1 and not greater than M.
[0113] Steps 202-203 describe the process by which the computer device determines the first interest feature at time i out of M time points. The computer device obtains the historical resource features at time i from the resource feature sequence and then obtains the first interest feature at time i-1. The method for determining the first interest feature at time i-1 is the same as the method for determining the first interest feature at time i in steps 202-203. When determining the first interest feature at time i, the first interest feature at time i-1 needs to be referenced.
[0114] The first interest feature at time i-1 reflects the object's interest at time i-1, and the historical resource feature at time i reflects the resources the object interacted with at time i. Therefore, based on the relationship between the historical resource feature at time i and the first interest feature at time i-1, we can mine the degree to which the object's interest at time i-1 is retained at time i, which is to say, we obtain the object's first retention feature at time i.
[0115] 203. The computer device determines the first interest feature of an object at time i based on the first interest feature at time i-1, the first retention feature at time i, and the historical resource feature at time i. The first interest feature at time i represents the interest at time i.
[0116] The historical resource characteristics at time i reflect the resources that the object interacted with at time i, and to a certain extent, the object's interest tendencies at time i can be captured based on these historical resource characteristics. In this embodiment, when determining the object's first interest characteristic at time i, it relies not only on the historical resource characteristics at time i, but also on the first interest characteristic at time i-1 and the first retained characteristic at time i. Therefore, the first interest characteristic at time i determined in this embodiment includes not only the object's own interest tendencies at time i, but also the interest tendencies at time i-1. Thus, the final interest tendency at time i is influenced by the interest tendency at time i-1, which conforms to the law of the evolution of the object's interests over time.
[0117] 204. The computer device determines the recommendation parameters of the candidate resources based on the first interest feature and candidate resource features of the object at the last time of M time points. The recommendation parameters are used to determine whether to recommend the candidate resources to the object.
[0118] The candidate resource is the resource to be recommended to the object at a time M moments later. Whether the object is interested in the candidate resource depends primarily on whether the candidate resource matches the object's interest at the last of the M moments. Therefore, the computer device predicts the recommendation parameters of the candidate resource based on the object's primary interest features at the last of the M moments and the candidate resource features. For example, these recommendation parameters represent the probability that the object will interact with the candidate resource if it is recommended to the object.
[0119] Since the primary interest feature at each of the M time points depends on the primary interest feature at the previous time point, the primary interest feature at the last time point not only includes the interest tendency of the last time point itself, but also reflects the evolution of the object's interest over these M time points. Therefore, the recommendation parameters determined based on such primary interest features are more accurate.
[0120] The method provided in this application embodiment obtains historical resources of historical resources that an object interacts with at multiple historical moments. For any historical moment, based on the historical resource characteristics of that historical moment and the interest characteristics of the previous historical moment, the degree of retention of the interest of the previous historical moment is mined at this historical moment. Then, based on the retention degree of that historical moment, the interest characteristics of the previous historical moment, and the historical resource characteristics of that historical moment, the interest characteristics of that historical moment are mined, and so on. Thus, the interest of each historical moment mined retains the interest of previous historical moments to a certain extent, thereby capturing the evolution of the object's interest over time. Based on the interest characteristics of the last historical moment and the candidate resource characteristics, it is determined whether to recommend candidate resources to the object, which can improve the accuracy of resource recommendation.
[0121] The above Figure 2 The embodiments described herein are merely brief illustrations of resource recommendation methods. In some embodiments, the computer device may also perform the resource recommendation process through a resource recommendation model.
[0122] Figure 3 This is a schematic diagram illustrating the structure of a resource recommendation model according to an embodiment of this application, such as... Figure 3 As shown, the resource recommendation model includes a first gated recurrent network 301, a feature fusion network 302, and a feature mapping network 303. The first gated recurrent network 301 is connected to the feature fusion network 302, and its output serves as the input to the feature fusion network 302. The feature fusion network 302 is connected to the feature mapping network 303, and its output serves as the input to the feature mapping network 303.
[0123] The first gated recurrent network 301 is used to determine the first interest feature at M time points based on the historical resource features at M time points in the resource feature sequence. Optionally, the first gated recurrent network includes a first reset gate, a first update gate, a first hidden layer, and a first fusion layer. The network structure of the first reset gate is the same as that of the first update gate, but the model parameters of the first reset gate are different from those of the first update gate. The first reset gate is used to determine the first retained feature, the first update gate is used to determine the first proportional feature, the first hidden layer is used to determine the first candidate interest feature, and the first fusion layer is used to determine the first interest feature.
[0124] The feature fusion network 302 is used to fuse the first interest feature and the candidate resource feature to obtain the target recommendation feature. Optionally, the feature fusion network 302 is an embedded feature concatenation network used to concatenate multiple input features.
[0125] The feature mapping network 303 is used to map target recommendation features to recommendation parameters. Optionally, the feature mapping network 303 includes a third hidden layer, a softmax layer, and an output layer connected in sequence.
[0126] In one possible implementation, such as Figure 4 As shown, the resource recommendation model also includes a second gated recurrent network 304. This second gated recurrent network 304 is located between the first gated recurrent network 301 and the feature fusion network 302, and is connected to both networks. The output of the first gated recurrent network 301 serves as the input to the second gated recurrent network 304, and the output of the second gated recurrent network 304 serves as the input to the feature fusion network 302.
[0127] The second gated recurrent network 304 is used to determine the second interest features at M time points based on the first interest features and candidate resource features at M time points. Optionally, the second gated recurrent network includes a second reset gate, a second update gate, a second hidden layer, and a second fusion layer. The network structure of the second reset gate is the same as that of the second update gate, but the model parameters of the second reset gate are different from those of the second update gate. The second reset gate is used to determine the second retained features, the second update gate is used to determine the second proportional features, the second hidden layer is used to determine the second candidate interest features, and the second fusion layer is used to determine the second interest features. Correspondingly, the feature fusion network 302 is used to fuse the second interest features and candidate resource features to obtain the target recommendation features.
[0128] Optionally, the network structure of the first gated recurrent network 301 is the same as that of the second gated recurrent network 304, but the model parameters of the first gated recurrent network 301 are different from those of the second gated recurrent network 304. Alternatively, the network structure and model parameters of the first gated recurrent network 301 and the second gated recurrent network 304 are both different. For example, the second gated recurrent network 304 may further include an attention layer, which is used to determine the weights corresponding to the M time steps based on the first interest features and candidate resource features at the M time steps, and the weights corresponding to the M time steps are used to weight the second proportional features at the M time steps.
[0129] The following combination Figure 3 or Figure 4 The resource recommendation model and the resource recommendation method provided in the embodiments of this application will be described in detail.
[0130] Figure 5 This is a flowchart of a resource recommendation method provided in an embodiment of this application. This embodiment is executed by a computer device. See also... Figure 5 The method includes:
[0131] 501. The computer device acquires candidate resource features and the resource feature sequence of the object. The candidate resource features represent the candidate resources to be recommended to the object. The resource feature sequence includes the historical resource features of the historical resources that the object interacted with at each of the M time points.
[0132] Here, M are the moments before the current moment, and M is an integer greater than 1.
[0133] In one possible implementation, the computer device determines multiple historical resources that the object has interacted with within a preset time period prior to the current moment. The number of these historical resources is M, and each historical resource corresponds to its own interaction time. The historical resource information of the M resources at each time point is arranged in chronological order of their interaction with the object, forming a resource sequence [b1, b2, b3, ..., b...]. M The computer device maps each historical resource information in the resource sequence to a historical resource feature, resulting in a resource feature sequence [e1, e2, e3, ..., e]. M ].
[0134] For example, the historical resource information is the identifier of the historical resource, and the historical resource feature is a multi-dimensional embedding vector.
[0135] In one possible implementation, the resource recommendation model includes a feature extraction network for extracting features. The computer device inputs historical resource information from M time points into the feature extraction network, which outputs historical resource features from the M time points.
[0136] 502. For the i-th time of M time points, the computer device determines the first retention feature of the object at the i-th time point by using the first gated recurrent network of the resource recommendation model, based on the historical resource features at the i-th time point and the first interest feature of the object at the (i-1)-th time point.
[0137] Wherein, the first retention feature at time i represents the degree of retention of interest at time i-1, and the first interest feature at time i-1 represents interest at time i-1, where i is an integer greater than 1 and not greater than M.
[0138] like Figure 3 and Figure 4 As shown, the resource recommendation model includes a first gated recurrent network, through which the computer device determines the first retained feature of the object at time i.
[0139] In one possible implementation, the first gated recurrent network includes a first reset gate. The computer device executes step 502 through the first reset gate. That is, the computer device inputs the historical resource features at time i and the object's first interest features at time i-1 to the first reset gate, and obtains the first retained features at time i output by the first reset gate.
[0140] For example, the first reset door can be represented by the following formula (1).
[0141] r i =σ(W r e i +U r h i-1 +b r ); formula (1)
[0142] Where, r i Let e represent the first preserved feature at time i. i h represents the historical resource characteristics at time i. i-1 Let W represent the first interest feature at time i-1. σ(·) represents the Sigmoid function in the first reset gate. r U r and b r This represents the model parameters of the first reset door.
[0143] 503. The computer device determines the first proportional feature of the object at time i based on the historical resource features at time i and the first interest features of the object at time i-1 through the first gated cyclic network.
[0144] Here, the first proportional feature at time i represents the fusion ratio of the interest at time i-1 and the interest at time i at time i. For example, the first proportional feature is a value between 0 and 1, which represents the proportion of the interest at time i-1 in the fusion process, and the difference between 1 and the value represents the proportion of the interest at time i in the fusion process.
[0145] like Figure 3 and Figure 4 As shown, the resource recommendation model includes a first gated recurrent network, through which the computer device determines the first proportional feature of the object at time i.
[0146] In one possible implementation, the first gated recurrent network includes a first update gate. The computer device executes step 503 through the first update gate. That is, the computer device inputs the historical resource features at time i and the object's first interest features at time i-1 into the first update gate to obtain the first proportional features at time i output by the first update gate.
[0147] For example, the first update gate can be represented by the following formula (2).
[0148] u i =σ(W u e i +U u h i-1 +b u ); formula (2)
[0149] Among them, u i Let e represent the first preserved feature at time i. i h represents the historical resource characteristics at time i. i-1 Let W represent the first interest feature at time i-1. σ(·) represents the Sigmoid function in the first update gate. u U u and b u This represents the model parameters for the first update gate.
[0150] 504. The computer device uses the first gated recurrent network to adjust the first interest feature at time i-1 using the first retained feature at time i to obtain the first reference interest feature at time i. Based on the first reference interest feature at time i and the historical resource feature at time i, the first candidate interest feature at time i is determined.
[0151] The first retention feature at time i represents the degree to which the interest at time i-1 is retained at time i, and the first interest feature at time i-1 represents the interest at time i-1. Therefore, by adjusting the first interest feature at time i-1 using the first retention feature at time i, we can obtain the first reference interest feature at time i. The first reference interest feature at time i represents the portion of the interest at time i-1 retained at time i.
[0152] The historical resource features at time i can reflect the resources that the object interacts with at time i, and to a certain extent, the object's interest tendencies at time i can be captured based on the historical resource features at time i. Furthermore, based on the first reference interest features at time i and the historical resource features at time i, the first candidate interest features at time i can be determined. These first candidate interest features at time i not only include the object's own interest tendencies at time i, but also a portion of its interest tendencies at time i-1.
[0153] like Figure 3 and Figure 4 As shown, the resource recommendation model includes a first gated recurrent network, through which the computer device determines the first candidate interest feature of the object at time i.
[0154] In one possible implementation, the first gated recurrent network includes a first hidden layer. The computer device executes step 504 through the first hidden layer. That is, the computer device inputs the first retained feature at time i, the first interest feature at time i-1, and the historical resource feature at time i into the first hidden layer to obtain the first candidate interest feature at time i output by the first hidden layer.
[0155] For example, the first hidden layer can be represented by the following formula (3).
[0156]
[0157] in, Let e represent the first candidate interest feature at time i. i Let r represent the historical resource characteristics at time i. i h represents the first preserved feature at time i. i-1 Let W represent the first interest feature at time i-1. Here, tanh(·) represents the hyperbolic tangent function in the first hidden layer, and W... h U h and b h This represents the model parameters of the first hidden layer. ⊙ represents the vector inner product operation.
[0158] 505. The computer device obtains the first interest feature at time i by fusing the first interest feature at time i-1 and the first candidate interest feature at time i through the first gated recurrent network, based on the first proportional feature at time i.
[0159] The first proportional feature at time i represents the fusion ratio of the interest at time i-1 and the interest at time i at time i. Therefore, by fusing the first interest feature at time i-1 and the first candidate interest feature at time i based on the first proportional feature at time i, a more accurate first interest feature at time i can be obtained.
[0160] like Figure 3 and Figure 4 As shown, the resource recommendation model includes a first gated recurrent network, through which the computer device determines the first interest feature of the object at time i.
[0161] In one possible implementation, the first gated recurrent network includes a first fusion layer. The computer device performs step 505 through the first fusion layer. That is, the computer device inputs the first proportional feature at time i, the first interest feature at time i-1, and the first candidate interest feature at time i into the first fusion layer to obtain the first interest feature at time i output by the first fusion layer.
[0162] For example, the first fusion layer can be represented by the following formula (4).
[0163]
[0164] Among them, h i h represents the first interest feature at time i. i-1 This represents the first interest feature at time i-1. Let u represent the first candidate interest feature at time i. i Let represent the first proportional feature at time i, and ⊙ represent the vector inner product operation.
[0165] In this implementation, the first interest feature at time i-1 is adjusted using the first retained feature at time i-1, which dynamically captures changes in user interests. Furthermore, the first interest feature at time i-1 contains some of the features retained from the first interest feature at time i-1, which helps to capture the evolution of interests over time, thereby better predicting the potential interests of the object and improving the accuracy of the first interest feature.
[0166] Furthermore, by introducing a first proportional feature, the fusion ratio between the first interest feature at time i-1 and the first candidate interest feature at time i is dynamically adjusted, thereby balancing the influence of historical interests and current interests. This dynamic proportional mechanism can better reflect the phased changes of interests, establish the interest evolution relationship between consecutive time moments, help capture the continuity and development pattern of user interests over time, and improve the accuracy of the first interest feature.
[0167] Furthermore, a resource recommendation model is provided. In the first gated recurrent network of the resource recommendation model, the dynamic modeling of interests is realized through the division of labor among the first reset gate, the first update gate, the first hidden layer, and the first fusion layer. This model retains the reference value of historical interests while highlighting the feature expression of current interests, and can capture the process of interest evolution over time. This improves the accuracy, flexibility, and computational efficiency of resource recommendation and is suitable for complex and ever-changing recommendation scenarios.
[0168] It should be noted that steps 502 to 505 above, taking i as an integer greater than 1 and not greater than M as an example, illustrate the process of determining the first interest feature at time i. Determining the first interest feature at time i depends on the first interest feature at time i-1 (i.e., the time before time i). However, for the first time among the M times, there is no previous time. Therefore, the computer device uses the first preset interest feature as the first interest feature of the previous time, and determines the first interest feature at the first time using the same method as steps 502 to 505 above. The detailed process is as follows: Based on the historical resource features and the first preset interest feature of the first time among the M times, determine the first reserved feature of the object at the first time; based on the first preset interest feature, the first reserved feature of the first time, and the historical resource features of the first time, determine the first interest feature of the object at the first time.
[0169] In one possible implementation, the computer device, through a first gated recurrent network, determines a first retained feature of the object at a first time step based on historical resource features and a first preset interest feature at a first time step. Through the first gated recurrent network, based on the historical resource features and the first preset interest feature at the first time step, a first proportional feature of the object at the first time step is determined. Through the first gated recurrent network, the first preset interest feature is adjusted using the first retained feature at the first time step to obtain a first reference interest feature at the first time step. Based on the first reference interest feature and the historical resource features at the first time step, a first candidate interest feature at the first time step is determined. Through the first gated recurrent network, based on the first proportional feature at the first time step, the first preset interest feature and the first candidate interest feature at the first time step are fused to obtain the first interest feature at the first time step. This process is similar to steps 502 to 505 above and will not be described in detail here.
[0170] It should be noted that this embodiment only illustrates the example of performing secondary correction on the first candidate interest feature obtained in step 504. In another embodiment, after obtaining the first candidate interest feature, it is also possible not to adjust the first candidate interest feature and directly use it as the first interest feature in subsequent processing. In this case, steps 503 and 505 can be omitted, and the first interest feature can be obtained solely through steps 502 and 504.
[0171] 506. The computer device uses the feature fusion network of the resource recommendation model to fuse the first interest feature, candidate resource feature and association feature at the last time step to obtain the target recommendation feature.
[0172] The computer device acquires association features related to the resource recommendation task, which represents the association information related to the resource recommendation task, namely, determining whether to recommend candidate resources to an object. These association features include at least one of the object's object features, the object's interaction features, or historical resource features at M time points.
[0173] Object features represent object information, such as the object's age, level, historical virtual resource expenditure, and current remaining virtual resource quantity. This virtual resource is used to interact with resources recommended to the object. For example, if the recommended resource is a game item, the virtual resource might be virtual diamonds, which are used to purchase game items. Optionally, the computer device maps object information to object features, where the object features are multi-dimensional embedding vectors.
[0174] The interaction features of an object represent its interaction information, including the proportion of virtual resources spent on various resources purchased by the object, the proportion of times the object purchased various resources, and the total number of times the object purchased various resources. Optionally, the computer device maps the interaction information to object features, which are multi-dimensional embedding vectors.
[0175] The historical resource features at M time points represent historical resource information, including resource identifier, resource category, the number of virtual resources required to purchase the resource, and the resource listing duration. Optionally, the computer device maps the historical resource information to object features, which are multi-dimensional embedding vectors. Optionally, the historical resource features include a first historical resource feature and a second historical resource feature. The first historical resource feature includes features obtained by mapping the resource identifier. This first historical resource feature is used to determine the first interest feature in steps 502 to 505 and participates in the feature fusion process in step 506 to obtain the target recommendation feature. The second historical resource feature includes features obtained by mapping other historical resource information besides the resource identifier. This second historical resource feature is used in the feature fusion process in step 506 to obtain the target recommendation feature.
[0176] like Figure 3 and Figure 4 As shown, the resource recommendation model includes a feature fusion network. The computer device inputs the first interest feature, candidate resource features, and related features into the feature fusion network to obtain the target recommendation features output by the feature fusion network.
[0177] In one possible implementation, the feature fusion network concatenates interest features, candidate resource features, and association features to obtain target recommendation features.
[0178] 507. Computer devices use a feature mapping network of a resource recommendation model to map target recommendation features into recommendation parameters, which are used to determine whether to recommend candidate resources to the object.
[0179] like Figure 3 and Figure 4 As shown, the resource recommendation model includes a feature mapping network. The computer device inputs the target recommendation features into the feature mapping network and obtains the recommendation parameters output by the feature mapping network.
[0180] In one possible implementation, the feature mapping network comprises a third hidden layer, a softmax layer, and an output layer connected in sequence. The output of the third hidden layer serves as the input to the softmax layer, and the output of the softmax layer serves as the input to the output layer. The computer device inputs the target recommendation features into the third hidden layer. After processing by the third hidden layer, the softmax layer, and the output layer in sequence, the output layer outputs the recommendation parameters.
[0181] In one possible implementation, the recommendation parameter represents the probability that the object will interact with the candidate resource when the candidate resource is recommended to the object.
[0182] It should be noted that steps 506 to 507 above describe determining the recommendation parameters of candidate resources based on the first interest feature, candidate resource feature, and association feature of the object at the last time of the M time points. In another embodiment, the recommendation parameters of candidate resources can also be determined based solely on the first interest feature and candidate resource feature at the last time of the M time points. That is, in step 506, only the first interest feature and candidate resource feature at the last time point are fused to obtain the target recommendation feature, and in step 507, the recommendation parameters are then determined based on this target recommendation feature.
[0183] 508. When the recommended parameters of the candidate resources meet the recommendation conditions, the computer equipment recommends candidate resources to the object.
[0184] The computer device determines whether the recommendation parameters of the candidate resource meet the recommendation criteria. If the criteria are met, the candidate resource is recommended to the object. If the criteria are not met, the candidate resource is not recommended to the object.
[0185] In one possible implementation, for a given object, the computer device determines recommendation parameters for multiple candidate resources. From these candidate resources, at least one target resource whose recommendation parameters satisfy the recommendation criteria is identified, and this at least one target resource is recommended to the object.
[0186] For example, the recommendation criteria are a preset number of recommendation parameters ranked from largest to smallest. For instance, if there are 20 candidate resources and the preset number is 10, the computer device selects the 10 candidate resources ranked from largest to smallest as target resources and recommends these 10 target resources to the user.
[0187] For example, the recommendation criterion is that the recommendation parameter is greater than a preset value. For instance, the recommendation parameter ranges from 0 to 1, and the preset value is 0.8. The computer device selects candidate resources with a recommendation parameter greater than 0.8 from among multiple candidate resources as target resources and recommends at least one of the determined target resources to the object.
[0188] The method provided in this application embodiment obtains historical resources of historical resources that an object interacts with at multiple historical moments. For any historical moment, based on the historical resource characteristics of that historical moment and the interest characteristics of the previous historical moment, the degree of retention of the interest of the previous historical moment is mined at this historical moment. Then, based on the retention degree of that historical moment, the interest characteristics of the previous historical moment, and the historical resource characteristics of that historical moment, the interest characteristics of that historical moment are mined, and so on. Thus, the interest of each historical moment mined retains the interest of previous historical moments to a certain extent, thereby capturing the evolution of the object's interest over time. Based on the interest characteristics of the last historical moment and the candidate resource characteristics, it is determined whether to recommend candidate resources to the object, which can improve the accuracy of resource recommendation.
[0189] In one embodiment, after extracting interest using the method described in the above embodiment and obtaining a first interest feature, interest evolution is performed based on the first interest feature to obtain a second interest feature. The second interest feature is then used to determine the recommendation parameters. For details, please refer to the following... Figure 6 Examples of implementations. Figure 6 This is a flowchart of another resource recommendation method provided in this application embodiment. This application embodiment is executed by a computer device. See also... Figure 6 The method includes:
[0190] 601. The computer device acquires candidate resource features and the resource feature sequence of the object. The candidate resource features represent the candidate resources to be recommended to the object. The resource feature sequence includes the historical resource features of the historical resources that the object interacted with at each of the M time points.
[0191] 602. For the i-th time of M time points, the computer device determines the first retention feature of the object at the i-th time point by using the first gated recurrent network of the resource recommendation model, based on the historical resource features at the i-th time point and the first interest feature of the object at the (i-1)-th time point.
[0192] 603. The computer device determines the first proportional feature of the object at time i based on the historical resource features at time i and the first interest feature of the object at time i-1 through the first gated cyclic network.
[0193] 604. The computer device uses the first gated recurrent network to adjust the first interest feature at time i-1 using the first retained feature at time i to obtain the first reference interest feature at time i. Based on the first reference interest feature at time i and the historical resource feature at time i, the first candidate interest feature at time i is determined.
[0194] 605. The computer device obtains the first interest feature at time i by fusing the first interest feature at time i-1 and the first candidate interest feature at time i through the first gated recurrent network, based on the first proportional feature at time i.
[0195] The processes of steps 601 to 605 are the same as those of steps 501 to 505, and will not be repeated here.
[0196] 606. The computer device uses the second gated recurrent network of the resource recommendation model to determine the second retained feature of the object at time i, based on the first interest feature at time i and the second interest feature at time i-1.
[0197] Wherein, the second retention feature at time i represents the degree of retention of the potential interest at time i-1, and the second interest feature at time i-1 represents the potential interest at time i-1, where i is an integer greater than 1 and not greater than M.
[0198] It should be noted that the second interest feature is an interest feature extracted further based on the first interest feature. Although both the first and second interest features can represent the object's interests, the second interest feature can represent a deeper level of potential interest compared to the first interest feature.
[0199] like Figure 3 and Figure 4 As shown, the resource recommendation model includes a second gated recurrent network, through which the computer device determines the second retained feature of the object at time i.
[0200] In one possible implementation, the second gated recurrent network includes a second reset gate. The computer device executes step 606 through the second reset gate. That is, the computer device inputs the first interest feature at time i and the second interest feature of the object at time i-1 to the second reset gate, and obtains the second retained feature at time i output by the second reset gate. The second reset gate has the same structure as the first reset gate described above, but the model parameters are different, and will not be described again here.
[0201] 607. The computer device determines the second proportional feature of the object at time i based on the first interest feature at time i and the second interest feature at time i-1 through the second gated cyclic network.
[0202] Here, the second proportional feature at time i represents the fusion ratio of the potential interest at time i-1 and the potential interest at time i at time i. For example, the second proportional feature is a value between 0 and 1, which represents the proportion of the potential interest at time i-1 in the fusion process, and the difference between 1 and the value represents the proportion of the potential interest at time i in the fusion process.
[0203] like Figure 3 and Figure 4 As shown, the resource recommendation model includes a second gated recurrent network, through which the computer device determines the second proportional feature of the object at time i.
[0204] In one possible implementation, the second gated recurrent network includes a second update gate. The computer device executes step 607 through the second update gate. That is, the computer device inputs the first interest feature at time i and the second interest feature of the object at time i-1 into the second update gate to obtain the second proportional feature at time i output by the second update gate. The second update gate has the same structure as the first update gate described above, but the model parameters are different, and will not be described again here.
[0205] 608. The computer device uses the second gated recurrent network to adjust the second interest feature at time i-1 using the second retained feature at time i to obtain the second reference interest feature at time i. Based on the second reference interest feature at time i and the first interest feature at time i, the second candidate interest feature of the object at time i is determined.
[0206] like Figure 3 and Figure 4 As shown, the resource recommendation model includes a second gated recurrent network, through which the computer device determines the second candidate interest feature of the object at time i.
[0207] In one possible implementation, the second gated recurrent network includes a second hidden layer. The computer device executes step 608 through the second hidden layer. That is, the computer device inputs the second retained feature at time i, the second interest feature at time i-1, and the first interest feature at time i into the second hidden layer to obtain the second candidate interest feature at time i output by the second hidden layer. This second hidden layer has the same structure as the first hidden layer described above, but the model parameters are different, and will not be described further here.
[0208] 609. The computer device obtains the second interest feature at time i by fusing the second interest feature at time i-1 and the second candidate interest feature at time i through the second gated recurrent network based on the second proportional feature at time i.
[0209] like Figure 3 and Figure 4 As shown, the resource recommendation model includes a second gated recurrent network, through which the computer device determines the second interest feature of the object at time i.
[0210] In one possible implementation, the second gated recurrent network includes a second fusion layer. The computer device executes step 609 through the second fusion layer. That is, the computer device inputs the second proportional feature at time i, the second interest feature at time i-1, and the second candidate interest feature at time i into the second fusion layer to obtain the second interest feature at time i output by the second fusion layer. This second fusion layer has the same structure as the first fusion layer described above, but the model parameters are different, and will not be described further here.
[0211] It should be noted that the process of determining the second interest features at M time points based on the first interest features at M time points in steps 606 to 609 is similar to the process of determining the first interest features at M time points based on the historical resource features at M time points in steps 602 to 605. The difference is that the input to steps 602 to 605 is the historical resource features, and the output is the first interest features. The input to steps 606 to 609 is the first interest features, and the output is the second interest features.
[0212] In this implementation, the second interest feature at time i-1 is adjusted using the second retained feature at time i-1, which dynamically captures changes in user interests. Furthermore, the second interest feature at time i contains some of the features retained in the second interest feature at time i-1, which helps to capture the evolution of interests over time, thereby better predicting the potential interests of the object and improving the accuracy of the second interest feature.
[0213] Furthermore, a second proportional feature is introduced to dynamically adjust the fusion ratio between the second interest feature at time i-1 and the second candidate interest feature at time i, thereby balancing the influence of historical interests and current interests. This dynamic proportional mechanism can better reflect the phased changes of interests, establish the interest evolution relationship between consecutive time moments, help capture the continuity and development pattern of user interests over time, and improve the accuracy of the second interest feature.
[0214] In one possible implementation, the computer device further determines the weight corresponding to each of the M time times based on the first interest features at M time times. Then, step 609 includes: using the weight corresponding to the i-th time time, weighting the second proportional feature at the i-th time time to obtain the weighted second proportional feature at the i-th time time; and based on the weighted second proportional feature at the i-th time time, fusing the second interest feature at the (i-1)-th time time time and the second candidate interest feature at the i-th time time to obtain the second interest feature at the i-th time time.
[0215] For example, the computer device uses the following formulas (5) and (6) to determine the second interest feature at time i.
[0216]
[0217] in, Let a represent the second proportional feature after weighting at time i. i U represents the weight at time i. ′ i This represents the second proportional characteristic at time i. ′ i h represents the second interest feature at time i. ′ i-1 This represents the second interest feature at time i-1. This represents the second candidate interest feature at time i.
[0218] Optionally, the computer device determines the weight corresponding to each of the M time points based on the first interest features at M time points, including: determining the correlation between the first interest features at each time point and the candidate resource features; and for any given time point, determining the ratio of the correlation corresponding to that time point to the sum of the correlations at the M time points to obtain the weight corresponding to that time point.
[0219] For example, the computer device uses the following formula (7) to determine the weight corresponding to the i-th time.
[0220]
[0221] Among them, a i h represents the weight at time i. i Let W represent the first interest feature at time i, and let e represent the model parameters. target h represents the characteristics of candidate resources. j Let represent the first interest feature at time j, where j is a positive integer not greater than M.
[0222] The first interest features at M time points represent the object's interest at those M time points, showing how the object's interest changes over time. Meanwhile, the resources a player expects to interact with after M time points are actually only influenced by the interest at a subset of those M time points; in other words, the degree to which the interest at different times within the M time points affects the expected interaction resources after M time points varies. Therefore, an attention mechanism is used to determine the weight of each of the M time points, and this weight is then used to weight the second proportional features at each time point to improve accuracy.
[0223] For example, the smaller the weight of the i-th moment determined by the attention mechanism, the weaker the correlation between the player's interest at the i-th moment and the candidate resources. Therefore, the second proportional feature at the i-th moment can be weighted by the weight of the i-th moment to reduce the weight of the second proportional feature at the i-th moment. On this basis, the second interest feature is obtained by fusing the weighted second proportional feature. This can ensure that the second candidate interest feature at the i-th moment can be recorded less in the final second interest feature, thereby reducing the reference degree of the interest at the i-th moment.
[0224] Figure 7 This is a schematic diagram of an interest feature determination method provided in an embodiment of this application, such as... Figure 7 As shown, the weights at time i are used to weight the second proportional feature at time i, resulting in the weighted second proportional feature at time i. Using the weighted second proportional feature at time i, the second candidate interest feature at time i and the second interest feature at time i-1 are fused to obtain the second interest feature at time i. This allows for the correction of the second candidate interest feature at time i, resulting in the corrected second interest feature.
[0225] In this implementation, the weight corresponding to each time point can be dynamically adjusted according to the importance of different time points. Therefore, when fusing interest features, it can better reflect the degree of influence of different time points. This weighting mechanism can highlight the interest features of more important time points, while weakening the influence of interest features of less important time points, which is conducive to improving the accuracy of the extracted second interest features.
[0226] Furthermore, by determining the correlation between the primary interest feature and the candidate resource feature at each time step, the matching degree between interests and candidate resources at different times can be quantified. Then, the weight of each time step can be determined based on the correlation at each time step. Thus, when determining interest features, the time steps that are strongly correlated with candidate resources can be highlighted, while the time steps that are weakly correlated with candidate resources can be weakened, which is conducive to improving the relevance and accuracy of resource recommendations.
[0227] It should be noted that steps 606 to 609 above, taking i as an integer greater than 1 and not greater than M as an example, illustrate the process of determining the second interest feature at time i. Determining the second interest feature at time i depends on the second interest feature at time i-1 (i.e., the time preceding time i). However, for the first time among the M times, there is no previous time. Therefore, the computer device uses the second preset interest feature as the second interest feature of the previous time of the first time, and determines the second interest feature of the first time in the same manner as steps 606 to 609 above. The detailed process is as follows: Based on the first interest feature and the second preset interest feature of the first time among the M times, determine the second retained feature of the object at the first time; based on the second preset interest feature, the second retained feature of the first time, and the first interest feature of the first time, determine the second interest feature of the object at the first time.
[0228] In one possible implementation, the computer device, through a second gated recurrent network, determines a second retained feature of the object at a first time step, based on a first interest feature and a second preset interest feature at a first time step. Then, through the second gated recurrent network, based on the first interest feature and the second preset interest feature at the first time step, a second proportional feature of the object at the first time step is determined. Next, through the second gated recurrent network, the second preset interest feature is adjusted using the second retained feature at the first time step to obtain a second reference interest feature at the first time step. Based on the second reference interest feature and the first interest feature at the first time step, a second candidate interest feature at the first time step is determined. Finally, through the second gated recurrent network, based on the second proportional feature at the first time step, the second preset interest feature and the second candidate interest feature at the first time step are fused to obtain the second interest feature at the first time step. This process is similar to steps 606 to 609 described above and will not be explained in detail here.
[0229] It should be noted that this embodiment only illustrates the example of performing secondary correction on the second candidate interest feature obtained in step 608. In another embodiment, after obtaining the second candidate interest feature, it is also possible not to adjust the second candidate interest feature and directly use it as the second interest feature in subsequent processing. In this case, steps 607 and 609 can be omitted, and the second interest feature can be obtained solely through steps 606 and 608.
[0230] 610. The computer device uses the feature fusion network of the resource recommendation model to fuse the second interest feature, candidate resource feature and association feature at the last time step to obtain the target recommendation feature.
[0231] 611. Computer devices use a feature mapping network of a resource recommendation model to map target recommendation features into recommendation parameters, which are used to determine whether to recommend candidate resources to the object.
[0232] Steps 610 to 611 are the same as steps 506 to 507 above, and will not be repeated here.
[0233] It should be noted that steps 610 to 611 above describe determining the recommendation parameters of candidate resources based on the second interest feature, candidate resource feature, and association feature of the object at the last time of the M time points. In another embodiment, the recommendation parameters of candidate resources can also be determined based solely on the second interest feature and candidate resource feature at the last time of the M time points. That is, in step 610, only the second interest feature and candidate resource feature at the last time point are fused to obtain the target recommendation feature, and in step 611, the recommendation parameters are then determined based on this target recommendation feature.
[0234] Figure 8 This is a schematic diagram of a resource recommendation method provided in an embodiment of this application, such as... Figure 8 As shown, the resource recommendation model includes a feature extraction network 305, a first gated recurrent network 301, a second gated recurrent network 304, a feature fusion network 302, and a feature mapping network 303. Figure 8 In this context, GRU stands for Gated Cyclic Unit, which consists of a reset gate, an update gate, a hidden layer, and a fusion layer. Figure 8 In this context, Att represents the attention mechanism, which is used to determine the weights at each time step.
[0235] like Figure 8 As shown, the feature extraction network 305 extracts resource feature sequences, candidate resource features, and association features respectively. The resource feature sequences are processed by a first gated recurrent network 301 to obtain first interest features, and then processed by a second gated recurrent network 304 to obtain second interest features. The second interest features, candidate resource features, and association features at the last time step are fused by a feature fusion network 302 to obtain target recommendation features. Finally, the target recommendation features are mapped by a feature mapping network 303 to obtain recommendation parameters.
[0236] 612. When the recommended parameters of the candidate resources meet the recommendation conditions, the computer equipment recommends candidate resources to the object.
[0237] Step 612 is the same as step 508 above, and will not be repeated here.
[0238] The method provided in this application embodiment obtains historical resources of historical resources that an object interacts with at multiple historical moments. For any historical moment, based on the historical resource characteristics of that historical moment and the interest characteristics of the previous historical moment, the degree of retention of the interest of the previous historical moment is mined at this historical moment. Then, based on the retention degree of that historical moment, the interest characteristics of the previous historical moment, and the historical resource characteristics of that historical moment, the interest characteristics of that historical moment are mined, and so on. Thus, the interest of each historical moment mined retains the interest of previous historical moments to a certain extent, thereby capturing the evolution of the object's interest over time. Based on the interest characteristics of the last historical moment and the candidate resource characteristics, it is determined whether to recommend candidate resources to the object, which can improve the accuracy of resource recommendation.
[0239] Furthermore, after determining the primary interest features at each time step, the same processing logic used to determine these features is employed to extract secondary interest features for each time step, enabling deeper mining of interest features and capturing more potential features across the interest dimension. Moreover, while the primary interest features may be affected by single behaviors or noisy data, the secondary interest features, obtained through multi-layer extraction, effectively smooth out the interference of these anomalous data. Therefore, utilizing the secondary interest features to determine whether to recommend candidate resources subsequently improves accuracy.
[0240] The training process of the resource recommendation model is explained below. Figure 9 This is a flowchart illustrating a training method for a resource recommendation model provided in this application embodiment. This application embodiment is executed by a computer device. See also... Figure 9 The method includes:
[0241] 901. Computer equipment acquires sample candidate resource features, interaction parameters, and sample object sample resource feature sequences.
[0242] The sample resource feature sequence includes the sample historical resource features of the historical resources interacted with by the sample object at each of the N time points, the sample candidate resource features represent the sample candidate resources recommended to the sample object after the N time points, and the interaction parameters indicate whether the sample object interacts with the sample candidate resources.
[0243] For example, if the sample object interacts with the sample candidate resource, the interaction parameter is equal to 1; if the sample object does not interact with the sample candidate resource, the interaction parameter is equal to 0.
[0244] 902. For the k-th time among N time points, the computer device uses a resource recommendation model to determine the first sample retention feature of the sample object at the k-th time point based on the sample's historical resource features at the k-th time point and the first sample interest features of the sample object at the (k-1)-th time point.
[0245] 903. The computer device uses a resource recommendation model to determine the first sample interest feature of the sample object at time k based on the first sample interest feature at time k-1, the first sample retention feature at time k, and the sample historical resource feature at time k.
[0246] 904. The computer device uses a resource recommendation model to determine the sample recommendation parameters of the candidate resources based on the first sample interest features and the sample candidate resource features of the sample object at the last time of N time points.
[0247] The process of determining the sample recommendation parameters in steps 902 to 904 is the same as the process of determining the recommendation parameters in the above embodiments, and will not be described again here.
[0248] 905. Computer devices train resource recommendation models based on sample recommendation parameters and interaction parameters.
[0249] The interaction parameter represents the true probability of an object interacting with a candidate resource when that candidate resource is recommended to it. The sample recommendation parameter represents the predicted probability of the object interacting with that candidate resource when that candidate resource is recommended to it. The smaller the difference between the sample recommendation parameter and the interaction parameter, the more accurate the resource recommendation model. Therefore, the computer device adjusts the model parameters of the second image generation model based on the sample recommendation parameter and the interaction parameter to obtain a more accurate resource recommendation model. The training objective is to reduce the difference between the sample recommendation parameter and the interaction parameter, thereby improving the resource recommendation capability of the resource recommendation model.
[0250] In one possible implementation, the computer device also acquires positive sample resource features and negative sample resource features, where positive sample resource features represent resources recommended to the sample object and interacted with after N time steps, and negative sample resource features represent resources recommended to the sample object but not interacted with after N time steps.
[0251] Step 905 includes: training a resource recommendation model based on sample recommendation parameters and interaction parameters, the first sample interest features and positive sample resource features at the last time step, and the first sample interest features and negative sample resource features at the last time step.
[0252] The more similar the first-sample interest features at the last time step are to the positive sample resource features, the more accurate the resource recommendation model. Conversely, the less similar the first-sample interest features at the last time step are to the negative sample resource features, the more accurate the resource recommendation model. Therefore, when training the resource recommendation model, the computer also considers the differences between the first-sample interest features at the last time step and the positive sample resource features, as well as the differences between the first-sample interest features at the last time step and the negative sample resource features. The training objectives are: to reduce the differences between sample recommendation parameters and interaction parameters, to reduce the differences between the first-sample interest features at the last time step and the positive sample resource features, and to increase the differences between the first-sample interest features at the last time step and the negative sample resource features.
[0253] Optionally, step 905 includes steps 9051 to 9053.
[0254] 9051. Based on the first similarity between the sample recommendation parameters and the interaction parameters, determine the first loss parameter, which is negatively correlated with the first similarity.
[0255] For example, the computer device uses the following formula (8) to determine the first loss parameter.
[0256]
[0257] Among them, L target Let represent the first loss parameter, p(x) represent the sample recommendation parameter, y represent the interaction parameter, and Q represent the number of sample candidate resources.
[0258] 9052. Based on the second similarity between the first sample interest features and the positive sample resource features at the last time step, and the third similarity between the first sample interest features and the negative sample resource features at the last time step, a second loss parameter is determined. The second loss parameter is negatively correlated with the second similarity and positively correlated with the third similarity.
[0259] For example, the computer device uses the following formulas (9), (10) and (11) to determine the second loss parameter.
[0260]
[0261] Among them, L aux Let h represent the second loss parameter, and P represent the sum of the number of positive and negative sample resources. i This represents the interest features of the first sample at the last moment. Indicates positive sample resource characteristics. This represents the resource characteristics of negative samples. Among them, h i and The second similarity between them h i and The third similarity between them.
[0262] Figure 10 This is a schematic diagram of a loss parameter determination method provided in an embodiment of this application, as shown below. Figure 10 As shown, the second loss parameter is determined based on the similarity between the first sample interest features and the positive sample resource features at the last time step, and the similarity between the first sample interest features and the negative sample resource features at the last time step. Positive sample resource features represent resources clicked by the sample object, and negative sample resource features represent resources not clicked by the sample object; being clicked means being interacted with.
[0263] 9053. Based on the first loss parameter and the second loss parameter, train the resource recommendation model.
[0264] Optionally, the computer device weights and sums the first loss parameter and the second loss parameter to obtain the third loss parameter, and trains the resource recommendation model based on the third loss parameter, with the training objective being to reduce the third loss parameter.
[0265] For example, the computer device uses the following formula (12) to determine the third loss parameter.
[0266] L = L target +α*L aux ; Formula (12)
[0267] Where L represents the third loss parameter, L target L represents the first loss parameter. aux This represents the second loss parameter. α represents the weighting coefficient.
[0268] The method provided in this application, for any historical moment, mines the degree to which the interest of the previous historical moment is retained in this historical moment based on the historical resource characteristics of this historical moment and the interest characteristics of the previous historical moment. Then, it mines the interest characteristics of this historical moment based on the retention degree of this historical moment, the interest characteristics of the previous historical moment, and the historical resource characteristics of this historical moment, and so on. Thus, the interest of each historical moment mined retains the interest of previous historical moments to a certain extent, thereby capturing the evolution of the object's interest over time, significantly improving the interest capture ability, recommendation accuracy, and generalization ability of the resource recommendation model.
[0269] Furthermore, by introducing positive and negative sample resource features, the resource recommendation model can better distinguish the feature differences between positive and negative samples, thereby differentiating between object preferences and non-preferences, which helps improve the accuracy of the resource recommendation model.
[0270] The resource recommendation method provided in this application can be applied to scenarios where any type of resource is recommended. Taking the scenario of recommending game items as an example, the detailed process is as follows. Figure 11 Examples of implementations. Figure 11 This is a flowchart illustrating a virtual item recommendation method provided in this application embodiment. This embodiment is executed by a terminal and a game server. The terminal has a game client installed, and the game server provides background services for the game client. Figure 11 As shown, the method includes the following steps.
[0271] 1101. The game server obtains the item feature sequence and multiple candidate item features of the target account at preset intervals.
[0272] Here, the candidate item feature represents the candidate virtual item to be recommended to the target account. The item feature sequence includes the historical item features of the historical virtual items that the target account interacted with at each of the M time points. The M time points are the time points before the current time point, and M is an integer greater than 1.
[0273] For example, virtual items are items used in a game match.
[0274] 1102. For the i-th time of M time points, the game server determines the first retained feature of the target account at the i-th time point based on the historical item features at the i-th time point and the first interest feature of the target account at the (i-1)-th time point.
[0275] Wherein, the first retention feature at time i represents the degree of retention of interest at time i-1, and the first interest feature at time i-1 represents interest at time i-1, where i is an integer greater than 1 and not greater than M.
[0276] 1103. The game server determines the target account's first interest feature at time i based on the first interest feature at time i-1, the first retention feature at time i, and the historical item feature at time i.
[0277] Here, the first interest feature at time i represents the interest at time i.
[0278] 1104. The game server determines the recommended parameters for multiple candidate virtual items based on the target account's first interest feature and multiple candidate item features at the last time of M time points.
[0279] Among them, the recommendation parameter for candidate virtual items is used to determine whether to recommend candidate virtual items to the target account.
[0280] 1105. The game server determines at least one candidate virtual item whose recommended parameters meet the recommendation conditions as the target virtual item and establishes a correspondence between the target account and at least one target virtual item.
[0281] 1106. In response to the login operation for the game client, the terminal logs in to the target account in the game client and sends an item recommendation request carrying the target account to the game server.
[0282] Figure 12 This is a schematic diagram of a game interface provided in an embodiment of this application, such as... Figure 12 As shown, the terminal responds to the login operation for the game client by displaying the game interface in the game client.
[0283] 1107. In response to the item recommendation request, the game server sends at least one target virtual item corresponding to the target account to the terminal.
[0284] 1108. The terminal receives at least one target virtual item and displays at least one target virtual item in the game client.
[0285] Figure 13 This is a schematic diagram of an item recommendation interface provided in an embodiment of this application, such as... Figure 13 As shown, the terminal displays an item recommendation list 1301 on the item recommendation interface. The item recommendation list 1301 includes multiple target virtual items recommended for the target account, such as items A to G. Optionally, items A to G are displayed in descending order of recommendation parameters.
[0286] In related technologies, it's common practice to acquire users' historical interaction records and utilize the statistical characteristics of various historical interaction resources to recommend virtual items, ignoring the evolution of users' interests in virtual items. However, in real-world scenarios, users' needs for virtual items change over time. These technologies fail to consider the interests users develop during interactions with virtual items and how those interests evolve over time. Therefore, when users' interest in virtual items changes, it's difficult to capture this shift in a timely manner, resulting in recommended virtual items that significantly deviate from the user's needs.
[0287] This application provides a virtual item recommendation scheme based on a deep interest evolution algorithm. It employs deep learning to model the sequence of virtual item interactions from a user's historical interactions, extracting user interests and their evolution. This overcomes the shortcomings of related technologies that cannot promptly uncover user interests and their evolution. Therefore, compared to related technologies, this application can more accurately and efficiently calculate a user's interest in different virtual items at different times, thereby improving the accuracy of virtual item recommendations. For users, this saves time searching for desired virtual items, improves the convenience and efficiency of obtaining virtual items, and enhances the user's gaming experience.
[0288] To verify the recommended effectiveness of the embodiments of this application, a comparative experiment was conducted using the solution of this application and solutions of related technologies. The experimental results are as follows: Figure 14 As shown. In the game client, acquiring virtual items requires spending virtual resources. Figure 14 Taking the virtual resource consumed as Star Diamonds in the game client as an example. Using the solution of this application embodiment to recommend virtual items to users, the average number of Star Diamonds consumed per user within a preset time period is 541.5, and the average number of items purchased per user is 7.39. Using the solution of related technologies to recommend virtual items to users, the average number of Star Diamonds consumed per user within a preset time period is 436.3, and the average number of items purchased per user is 5.61. The method of this application embodiment can significantly increase the average number of Star Diamonds consumed and the average number of items purchased per user. The average number of Star Diamonds consumed per user is increased by 105.2 in absolute terms and 24.1% in relative terms compared to related technologies. The average number of different items purchased per user is increased by 1.78 in absolute terms and 31.7% in relative terms compared to related technologies. Therefore, it can be seen that this application can more accurately recommend desired virtual items to users, thereby promoting user interaction with virtual items.
[0289] Figure 15 This is a schematic diagram of the structure of a resource recommendation device provided in an embodiment of this application. See also... Figure 15 The device includes:
[0290] The first acquisition module 1501 is used to acquire candidate resource features and the resource feature sequence of the object. The candidate resource features represent the candidate resources to be recommended to the object. The resource feature sequence includes the historical resource features of the historical resources that the object interacted with at each of the M time points. The M time points are the time points before the current time point, and M is an integer greater than 1.
[0291] The first determining module 1502 is used to determine the first retention feature of an object at time i based on the historical resource features at time i and the first interest feature of the object at time i-1, for time i among M time moments. The first retention feature at time i represents the degree of retention of the interest at time i-1. The first interest feature at time i-1 represents the interest at time i-1. i is an integer greater than 1 and not greater than M.
[0292] The first determining module 1502 is further configured to determine the first interest feature of the object at time i based on the first interest feature at time i-1, the first retention feature at time i, and the historical resource feature at time i, wherein the first interest feature at time i represents the interest at time i.
[0293] The recommendation parameter determination module 1503 is used to determine the recommendation parameters of the candidate resources based on the first interest feature and candidate resource features of the object at the last time of the M time points. The recommendation parameters are used to determine whether to recommend the candidate resources to the object.
[0294] The resource recommendation device provided in this application embodiment acquires historical resources of historical resources that an object interacts with at multiple historical moments. For any historical moment, based on the historical resource characteristics of that historical moment and the interest characteristics of the previous historical moment, it mines the degree of retention of the interest of the previous historical moment in that historical moment. Then, based on the retention degree of that historical moment, the interest characteristics of the previous historical moment, and the historical resource characteristics of that historical moment, it mines the interest characteristics of that historical moment, and so on. Thus, the interest of each historical moment mined retains the interest of previous historical moments to a certain extent, thereby capturing the evolution of the object's interest over time. Based on the interest characteristics of the last historical moment and the candidate resource characteristics, it determines whether to recommend candidate resources to the object, which can improve the accuracy of resource recommendation.
[0295] Optionally, see Figure 16 The first determining module 1502 is used for:
[0296] The first interest feature at time i-1 is adjusted using the first preserved feature at time i-1 to obtain the first reference interest feature at time i.
[0297] Based on the first reference interest feature at time i and the historical resource feature at time i, the first interest feature at time i is determined.
[0298] Optionally, see Figure 16The first determining module 1502 is further configured to determine the first proportional feature of the object at time i based on the historical resource features at time i and the first interest features of the object at time i-1. The first proportional feature at time i represents the fusion ratio of the interest at time i-1 and the interest at time i at time i.
[0299] The first determining module 1502 is used for:
[0300] Based on the first reference interest feature at time i and the historical resource feature at time i, the first candidate interest feature at time i is determined;
[0301] Based on the first proportional feature at time i, the first interest feature at time i-1 and the first candidate interest feature at time i are fused to obtain the first interest feature at time i.
[0302] Optionally, see Figure 16 The resource recommendation model includes a first gated recurrent network, which includes a first reset gate, a first update gate, a first hidden layer, and a first fusion layer. The network structure of the first reset gate is the same as that of the first update gate, but the model parameters of the first reset gate are different from those of the first update gate.
[0303] The first retained feature is determined by the first reset gate, the first proportional feature is determined by the first update gate, the first candidate interest feature is determined by the first hidden layer, and the first interest feature is determined by the first fusion layer.
[0304] Optionally, see Figure 16 The first determining module 1502 is also used to determine the first retained feature of the object at the first time based on the historical resource features and the first preset interest features of the first time among M time periods;
[0305] The first determining module 1502 is further configured to determine the first interest feature of the object at the first moment based on the first preset interest feature, the first retained feature at the first moment, and the historical resource feature at the first moment.
[0306] Optionally, see Figure 16 The device also includes:
[0307] The second determining module 1504 is used to determine the second retained feature of the object at time i based on the first interest feature at time i and the second interest feature at time i-1.
[0308] The second determining module 1504 is further configured to determine the second interest feature of the object at time i based on the second interest feature at time i-1, the second retained feature at time i, and the first interest feature at time i.
[0309] The recommendation parameter determination module 1503 is used to determine the recommendation parameters of candidate resources based on the second interest feature and candidate resource features of the object at the last time of M time points.
[0310] Optionally, see Figure 16 The second determining module 1504 is used for:
[0311] The second interest feature at time i-1 is adjusted using the second preserved feature at time i-1 to obtain the second reference interest feature at time i.
[0312] Based on the second reference interest feature at time i and the first interest feature at time i, the second interest feature of the object at time i is determined.
[0313] Optionally, see Figure 16 The second determining module 1504 is also used to determine the second proportional feature of the object at time i based on the first interest feature at time i and the second interest feature at time i-1.
[0314] The second determining module 1504 is used for:
[0315] Based on the second reference interest feature and the first interest feature at time i, determine the second candidate interest feature of the object at time i.
[0316] Based on the second proportional feature at time i, the second interest feature at time i-1 and the second candidate interest feature at time i are fused to obtain the second interest feature at time i.
[0317] Optionally, see Figure 16 The device also includes:
[0318] The weight determination module 1505 is used to determine the weight corresponding to each of the M time points based on the first interest features at M time points.
[0319] The second determining module 1504 is used for:
[0320] Using the weights corresponding to time i, the second proportional feature at time i is weighted to obtain the weighted second proportional feature at time i.
[0321] Based on the weighted second proportional feature at time i, the second interest feature at time i-1 and the second candidate interest feature at time i are fused to obtain the second interest feature at time i.
[0322] Optionally, see Figure 16 The weight determination module 1505 is used for:
[0323] Determine the correlation between the primary interest feature and the candidate resource features at each time step;
[0324] For any given time, the weight corresponding to that time is obtained by taking the ratio of the correlation degree at that time to the sum of the correlation degrees at the M times.
[0325] Optionally, see Figure 16 The resource recommendation model includes a second gated recurrent network, which includes a second reset gate, a second update gate, a second hidden layer, and a second fusion layer. The network structure of the second reset gate is the same as that of the second update gate, but the model parameters of the second reset gate are different from those of the second update gate.
[0326] The second retained feature is determined by the second reset gate, the second proportional feature is determined by the second update gate, the second candidate interest feature is determined by the second hidden layer, and the second interest feature is determined by the second fusion layer.
[0327] Optionally, see Figure 16 The second determining module 1504 is also used to determine the second retained feature of the object at the first time based on the first interest feature and the second preset interest feature of the first time among M time times;
[0328] The second determining module 1504 is further configured to determine the second interest feature of the object at the first time based on the second preset interest feature, the second retained feature at the first time, and the first interest feature at the first time.
[0329] Optionally, see Figure 16 The resource recommendation model includes a feature fusion network and a feature mapping network; the recommendation parameter determination module 1503 is used for:
[0330] Obtain association features, which include at least one of the following: object features of an object, interaction features of an object, or historical resource features at M time points;
[0331] By using a feature fusion network, the first interest feature, candidate resource feature, and association feature at the last time step are fused to obtain the target recommendation feature;
[0332] The target recommendation features are mapped to recommendation parameters through a feature mapping network.
[0333] Optionally, see Figure 16 The device also includes a model training module 1506, used for:
[0334] The sample candidate resource features, interaction parameters, and sample resource feature sequence of the sample object are obtained. The sample resource feature sequence includes the sample historical resource features of the sample object interacting with the historical resources at each of the N time points. The sample candidate resource features represent the sample candidate resources recommended to the sample object after N time points. The interaction parameters indicate whether the sample object interacts with the sample candidate resources.
[0335] For the k-th time among N time points, the resource recommendation model determines the first sample retention feature of the sample object at time k based on the sample's historical resource features at time k and the first sample interest features of the sample object at time k-1.
[0336] Using a resource recommendation model, the first sample interest features of a sample object at time k are determined based on the first sample interest features at time k-1, the first sample retention features at time k, and the sample historical resource features at time k.
[0337] Based on the first sample interest features and sample candidate resource features of the sample object at the last time of N time steps using the resource recommendation model, the sample recommendation parameters of the sample candidate resources are determined.
[0338] A resource recommendation model is trained based on sample recommendation parameters and interaction parameters.
[0339] Optionally, see Figure 16 The device also includes:
[0340] The second acquisition module 1507 is used to acquire positive sample resource features and negative sample resource features. Positive sample resource features represent resources recommended to the sample object and interacted with after N time steps, and negative sample resource features represent resources recommended to the sample object and not interacted with after N time steps.
[0341] Model training module 1506 is used for:
[0342] The resource recommendation model is trained based on the sample recommendation parameters and interaction parameters, the first sample interest features and positive sample resource features at the last time step, and the first sample interest features and negative sample resource features at the last time step.
[0343] Optionally, see Figure 16 Model training module 1506 is used for:
[0344] Based on the first similarity between the sample recommendation parameters and the interaction parameters, a first loss parameter is determined, which is negatively correlated with the first similarity.
[0345] A second loss parameter is determined based on the second similarity between the first sample interest features and the positive sample resource features at the last time step, and the third similarity between the first sample interest features and the negative sample resource features at the last time step. The second loss parameter is negatively correlated with the second similarity and positively correlated with the third similarity.
[0346] The resource recommendation model is trained based on the first and second loss parameters.
[0347] It should be noted that the resource recommendation device provided in the above embodiments is only an example of the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the computer device can be divided into different functional modules to complete all or part of the functions described above. In addition, the resource recommendation device and the resource recommendation method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0348] This application also provides a computer device, which includes a processor and a memory. The memory stores at least one computer program, which is loaded and executed by the processor to perform the operations performed in the resource recommendation method of the above embodiments.
[0349] Optionally, the computer device is provided as a terminal. Figure 17 A schematic diagram of the structure of a terminal 1700 provided in an exemplary embodiment of this application is shown.
[0350] Terminal 1700 includes a processor 1701 and a memory 1702.
[0351] Processor 1701 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 1701 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 1701 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 1701 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 1701 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0352] Memory 1702 may include one or more computer-readable storage media, which may be non-transitory. Memory 1702 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 memory 1702 are used to store at least one computer program, which is used by processor 1701 to implement the resource recommendation method provided in the method embodiments of this application.
[0353] In some embodiments, the terminal 1700 may also optionally include: a peripheral device interface 1703 and at least one peripheral device. The processor 1701, memory 1702, and peripheral device interface 1703 can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface 1703 via a bus, signal line, or circuit board. Optionally, the peripheral device includes at least one of: a radio frequency circuit 1704, a display screen 1705, a camera assembly 1706, an audio circuit 1707, and a power supply 1708.
[0354] Peripheral interface 1703 can be used to connect at least one I / O (Input / Output) related peripheral device to processor 1701 and memory 1702. In some embodiments, processor 1701, memory 1702 and peripheral interface 1703 are integrated on the same chip or circuit board; in some other embodiments, any one or two of processor 1701, memory 1702 and peripheral interface 1703 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.
[0355] The radio frequency (RF) circuit 1704 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 1704 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 1704 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals back into electrical signals. Optionally, the RF circuit 1704 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 1704 can communicate with other devices through 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 1704 may also include circuitry related to NFC (Near Field Communication), which is not limited in this application.
[0356] Display screen 1705 is used to display a UI (User Interface). This UI may include graphics, text, icons, videos, and any combination thereof. When display screen 1705 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 1701 for processing. In this case, display screen 1705 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 1705, disposed on the front panel of terminal 1700; in other embodiments, there may be at least two display screens, disposed on different surfaces of terminal 1700 or in a folded design; in still other embodiments, display screen 1705 may be a flexible display screen, disposed on a curved or folded surface of terminal 1700. Furthermore, display screen 1705 may also be configured as a non-rectangular, irregular shape, i.e., a non-rectangular screen. The display screen 1705 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).
[0357] The camera assembly 1706 is used to acquire images or videos. Optionally, the camera assembly 1706 includes a front-facing camera and a rear-facing camera. The front-facing camera is disposed on the front panel of the terminal 1700, and the rear-facing camera is disposed on the back of the terminal 1700. 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 1706 may also include a flash. The flash may 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.
[0358] The audio circuit 1707 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 1701 for processing, or input to the radio frequency circuit 1704 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 1700. The microphone may also be an array microphone or an omnidirectional microphone. The speaker is used to convert electrical signals from the processor 1701 or the radio frequency circuit 1704 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 1707 may also include a headphone jack.
[0359] Power supply 1708 is used to power the various components in terminal 1700. Power supply 1708 can be AC power, DC power, a disposable battery, or a rechargeable battery. When power supply 1708 includes a rechargeable battery, the rechargeable battery can support wired or wireless charging. The rechargeable battery can also be used to support fast charging technology.
[0360] Those skilled in the art will understand that Figure 17 The structure shown does not constitute a limitation on terminal 1700 and may include more or fewer components than shown, or combine certain components, or use different component arrangements.
[0361] Optionally, the computer device is provided as a server. Figure 18 This is a schematic diagram of a server structure provided in an embodiment of this application. The server 1800 can vary significantly due to different configurations or performance. It may include one or more Central Processing Units (CPUs) 1801 and one or more memories 1802. The memories 1802 store at least one computer program, which is loaded and executed by the processor 1801 to implement the methods provided in the above-described method embodiments. Of course, the server may also have wired or wireless network interfaces, a keyboard, and input / output interfaces for input and output. The server may also include other components for implementing device functions, which will not be elaborated upon here.
[0362] This application also provides a computer-readable storage medium storing at least one computer program, which is loaded and executed by a processor to implement the operations performed by the resource recommendation method of the above embodiments.
[0363] This application also provides a computer program product, including a computer program loaded and executed by a processor to perform the operations performed by the resource recommendation method of the above embodiments.
[0364] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0365] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present application should be included within the protection scope of the present application.
Claims
1. A resource recommendation method, characterized in that, The method includes: Obtain candidate resource features and a sequence of resource features of an object. The candidate resource features represent candidate resources to be recommended to the object. The sequence of resource features includes historical resource features of historical resources that the object interacted with at each of M time points, where M time points are time points before the current time point and M is an integer greater than 1. For the i-th time among the M time points, based on the historical resource characteristics of the i-th time point and the first interest characteristics of the object at the (i-1)-th time point, the first retention characteristic of the object at the i-th time point is determined. The first retention characteristic at the i-th time point represents the degree to which the interest at the (i-1)-th time point is retained at the i-th time point. The first interest characteristic at the (i-1)-th time point represents the interest at the (i-1)-th time point, where i is an integer greater than 1 and not greater than M. Based on the first interest feature at time i-1, the first retention feature at time i, and the historical resource feature at time i, the first interest feature of the object at time i is determined, and the first interest feature at time i represents the interest at time i. Based on the object's first interest feature at the last time of the M time points and the candidate resource features, recommendation parameters for the candidate resources are determined, and the recommendation parameters are used to determine whether to recommend the candidate resources to the object.
2. The method according to claim 1, characterized in that, The determination of the object's first interest feature at time i, based on the first interest feature at time i-1, the first retention feature at time i, and the historical resource feature at time i, includes: The first interest feature at time i-1 is adjusted using the first preserved feature at time i-1 to obtain the first reference interest feature at time i. Based on the first reference interest feature at time i and the historical resource feature at time i, the first interest feature at time i is determined.
3. The method according to claim 2, characterized in that, The method further includes: Based on the historical resource characteristics at time i and the first interest characteristics of the object at time i-1, the first proportional characteristic of the object at time i is determined, wherein the first proportional characteristic at time i represents the fusion ratio of the interest at time i-1 and the interest at time i at time i. The determination of the first interest feature at time i based on the first reference interest feature at time i and the historical resource feature at time i includes: Based on the first reference interest feature at time i and the historical resource feature at time i, the first candidate interest feature at time i is determined; Based on the first proportional feature at time i, the first interest feature at time i-1 and the first candidate interest feature at time i are fused to obtain the first interest feature at time i.
4. The method according to claim 3, characterized in that, The method is executed through a resource recommendation model, which includes a first gated recurrent network. The first gated recurrent network includes a first reset gate, a first update gate, a first hidden layer, and a first fusion layer. The network structure of the first reset gate is the same as that of the first update gate, but the model parameters of the first reset gate are different from those of the first update gate. The first retained feature is determined by the first reset gate, the first proportional feature is determined by the first update gate, the first candidate interest feature is determined by the first hidden layer, and the first interest feature is determined by the first fusion layer.
5. The method according to claim 1, characterized in that, The method further includes: Based on the historical resource characteristics and the first preset interest characteristics of the first time point among the M time points, the first retention characteristics of the object at the first time point are determined; Based on the first preset interest feature, the first retention feature at the first moment, and the historical resource feature at the first moment, the first interest feature of the object at the first moment is determined.
6. The method according to claim 1, characterized in that, The step of determining the recommendation parameters of the candidate resources based on the first interest feature of the object at the last time of the M time points and the candidate resource features includes: Based on the first interest feature at time i and the second interest feature at time i-1, the second retained feature of the object at time i is determined; Based on the second interest feature at the (i-1)th time, the second retained feature at the i-th time, and the first interest feature at the i-th time, the second interest feature of the object at the i-th time is determined; Based on the object's second interest feature at the last time of the M time points and the candidate resource features, the recommendation parameters for the candidate resources are determined.
7. The method according to claim 6, characterized in that, The determination of the object's second interest feature at time i, based on the second interest feature at time i-1, the second retained feature at time i, and the first interest feature at time i, includes: The second interest feature at time i-1 is adjusted using the second preserved feature at time i-1 to obtain the second reference interest feature at time i. Based on the second reference interest feature at time i and the first interest feature at time i, the second interest feature of the object at time i is determined.
8. The method according to claim 7, characterized in that, The method further includes: Based on the first interest feature at time i and the second interest feature at time i-1, the second proportional feature of the object at time i is determined; Determining the second interest feature of the object at time i based on the second reference interest feature at time i and the first interest feature at time i includes: Based on the second reference interest feature at time i and the first interest feature at time i, the second candidate interest feature of the object at time i is determined; Based on the second proportional feature at time i, the second interest feature at time i-1 and the second candidate interest feature at time i are fused to obtain the second interest feature at time i.
9. The method according to claim 8, characterized in that, The method further includes: Based on the first interest features at the M time points, determine the weight corresponding to each of the M time points; The process of fusing the second interest feature at time i-1 and the second candidate interest feature at time i to obtain the second interest feature at time i includes: Using the weights corresponding to the i-th time, the second proportional feature at the i-th time is weighted to obtain the weighted second proportional feature at the i-th time; Based on the weighted second proportional feature at time i, the second interest feature at time i-1 and the second candidate interest feature at time i are fused to obtain the second interest feature at time i.
10. The method according to claim 9, characterized in that, The step of determining the weight corresponding to each of the M time points based on the first interest features at the M time points includes: Determine the correlation between the first interest feature at each time step and the candidate resource feature; For any given moment, determine the ratio of the correlation degree corresponding to that moment to the sum of the correlation degrees corresponding to the M moments, and obtain the weight corresponding to that moment.
11. The method according to claim 8, characterized in that, The method is executed through a resource recommendation model, which includes a second gated recurrent network. The second gated recurrent network includes a second reset gate, a second update gate, a second hidden layer, and a second fusion layer. The network structure of the second reset gate is the same as that of the second update gate, but the model parameters of the second reset gate are different from those of the second update gate. The second retained feature is determined by the second reset gate, the second proportional feature is determined by the second update gate, the second candidate interest feature is determined by the second hidden layer, and the second interest feature is determined by the second fusion layer.
12. The method according to claim 6, characterized in that, The method further includes: Based on the first interest feature and the second preset interest feature of the object at the first time of the M time points, the second retained feature of the object at the first time point is determined. Based on the second preset interest feature, the second retained feature at the first time, and the first interest feature at the first time, the second interest feature of the object at the first time is determined.
13. The method according to claim 1, characterized in that, The method is executed through a resource recommendation model, which includes a feature fusion network and a feature mapping network; the step of determining the recommendation parameters of the candidate resources based on the first interest feature of the object at the last time step of the M time steps and the candidate resource features includes: Obtain association features, wherein the association features include at least one of the object features of the object, the interaction features of the object, or the historical resource features at the M time points; The target recommendation features are obtained by fusing the first interest features, the candidate resource features, and the association features at the last time step through the feature fusion network. The target recommendation features are mapped to the recommendation parameters through the feature mapping network.
14. The method according to any one of claims 1 to 13, characterized in that, The method is executed through a resource recommendation model, the training process of which includes: The sample candidate resource features, interaction parameters, and sample resource feature sequence of the sample object are obtained. The sample resource feature sequence includes the sample historical resource features of the historical resources interacted by the sample object at each of the N time points. The sample candidate resource features represent the sample candidate resources recommended to the sample object after the N time points. The interaction parameters indicate whether the sample object interacts with the sample candidate resources. For the k-th time among the N time points, the resource recommendation model determines the first sample retention feature of the sample object at the k-th time point based on the sample historical resource features at the k-th time point and the first sample interest features of the sample object at the (k-1)-th time point. Based on the resource recommendation model, the first sample interest feature of the sample object at time k is determined at time k, the first sample retention feature at time k is determined, and the sample historical resource feature at time k is determined. Based on the first sample interest features of the sample object at the last time of the N time points and the sample candidate resource features, the sample recommendation parameters of the sample candidate resource are determined by the resource recommendation model. The resource recommendation model is trained based on the sample recommendation parameters and the interaction parameters.
15. The method according to claim 14, characterized in that, The method further includes: Obtain positive sample resource features and negative sample resource features. The positive sample resource features represent resources recommended to the sample object and interacted with after the N time points, and the negative sample resource features represent resources recommended to the sample object and not interacted with after the N time points. The step of training the resource recommendation model based on the sample recommendation parameters and the interaction parameters includes: The resource recommendation model is trained based on the sample recommendation parameters and the interaction parameters, the first sample interest features and the positive sample resource features at the last moment, and the first sample interest features and the negative sample resource features at the last moment.
16. The method according to claim 15, characterized in that, The step of training the resource recommendation model based on the sample recommendation parameters and the interaction parameters, the first sample interest features and the positive sample resource features at the last time step, and the first sample interest features and the negative sample resource features at the last time step includes: Based on the first similarity between the sample recommendation parameters and the interaction parameters, a first loss parameter is determined, wherein the first loss parameter is negatively correlated with the first similarity. A second loss parameter is determined based on the second similarity between the first sample interest feature and the positive sample resource feature at the last time step, and the third similarity between the first sample interest feature and the negative sample resource feature at the last time step. The second loss parameter is negatively correlated with the second similarity and positively correlated with the third similarity. The resource recommendation model is trained based on the first loss parameter and the second loss parameter.
17. A resource recommendation device, characterized in that, The device includes: The first acquisition module is used to acquire candidate resource features and a resource feature sequence of an object. The candidate resource features represent candidate resources to be recommended to the object. The resource feature sequence includes historical resource features of historical resources that the object interacted with at each of M time points. The M time points are the time points before the current time point, and M is an integer greater than 1. The first determining module is used to determine, for the i-th time among the M time points, the first retention feature of the object at the i-th time point based on the historical resource features at the i-th time point and the first interest feature of the object at the (i-1)-th time point. The first retention feature at the i-th time point represents the degree to which the interest at the (i-1)-th time point is retained at the i-th time point. The first interest feature at the (i-1)-th time point represents the interest at the (i-1)-th time point, where i is an integer greater than 1 and not greater than M. The first determining module is further configured to determine the first interest feature of the object at the i-th time based on the first interest feature at the (i-1)-th time, the first retention feature at the i-th time, and the historical resource feature at the i-th time, wherein the first interest feature at the i-th time represents the interest at the i-th time; The recommendation parameter determination module is used to determine the recommendation parameters of the candidate resource based on the first interest feature of the object at the last time of the M time points and the candidate resource features. The recommendation parameters are used to determine whether to recommend the candidate resource to the object.
18. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing at least one computer program, which is loaded and executed by the processor to perform the operations of the resource recommendation method as described in any one of claims 1 to 16.
19. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one computer program, which is loaded and executed by a processor to perform the operations of the resource recommendation method as described in any one of claims 1 to 16.
20. A computer program product, comprising a computer program, characterized in that, The computer program is loaded and executed by a processor to perform the operations of the resource recommendation method as described in any one of claims 1 to 16.