Media resource recommendation method, device, server and storage medium
By obtaining the historical behavioral data of the target account and performing layered screening to determine the target information corresponding to each candidate media resource, the problem of difficulty in recommending content that meets the user's recent interests in existing technologies is solved, and accurate media resource recommendations are achieved.
Patent Information
- Application Number
- CN202111601736.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-24
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2041-12-24
AI Technical Summary
Existing technologies have difficulty in effectively recommending media resources that match users' recent interests, resulting in poor recommendation results.
By obtaining the historical behavior data of the target account, the first information and the second information are determined, and based on each candidate media resource and the first information, the second information is hierarchically screened to determine the target information corresponding to each candidate media resource, and finally multiple candidate media resources are recommended to the target account.
It enables accurate recommendations based on users’ recent interests, improving the accuracy of media resource recommendations and user satisfaction.
Smart Images

Figure CN114461849B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing technology, and in particular to a media resource recommendation method, device, server, and storage medium. Background Art
[0002] A user's historical behavior data contains all of their interests. Based on this data, the server can recommend short videos of interest to the user. However, over time, a user's interests may change, and a short video they previously enjoyed may no longer be of interest. In this case, the short video recommendations may not meet the user's interests. Therefore, recommending short videos that match the user's recent interests has become a hot topic in this field. Summary of the Invention
[0003] The present disclosure provides a media resource recommendation method, device, server, and storage medium, which can recommend media resources that meet the user's recent interests to the user.
[0004] The technical solutions disclosed in this disclosure are as follows:
[0005] According to a first aspect of the present disclosure, a method for recommending media resources is provided, the method comprising:
[0006] Obtaining a media resource request, the media resource request including a target identifier, the media resource request being used to request a media resource recommendation for a target account corresponding to the target identifier;
[0007] Acquire multiple candidate media resources according to the target identifier;
[0008] determining first information and second information based on the historical behavior data of the target account, wherein the first information includes information about media resources operated by the target account within a first preset time period, and the second information includes information about media resources operated by the target account within a second preset time period, wherein the second preset time period is longer than the first preset time period;
[0009] Based on each candidate media resource and the first information, the second information is hierarchically screened to determine target information corresponding to each candidate media resource;
[0010] The plurality of candidate media resources are recommended to the target account based on each candidate media resource and target information corresponding to each candidate media resource.
[0011] Optionally, based on each candidate media resource and the first information, performing hierarchical screening on the second information to determine target information corresponding to each candidate media resource includes:
[0012] determining a target type according to the media resource in the first information, where the target type is the same as or similar to the type of the media resource in the first information;
[0013] Determine respectively in the second information a first media resource of the same type as each candidate media resource, and obtain third information corresponding to each candidate media resource;
[0014] The second media resource of the same target type as that of the target is determined in the third information corresponding to each candidate media resource, and the target information corresponding to each candidate media resource is obtained.
[0015] Optionally, recommending the plurality of candidate media resources to the target account based on each candidate media resource and target information corresponding to each candidate media resource includes:
[0016] Inputting each candidate media resource and the target information corresponding to the candidate media resource into the media resource recommendation model, and outputting the recommendation degree corresponding to each candidate media resource, where the recommendation degree corresponding to each candidate media resource is used to indicate the target account's interest in the candidate media resource;
[0017] sorting the plurality of candidate media resources based on a recommendation degree corresponding to each candidate media resource;
[0018] Based on the ranking result, the plurality of candidate media resources are recommended to the target account.
[0019] Optionally, determining the target type according to the media resource in the first information includes:
[0020] Dividing the media resources of the same type included in the first information into a resource set to obtain multiple resource sets, where each resource set corresponds to one candidate type;
[0021] determining a first type according to the multiple resource sets, where the first type is used to indicate a type of media resource that the target account is interested in in the first information;
[0022] The target type is determined, the target type including the first type.
[0023] Optionally, determining the first type according to the multiple resource sets includes:
[0024] Obtaining the number of media resources in each resource set, and determining the candidate type corresponding to the resource set whose number is greater than a preset value as the first type;
[0025] or,
[0026] The multiple resource sets are sorted from largest to smallest according to the number of media resources, and candidate types corresponding to the first K resource sets after sorting are determined as the first type, where K is a positive integer.
[0027] Optionally, determining the first type according to the multiple resource sets includes:
[0028] Get the center embedding vector corresponding to the candidate type of each resource set;
[0029] Determine the average vector of multiple center embedding vectors;
[0030] The types corresponding to K central embedding vectors close to the average vector are determined as the first type, where K is a positive integer.
[0031] Optionally, determining the first type according to the multiple resource sets includes:
[0032] Using a hierarchical clustering approach, similar types among the candidate types corresponding to the multiple resource sets are merged to obtain multiple merged types;
[0033] Obtain the number of media resources in each merge type, and determine the type with a number greater than a preset value as the first type, or sort the merge types from large to small according to the number of media resources, and determine the first K merge types after sorting as the first type, where K is a positive integer.
[0034] Optionally, the method further includes:
[0035] determining a second type according to the media resource in the first information, where the second type is used to indicate the type of the media resource in which the target account has a change of interest in the second information;
[0036] The determining of the target type includes:
[0037] The first type and the second type are determined as the target types.
[0038] Optionally, determining the second type according to the media resource in the first information includes:
[0039] sorting the media resources in the first information according to the order of operation times, and dividing the sorted media resources into first window resources and second window resources, wherein the operation times of the media resources included in the first window resources are earlier than the operation times of the media resources included in the second window resources;
[0040] Dividing the media resources of the same type in the first window resources into a set to obtain multiple first sets, where each first set corresponds to one first window type;
[0041] Dividing the media resources of the same type in the second window resources into a set to obtain multiple second sets, where each second set corresponds to one second window type;
[0042] Based on the first window type and the second window type, the second type is determined.
[0043] Optionally, determining the second type based on the first window type and the second window type includes:
[0044] Acquire the same overlapping type between the first window type and the second window type;
[0045] Determining the newly added number of media resources of each second window type and the same first window type in the overlapping type;
[0046] The overlapping types corresponding to the largest K new numbers among all the new numbers are determined as the second type.
[0047] Optionally, determining the second type based on the first window type and the second window type includes:
[0048] Merging the first window types by using a hierarchical clustering method to obtain a first merged type;
[0049] Merging the second window types by using the hierarchical clustering method to obtain a second merged type;
[0050] Obtain the same overlapping type in the first merge type and the second merge type;
[0051] Determining the newly added number of media resources of each second merge type and the same first merge type in the overlapping type;
[0052] The overlapping types corresponding to the largest K new numbers among all the new numbers are determined as the second type.
[0053] Optionally, determining, in the third information corresponding to each candidate media resource, a second media resource of the same type as the target, includes:
[0054] For each candidate media resource in the third information corresponding to the candidate media resource, determine whether the type of each media resource is the same as the target type in descending order of the operation time. If they are the same, the media resource is the second media resource, until the number of the determined second media resources is equal to the preset number;
[0055] If the determined number of the second media resources is less than the preset number, determine the proximity type of the target type, and continue to determine the second media resources in the third information corresponding to the candidate media resource based on the proximity type until the number of the second media resources is equal to the preset number.
[0056] Optionally, determining whether the type of each media resource is the same as the target type one by one includes:
[0057] For each target type, perform the following steps: 1. Determine whether the type of each media resource is the same as the target type;
[0058] or,
[0059] Sort the number of media resources corresponding to each target type in descending order; starting from the first sorted target type, perform the following steps: determine one by one whether the type of each media resource is the same as the target type.
[0060] Optionally, determining the first information and the second information based on the historical behavior data of the target account includes:
[0061] Obtaining, based on the historical behavior data of the target account, an operation type of the target account operating the media resource;
[0062] A first sequence and a second sequence corresponding to each operation type are determined, where the first information includes the first sequence corresponding to each operation type, and the second information includes the second sequence corresponding to each operation type.
[0063] Optionally, determining a first media resource of the same type as each candidate media resource in the second information, and obtaining third information corresponding to each candidate media resource, includes:
[0064] Based on the type of each candidate media resource, determining the first media resource in each second sequence respectively, to obtain a third sequence corresponding to each operation type;
[0065] The third information is determined according to a third sequence corresponding to each operation type.
[0066] Optionally, the method further includes:
[0067] If the number of first media resources included in the third sequence does not meet the preset condition, obtaining a close type of each candidate media resource based on the center embedding vector corresponding to the type of the candidate media resource, and determining the first media resource in each second sequence based on the close type of each type, to obtain a corresponding fourth sequence, until the number of first media resources meets the preset condition;
[0068] The determining the third information according to the third sequence corresponding to each operation type includes:
[0069] The third information is determined according to the third sequence corresponding to each operation type and the fourth sequence.
[0070] Optionally, the preset condition includes that the number of first media resources included in all third sequences is greater than a preset number;
[0071] or,
[0072] The preset condition includes that the number of first media resources included in each third sequence is greater than a preset number.
[0073] According to a second aspect of the present disclosure, a recommendation model construction is provided, including:
[0074] an acquiring unit configured to execute a media resource acquisition request, the media resource request including a target identifier, the media resource request being used to request a media resource recommendation for a target account corresponding to the target identifier; and acquire a plurality of candidate media resources based on the target identifier;
[0075] a determining unit configured to determine first information and second information based on the historical behavior data of the target account, wherein the first information includes information about media resources operated by the target account within a first preset time period, and the second information includes information about media resources operated by the target account within a second preset time period, wherein the second preset time period is longer than the first preset time period; and perform hierarchical screening on the second information based on each candidate media resource and the first information to determine target information corresponding to each candidate media resource;
[0076] The recommendation unit is configured to recommend the plurality of candidate media resources to the target account based on each candidate media resource and target information corresponding to each candidate media resource.
[0077] Optionally, the determination unit is specifically configured to perform:
[0078] determining a target type according to the media resource in the first information, where the target type is the same as or similar to the type of the media resource in the first information;
[0079] Determine respectively in the second information a first media resource of the same type as each candidate media resource, and obtain third information corresponding to each candidate media resource;
[0080] The second media resource of the same target type as that of the target is determined in the third information corresponding to each candidate media resource, and the target information corresponding to each candidate media resource is obtained.
[0081] Optionally, it is recommended that the unit be specifically configured to perform:
[0082] Inputting each candidate media resource and the target information corresponding to the candidate media resource into the media resource recommendation model, and outputting the recommendation degree corresponding to each candidate media resource, where the recommendation degree corresponding to each candidate media resource is used to indicate the target account's interest in the candidate media resource;
[0083] sorting the plurality of candidate media resources based on a recommendation degree corresponding to each candidate media resource;
[0084] Based on the ranking result, the plurality of candidate media resources are recommended to the target account.
[0085] Optionally, the determination unit is specifically configured to perform:
[0086] Dividing the media resources of the same type included in the first information into a resource set to obtain multiple resource sets, where each resource set corresponds to one candidate type;
[0087] determining a first type according to the multiple resource sets, where the first type is used to indicate a type of media resource that the target account is interested in in the first information;
[0088] The target type is determined, the target type including the first type.
[0089] Optionally, the determination unit is specifically configured to perform:
[0090] Obtaining the number of media resources in each resource set, and determining the candidate type corresponding to the resource set whose number is greater than a preset value as the first type;
[0091] or,
[0092] The multiple resource sets are sorted from largest to smallest according to the number of media resources, and candidate types corresponding to the first K resource sets after sorting are determined as the first type, where K is a positive integer.
[0093] Optionally, the determination unit is specifically configured to perform:
[0094] Get the center embedding vector corresponding to the candidate type of each resource set;
[0095] Determine the average vector of multiple center embedding vectors;
[0096] The types corresponding to K central embedding vectors close to the average vector are determined as the first type, where K is a positive integer.
[0097] Optionally, the determination unit is specifically configured to perform:
[0098] Using a hierarchical clustering approach, similar types among the candidate types corresponding to the multiple resource sets are merged to obtain multiple merged types;
[0099] Obtain the number of media resources in each merge type, and determine the type with a number greater than a preset value as the first type, or sort the merge types from large to small according to the number of media resources, and determine the first K merge types after sorting as the first type, where K is a positive integer.
[0100] Optionally, the determining unit is further configured to perform: determining a second type according to the media resource in the first information, where the second type is used to indicate a type of the media resource in which the target account has a change of interest in the second information;
[0101] The determining unit is specifically configured to determine the first type and the second type as the target type.
[0102] Optionally, the determination unit is specifically configured to perform:
[0103] sorting the media resources in the first information according to the order of operation times, and dividing the sorted media resources into first window resources and second window resources, wherein the operation times of the media resources included in the first window resources are earlier than the operation times of the media resources included in the second window resources;
[0104] Dividing the media resources of the same type in the first window resources into a set to obtain multiple first sets, where each first set corresponds to one first window type;
[0105] Dividing the media resources of the same type in the second window resources into a set to obtain multiple second sets, where each second set corresponds to one second window type;
[0106] Based on the first window type and the second window type, the second type is determined.
[0107] Optionally, the determination unit is specifically configured to perform:
[0108] Acquire the same overlapping type between the first window type and the second window type;
[0109] Determining the newly added number of media resources of each second window type and the same first window type in the overlapping type;
[0110] The overlapping types corresponding to the largest K new numbers among all the new numbers are determined as the second type.
[0111] Optionally, the determination unit is specifically configured to perform:
[0112] Merging the first window types by using a hierarchical clustering method to obtain a first merged type;
[0113] Merging the second window types by using the hierarchical clustering method to obtain a second merged type;
[0114] Obtain the same overlapping type in the first merge type and the second merge type;
[0115] Determining the newly added number of media resources of each second merge type and the same first merge type in the overlapping type;
[0116] The overlapping types corresponding to the largest K new numbers among all the new numbers are determined as the second type.
[0117] Optionally, the determination unit is specifically configured to perform:
[0118] For each candidate media resource in the third information corresponding to the candidate media resource, determine whether the type of each media resource is the same as the target type in descending order of the operation time. If they are the same, the media resource is the second media resource, until the number of the determined second media resources is equal to the preset number;
[0119] If the determined number of the second media resources is less than the preset number, determine the proximity type of the target type, and continue to determine the second media resources in the third information corresponding to the candidate media resource based on the proximity type until the number of the second media resources is equal to the preset number.
[0120] Optionally, the determination unit is specifically configured to perform:
[0121] For each target type, perform the following steps: 1. Determine whether the type of each media resource is the same as the target type;
[0122] or,
[0123] Sort the number of media resources corresponding to each target type in descending order; starting from the first sorted target type, perform the following steps: determine one by one whether the type of each media resource is the same as the target type.
[0124] Optionally, the determination unit is specifically configured to perform:
[0125] Obtaining, based on the historical behavior data of the target account, an operation type of the target account operating the media resource;
[0126] A first sequence and a second sequence corresponding to each operation type are determined, where the first information includes the first sequence corresponding to each operation type, and the second information includes the second sequence corresponding to each operation type.
[0127] Optionally, the determination unit is specifically configured to perform:
[0128] Based on the type of each candidate media resource, determining the first media resource in each second sequence respectively, to obtain a third sequence corresponding to each operation type;
[0129] The third information is determined according to a third sequence corresponding to each operation type.
[0130] Optionally, the determining unit is further configured to: if the number of first media resources included in the third sequence does not meet a preset condition, obtain a proximity type of each candidate media resource based on a center embedding vector corresponding to the type of the resource, and determine the first media resource in each second sequence based on the proximity type of each type, to obtain a corresponding fourth sequence, until the number of first media resources meets the preset condition;
[0131] The determining unit is specifically configured to determine the third information according to the third sequence and the fourth sequence corresponding to each operation type.
[0132] Optionally, the preset condition includes that the number of first media resources included in all first behavior sequences is greater than a preset number;
[0133] or,
[0134] The preset condition includes that the number of first media resources included in each first behavior sequence is greater than a preset number.
[0135] According to a third aspect of the present disclosure, a server is provided, the server comprising:
[0136] processor;
[0137] A memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement any one of the optional media resource recommendation methods in the first aspect above.
[0138] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which instructions are stored. When the instructions in the computer-readable storage medium are executed by a processor of a server, the server is enabled to execute any one of the optional media resource recommendation methods in the above-mentioned first aspect.
[0139] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising instructions, which, when executed on a server, enable the server to execute any one of the optional media resource recommendation methods in the first aspect.
[0140] The technical solution provided by this disclosure provides at least the following beneficial effects: After receiving a media resource request and multiple candidate media resources and determining first information and second information, the media resource recommendation device can perform hierarchical screening of the second information based on each candidate media resource and the first information to determine target information corresponding to each candidate media resource. The media resource recommendation device can then recommend multiple candidate media resources to a target account based on each candidate media resource and the target information corresponding to each candidate media resource.
[0141] In this way, the first information includes the media resources recently used by the target account. The media resource recommendation device performs hierarchical screening on the second information to obtain target information corresponding to each candidate media resource. This ensures that the media resources included in the filtered target information are not only of the same type as the candidate media resources but also match the user's recent interests. As a result, the media resource recommendation device, based on the candidate media resources and the corresponding target information, recommends media resources to the target account that match the target account's recent interests.
[0142] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0143] The accompanying drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute an improper limitation of the present disclosure.
[0144] Figure 1 The figure is a schematic diagram showing a media resource recommendation system according to an exemplary embodiment.
[0145] Figure 2 This is one of the flow charts of a method for recommending media resources according to an exemplary embodiment.
[0146] Figure 3 This is a second flowchart of a method for recommending media resources according to an exemplary embodiment.
[0147] Figure 4 This is a third flowchart of a method for recommending media resources according to an exemplary embodiment.
[0148] Figure 5 The figure is a logical structure diagram of a recommendation model constructed according to an exemplary embodiment.
[0149] Figure 6 The figure is a structural block diagram of a server according to an exemplary embodiment. DETAILED DESCRIPTION
[0150] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
[0151] It should be noted that the embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0152] It should be noted that the user information involved in the embodiments of the present disclosure (including but not limited to user device information, user personal information, etc.) is all information authorized by the user or fully authorized by all parties.
[0153] The media resource recommendation method provided in the embodiments of the present disclosure can be applied to a scenario where a server recommends media resources to a target account using a terminal device. The media resources can be videos, short videos, audio, documents, etc., and the embodiments of the present disclosure do not limit this.
[0154] In related technologies, when a user launches a video application installed on a terminal device, the terminal device can send a refresh request to a server. After receiving the refresh request, the server can obtain a set of videos to be sorted based on the target identifier included in the refresh request. The server can then use a click-through-rate (CTR) model and all historical behavior data corresponding to the target identifier to build a model, and sort the videos included in the set of videos to be sorted based on the constructed model. The server then returns the sorted set of videos to the terminal device, so that the terminal device can display the sorted videos for the user to watch.
[0155] However, as time goes by, users' interests may change. In this case, when using the video recommendation model to recommend videos to users, it may not meet the users' interests.
[0156] To recommend media resources that match a user's recent interests, embodiments of the present disclosure provide a media resource recommendation method. By performing hierarchical screening on second information to obtain target information corresponding to each candidate media resource, the media resources included in the filtered target information are not only of the same type as the candidate media resources but also match the user's recent interests. Consequently, the media resource recommendation device, based on the candidate media resources and the corresponding target information, recommends media resources to a target account that match the target account's recent interests.
[0157] Figure 1 FIG. 1 is a schematic diagram of a media resource recommendation system according to an exemplary embodiment. The media resource recommendation method provided by the embodiment of the present disclosure can be applied to the media resource recommendation system. Figure 1 As shown, the media resource recommendation system may include: a terminal device 101 and a server 102. The terminal device 101 communicates with the server 102 via a wired communication method or a wireless communication method.
[0158] Terminal device 101 has a media resource application installed that provides users with services such as searching and displaying media resources. Furthermore, users can perform various operations on media resources in the media resource application, such as clicking, liking, commenting, and forwarding. These media resources can include videos, short videos, audio, documents, and more.
[0159] In some embodiments, the terminal device 101 can be a mobile phone, a tablet computer, a desktop, a laptop, a handheld computer, a notebook computer, a vehicle-mounted device, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, etc. Figure 1 In the figure, the terminal device 101 is taken as a mobile phone as an example.
[0160] The server 102 is configured to provide services for the media resource applications installed in the terminal device 101. In the embodiment of the present disclosure, the server 102 is configured to recommend media resources that meet the user's interests to the media resource applications when the user refreshes the media resource applications through the terminal device 101.
[0161] In some embodiments, the server 102 may be a single server, a server cluster consisting of multiple servers, or a cloud computing platform, which is not limited in the embodiments of the present disclosure. Figure 1 A server is used as an example.
[0162] Of course, the media resource recommendation method provided by the embodiment of the present disclosure can also be applied to Figure 1 The present invention may be applied to other systems other than the above, or may be applied to a scenario including only a server, which is not limited in the embodiments of the present disclosure.
[0163] Figure 2 FIG. 1 is a flow chart showing a method for recommending media resources according to an exemplary embodiment. Figure 2As shown, the method may include the following steps 201-205.
[0164] 201. The server obtains a media resource request.
[0165] The media resource request may include a target identifier, and the media resource request is used to request recommendation of media resources for a target account corresponding to the target identifier.
[0166] It is understood that the target identifier can be an account identifier of a media resource application or a device identifier, as long as it can uniquely identify a user. The account identifier can be a login account identifier of a media resource application, such as an account nickname. The device identifier can be a device model information, etc.
[0167] For example, in one scenario of an embodiment of the present disclosure, when a user launches a media application installed on a terminal device, the terminal device may send a refresh request to a server, which is a media resource request. After receiving the refresh request, the server may obtain a target identifier in the refresh request.
[0168] 202. The server obtains multiple candidate media resources according to the target identifier.
[0169] After obtaining the target identifier in the media resource request, the server can retrieve multiple candidate media resources based on the target identifier. These candidate media resources are the media resources to be sorted, and the media resources that the user is interested in should be placed at the top of the list. The top-ranked media resources can be displayed on the terminal device for the user to watch.
[0170] Optionally, in an embodiment of the present disclosure, after acquiring the target identifier, the server may perform a rough screening of data in a stored media resource library based on the target identifier to obtain a plurality of candidate media resources.
[0171] 203. The server determines the first information and the second information based on the historical behavior data of the target account.
[0172] After obtaining the target identifier, the server may obtain the target account corresponding to the target identifier and all historical behavior data of the target account, and determine first information and second information based on the all historical behavior data. The first information includes information about media resources operated by the target account within a first preset time period, and the second information includes information about media resources operated by the target account within a second preset time period, where the second preset time period is longer than the first preset time period.
[0173] It is understood that the aforementioned second information may include information about all media resources operated by the target account since the target account was registered, that is, the second information is the target account's lifetime behavior information. The first information may include information about the target account's recent media resource operations. For example, the first information may include information about a preset number of media resources recently operated by the target account. That is, starting from the current moment, the preset number of media resources are obtained in chronological order from recent to recent, thereby obtaining the first information. For another example, the first information may include information about all media resources operated by the target account within a preset market period before the current moment.
[0174] Optionally, in an embodiment of the present disclosure, the server may obtain the target account's operation type for operating media resources based on all historical behavior data of the target account, and determine a first sequence and a second sequence corresponding to each operation type. The first information may include the first sequence corresponding to each operation type, and the second information may include the second sequence corresponding to each operation type.
[0175] For example, assuming that the server obtains, based on the target account's entire historical behavior data, the types of media resource operations performed by the target account, including click operations, like operations, and forwarding operations, the server then determines the first information to include a first click sequence, a first like sequence, and a first forwarding sequence, and the second information to include a second click sequence, a second like sequence, and a second forwarding sequence.
[0176] It's understandable that the second sequence is very long, longer than the first. Sequences are created by arranging user behavior information in chronological order. The behavior sequence corresponding to a particular action type includes all media resources from the target account performing that action. For example, if the action type is a "like" action, the second "like" sequence corresponding to the "like" action includes all media resources from the target account performing that action.
[0177] In addition, the first sequence or second sequence corresponding to each operation type may include sequences of different dimensions for each operation type. For example, assuming that the media resource is a video, the first sequence may include: a video identification sequence of the 50 videos recently watched by the target account, a video author identification sequence of the 50 videos recently watched by the target account, a video duration sequence of the 50 videos recently watched by the target account, and a video length sequence consisting of the duration between the viewing moment and the current moment of each of the 50 videos recently watched by the target account. Similarly, the second sequence may also include the above sequences, which will not be repeated here.
[0178] 204. The server performs hierarchical screening on the second information based on each candidate media resource and the first information to determine target information corresponding to each candidate media resource.
[0179] Optionally, in an embodiment of the present disclosure, the server may determine a target type based on the media resources in the first information, and determine a first media resource of the same type as each candidate media resource in the second information to obtain third information corresponding to each candidate media resource, and determine a second media resource of the same type as the target in the third information corresponding to each candidate media resource to obtain target information corresponding to each candidate media resource. The target type is the same as or similar to the type of the media resource in the first information.
[0180] 205. The server recommends multiple candidate media resources to the target account based on each candidate media resource and the target information corresponding to each candidate media resource.
[0181] The technical solution provided by the above embodiment provides at least the following beneficial effects: After receiving a media resource request and multiple candidate media resources and determining the first information and the second information, the media resource recommendation device can perform hierarchical screening of the second information based on each candidate media resource and the first information to determine the target information corresponding to each candidate media resource. The media resource recommendation device can then recommend multiple candidate media resources to the target account based on each candidate media resource and the target information corresponding to each candidate media resource.
[0182] In this way, the first information includes the media resources recently used by the target account. The media resource recommendation device performs hierarchical screening on the second information to obtain target information corresponding to each candidate media resource. This ensures that the media resources included in the filtered target information are not only of the same type as the candidate media resources but also match the user's recent interests. As a result, the media resource recommendation device, based on the candidate media resources and the corresponding target information, recommends media resources to the target account that match the target account's recent interests.
[0183] Optionally, in the embodiment of the present disclosure, Figure 2 ,like Figure 3 As shown, the above step 204 can be specifically implemented through the following steps 206 to 208.
[0184] 206. The server determines the target type according to the media resources in the first information.
[0185] The target type is the same as or similar to the type of media resource in the first information. The target type refers to the type of media resource that the user has recently been interested in. As a possible implementation, the user's recent interest points can be absolute interest or relative interest. As another possible implementation, the user's interest points can include absolute interest and relative interest. Absolute interest refers to the type of media resource that the target account is interested in in the first information. Relative interest refers to the type of media resource in which the target account has changed its interest in the first information.
[0186] Optionally, in an embodiment of the present disclosure, after determining the first information in step 203, the server can divide the media resources of the first information with the same type into a resource set, that is, divide the media resources with the same cluster identifier into a resource set, and obtain multiple resource sets, one resource set corresponding to one candidate type. And the server can determine the first type based on the multiple resource sets, and the first type is used to indicate the type of media resources that the target account is interested in in the first information, and the first type is used to indicate the absolute interest of the target account. As a possible implementation, the server can determine the first type as the target type. In this way, by determining the recent absolute interest of the target account, preparations are made for the second screening, so as to screen out media resources that meet the user's recent interests, so as to recommend media resources that meet the user's recent interests.
[0187] Further optionally, the server may also determine a second type based on the information of the media resources in the first information, where the second type is used to indicate the type of media resources in which the target account has a change of interest in the first information, that is, the second type is used to indicate the relative interest of the target account. As another possible implementation, the server may determine the first type and the second type as target types. For example, the target account has recently been very interested in certain types of media resources, but due to insufficient delivery and exposure, the target account's needs have not been met. In this case, the number of these types of media resources is not high, but it represents a change in the target account's interest.
[0188] In this way, when considering the absolute interest of the target account, the relative interest of the target account is also considered. By comprehensively integrating the recent interests of the target account, the determined user interests, that is, the target types, can be made more comprehensive and prepared.
[0189] Optionally, in an embodiment of the present disclosure, when the server determines the first type based on multiple resource sets, the server may determine the first type in the following three ways.
[0190] In method 1, the server determines the first type based on simple statistics of the number of different types of media resources.
[0191] The server may obtain the number of media resources in each resource set and determine the candidate types corresponding to resource sets with a number greater than a preset value as the first type. Alternatively, the server may sort the multiple resource sets from largest to smallest according to the number of media resources and determine the candidate types corresponding to the first K resource sets after sorting as the first type, where K is a positive integer.
[0192] In method 2, the server determines the first type based on the central embedding vector.
[0193] The server can obtain the central embedding vector corresponding to the candidate type corresponding to each resource set in multiple resource sets, determine the average vector of the multiple central embedding vectors, and determine the type corresponding to K central embedding vectors close to the average vector as the first type, where K is a positive integer.
[0194] Mode 3: The server determines the first type based on hierarchical clustering.
[0195] The server can use hierarchical clustering to merge similar candidate types corresponding to multiple resource sets to obtain multiple merged types. The server then obtains the number of media resources in each merged type and identifies the type with a greater number than a preset value as the target type. Alternatively, the server can sort the merged types from largest to smallest based on the number of media resources and identify the first K merged types after sorting as the first type, where K is a positive integer.
[0196] This approach 3 clusters the candidate types by adopting a hierarchical clustering approach, which can reduce the degree of type subdivision and increase the number of media resources of the merged type, thereby facilitating the determination of the first type.
[0197] For example, assuming that the media resources in the first information are divided into 1000 resource sets, ie, 1000 candidate types are obtained, by merging the 1000 candidate types into 500 types, the degree of type subdivision is reduced, and the accuracy of the first type is improved.
[0198] It is worth noting that the above-mentioned method 1 can be used when the interests of the target account are relatively concentrated. If there is a clear large number of one or more media resources in multiple resource sets, or the difference between the maximum and minimum numbers of media resources is greater than a preset value, it indicates that the interests of the target account are relatively concentrated. Method 2 or method 3 can be used when the interests of the target account are relatively dispersed. If the fluctuation of the number of media resources in multiple resource sets is not very obvious, or the maximum number of media resources is basically equal to the minimum number, it indicates that the interests of the target account are relatively dispersed.
[0199] Optionally, in an embodiment of the present disclosure, when determining the second type based on the information of the media resources in the first information, the above-mentioned server may specifically sort the media resources in the first information in the order of the operation moments, and divide the sorted media resources into first window resources and second window resources, wherein the operation moments of the media resources included in the first window resources are prior to the operation moments of the media resources included in the second window resources. Afterwards, the server may divide the media resources of the same type in the first window resources into a set to obtain multiple first sets, where one first set corresponds to one first window type, and divide the media resources of the same type in the second window resources into a set to obtain multiple second sets, where one second set corresponds to one second window type, and determine the second type based on the first window type and the second window type.
[0200] For example, assuming the current time is October 1st, the server obtains the first information from the last two days and sorts all the media resources included in the first information in chronological order. In this case, the server can use the sorted media resources operated by the target account on September 29th as the first window resources, and the sorted media resources operated by the target account on September 30th as the second window resources.
[0201] Optionally, in an embodiment of the present disclosure, as a possible implementation, the process of the server determining the second type based on the first window type and the second window type is: the server obtains the same overlapping type in the first window type and the second window type, and determines the newly added number of media resources of each second window type and the same first window type in all overlapping types, and determines the overlapping type corresponding to the largest K new numbers among all new numbers as the second type.
[0202] Optionally, in an embodiment of the present disclosure, as another possible implementation, the process of the server determining the second type based on the first window type and the second window type is as follows: the server can merge the first window type using hierarchical clustering to obtain the first merged type, and merge the second window type using hierarchical clustering to obtain the second merged type. Afterwards, the server can obtain the same overlapping type in the first merged type and the second merged type, and determine the number of new media resources of each second merged type and the same first merged type among all overlapping types, and determine the overlapping type corresponding to the largest K new numbers among all new numbers as the second type. In this way, by merging adjacent types using hierarchical clustering, the degree of type subdivision can be reduced, thereby increasing the overlap rate of window types in the two window resources, thereby better screening out the relative interests of users.
[0203] 207. The server determines, in the second information, a first media resource of the same type as each candidate media resource, and obtains third information corresponding to each candidate media resource.
[0204] Optionally, in an embodiment of the present disclosure, after determining the second sequence corresponding to each operation type, the server can determine the first media resource in the second sequence corresponding to each operation type based on the type of the candidate media resource, obtain the third sequence corresponding to each operation type, and determine the third information based on the third sequence corresponding to each operation type.
[0205] It's worth noting that if the second sequence corresponding to each operation type is just one, the server can directly determine the corresponding third sequence. If the second sequence corresponding to each operation type includes sequences in multiple dimensions, then for example, for the second sequence corresponding to a single operation type, the server only needs to determine the third sequence in the behavior sequence in any one dimension based on the type of the candidate media resource.
[0206] In addition, the type of the media resource is pre-stored in the server, and the cluster identifier can be used to uniquely identify the type of the media resource.
[0207] Optionally, in an embodiment of the present disclosure, a preset condition may be pre-set, wherein the preset condition specifies the number of first media resources included in the third sequence, and the number is generally greater than the number specified by the traditional CTR model.
[0208] If the number of first media resources included in the third sequence does not meet the preset condition, the server can obtain a close type for each candidate media resource based on the central embedding vector corresponding to that type, and determine a first media resource in each second sequence based on the close type of each type, thereby obtaining a corresponding fourth sequence until the number of first media resources meets the preset condition. In this way, a maximum number of first media resources can be obtained for the next level of screening without increasing computational complexity.
[0209] In this case, the server determines the third information according to the third sequence corresponding to each operation type, which may specifically include: the server determines the third information according to the third sequence corresponding to each operation type and the fourth sequence.
[0210] If the number of first media resources included in the third sequence meets the preset condition, the server may determine the first media resource in the second sequence corresponding to each operation type based on the type of the candidate media resources until the number of first media resources meets the preset condition.
[0211] Optionally, in an embodiment of the present disclosure, the preset condition may include that the number of first media resources included in all third sequences is greater than a preset number. Alternatively, the preset condition may include that the number of first media resources included in each third sequence is greater than a corresponding preset number. The present embodiment does not limit the specific content of the preset condition. Diverse implementations of the preset condition can meet the diverse needs of different scenarios, making the screening of first media resources more flexible.
[0212] 208. The server determines, from the third information corresponding to each candidate media resource, a second media resource of the same type as the target, and obtains target information corresponding to each candidate media resource.
[0213] Optionally, in an embodiment of the present disclosure, after determining the third information and determining the target type, the server can determine whether the type of each media resource in the third information corresponding to each candidate media resource is the same as the target type one by one in order from the last operation moment. If different, the media resource is not the second media resource. If the same, the media resource is the second media resource, until the number of determined second media resources is equal to the preset number. If the number of determined second media resources is less than the preset number, the server can determine the close type of the target type based on the center embedding vector of the target type, and continue to determine the second media resource in the third information corresponding to the candidate media resource based on the close type of the target type until the number of second media resources is equal to the preset number.
[0214] It is worth noting that the third information may be a sequence corresponding to each operation type (e.g., a like sequence, a forwarding sequence, a click sequence, etc.) obtained after the first screening of the second information. The target information may be obtained by performing a second screening of the sequences included in the third information. The target information may also include a sequence corresponding to each operation type, each sequence including the filtered second media resource.
[0215] In this way, by using the current time as the starting point and determining the second media resources one by one in chronological order from recent to remote, it is possible to ensure that the user's recent interests are screened out as much as possible. If the number of second media resources does not meet the specified sequence length, the server can relax the conditions and determine the second media resources based on recent interests that are similar.
[0216] Optionally, in an embodiment of the present invention, the server may determine, one by one, whether the type of each media resource is the same as the target type. Specifically, in one implementation, the server may, for each target type, individually determine whether the type of each media resource is the same as the target type. In another implementation, the server may sort the number of media resources of each target type in descending order and, starting with the first target type in the sort, individually determine whether the type of each media resource is the same as the target type.
[0217] Compared to the two methods above, the first method is faster. The second method searches based on the target account's most interested resource type. If the required number of resources is not met, the search continues based on the next most interested resource type until the required number of second media resources is met. This shows that the second method identifies second media resources that are more closely aligned with the user's recent interests.
[0218] The technical solution provided by the above embodiment provides at least the following beneficial effects: the server performs a two-tiered screening of the second information: first, filtering the second information based on the types of candidate media resources to obtain third information, and then performing a secondary screening of the third information based on the target type to obtain target information. The second media resources included in the target information not only clearly align with the types of the candidate media resources but also align with the user's recent interests. Furthermore, the target type considers not only the absolute interests of the target account but also the relative interests of the target account. By comprehensively integrating the recent interests of the target account, the user's interests, i.e., the target type, can be determined more comprehensively and accurately.
[0219] Optionally, in the embodiment of the present disclosure, Figure 3 ,like Figure 4 As shown, the above step 205 can be specifically implemented through the following steps 209 to 211.
[0220] 209. The server inputs each candidate media resource and the target information corresponding to the candidate media resource into the media resource recommendation model, and outputs the recommendation degree corresponding to each candidate media resource.
[0221] The recommendation degree corresponding to each candidate media resource is used to indicate the target account's interest in the candidate media resource.
[0222] Optionally, the above-mentioned media resource recommendation model can be an attention mechanism model, for example, the attention mechanism model can be a deep self-attention network (Transformer) or a multi-head attention network (Multi-head Attention).
[0223] When modeling candidate media resources and their corresponding target information using multi-head attention, a query-key-value (QKV)-based attention approach can be used. A vector containing the candidate media resource's features and other characteristics is used as the query, and the target information corresponding to the candidate media resource is used as the key and value to obtain a characteristic representation of the user behavior sequence. This feature is then combined with other features and passed through a multi-layer perceptron (MLP) to determine the recommendation level of the corresponding candidate media resource.
[0224] 210. The server ranks multiple candidate media resources based on the recommendation degree corresponding to each candidate media resource.
[0225] The above-mentioned sorting result can specifically sort the multiple candidate media resources in descending order of interest, so that the terminal device can display media resources with higher interest, thereby improving user experience.
[0226] 211. The server recommends multiple candidate media resources to the target account based on the ranking result.
[0227] The technical solution provided by the above embodiment brings at least the following beneficial effects: the server determines the recommendation degree of each candidate media resource by utilizing the media resource recommendation model, and sorts multiple candidate media resources in descending order of interest, so that the terminal device displays media resources with higher interest, thereby improving the user experience.
[0228] Figure 5 This is a logical structure diagram of a recommendation model constructed according to an exemplary embodiment. Figure 5 The recommendation model is constructed and applied to the server, and includes: an acquisition unit 51, a determination unit 52 and a recommendation unit 53.
[0229] The acquisition unit 51 is configured to execute a media resource acquisition request, wherein the media resource request includes a target identifier and is used to request a media resource recommendation for a target account corresponding to the target identifier; and acquire a plurality of candidate media resources according to the target identifier;
[0230] The determining unit 52 is configured to determine first information and second information based on the historical behavior data of the target account, wherein the first information includes information about media resources operated by the target account within a first preset time period, and the second information includes information about media resources operated by the target account within a second preset time period, wherein the second preset time period is longer than the first preset time period; and perform hierarchical screening on the second information based on each candidate media resource and the first information to determine target information corresponding to each candidate media resource;
[0231] The recommendation unit 53 is configured to recommend the plurality of candidate media resources to the target account based on each candidate media resource and target information corresponding to each candidate media resource.
[0232] Optionally, the determining unit 52 is specifically configured to execute:
[0233] determining a target type according to the media resource in the first information, where the target type is the same as or similar to the type of the media resource in the first information;
[0234] Determine respectively in the second information a first media resource of the same type as each candidate media resource, and obtain third information corresponding to each candidate media resource;
[0235] The second media resource of the same target type as that of the target is determined in the third information corresponding to each candidate media resource, and the target information corresponding to each candidate media resource is obtained.
[0236] Optionally, the recommendation unit 53 is specifically configured to execute:
[0237] Inputting each candidate media resource and the target information corresponding to the candidate media resource into the media resource recommendation model, and outputting the recommendation degree corresponding to each candidate media resource, where the recommendation degree corresponding to each candidate media resource is used to indicate the target account's interest in the candidate media resource;
[0238] sorting the plurality of candidate media resources based on a recommendation degree corresponding to each candidate media resource;
[0239] Based on the ranking result, the plurality of candidate media resources are recommended to the target account.
[0240] Optionally, the determining unit 52 is specifically configured to execute:
[0241] Dividing the media resources of the same type included in the first information into a resource set to obtain multiple resource sets, where each resource set corresponds to one candidate type;
[0242] determining a first type according to the multiple resource sets, where the first type is used to indicate a type of media resource that the target account is interested in in the first information;
[0243] The target type is determined, the target type including the first type.
[0244] Optionally, the determining unit 52 is specifically configured to execute:
[0245] Obtaining the number of media resources in each resource set, and determining the candidate type corresponding to the resource set whose number is greater than a preset value as the first type;
[0246] or,
[0247] The multiple resource sets are sorted from largest to smallest according to the number of media resources, and candidate types corresponding to the first K resource sets after sorting are determined as the first type, where K is a positive integer.
[0248] Optionally, the determining unit 52 is specifically configured to execute:
[0249] Get the center embedding vector corresponding to the candidate type of each resource set;
[0250] Determine the average vector of multiple center embedding vectors;
[0251] The types corresponding to K central embedding vectors close to the average vector are determined as the first type, where K is a positive integer.
[0252] Optionally, the determining unit 52 is specifically configured to execute:
[0253] Using a hierarchical clustering approach, similar types among the candidate types corresponding to the multiple resource sets are merged to obtain multiple merged types;
[0254] Obtain the number of media resources in each merge type, and determine the type with a number greater than a preset value as the first type, or sort the merge types from large to small according to the number of media resources, and determine the first K merge types after sorting as the first type, where K is a positive integer.
[0255] Optionally, the determining unit 52 is further configured to perform: determining a second type according to the media resource in the first information, where the second type is used to indicate a type of the media resource in which the target account has a change of interest in the second information;
[0256] The determining unit 52 is specifically configured to determine the first type and the second type as the target type.
[0257] Optionally, the determining unit 52 is specifically configured to execute:
[0258] sorting the media resources in the first information according to the order of operation times, and dividing the sorted media resources into first window resources and second window resources, wherein the operation times of the media resources included in the first window resources are earlier than the operation times of the media resources included in the second window resources;
[0259] Dividing the media resources of the same type in the first window resources into a set to obtain multiple first sets, where each first set corresponds to one first window type;
[0260] Dividing the media resources of the same type in the second window resources into a set to obtain multiple second sets, where each second set corresponds to one second window type;
[0261] Based on the first window type and the second window type, the second type is determined.
[0262] Optionally, the determining unit 52 is specifically configured to execute:
[0263] Acquire the same overlapping type between the first window type and the second window type;
[0264] Determining the newly added number of media resources of each second window type and the same first window type in the overlapping type;
[0265] The overlapping types corresponding to the largest K new numbers among all the new numbers are determined as the second type.
[0266] Optionally, the determining unit 52 is specifically configured to execute:
[0267] Merging the first window types by using a hierarchical clustering method to obtain a first merged type;
[0268] Merging the second window types by using the hierarchical clustering method to obtain a second merged type;
[0269] Obtain the same overlapping type in the first merge type and the second merge type;
[0270] Determining the newly added number of media resources of each second merge type and the same first merge type in the overlapping type;
[0271] The overlapping types corresponding to the largest K new numbers among all the new numbers are determined as the second type.
[0272] Optionally, the determining unit 52 is specifically configured to execute:
[0273] For each candidate media resource in the third information corresponding to the candidate media resource, determine whether the type of each media resource is the same as the target type in descending order of the operation time. If they are the same, the media resource is the second media resource, until the number of the determined second media resources is equal to the preset number;
[0274] If the determined number of the second media resources is less than the preset number, determine the proximity type of the target type, and continue to determine the second media resources in the third information corresponding to the candidate media resource based on the proximity type until the number of the second media resources is equal to the preset number.
[0275] Optionally, the determining unit 52 is specifically configured to execute:
[0276] For each target type, perform the following steps: 1. Determine whether the type of each media resource is the same as the target type;
[0277] or,
[0278] Sort the number of media resources corresponding to each target type in descending order; starting from the first sorted target type, perform the following steps: determine one by one whether the type of each media resource is the same as the target type.
[0279] Optionally, the determining unit 52 is specifically configured to execute:
[0280] Based on the type of each candidate media resource, determining the first media resource in each second sequence respectively, to obtain a third sequence corresponding to each operation type;
[0281] The third information is determined according to a third sequence corresponding to each operation type.
[0282] Optionally, the determining unit 52 is further configured to: if the number of first media resources included in the third sequence does not meet a preset condition, obtain a proximity type of each candidate media resource based on the center embedding vector corresponding to the type of the candidate media resource, and determine the first media resource in each second sequence based on the proximity type of each type, to obtain a corresponding fourth sequence, until the number of first media resources meets the preset condition;
[0283] The determining unit 52 is specifically configured to determine the third information according to the third sequence and the fourth sequence corresponding to each operation type.
[0284] Optionally, the preset condition includes that the number of first media resources included in all first behavior sequences is greater than a preset number;
[0285] or,
[0286] The preset condition includes that the number of first media resources included in each first behavior sequence is greater than a preset number.
[0287] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0288] Figure 6 This is a structural block diagram of a server according to an exemplary embodiment, which can be a media resource recommendation device. The server may have relatively large differences due to different configurations or performances, and may include one or more processors 61 and one or more memories 62. Among them, the memory 62 stores at least one instruction, and at least one instruction is loaded and executed by the processor 61 to implement the media resource recommendation method provided by the above-mentioned various method embodiments. Of course, the server may also have components such as a wired or wireless network interface, a keyboard, and an input and output interface for input and output. The server may also include other components for implementing device functions, which will not be described here.
[0289] The present disclosure also provides a computer-readable storage medium including instructions. The computer-readable storage medium stores instructions that, when executed by a computer processor, enable the computer to perform the media resource recommendation method provided in the aforementioned embodiments. For example, the computer-readable storage medium may be a memory 62 including instructions, which may be executed by a server processor 61 to perform the aforementioned method. Alternatively, the computer-readable storage medium may be a ROM, RAM, CD-ROM, magnetic tape, floppy disk, or optical data storage device.
[0290] The present disclosure also provides a computer program product comprising instructions, which, when executed on a server, enables the server to execute the media resource recommendation method provided in the above-mentioned embodiment.
[0291] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the following claims.
[0292] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A media resource recommendation method, characterized in that: include: Obtaining a media resource request, the media resource request including a target identifier, the media resource request being used to request a media resource recommendation for a target account corresponding to the target identifier; Acquire multiple candidate media resources according to the target identifier; determining first information and second information based on the historical behavior data of the target account, wherein the first information includes information about media resources operated by the target account within a first preset time period, and the second information includes information about media resources operated by the target account within a second preset time period, wherein the second preset time period is longer than the first preset time period; Determine a target type based on the media resources in the first information, where the target type is the same as or similar to the type of the media resources in the first information, and the target type includes a first type and a second type, where the first type is used to indicate the type of media resources that the target account is interested in in the first information, and the second type is used to indicate the type of media resources in which the target account has a change of interest in the first information; determine the second type in the following manner: sort the media resources in the first information according to the order of operation time, and divide the sorted media resources into first window resources and second window resources, where the operation time of the media resources included in the first window resources is earlier than the operation time of the media resources included in the second window resources; divide the media resources of the same type in the first window resources into a set to obtain multiple first sets, where each first set corresponds to a first window type; divide the media resources of the same type in the second window resources into a set to obtain multiple second sets, where each second set corresponds to a second window type; obtain the same overlapping type in the first window type and the second window type; determine the number of newly added media resources of each second window type in the overlapping type that have the same first window type; and determine the overlapping type corresponding to the largest K newly added numbers among all the newly added numbers as the second type; Determine respectively in the second information a first media resource of the same type as each candidate media resource, and obtain third information corresponding to each candidate media resource; Determine, from the third information corresponding to each candidate media resource, a second media resource of the same type as the target, and obtain target information corresponding to each candidate media resource; The plurality of candidate media resources are recommended to the target account based on each candidate media resource and target information corresponding to each candidate media resource.
2. The media resource recommendation method according to claim 1, characterized in that: The recommending the plurality of candidate media resources to the target account based on each candidate media resource and target information corresponding to each candidate media resource includes: Inputting each candidate media resource and target information corresponding to the candidate media resource into a media resource recommendation model, and outputting a recommendation degree corresponding to each candidate media resource, wherein the recommendation degree corresponding to each candidate media resource is used to indicate the target account's interest in the candidate media resource; sorting the plurality of candidate media resources based on a recommendation degree corresponding to each candidate media resource; Based on the ranking result, the plurality of candidate media resources are recommended to the target account.
3. The media resource recommendation method according to claim 1, characterized in that: The determining the target type according to the media resources in the first information includes: Dividing the media resources of the same type included in the first information into a resource set to obtain multiple resource sets, where each resource set corresponds to one candidate type; Determining the first type according to the multiple resource sets; The target type is determined, the target type including the first type.
4. The media resource recommendation method according to claim 3, characterized in that: The determining the first type according to the multiple resource sets includes: Obtaining the number of media resources in each resource set, and determining the candidate type corresponding to the resource set whose number is greater than a preset value as the first type; or, The multiple resource sets are sorted from largest to smallest according to the number of media resources, and candidate types corresponding to the first K resource sets after sorting are determined as the first type, where K is a positive integer.
5. The media resource recommendation method according to claim 3, characterized in that: The determining the first type according to the multiple resource sets includes: Get the center embedding vector corresponding to the candidate type of each resource set; Determine the average vector of multiple center embedding vectors; The types corresponding to K central embedding vectors close to the average vector are determined as the first type, where K is a positive integer.
6. The media resource recommendation method according to claim 3, characterized in that: The determining the first type according to the multiple resource sets includes: Using a hierarchical clustering approach, similar types among the candidate types corresponding to the multiple resource sets are merged to obtain multiple merged types; Obtain the number of media resources in each merge type, and determine the type with a number greater than a preset value as the first type, or sort the merge types from large to small according to the number of media resources, and determine the first K merge types after sorting as the first type, where K is a positive integer.
7. The media resource recommendation method according to claim 3, characterized in that: The method further comprises: determining the second type according to the media resources in the first information; The determining of the target type includes: The first type and the second type are determined as the target types.
8. The media resource recommendation method according to claim 1, characterized in that: The determining the second type based on the first window type and the second window type includes: Merging the first window types by using a hierarchical clustering method to obtain a first merged type; Merging the second window types by using the hierarchical clustering method to obtain a second merged type; Obtain the same overlapping type in the first merge type and the second merge type; Determining the newly added number of media resources of each second merge type and the same first merge type in the overlapping type; The overlapping types corresponding to the largest K new numbers among all the new numbers are determined as the second type.
9. The media resource recommendation method according to claim 1, characterized in that: The determining, from the third information corresponding to each candidate media resource, a second media resource of the same type as the target, includes: For each candidate media resource in the third information corresponding to the candidate media resource, determining whether the type of each media resource is the same as the target type in descending order of operation time; if so, the media resource is the second media resource, until the number of determined second media resources is equal to a preset number; If the determined number of the second media resources is less than the preset number, determine the proximity type of the target type, and continue to determine the second media resources in the third information corresponding to the candidate media resource based on the proximity type until the number of the second media resources is equal to the preset number.
10. The media resource recommendation method according to claim 9, characterized in that: Determining one by one whether the type of each media resource is the same as the target type includes: For each target type, respectively performing: determining whether the type of each media resource is the same as the target type; or, The number of media resources corresponding to each target type is sorted in descending order; starting from the first sorted target type, the following steps are performed: determining whether the type of each media resource is the same as the target type one by one.
11. The media resource recommendation method according to claim 1, characterized in that: The determining of the first information and the second information based on the historical behavior data of the target account includes: Obtaining, based on the historical behavior data of the target account, an operation type of the target account operating the media resource; A first sequence and a second sequence corresponding to each operation type are determined, where the first information includes the first sequence corresponding to each operation type, and the second information includes the second sequence corresponding to each operation type.
12. The media resource recommendation method according to claim 11, characterized in that: The determining, in the second information, a first media resource of the same type as each candidate media resource, and obtaining third information corresponding to each candidate media resource includes: Based on the type of each candidate media resource, determining the first media resource in each second sequence respectively, to obtain a third sequence corresponding to each operation type; The third information is determined according to a third sequence corresponding to each operation type.
13. The media resource recommendation method according to claim 12, characterized in that: The method further comprises: If the number of first media resources included in the third sequence does not meet the preset condition, obtaining a close type of the type of each candidate media resource based on the center embedding vector corresponding to the type of the type, and determining the first media resource in each second sequence based on the close type of each type, to obtain a corresponding fourth sequence, until the number of first media resources meets the preset condition; The determining the third information according to the third sequence corresponding to each operation type includes: The third information is determined according to the third sequence corresponding to each operation type and the fourth sequence.
14. The media resource recommendation method according to claim 13, characterized in that: The preset condition includes that the number of first media resources included in all third sequences is greater than a preset number; or, The preset condition includes that the number of first media resources included in each third sequence is greater than a preset number.
15. A media resource recommendation device, characterized in that: include: an acquiring unit configured to execute a media resource acquisition request, wherein the media resource request includes a target identifier, and the media resource request is used to request a media resource to be recommended for a target account corresponding to the target identifier; Acquire multiple candidate media resources according to the target identifier; a determining unit configured to determine first information and second information based on the historical behavior data of the target account, wherein the first information includes information about media resources operated by the target account within a first preset time period, and the second information includes information about media resources operated by the target account within a second preset time period, wherein the second preset time period is longer than the first preset time period; Determining a target type based on the media resources in the first information, where the target type is the same as or similar to the type of the media resources in the first information, and the target type includes a first type and a second type, where the first type is used to indicate the type of media resources that the target account is interested in in the first information, and the second type is used to indicate the type of media resources in which the target account has a change of interest in the first information; Determine respectively in the second information the first media resource of the same type as each candidate media resource, and obtain the third information corresponding to each candidate media resource; determine in the third information corresponding to each candidate media resource the second media resource of the same type as the target, and obtain the target information corresponding to each candidate media resource; the determination unit is further configured to sort the media resources in the first information according to the order of operation time, and divide the sorted media resources into first window resources and second window resources, the operation time of the media resources included in the first window resource is earlier than the operation time of the media resources included in the second window resource; divide the media resources of the same type in the first window resource into a set to obtain multiple first sets, and each first set corresponds to a first window type; divide the media resources of the same type in the second window resource into a set to obtain multiple second sets, and each second set corresponds to a second window type; obtain the same overlapping type in the first window type and the second window type; determine the newly added number of media resources of each second window type with the same first window type in the overlapping type; and determine the overlapping type corresponding to the largest K newly added numbers among all the newly added numbers as the second type; The recommendation unit is configured to recommend the plurality of candidate media resources to the target account based on each candidate media resource and target information corresponding to each candidate media resource.
16. The media resource recommendation device according to claim 15, characterized in that: The recommendation unit, Specifically configured to execute: Inputting each candidate media resource and target information corresponding to the candidate media resource into a media resource recommendation model, and outputting a recommendation degree corresponding to each candidate media resource, wherein the recommendation degree corresponding to each candidate media resource is used to indicate the target account's interest in the candidate media resource; sorting the plurality of candidate media resources based on a recommendation degree corresponding to each candidate media resource; Based on the ranking result, the plurality of candidate media resources are recommended to the target account.
17. The media resource recommendation device according to claim 15, characterized in that: The determining unit is specifically configured to execute: Dividing the media resources of the same type included in the first information into a resource set to obtain multiple resource sets, where each resource set corresponds to one candidate type; Determining the first type according to the multiple resource sets; The target type is determined, the target type including the first type.
18. The media resource recommendation device according to claim 17, characterized in that: The determining unit is specifically configured to execute: Obtaining the number of media resources in each resource set, and determining the candidate type corresponding to the resource set whose number is greater than a preset value as the first type; or, The multiple resource sets are sorted from largest to smallest according to the number of media resources, and candidate types corresponding to the first K resource sets after sorting are determined as the first type, where K is a positive integer.
19. The media resource recommendation device according to claim 17, characterized in that: The determining unit is specifically configured to execute: Get the center embedding vector corresponding to the candidate type of each resource set; Determine the average vector of multiple center embedding vectors; The types corresponding to K central embedding vectors close to the average vector are determined as the first type, where K is a positive integer.
20. The media resource recommendation device according to claim 17, wherein: The determining unit is specifically configured to execute: Using a hierarchical clustering approach, similar types among the candidate types corresponding to the multiple resource sets are merged to obtain multiple merged types; Obtain the number of media resources in each merge type, and determine the type with a number greater than a preset value as the first type, or sort the merge types from large to small according to the number of media resources, and determine the first K merge types after sorting as the first type, where K is a positive integer.
21. The media resource recommendation device according to claim 17, characterized in that: The determining unit is further configured to perform: determining the second type according to the media resources in the first information; The determining unit is specifically configured to determine the first type and the second type as the target type.
22. The media resource recommendation device according to claim 15, characterized in that: The determining unit is specifically configured to execute: Merging the first window types by using a hierarchical clustering method to obtain a first merged type; Merging the second window types by using the hierarchical clustering method to obtain a second merged type; Obtain the same overlapping type in the first merge type and the second merge type; Determining the newly added number of media resources of each second merge type and the same first merge type in the overlapping type; The overlapping types corresponding to the largest K new numbers among all the new numbers are determined as the second type.
23. The media resource recommendation device according to claim 15, characterized in that: The determining unit is specifically configured to execute: For each candidate media resource in the third information corresponding to the candidate media resource, determining whether the type of each media resource is the same as the target type in descending order of operation time; if so, the media resource is the second media resource, until the number of determined second media resources is equal to a preset number; If the determined number of the second media resources is less than the preset number, determine the proximity type of the target type, and continue to determine the second media resources in the third information corresponding to the candidate media resource based on the proximity type until the number of the second media resources is equal to the preset number.
24. The media resource recommendation device according to claim 23, characterized in that: The determining unit is specifically configured to execute: For each target type, respectively performing: determining whether the type of each media resource is the same as the target type; or, The number of media resources corresponding to each target type is sorted in descending order; starting from the first sorted target type, the following steps are performed: determining whether the type of each media resource is the same as the target type one by one.
25. The media resource recommendation device according to claim 15, characterized in that: The determining unit is specifically configured to execute: Obtaining, based on the historical behavior data of the target account, an operation type of the target account operating the media resource; A first sequence and a second sequence corresponding to each operation type are determined, where the first information includes the first sequence corresponding to each operation type, and the second information includes the second sequence corresponding to each operation type.
26. The media resource recommendation device according to claim 25, characterized in that: The determining unit is specifically configured to execute: Based on the type of each candidate media resource, determining the first media resource in each second sequence respectively, to obtain a third sequence corresponding to each operation type; The third information is determined according to a third sequence corresponding to each operation type.
27. The media resource recommendation device according to claim 26, characterized in that: The determining unit is further configured to: if the number of first media resources included in the third sequence does not meet a preset condition, obtain a proximity type of each candidate media resource based on a center embedding vector corresponding to the type of the candidate media resource, and determine the first media resource in each second sequence based on the proximity type of each type, to obtain a corresponding fourth sequence, until the number of first media resources meets the preset condition; The determining unit is specifically configured to determine the third information according to the third sequence and the fourth sequence corresponding to each operation type.
28. The media resource recommendation device according to claim 27, characterized in that: The preset condition includes that the number of first media resources included in all first behavior sequences is greater than a preset number; or, The preset condition includes that the number of first media resources included in each first behavior sequence is greater than a preset number.
29. A server, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the media resource recommendation method according to any one of claims 1 to 14.
30. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor of a server, the server is enabled to execute the media resource recommendation method according to any one of claims 1 to 14.
31. A computer program product comprising computer instructions, characterized in that When the computer instructions are executed by a processor, the media resource recommendation method according to any one of claims 1 to 14 is implemented.
Citation Information
Patent Citations
Media content recommendation method and device, electronic equipment and storage medium
CN113704510A