Media content recommendation method and apparatus, electronic device, and storage medium
By integrating the similarity between accounts and media content, and using the influence features in the newly added behavioral data to train the recommendation model, the problem of insufficient recommendation accuracy was solved, and more accurate media content recommendations were achieved.
Patent Information
- Application Number
- CN202111481105.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-06
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2042-01-23
AI Technical Summary
Existing recommendation models lack accuracy and are difficult to improve when based on interactions between accounts and media content.
By acquiring object features from the recommendation model, fusing the similarity between accounts and media content, and using the influence features and propagation loss from newly added behavioral data to train the model, the accuracy of the recommendation model is enhanced.
This improves the accuracy of the recommendation model, ensuring that the media content recommended to user accounts better matches their interests and needs.
Smart Images

Figure CN114154068B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of computer, and particularly relates to a media content recommendation method and device, electronic equipment and storage medium. BACKGROUND
[0002] With the development of the Internet and the wide application of recommendation technology, recommending media content to an account based on a recommendation model has become a common recommendation method. The recommendation model usually recommends based on the features of the account and the features of the media content. The features are obtained by training the recommendation model based on behavior information. The behavior information includes at least one piece of behavior data, and each piece of behavior data can represent an interaction behavior between a media content and an account, such as a behavior of displaying the media content based on the account or a behavior of forwarding the media content based on the account. The recommendation model can determine the features of each media content and each account according to at least one piece of behavior data.
[0003] However, how to improve the recommendation accuracy of the recommendation model based on new interaction behaviors between the account and the media content has become a problem to be solved. SUMMARY
[0004] The present disclosure provides a media content recommendation method, device, electronic equipment and storage medium, which improves the recommendation accuracy.
[0005] According to an aspect of an embodiment of the present disclosure, a media content recommendation method is provided, and the method comprises:
[0006] obtaining a recommendation model, wherein the recommendation model comprises object features of a plurality of objects, and the plurality of objects comprises user accounts and media content;
[0007] determining a similarity between a first user account and a first media content based on an account feature of the first user account and a content feature of the first media content, wherein the first user account is any one of the user accounts, and the first media content is any one of the media content;
[0008] determining to recommend the first media content to the first user account based on the similarity;
[0009] wherein the plurality of objects comprises a first object and a second object, the first object is an object in new behavior data, the second object is an object related to the first object, the recommendation model is trained based on a propagation loss negatively related to a first similarity, the first similarity is determined based on a similarity between an influence feature of the second object and an object feature of the second object, and the influence feature represents a feature of the second object under an influence of an interaction behavior corresponding to the new behavior data.
[0010] In some embodiments, the account features include first memory features and second memory features of the first user account, the first memory features representing long-term features of the first user account, and the second memory features representing short-term features of the first user account; and the content features include first memory features and second memory features of the first media content, the first memory features of the first media content representing long-term features of the first media content, and the second memory features of the first media content representing short-term features of the first media content.
[0011] The determining of the similarity between the first user account and the first media content based on the account features of the first user account and the content features of the first media content includes:
[0012] The first memory features and the second memory features of the first user account are fused to obtain fused features of the first user account, and the first memory features and the second memory features of the first media content are fused to obtain fused features of the first media content.
[0013] The similarity between the fused features of the first user account and the fused features of the first media content is determined.
[0014] In some embodiments, the account features further include context features of the first user account, the context features representing features of the first user account under the influence of other objects.
[0015] The fusing of the first memory features and the second memory features of the first user account to obtain the fused features of the first user account includes:
[0016] The first memory features, the second memory features, and the context features of the first user account are fused to obtain the fused features of the first user account.
[0017] According to still another aspect of the embodiments of the present disclosure, a recommendation model processing method is provided, which includes:
[0018] Obtaining first behavior information, the first behavior information including newly added behavior data and historical behavior data, the newly added behavior data being used to represent an interaction behavior between two first objects belonging to different types, the types including accounts and media contents, and the historical behavior data being historical behavior data corresponding to a second object related to any of the first objects;
[0019] Obtaining a recommendation model, the recommendation model including first features of a plurality of objects, the plurality of objects including the two first objects and at least one second object in the historical behavior data;
[0020] For each of the first objects, an influence feature of the second object is determined based on a first feature of the first object and an interaction time difference of the second object related to the first object, wherein the influence feature of any of the second object represents a feature of the second object under an influence of an interaction behavior corresponding to the new behavior data, and the interaction time difference of the second object is a time difference between an occurrence time of the new behavior data and an occurrence time of historical behavior data to which the second object belongs.
[0021] The recommendation model is trained based on a propagation loss negatively related to a first similarity, wherein the first similarity is determined based on a similarity between the influence feature of each of the second object and a first feature of each of the second object, and the trained recommendation model comprises the second features of the plurality of objects, and the trained recommendation model is used for making a recommendation based on the second features of the plurality of objects.
[0022] In some embodiments, the determination of the influence feature of the second object based on the first feature of the first object and the interaction time difference of the second object related to the first object comprises:
[0023] For each of the first objects, a first feature of the first object is decayed based on an interaction time difference of the first object to obtain an interaction feature of the first object, wherein the interaction time difference of the first object is a time difference between an occurrence time of the new behavior data and an occurrence time of historical behavior data to which the first object belongs.
[0024] The influence feature of the second object related to the first object is determined based on the interaction feature of the first object and an interaction time difference of the second object belonging to the same historical behavior data as the first object.
[0025] The influence feature of another second object is determined based on the influence feature of the second object and an interaction time difference of the other second object belonging to the same historical behavior data as the second object, until the influence feature of each of the second objects related to the first object in the first behavior information is determined.
[0026] In some embodiments, the determination of the influence feature of the second object related to the first object based on the interaction feature of the first object and the interaction time difference of the second object belonging to the same historical behavior data as the first object comprises:
[0027] In a case where the interaction time difference is not greater than a time difference threshold, a first attenuation parameter negatively related to the interaction time difference is determined, and an interaction feature of the first object is attenuated according to the first attenuation parameter to obtain an influence feature of the second object; or
[0028] In a case where the interaction time difference is greater than the time difference threshold, a preset influence feature is determined as the influence feature of the second object.
[0029] In some embodiments, the first behavior information includes at least two object nodes belonging to different node types and edges connected between any two object nodes, the node types including an account type and a media content type; wherein the at least two object nodes include two first object nodes belonging to different types and a second object node directly or indirectly connected to any of the first object nodes;
[0030] The two first object nodes and the first edges connected between the two first object nodes constitute the new behavior data;
[0031] The first object nodes and the second object nodes belonging to different types and the second edges connected between the first object nodes and the second object nodes constitute a piece of historical behavior data, and / or the second object nodes belonging to different types and the third edges connected between any two second object nodes constitute a piece of historical behavior data;
[0032] The determination of the influence feature of the second object for each first object based on the first feature of the first object and the interaction time difference of the second object related to the first object includes:
[0033] For each first object node, a first feature of the first object node is attenuated based on an interaction time difference of the first object node to obtain an interaction feature of the first object node, the interaction time difference of the first object node being a time difference between an occurrence time of the first edge and an occurrence time of a second edge connected to the first object node;
[0034] The determination of the influence feature of the second object node based on the interaction feature of the first object node and the interaction time difference of the second object node directly connected to the first object node includes:
[0035] The determination of the influence feature of another second object node based on the influence feature of the second object node and the interaction time difference of another second object node directly connected to the second object node is continued until the influence feature of each second object node directly or indirectly connected to any first object node in the first behavior information is determined.
[0036] In some embodiments, the method further comprises:
[0037] For each of the first objects, based on an interaction time difference of the first object, attenuating a first feature of the first object to obtain an attenuated feature, the attenuated feature representing a feature of the first feature of the first object after attenuation under an influence of an interaction behavior corresponding to the new behavior data, the interaction time difference of the first object being a time difference between an occurrence time of the new behavior data and an occurrence time of historical behavior data to which the first object belongs;
[0038] Based on the attenuated features of the two first objects, determining an interaction loss negatively correlated with a second similarity, the second similarity being a similarity between the attenuated features of the two first objects;
[0039] The training of the recommendation model based on the propagation loss negatively correlated with the first similarity comprises:
[0040] Training the recommendation model based on the propagation loss negatively correlated with the first similarity and the interaction loss.
[0041] In some embodiments, the first feature of the first object comprises a first memory feature and a second memory feature, the first memory feature representing a long-term feature of the first object, and the second memory feature representing a short-term feature of the first object; and the attenuation of the first feature of the first object based on the interaction time difference of the first object to obtain the attenuated feature comprises:
[0042] Attenuating the second memory feature of the first object based on the interaction time difference of the first object;
[0043] Fusing the first memory feature of the first object and the attenuated second memory feature to obtain the attenuated feature of the first object.
[0044] In some embodiments, the attenuation of the second memory feature of the first object based on the interaction time difference of the first object comprises:
[0045] Determining a second attenuation parameter based on the interaction time difference of the first object and a learning parameter corresponding to a type of the first object;
[0046] Attenuating the second memory feature based on the second attenuation parameter.
[0047] In some embodiments, the first feature of the first object further includes a contextual feature, which characterizes the features of the first object under the influence of other objects; fusing the first memory feature of the first object with the decayed second memory feature to obtain the decayed feature of the first object includes:
[0048] The first memory feature, the attenuated second memory feature, and the context feature of the first object are weighted and fused to obtain the attenuated feature of the first object.
[0049] In some embodiments, the context features of the first object include the context features of the first object for multiple interaction types, and the newly added behavior data includes the target interaction type corresponding to the interaction behavior;
[0050] The weighted fusion of the first memory feature, the attenuated second memory feature, and the context feature of the first object to obtain the attenuated feature of the first object includes:
[0051] From the context features of the first object for multiple interaction types, determine the context features corresponding to the target interaction type;
[0052] The first memory feature of the first object, the attenuated second memory feature, and the context feature corresponding to the target interaction type are weighted and fused to obtain the attenuated feature of the first object.
[0053] In some embodiments, the recommendation model further includes model parameters, and training the recommendation model based on the propagation loss negatively correlated with the first similarity and the interaction loss includes:
[0054] The propagation loss negatively correlated with the first similarity and the interaction loss are fused to obtain the model loss of the recommendation model;
[0055] Based on the model loss, the model parameters and the first features of the multiple objects in the recommendation model are updated to obtain the trained recommendation model.
[0056] In some embodiments, the method further includes:
[0057] From the second behavior information, a third object corresponding to each first object is determined. The second behavior information includes the newly added behavior data and multiple historical behavior data. The third object is any other object in the second behavior information besides the first object.
[0058] A negative sampling loss is determined that is negatively correlated with the third similarity, which is determined based on the similarity between the interaction features of the first object and the context features of the third object, wherein the context features characterize the features of the third object under the influence of other objects;
[0059] The training of the recommendation model based on the propagation loss negatively correlated with the first similarity includes:
[0060] The recommendation model is trained based on the propagation loss negatively correlated with the first similarity and the negative sampling loss.
[0061] In some embodiments, the method further includes:
[0062] From the second behavior information, a third object corresponding to each first object is determined. The second behavior information includes the newly added behavior data and multiple historical behavior data. The third object is any other object in the second behavior information besides the first object.
[0063] A negative sampling loss is determined that is negatively correlated with the third similarity, which is determined based on the similarity between the interaction features of the first object and the context features of the third object, wherein the context features characterize the features of the third object under the influence of other objects;
[0064] The step of training the recommendation model based on the propagation loss negatively correlated with the first similarity and the interaction loss includes:
[0065] The recommendation model is trained based on the propagation loss negatively correlated with the first similarity, the interaction loss, and the negative sampling loss.
[0066] In some embodiments, obtaining the first behavioral information includes:
[0067] Based on the two first objects in the newly added behavior data, the second behavior information is sampled to obtain the first behavior information, which includes the newly added behavior data and multiple historical behavior data.
[0068] In some embodiments, sampling the second behavior information according to the two first objects in the newly added behavior data to obtain the first behavior information includes:
[0069] Obtain a set of sampling methods, wherein the set of sampling methods includes multiple sampling methods;
[0070] From the set of sampling methods, determine the sampling method for each of the first objects;
[0071] For each of the first objects, starting from the first object, sampling is performed in the second behavior information according to the determined sampling method, and the sampled historical behavior data and the newly added behavior data constitute the first behavior information.
[0072] In some embodiments, the first feature of the second object includes a context feature, the context feature characterizing the features of the second object under the influence of other objects; the method further includes:
[0073] Determine the similarity between the influence features and context features of each of the second objects;
[0074] The similarity of the at least one second object is fused to obtain the first similarity.
[0075] In some embodiments, before acquiring the new behavior data, the method further includes:
[0076] Multiple sample behavior data are obtained, and each sample behavior data is used to represent the interaction behavior between two sample objects of different types;
[0077] The multiple sample behavior data are divided into multiple sample sets according to the order of their occurrence from oldest to most recent, and each sample set contains the same number of sample behavior data.
[0078] The recommendation model is trained sequentially based on the multiple sample sets.
[0079] According to another aspect of the present disclosure, a media content recommendation device is provided, the device comprising:
[0080] The first acquisition unit is configured to execute the acquisition of a recommendation model, the recommendation model including object features of multiple objects, the multiple objects including user accounts and media content;
[0081] The first determining unit is configured to perform an operation based on the account characteristics of a first user account and the content characteristics of a first media content to determine the similarity between the first user account and the first media content, wherein the first user account is any one of the user accounts and the first media content is any one of the media content.
[0082] The recommendation unit is configured to perform the task of recommending the first media content to the first user account based on the similarity.
[0083] The plurality of objects include a first object and a second object. The first object is an object in the newly added behavioral data, and the second object is an object related to the first object. The recommendation model is trained based on a propagation loss that is negatively correlated with a first similarity. The first similarity is determined based on the similarity between the influence features of the second object and the object features of the second object. The influence features characterize the features of the second object under the influence of the interaction behavior corresponding to the newly added behavioral data.
[0084] In some embodiments, the account features include a first memory feature and a second memory feature of the first user account, wherein the first memory feature represents the long-term features of the first user account and the second memory feature represents the short-term features of the first user account; the content features include a first memory feature and a second memory feature of the first media content, wherein the first memory feature represents the long-term features of the first media content and the second memory feature represents the short-term features of the first media content.
[0085] The first determining unit is configured to perform the following operations: fusing the first memory feature and the second memory feature of the first user account to obtain the fused feature of the first user account; fusing the first memory feature and the second memory feature of the first media content to obtain the fused feature of the first media content; and determining the similarity between the fused feature of the first user account and the fused feature of the first media content.
[0086] In some embodiments, the account features further include contextual features of the first user account, which characterize the features of the first user account under the influence of other objects;
[0087] The first determining unit is configured to perform a fusion of the first memory feature, the second memory feature, and the context feature of the first user account to obtain a fused feature of the first user account.
[0088] According to another aspect of the present disclosure, a recommendation model processing apparatus is provided, the apparatus comprising:
[0089] The second acquisition unit is configured to acquire first behavior information, which includes new behavior data and historical behavior data. The new behavior data is used to represent the interaction behavior between two first objects of different types, including accounts and media content. The historical behavior data is the historical behavior data corresponding to a second object related to any of the first objects.
[0090] The third acquisition unit is configured to acquire a recommendation model, the recommendation model including first features of multiple objects, the multiple objects including the two first objects and at least one second object in the historical behavior data;
[0091] The second determining unit is configured to perform, for each first object, determine the influence feature of the second object based on a first feature of the first object and the interaction time difference of the second object related to the first object. The influence feature of any second object characterizes the feature of the second object under the influence of the interaction behavior corresponding to the new behavior data. The interaction time difference of the second object is the time difference between the occurrence time of the new behavior data and the occurrence time of the historical behavior data to which the second object belongs.
[0092] The training unit is configured to train the recommendation model by performing a propagation loss negatively correlated with a first similarity, the first similarity being determined based on the similarity between the influence features of each second object and the first features of each second object, the trained recommendation model including the second features of the plurality of objects, and the trained recommendation model being used to make recommendations based on the second features of the plurality of objects.
[0093] In some embodiments, the second determining unit is configured to perform, for each first object, attenuate a first feature of the first object based on the interaction time difference of the first object to obtain the interaction feature of the first object, wherein the interaction time difference of the first object is the time difference between the occurrence time of the newly added behavioral data and the occurrence time of the historical behavioral data to which the first object belongs.
[0094] Based on the interaction characteristics of the first object and the interaction time difference of the second object that belongs to the same historical behavior data as the first object, the influence characteristics of the second object related to the first object are determined.
[0095] Based on the influence characteristics of the second object and the interaction time difference of another second object belonging to the same historical behavior data as the second object, the influence characteristics of another second object are determined until the influence characteristics of each second object related to the first object in the first behavior information are determined.
[0096] In some embodiments, the second determining unit is configured to, when the interaction time difference is not greater than a time difference threshold, determine a first attenuation parameter negatively correlated with the interaction time difference, attenuate the interaction features of the first object according to the first attenuation parameter, and obtain the influence features of the second object; or...
[0097] The second determining unit is configured to determine a preset influence feature as the influence feature of the second object when the interaction time difference is greater than the time difference threshold.
[0098] In some embodiments, the first behavioral information includes at least two object nodes belonging to different node types and an edge connecting any two object nodes, wherein the node types include account type and media content type; wherein the at least two object nodes include two first object nodes belonging to different types and a second object node directly or indirectly connected to either of the first object nodes;
[0099] The two first object nodes and the first edge connecting the two first object nodes constitute the newly added behavior data;
[0100] A first object node and a second object node of different types, as well as the second side connecting the first object node and the second object node, constitute a historical behavior data, and / or, any two second object nodes of different types, as well as the third side connecting any two second object nodes, constitute a historical behavior data.
[0101] The second determining unit is configured to perform, for each first object node, attenuate the first feature of the first object node based on the interaction time difference of the first object node to obtain the interaction feature of the first object node, wherein the interaction time difference of the first object node is the time difference between the occurrence time of the first edge and the occurrence time of the second edge connected to the first object node.
[0102] Based on the interaction characteristics of the first object node and the interaction time difference of the second object node directly connected to the first object node, the influence characteristics of the second object node are determined.
[0103] Based on the influence characteristics of the second object node and the interaction time difference of another second object node directly connected to the second object node, the influence characteristics of another second object node are determined until the influence characteristics of each second object node directly or indirectly connected to any first object node in the first behavior information are determined.
[0104] In some embodiments, the apparatus further includes:
[0105] The third determining unit is configured to perform, for each first object, attenuate the first feature of the first object based on the interaction time difference of the first object to obtain the attenuated feature. The attenuated feature represents the feature of the first feature of the first object after attenuation under the influence of the interaction behavior corresponding to the new behavior data. The interaction time difference of the first object is the time difference between the occurrence time of the new behavior data and the occurrence time of the historical behavior data to which the first object belongs.
[0106] Based on the decay characteristics of the two first objects, an interaction loss negatively correlated with the second similarity is determined, where the second similarity is the similarity between the decay characteristics of the two first objects.
[0107] The training unit is configured to train the recommendation model based on the propagation loss negatively correlated with the first similarity and the interaction loss.
[0108] In some embodiments, the first feature of the first object includes a first memory feature and a second memory feature, wherein the first memory feature represents the long-term features of the first object and the second memory feature represents the short-term features of the first object; the third determining unit is configured to perform attenuation of the second memory feature of the first object based on the interaction time difference of the first object; and to fuse the first memory feature of the first object with the attenuated second memory feature to obtain the attenuated feature of the first object.
[0109] In some embodiments, the third determining unit is configured to execute learning parameters based on the interaction time difference of the first object and the type of the first object to determine a second decay parameter; and to decay the second memory feature based on the second decay parameter.
[0110] In some embodiments, the first feature of the first object further includes a context feature, which characterizes the features of the first object under the influence of other objects; the third determining unit is configured to perform a weighted fusion of the first memory feature, the attenuated second memory feature, and the context feature of the first object to obtain the attenuated feature of the first object.
[0111] In some embodiments, the context features of the first object include the context features of the first object for multiple interaction types, and the newly added behavior data includes the target interaction type corresponding to the interaction behavior;
[0112] The third determining unit is configured to perform the following: determine the context features corresponding to the target interaction type from the context features of the first object for multiple interaction types; and perform weighted fusion of the first memory features, the attenuated second memory features, and the context features corresponding to the target interaction type of the first object to obtain the attenuated features of the first object.
[0113] In some embodiments, the recommendation model further includes model parameters, and the training unit is configured to perform a process of fusing the propagation loss negatively correlated with the first similarity and the interaction loss to obtain the model loss of the recommendation model; and based on the model loss, to update the model parameters in the recommendation model and the first features of the plurality of objects to obtain the trained recommendation model.
[0114] In some embodiments, the apparatus further includes:
[0115] The fourth determining unit is configured to perform the following actions: determining a third object corresponding to each first object from the second behavioral information, wherein the second behavioral information includes the newly added behavioral data and multiple historical behavioral data, and the third object is any other object in the second behavioral information besides the first object; determining a negative sampling loss that is negatively correlated with a third similarity, wherein the third similarity is determined based on the similarity between the interaction features of the first object and the context features of the third object, and the context features characterize the features of the third object under the influence of other objects;
[0116] The training unit is configured to train the recommendation model based on the propagation loss negatively correlated with the first similarity and the negative sampling loss.
[0117] In some embodiments, the apparatus further includes:
[0118] The fourth determining unit is configured to determine a third object corresponding to each of the first objects from the second behavior information, wherein the second behavior information includes the newly added behavior data and multiple historical behavior data, and the third object is any other object in the second behavior information besides the first object;
[0119] A negative sampling loss is determined that is negatively correlated with the third similarity, which is determined based on the similarity between the interaction features of the first object and the context features of the third object, wherein the context features characterize the features of the third object under the influence of other objects;
[0120] The training unit is configured to train the recommendation model based on the propagation loss negatively correlated with the first similarity, the interaction loss, and the negative sampling loss.
[0121] In some embodiments, the second acquisition unit is configured to sample the second behavior information according to the two first objects in the newly added behavior data to obtain the first behavior information, wherein the second behavior information includes the newly added behavior data and multiple historical behavior data.
[0122] In some embodiments, the second acquisition unit is configured to acquire a set of sampling methods, the set of sampling methods including multiple sampling methods; determine the sampling method for each first object from the set of sampling methods; for each first object, starting from the first object, sample the second behavior information according to the determined sampling method, and combine the sampled historical behavior data with the newly added behavior data to form the first behavior information.
[0123] In some embodiments, the first feature of the second object includes a context feature, the context feature characterizing the features of the second object under the influence of other objects; the apparatus further includes:
[0124] The fifth determining unit is configured to perform the following: determining the similarity between the influence features and context features of each second object; and fusing the similarities of the at least one second object to obtain the first similarity.
[0125] In some embodiments, the apparatus further includes:
[0126] The training unit is further configured to acquire multiple sample behavior data, each of which represents the interaction behavior between two sample objects of different types; divide the multiple sample behavior data into multiple sample sets according to the order of occurrence from earliest to latest, with each sample set containing the same number of sample behavior data; and train the recommendation model sequentially based on the multiple sample sets.
[0127] According to another aspect of the present disclosure, an electronic device is provided, the electronic device comprising:
[0128] One or more processors;
[0129] Memory for storing the one or more processor-executable instructions;
[0130] The one or more processors are configured to execute the media content recommendation method or recommendation model processing method described above.
[0131] According to another aspect of the present disclosure, a computer-readable storage medium is provided, wherein when instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the media content recommendation method or recommendation model processing method described above.
[0132] According to another aspect of the present disclosure, a computer program product is provided, the computer program product including a computer program that is executed by a processor to implement the media content recommendation method or recommendation model processing method described above.
[0133] In this embodiment of the disclosure, the newly added behavioral data represents a new interactive behavior generated by a first object. This interactive behavior will affect a second object related to the first object. By determining the influence features of the second object affected by the interactive behavior corresponding to the newly added behavioral data, the recommendation model trained in this way has higher accuracy in the object features it includes. As a result, the accuracy of the similarity between the first user account and the first media content determined by the recommendation model is also higher, thereby improving the recommendation accuracy of the media content.
[0134] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0135] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0136] Figure 1 This is a schematic diagram illustrating an implementation environment according to an exemplary embodiment.
[0137] Figure 2 This is a flowchart illustrating a recommendation model processing method according to an exemplary embodiment.
[0138] Figure 3 This is a flowchart illustrating a recommendation model processing method according to an exemplary embodiment.
[0139] Figure 4 This is a schematic diagram illustrating the training process of a recommendation model according to an exemplary embodiment.
[0140] Figure 5 This is a flowchart illustrating a recommendation model processing method according to an exemplary embodiment.
[0141] Figure 6 This is a flowchart illustrating a media content recommendation method according to an exemplary embodiment.
[0142] Figure 7 This is a flowchart illustrating a media content recommendation method according to an exemplary embodiment.
[0143] Figure 8 This is a block diagram illustrating a media content recommendation device according to an exemplary embodiment.
[0144] Figure 9 This is a block diagram illustrating a recommendation model processing apparatus according to an exemplary embodiment.
[0145] Figure 10 This is a structural block diagram of a terminal according to an exemplary embodiment.
[0146] Figure 11 This is a structural block diagram of a server according to an exemplary embodiment. Detailed Implementation
[0147] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.
[0148] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0149] It should be noted that the terms "at least one", "multiple", "each", "any", etc., used in this disclosure, "at least one" includes one, two or more, "multiple" includes two or more, "each" refers to each of the corresponding multiple, and "any" refers to any one of the multiple.
[0150] It should be noted that the user data involved in this 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.
[0151] The media content recommendation method provided in this disclosure is executed by an electronic device. Optionally, the electronic device may be a terminal or a server, in which case the media content recommendation method can be implemented by the terminal or the server, or by interaction between the terminal and the server. This disclosure does not limit this aspect. In this disclosure, the media content recommendation method implemented through interaction between a terminal and a server is used as an example for explanation.
[0152] Figure 1 This is a schematic diagram illustrating an implementation environment according to an exemplary embodiment. See also: Figure 1 The implementation environment includes: terminal 110 and server 120. Terminal 110 is connected to server 120 via a wireless network or a wired network.
[0153] Optionally, terminal 110 can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, etc., but is not limited to these. Terminal 110 can refer to one of multiple terminals; this embodiment only uses terminal 110 as an example. Those skilled in the art will understand that the number of terminals can be more or less. In some embodiments, terminal 110 is equipped with a media content display application provided by server 120. Terminal 110 can achieve data interaction with server 120 through this media content display application. This media content display application can be a video application or a music application, etc.
[0154] Optionally, server 120 may be a single server, a server cluster consisting of several servers, or a cloud computing service center. The number of servers 120 may be more or fewer, and this disclosure does not limit this. Of course, server 120 may also include other functional servers to provide more comprehensive and diversified services.
[0155] In this embodiment, a user performs one or more actions on media content on terminal 110. Terminal 110 is logged into an account, thus an interaction occurs between the account and the media content. Terminal 110 obtains the behavior data corresponding to this interaction and sends the behavior data to server 120. Server 102 trains a recommendation model based on the behavior data. Server 120 determines the media content to recommend to the account based on the trained recommendation model. Server 120 sends the media content to the terminal 110 logged into that account, and terminal 110 displays the media content so that the user operating terminal 110 can view it.
[0156] It should be noted that the behavioral data used to train the recommendation model in this embodiment can be uploaded to the server by the terminal or obtained by the server itself, and this embodiment does not limit this.
[0157] After introducing the implementation environment of the embodiments of this disclosure, the application scenarios of the embodiments of this disclosure will be described below in conjunction with the above implementation environment. It should be noted that in the following description, the terminal is the aforementioned terminal 110, and the server is the aforementioned server 120.
[0158] In some embodiments, the method provided by this disclosure can be applied to media content recommendation scenarios. Media content includes videos, images, or audio, etc. Taking short videos as an example, when a user browses a short video through a terminal, the interaction between the account and the short video is recorded as new behavioral data, such as liking, commenting, or forwarding. The server uses the recommendation model processing method provided by this disclosure to train a recommendation model based on this new behavioral data. Subsequently, when recommending content to an account logged in on the terminal, the server uses the media content recommendation method provided by this disclosure to determine the short video recommended for that account based on the trained recommendation model, thereby recommending the short video to the account.
[0159] In other embodiments, the method provided in this disclosure can also be applied to other recommendation scenarios, such as item recommendation scenarios. When a user conducts item transactions through a terminal, the interaction between the account and the item is recorded as new behavioral data, such as transaction behavior, viewing behavior, or collection behavior. The server uses the recommendation model processing method provided in this disclosure to train a recommendation model based on the new behavioral data. Subsequently, when recommending items to an account logged in on the terminal, the server uses the media content recommendation method provided in this disclosure to determine the items recommended for that account based on the trained recommendation model, thereby recommending the item to the account.
[0160] It should be noted that the recommendation model processing method provided in this disclosure can also be applied to other scenarios where models are processed, and this disclosure does not limit this application.
[0161] Figure 2 This is a flowchart illustrating a recommendation model processing method according to an exemplary embodiment, see [link to flowchart]. Figure 2 The method is executed by an electronic device and includes the following steps:
[0162] In step 201, the electronic device acquires first behavior information, which includes new behavior data and historical behavior data. The new behavior data is used to represent the interaction behavior between two first objects of different types, including accounts and media content. The historical behavior data is the historical behavior data corresponding to the second object associated with any of the first objects.
[0163] In some embodiments, a new behavioral data entry is data corresponding to an account's interaction with media content. Historical behavioral data is data corresponding to an account's interaction with media content prior to the generation of the new behavioral data. The historical behavioral data included in the first behavioral information can be considered as historical behavioral data affected by the new behavioral data.
[0164] Optionally, interactive behaviors include liking, forwarding, posting, saving, or commenting. Correspondingly, the types of interactive behaviors are also diverse, including liking, forwarding, posting, saving, and commenting.
[0165] In some embodiments, an account has at least one account type. That is, the account type is at least one of user type and author type. An author account is an account that publishes media content, and a user account is an account that interacts with media content published by other accounts. In this embodiment of the disclosure, since a new behavioral data is generated for an interaction behavior, the account type of the account performing the interaction behavior is unique. For example, if an account publishes media content, then the account is an author account; if an account likes media content, then the account is a user account. That is, the account performing the interaction behavior in a new behavioral data can be either a user account or an author account.
[0166] In step 202, the electronic device acquires a recommendation model, which includes first features of multiple objects, including two first objects and at least one second object from historical behavior data.
[0167] Since an account may have two account types, meaning it possesses two attributes, but each new behavioral data entry pertains to one account type, the recommendation model can process the data separately for author accounts and user accounts. This results in a recommendation model that includes two features for the account: features for the author account and features for the user account, thus distinguishing the characteristics of the same account under different account types. Specifically, the author account features are the characteristics of the account under the author attribute, and the user account features are the characteristics of the account under the user attribute.
[0168] The first feature of an object represents the semantic information of the media content it matches. This semantic information is learned by the recommendation model during training, and may include information such as the type of media content or other relevant details. The first feature of an account represents the semantic information of the media content it matches, and the first feature of the media content represents its semantic information. Matched media content refers to the media content preferred by the account.
[0169] In step 203, for each first object, the electronic device determines the influence characteristics of the second object based on the first characteristics of the first object and the interaction time difference of the second object associated with the first object.
[0170] Among them, the influence feature of any second object represents the characteristics of the second object under the influence of the interaction behavior corresponding to the newly added behavioral data, and the interaction time difference of the second object is the time difference between the occurrence time of the newly added behavioral data and the occurrence time of the historical behavioral data to which the second object belongs.
[0171] In step 204, the electronic device trains the recommendation model based on the propagation loss negatively correlated with the first similarity, whereby the first similarity is determined based on the similarity between the influence features of each second object and the first features of each second object.
[0172] The trained recommendation model includes the second features of multiple objects, and is used to make recommendations based on the second features of multiple objects.
[0173] In this embodiment of the disclosure, after two first objects interact to obtain new behavioral data, the interaction can affect a second object related to the first object. Based on the first feature of the first object and the interaction time difference between the second object and the first object, the influence feature representing the impact of the interaction corresponding to the new behavioral data on the second object can be determined. Furthermore, since the propagation loss is determined based on the first similarity between the influence feature of the second object and the first feature of the second object itself, the recommendation model can learn the influence of the interaction on the second object during training based on the propagation loss. This not only enables training of the recommendation model when a new interaction occurs, but also incorporates the influence of the new behavioral data on the second object during training, thereby greatly improving the training accuracy of the recommendation model.
[0174] In this embodiment of the disclosure, the interaction between the account and the media content is constantly being generated, so new behavioral data is constantly being generated. As a result, the electronic device can update and train the recommendation model based on the new behavioral data and the historical behavioral data affected by the new behavioral data.
[0175] Figure 3 This is a flowchart illustrating a recommendation model processing method according to an exemplary embodiment, see [link to flowchart]. Figure 3 The method is executed by an electronic device. This embodiment of the disclosure takes training a recommendation model based on the first behavior information as an example for illustration. The method includes the following steps:
[0176] In step 301, the electronic device acquires first behavior information, which includes new behavior data and historical behavior data. The new behavior data is used to represent the interaction behavior between two first objects of different types, including accounts and media content. The historical behavior data is the historical behavior data corresponding to the second object associated with any of the first objects.
[0177] For example, a new behavior data entry might be (u, v, r, t), where u is the account, v is the media content, r is the interaction type corresponding to the interaction behavior, and t is the time when the new behavior data occurred. The account can be a user-type account or an author-type account.
[0178] In some embodiments, the first behavioral information includes at least two object nodes belonging to different node types and an edge connecting any two object nodes. The node types include account type and media content type. The at least two object nodes include two first object nodes belonging to different types and a second object node that is directly or indirectly connected to either of the first object nodes.
[0179] Two first object nodes and the first edge connecting the two first object nodes constitute new behavior data; first object nodes and second object nodes of different types and the second edge connecting the first object node and the second object node constitute a piece of historical behavior data, and / or, any two second object nodes of different types and the third edge connecting any two second object nodes constitute a piece of historical behavior data.
[0180] The first set of information is represented as a graph, where each action consists of an edge connecting two object nodes. The edge type represents the interaction type, such as a like or a share. The node types include user and author types, resulting in object nodes comprising author account nodes, user account nodes, and media content nodes. Since there are multiple node types and multiple edge types, the graph corresponding to the first set of information is a heterogeneous graph. Furthermore, a user account can perform multiple interaction actions on the same media content, such as liking and saving. Therefore, there may be multiple edges of different types between two connected object nodes, making the graph a multi-heterogeneous graph. Moreover, since new action data is constantly being generated, the graph is a dynamic multi-heterogeneous graph.
[0181] In the diagram, an account corresponds to at least one of the user node and the author node. Each object node in the diagram has a corresponding feature. Therefore, an account can have one or two features, that is, at least one of the features of the user node and the features of the author node.
[0182] In some embodiments, when the electronic device is a terminal, the terminal acquires newly generated behavioral data and trains a recommendation model based on the newly generated behavioral data and the historical behavioral data corresponding to the second object. Alternatively, when the electronic device is a server, the server acquires newly generated behavioral data with the help of the terminal and trains a recommendation model based on the newly generated behavioral data and the historical behavioral data corresponding to the second object. In this embodiment, the terminal reports its account and media content interaction behaviors to the server, and the server generates the newly generated behavioral data.
[0183] In some embodiments, the electronic device obtains the first behavior information by sampling the second behavior information according to the two first objects in the newly added behavior data to obtain the first behavior information, wherein the second behavior information includes the newly added behavior data and multiple historical behavior data.
[0184] The second behavioral information includes a large amount of behavioral data, while the first behavioral information is a small amount of behavioral data obtained by sampling from two first objects. If the second behavioral information is represented by a dynamic multi-heterogeneous graph, then the first behavioral information is the activation subgraph obtained by sampling the dynamic multi-heterogeneous graph. "Activation" can be understood as the second object being affected by the newly added behavioral data.
[0185] In this embodiment, the first behavior information is obtained by sampling from the second behavior information, which contains a large amount of historical behavior data. Therefore, the recommendation model does not need to be trained based on the second behavior information with a large amount of data every time new behavior data is obtained. Instead, it can be trained based on the first behavior information with a smaller amount of data, which greatly reduces the amount of data required for model training. Moreover, the historical behavior data in the first behavior information is sampled from the two first objects in the new behavior data. It is historical behavior data related to the new behavior data. The subsequent training of the recommendation model based on the new behavior data and these related historical behavior data can fully consider the impact of the new behavior data on the historical behavior data, thereby improving the accuracy of the recommendation model.
[0186] In some embodiments, the electronic device samples the second behavior information according to two first objects in the newly added behavior data to obtain the first behavior information. The implementation method includes: the electronic device obtains a set of sampling methods, which includes multiple sampling methods; from the set of sampling methods, it determines the sampling method for each first object; for each first object, starting from that first object, it samples the second behavior information according to the determined sampling method, and the sampled historical behavior data and the newly added behavior data constitute the first behavior information.
[0187] In this embodiment of the disclosure, the first line information is obtained by sampling from the second line information according to the sampling method corresponding to each first object, so that the sampled first line information is more accurate.
[0188] Optionally, the second row of information is represented by a dynamic multi-heterogeneous graph, and the sampling method set is a meta-path pattern set. The meta-path pattern set includes multiple meta-path patterns, each indicating a meta-path. Each meta-path pattern in the meta-path pattern set can be set as needed, and this disclosure does not limit this. For each first object node connected by the first edge, the electronic device determines at least one meta-path pattern of the first object node from the meta-path pattern set, and sets the number of paths sampled from the first object node, as well as the path length of each path. The path length corresponds to the number of object nodes included in the path; for example, if the path length is 5, then the number of object nodes included in the path is 5.
[0189] Accordingly, for each first object node, the electronic device samples from the dynamic multi-heterogeneous graph corresponding to the second row of information according to the meta-path pattern to obtain the path set corresponding to the first object node, where each path includes at least one edge. Thus, the multiple paths sampled from two first object nodes form an activation subgraph.
[0190] For example, the meta-path pattern set is Meta-path pattern is The path set of account node u in the new edge is Here, account node u has k paths, and each path satisfies a certain pattern in the meta-path pattern set, satisfying the following conditions:
[0191]
[0192] Where, p i φ(p) represents the i-th object node in path p. i ) represents the object node p i Node type, Representation pattern No. The node type of each object node is given by f(i,L) = (i-1)modL) + 1, where mod is the modulo operation. Representation pattern The path length is l, ψ(p) j ,p j+1 ) represents an edge (p) j ,p j+1 The edge type of p j and p j+1 They are respectively the edges (p) j ,p j+1 The two object nodes connected, Representation pattern No. The edge type of each edge.
[0193] It should be noted that since the path length of each path corresponding to the first object node set in advance may not be equal to the path length of the meta path indicated by the meta path pattern, the electronic device can repeat the path in the meta path pattern during the sampling process to make the path length of the meta path pattern long enough.
[0194] For example, electronic devices can set metapath patterns to symmetric form. For asymmetric metapath patterns within the metapath pattern set... n is the number of nodes included in the path. Electronic devices can transform it into a meta-path pattern of the following symmetric form.
[0195]
[0196] It should be noted that after acquiring new behavioral data, before training the recommendation model, the electronic device acquires the first behavioral information. Thus, during the training process of the recommendation model, the pre-sampled first behavioral information can be used in each iteration of the recommendation model training based on the first behavioral information, without the need to resample for each iteration.
[0197] In step 302, the electronic device acquires a recommendation model, which includes first features of multiple objects, including two first objects and at least one second object from historical behavior data.
[0198] Optionally, the first feature can be represented in the form of an embedding vector.
[0199] In some embodiments, the recommendation model is an initial model, i.e., an untrained model. Optionally, the first features of the multiple objects included in the recommendation model acquired by the electronic device are features obtained by the recommendation model through random initialization. Specifically, the electronic device acquires multiple historical behavior data, extracts multiple objects from these historical behavior data, and randomly initializes the features of these multiple objects through the recommendation model to obtain the first features of the multiple objects.
[0200] In other embodiments, the recommendation model is a pre-trained model. Optionally, the electronic device trains an initial model based on multiple sample behavior data to obtain the recommendation model. The implementation process of training a recommendation model based on multiple sample behavior data is described in [link to documentation]. Figure 5The illustrated embodiment will not be described in detail here. If the recommendation model is a trained model, then the first features of the multiple objects included in the recommendation model obtained by the electronic device are the first features trained by the recommendation model.
[0201] In step 303, for each first object, the electronic device attenuates the first feature of the first object based on the interaction time difference of the first object to obtain the interaction feature of the first object. The interaction time difference of the first object is the time difference between the occurrence time of the newly added behavioral data and the occurrence time of the historical behavioral data to which the first object belongs.
[0202] The historical behavior data of the first object includes at least one historical behavior data point. In some embodiments, the historical behavior data of the first object is the historical behavior data corresponding to the latest interaction behavior of the first object. "Latest" means the interaction behavior occurring before the occurrence of the newly added behavior data and is closest to the occurrence time of the newly added behavior data. In this embodiment, the interaction time difference of the first object is determined by combining the occurrence time of the newly added behavior data with the occurrence time of the latest interaction behavior of the first object. The calculation method is simple and the efficiency of obtaining the interaction time difference is high.
[0203] In other embodiments, the historical behavior data of the first object includes at least two historical behavior data sets, which include historical behavior data corresponding to the two most recent interaction behaviors of the first object. The electronic device then obtains the interaction time difference of the first object by: determining the time difference between the occurrence time of the newly added behavior data and the occurrence time of the historical behavior data corresponding to each of the at least two interaction behaviors; and determining the interaction time difference of the first object based on the at least two time differences.
[0204] In this embodiment, at least two interactive actions of the first object are performed sequentially. These at least two interactive actions may include interactive actions within a time period or a certain number of interactive actions. The duration of this time period can be set as needed, and this embodiment does not limit it. For example, the duration may be 30 minutes, 1 hour, or 3 hours. The number of interactive actions can be set as needed, and this embodiment does not limit it. For example, the number may be 5, 10, or 20.
[0205] In one possible implementation of this embodiment, the electronic device determines the interaction time difference of the first object based on at least two time differences by using the average of the at least two time differences as the interaction time difference of the first object. In this embodiment, because the interaction time corresponding to the latest multiple interaction behaviors of the object is referenced when determining the interaction time difference, the accuracy of the determined interaction time difference is relatively high.
[0206] In some embodiments, the electronic device stores each piece of historical behavior data, enabling it to retrieve the historical behavior data of the first object from the stored historical behavior data. It should be noted that the interaction time difference of the first object does not change with the iterative training of the recommendation model. Therefore, the electronic device can calculate and store the interaction time difference of the first object after acquiring the first behavior information but before training the recommendation model. This allows the recommendation model to retrieve the stored interaction time difference of the first object during iterative training, eliminating the need for repeated calculations and improving the model's training efficiency.
[0207] In some embodiments, the first feature of the first object includes a first memory feature and a second memory feature. The first memory feature characterizes the long-term features of the first object, and the second memory feature characterizes the short-term features of the first object.
[0208] The first memory feature references behavioral data generated by the first object over a relatively long period, representing the long-term characteristics of the first object. The second memory feature represents the recent characteristics of the first object; that is, recently generated behavioral data has a greater impact on the second memory feature. In some embodiments, the first and second memory features in the initial recommendation model are randomly initialized and cannot accurately represent the characteristics of the first object. However, as the recommendation model is trained more times, the second memory feature is attenuated by incorporating newly added behavioral data, making it more closely reflect the recent characteristics of the first object. Thus, the trained recommendation model includes more accurate first and second memory features.
[0209] The electronic device attenuates the first feature of the first object based on the interaction time difference of the first object, and obtains the interaction feature of the first object by the following steps (1)-(2):
[0210] (1) The electronic device attenuates the second memory feature of the first object based on the interaction time difference of the first object.
[0211] In some embodiments, the electronic device attenuates the second memory feature of the first object based on the interaction time difference of the first object by: determining a second attenuation parameter based on the interaction time difference and the learning parameters corresponding to the type of the first object; and attenuating the second memory feature based on the second attenuation parameter.
[0212] The larger the interaction time difference of the first object, the longer the time interval between the interaction corresponding to the newly added behavioral data and the first object's previous or several interactions, meaning the first object has recently interacted less frequently. Therefore, the second memory feature cannot accurately represent the semantic information of the media content recently matched by the first object. In other words, for the first object, the difference between the second and first memory features is not significant, so the second decay parameter can be set smaller to minimize the difference before and after decay. Conversely, the smaller the interaction time difference of the first object, the shorter the time interval between the interaction corresponding to the newly added behavioral data and the first object's previous or several interactions, meaning the first object has recently interacted more frequently. Therefore, the second memory feature can accurately represent the semantic information of the media content recently matched by the first object. Thus, the second decay parameter can be set larger to distinguish the second and first memory features.
[0213] Furthermore, the types of the first object include user accounts, author accounts, or media content. The electronic device can determine appropriate learning parameters based on the type of the first object, thereby obtaining appropriate second decay parameters, so that the decay degree of the first feature is different for different types of first objects.
[0214] In this embodiment, the interaction time difference of the first object can reflect the time difference between the new interaction behavior and the historical interaction behavior of the first object, and includes the time information of the interaction behavior. The learning parameter is corresponding to the type of the first object and includes the type information of the first object. By combining the interaction time difference and the learning parameter to attenuate the second memory feature, the second memory feature can be attenuated with reference to the time information and object type information of the first object. As a result, the attenuated second memory feature is more consistent with the recent features of the first object, thereby improving the accuracy of the second memory feature.
[0215] Alternatively, the electronic device uses the following formula to determine the second attenuation parameter:
[0216]
[0217] Where m is the second attenuation parameter, u is the first object, φ(u) is the type of the first object, and α φ(u) The learning parameters are for the type. x and y are arbitrary variables, and Δ(u) is the interaction time difference.
[0218] After obtaining the second attenuation parameter, the electronic device attenuates the second memory feature based on the second attenuation parameter in the following ways: the electronic device uses the product of the second attenuation parameter and the second memory feature as the attenuated second memory feature.
[0219] (2) The electronic device fuses the first memory feature of the first object with the decayed second memory feature to obtain the interaction feature of the first object.
[0220] In some embodiments, the present disclosure does not limit the implementation of fusion. Taking summation as an example, the electronic device uses the sum of the first memory feature and the attenuated second memory feature as the interaction feature of the first object.
[0221] In this embodiment of the disclosure, since the interaction feature integrates the first memory feature and the second memory feature generated by the first object through its own related behavioral data during the dynamic interaction process, that is, it not only integrates the long-term features of the first object, but also integrates the short-term features after decay based on the occurrence of recent interaction behaviors, the interaction feature can accurately represent the dynamic features of the first object and has higher accuracy.
[0222] In this embodiment, after determining the interaction features of the first object, the recommendation model can combine these features to determine the model loss during this iteration of training, and then train the model using the model loss. The model loss includes multiple types of loss. Optionally, the electronic device performs steps 303-305 to determine the interaction loss of the recommendation model, and steps 306-308 to determine the propagation loss of the recommendation model. This embodiment does not limit the order in which the two model losses are determined.
[0223] In step 304, the electronic device determines the attenuation feature of the first object based on the interaction feature of the first object. The attenuation feature represents the feature of the first object after the first feature is attenuated under the influence of the interaction behavior corresponding to the newly added behavior data.
[0224] Here, the decay feature of the first object is the feature of the first object predicted by the recommendation model based on the interaction time difference of the first object during one iteration of training. In some embodiments, the electronic device directly uses the interaction feature of the first object as the decay feature of the first object.
[0225] In some other embodiments, the first feature of the first object further includes a context feature, which represents the feature of the first object under the influence of other objects; then step 304 is implemented by the electronic device performing weighted fusion of the interaction feature and the context feature of the first object to obtain the attenuation feature of the first object.
[0226] In this embodiment, the implementation method of weighted fusion is not limited. Taking weighted summation as an example, the electronic device performs weighted summation of interaction features and context features to obtain attenuation features. The weights can be set as needed. For example, the electronic device can directly use the sum of interaction features and context features as the attenuation features.
[0227] In this embodiment of the disclosure, the attenuation feature of the first object is obtained by weighted fusion, so that the determined attenuation feature not only refers to the interaction feature of the first object that can represent dynamic information, but also refers to the context feature of the first object under the influence of the interaction behavior of other objects. In this way, the accuracy of the attenuation feature is improved by referring to features of multiple dimensions.
[0228] In some embodiments, the contextual features of the first object include contextual features of the first object for multiple interaction types, and the newly added behavioral data includes the target interaction type corresponding to the interaction behavior. Each interaction type corresponds to a contextual feature, so the electronic device can determine the attenuation feature of the first object based on the contextual feature of the corresponding type, thereby improving the accuracy of the attenuation feature. In one possible implementation of this embodiment, the electronic device performs a weighted fusion of the interaction features and contextual features of the first object to obtain the attenuation feature of the first object. This includes: the electronic device determining the contextual feature corresponding to the target interaction type from the contextual features of the first object for multiple interaction types; and performing a weighted fusion of the interaction features of the first object and the contextual feature corresponding to the target interaction type to obtain the attenuation feature of the first object.
[0229] In this embodiment, the implementation method of weighted fusion is not limited. Taking weighted summation as an example, the electronic device performs weighted summation of the interaction features of the first object and the context features corresponding to the target interaction type to obtain the attenuation feature of the first object. The weights can be set as needed. For example, the electronic device can directly use the sum of the interaction features and the context features corresponding to the target interaction type as the attenuation feature.
[0230] In this embodiment of the disclosure, since interaction type can represent different interactive behaviors of an object, and different interactive behaviors can reflect the connection between the object and different media content, taking an account as an example, the account's clicking behavior on short video A and the account's liking behavior on short video B can reflect the account's different degrees of preference for these two short videos, with the account's preference for short video B being greater. Therefore, interaction type can also affect the characteristics of an object.
[0231] In this embodiment of the disclosure, since different interaction types correspond to different context features, the decay feature of the first object is determined by the context feature corresponding to the target interaction type of the newly added behavior data, so that the decay feature matches the target interaction type corresponding to the current interaction behavior more closely, thereby greatly improving the accuracy of the decay feature.
[0232] Optionally, the electronic device uses the following formula to determine the attenuation characteristics of the first object:
[0233]
[0234] Where 'a' is the first object, As a decay characteristic, As the first memory feature, For the second memory feature, r is the target interaction type. The context features are the target interaction type, and g(x) is the second decay parameter. x and y are arbitrary variables, and α φ(a) Here, φ(a) represents the learning parameters, Δ represents the type of the first object, and Δ represents the learning parameters. a This refers to the interaction time difference.
[0235] For example, taking the interaction behavior corresponding to newly added behavioral data as an edge (u,v,r,t) in a dynamic multi-heterogeneous graph, with the two objects being the connected account node u and media content node v, where r is the edge type and t is the interaction time, then the decay characteristic of account node u is: The decay characteristics of media content node v are as follows
[0236] In this embodiment of the disclosure, since the attenuation feature of the first object is obtained by fusing features from multiple dimensions, the accuracy of the attenuation feature is relatively high.
[0237] In step 305, the electronic device determines an interaction loss negatively correlated with a second similarity based on the attenuation features of the two first objects, where the second similarity is the similarity between the attenuation features of the two first objects.
[0238] In this model, since account features represent the semantic information of the media content matched with the account, and media content features represent the semantic information of the media content, if two first objects interact, their features should be more similar, indicating that the account prefers that media content. During the training of the recommendation model, the training objective is to maximize the similarity between the decaying features of two first objects, i.e., the second similarity. Furthermore, the interaction loss is negatively correlated with the second similarity; therefore, the smaller the interaction loss, the more similar the decaying features of the two first objects are.
[0239] In this embodiment of the disclosure, since the interaction loss is negatively correlated with the similarity between the decay features of the two first objects, the interaction loss can accurately represent the prediction bias of the recommendation model during the training process, and the calculation process of the interaction loss is relatively simple, thereby reducing the difficulty of calculating the model loss.
[0240] In some embodiments, the attenuation features are represented as embedding vectors, and the similarity between the attenuation features of two first objects can be represented by the inner product of the two attenuation features. Optionally, the electronic device uses the following formula to determine the interaction loss:
[0241]
[0242] in, For interaction loss, z is any variable. and These are the decay characteristics of the two first objects, respectively.
[0243] In this embodiment of the disclosure, the interaction loss of the recommendation model is calculated by using the inner product of two decaying features. This reduces the computational difficulty and accurately represents the similarity between the two decaying features, thus enabling the interaction loss to be calculated quickly and accurately.
[0244] In step 306, for each first object, the electronic device determines the influence characteristics of the second object related to the first object based on the interaction characteristics of the first object and the interaction time difference of the second object belonging to the same historical behavior data as the first object.
[0245] Among them, the influence feature of any second object represents the characteristics of the second object under the influence of the interaction behavior corresponding to the newly added behavioral data, and the interaction time difference of the second object is the time difference between the occurrence time of the newly added behavioral data and the occurrence time of the historical behavioral data to which the second object belongs.
[0246] Since any first object may have already performed other interactive behaviors before the electronic device acquires new behavioral data, i.e., historical behavioral data already exists, the occurrence of new behavioral data will affect these historical behavioral data, and the characteristics of the second object included in these historical behavioral data should also be updated.
[0247] Optionally, the electronic device determines the influence characteristics of the second object related to the first object based on the interaction characteristics of the first object and the interaction time difference of the second object belonging to the same historical behavior data as the first object. The implementation method includes: when the interaction time difference is not greater than the time difference threshold, the electronic device determines a first attenuation parameter that is negatively correlated with the interaction time difference, and attenuates the interaction characteristics of the first object according to the first attenuation parameter to obtain the influence characteristics of the second object; or, when the interaction time difference is greater than the time difference threshold, a preset influence characteristic is determined as the influence characteristics of the second object.
[0248] The time difference threshold is a pre-set time difference. If the interaction time difference of the second object is greater than the time difference threshold, it means that the first object performed the interaction corresponding to the new behavior data a considerable period of time after the interaction corresponding to the historical behavior data. In this case, the interaction corresponding to the new behavior data has a small impact on the second object, and the electronic device can directly determine the preset impact feature as the impact feature of the second object. Accordingly, the preset impact feature is set to a small value.
[0249] If the interaction time difference of the second object is not greater than the time difference threshold, it means that within a short period after the interaction corresponding to the historical behavior data, the first object performed the interaction corresponding to the new behavior data. Therefore, the interaction corresponding to the new behavior data has a significant impact on the second object. The electronic device can then further determine different first attenuation parameters based on the magnitude of the interaction time difference, so that the influence characteristics of the second object can more accurately represent the degree of influence received by the second object. Optionally, a larger interaction time difference indicates a smaller influence, and thus a smaller first attenuation parameter; conversely, a smaller interaction time difference indicates a larger influence, and thus a larger first attenuation parameter.
[0250] The time difference threshold and preset influence characteristics can be set as needed, and this embodiment does not limit them. For example, the preset influence characteristics can be set to 0, and the time difference threshold can be set to 1 hour, 2 hours or 5 hours, etc.
[0251] In this embodiment, since the magnitude of the interaction time difference of the second object can affect the degree of influence of the interaction behavior corresponding to the newly added behavior data on the second object, when the interaction time difference is small, it indicates that the occurrence time of the historical behavior data and the newly added behavior data is relatively close, and the newly added behavior data has a greater influence on the historical behavior data. Therefore, attenuating the interaction features of the first object according to the attenuation parameter negatively correlated with the interaction time difference can better reflect the influence of the newly added behavior data, thereby improving the accuracy of the influence features. Conversely, when the interaction time difference is large, it indicates that the occurrence time of the historical behavior data and the newly added behavior data is relatively far, and the newly added behavior data has a smaller influence on the historical behavior data. Therefore, it is sufficient to determine the preset influence features as the influence features of the second object, without needing to attenuate the interaction features of the first object according to the attenuation parameter negatively correlated with the interaction time difference, thus saving computational resources.
[0252] Optionally, the electronic device uses the following formula to determine the influence characteristics of the second object:
[0253]
[0254] Where p represents the historical behavior data of both the first and second objects, u p For the first object, b p For the second object, The interaction characteristics of the first object, For the influence characteristics of the second object, Δ(t) p )=tt p t represents the time when the new behavioral data occurred. p For the time when historical behavioral data occurred, w is an arbitrary variable, and τ is a threshold. This is the first attenuation parameter.
[0255] In this embodiment of the disclosure, the interaction features of the first object after attenuation are used as the influence features of the second object, thereby accurately representing the features of the second object under the influence of the interaction behavior corresponding to the newly added behavior data, thus improving the accuracy of the influence features.
[0256] In step 307, the electronic device continues to determine the influence characteristics of another second object based on the influence characteristics of the second object and the interaction time difference of another second object belonging to the same historical behavior data as the second object, until the influence characteristics of each second object related to the first object in the first behavior information are determined.
[0257] Specifically, for a second object related to a first object, the degree of influence of the first object on the second object decreases as the distance between the second object and the first object increases. In other words, the greater the distance between the second object and the first object, the less influence the second object receives from the first object, and the less information the first object transmits to the second object. Taking objects as nodes in a dynamic multi-heterogeneous graph as an example, the distance between two objects can be represented by the number of edges separating them. For instance, if two object nodes are connected by one edge, they are relatively close; if they are connected by other object nodes and multiple edges, they are relatively far apart.
[0258] In some embodiments, the electronic device determines the influence characteristics of another second object based on the influence characteristics of the second object and the interaction time difference of another second object belonging to the same historical behavior data as the second object in the same way as in step 306, and will not be described again here. Steps 303 and 306-307 are one implementation of the electronic device determining the influence characteristics of the second object for each first object based on the first characteristics of the first object and the interaction time difference of the second object related to the first object.
[0259] In this embodiment, the interaction between two first objects affects a second object. The greater the time difference between the first and second object's interaction, the smaller the impact. By determining the impact characteristics of the second object based on the interaction characteristics of the first object and the interaction time difference of the second object, the impact characteristics are determined with reference to the interaction time difference, thus ensuring high accuracy. Furthermore, the first action information contains numerous objects, and each first object can be directly or indirectly related to multiple second objects. Therefore, based on the association between the first object and multiple second objects, the impact characteristics of the second objects directly related to the first object are first determined, and then the impact characteristics of another second object directly related to that first object are determined. This sequential determination of impact characteristics more accurately reflects the strength of the association between the first object and each second object, thereby improving the accuracy of the impact characteristics of each second object.
[0260] In some embodiments, the process by which an electronic device determines the influence characteristics of a second object for each first object based on a first characteristic of the first object and the interaction time difference between the second object and the first object is implemented in a graph structure, and accordingly, the process includes the following steps:
[0261] For each first object node, the electronic device attenuates the first feature of the first object node based on the interaction time difference of the first object node to obtain the interaction feature of the first object node. The interaction time difference of the first object node is the time difference between the occurrence time of the first side and the occurrence time of the second side connected to the first object node. Based on the interaction feature of the first object node and the interaction time difference of the second object node directly connected to the first object node, the influence feature of the second object node is determined. The influence feature of another second object node is determined based on the influence feature of the second object node and the interaction time difference of another second object node directly connected to the second object node, until the influence feature of each second object node directly or indirectly connected to any first object node in the first line of information is determined.
[0262] Specifically, for each first object node on the first side, the interaction features of the first object node start from the first object node and propagate sequentially along the path in the activation subgraph, so that the interaction features of the first object node can be propagated to each second object node on the path, and the interaction features gradually decay during the propagation process.
[0263] In this embodiment of the disclosure, by representing behavioral data in the form of a graph structure, the relationship between multiple objects becomes clearer. Therefore, based on the relationship between the first object node and multiple second object nodes, the influence characteristics of the second object directly connected to the first object node are first determined, and then the influence characteristics of another second object node directly connected to the second object are determined. This method of processing each item one by one and determining the influence characteristics of each second object node in turn can more accurately reflect the strength of the relationship between the first object and each second object, thereby improving the accuracy of the influence characteristics of each second object.
[0264] In step 308, the electronic device determines a propagation loss that is negatively correlated with a first similarity, which is determined based on the similarity between the influence features of each second object and a first feature of each second object.
[0265] Wherein, the first feature of the second object includes contextual features, which characterize the features of the second object under the influence of other objects; then the electronic device determines the first similarity in the following ways: the electronic device determines the similarity between the influence features and contextual features of each second object; and the similarity of at least one second object is fused to obtain the first similarity.
[0266] In this embodiment, the implementation method of fusion is not limited. Taking summation as an example, the electronic device uses the sum of the similarities of at least one second object as the first similarity.
[0267] In this embodiment of the disclosure, since the context features of the second object can characterize the features of the second object under the influence of other objects, and the influence features of the second object are the features of the second object under the influence of the interaction behavior corresponding to the newly added behavioral data, the similarity between the influence features and the context features of the second object can reflect the prediction accuracy of the recommendation model on the influence features of the second object. Therefore, the determined first similarity is more accurate, thereby improving the accuracy of the propagation loss.
[0268] The training objective of the recommendation model should be to maximize the similarity between the influence features of the second object and the context features. That is, the greater the similarity, the smaller the propagation loss of the recommendation model. Therefore, the first similarity is negatively correlated with the propagation loss of the recommendation model. In some embodiments, features are represented in the form of embedding vectors, and the similarity between two features can be represented by the inner product of the two features. The electronic device can then determine the propagation loss using the following formula:
[0269]
[0270] in, To spread the loss, p u ∪p v The first line contains information, p u p represents the historical behavior data of the second object related to the first object u. v Let p be the historical behavior data corresponding to the second object related to the first object v, p be any historical behavior data in the first behavior information, and r be the interaction type to which the interaction behavior corresponding to the historical behavior data p belongs. The context features corresponding to the interaction type r of the second object. The influence characteristics of the second object.
[0271] In this embodiment of the disclosure, the propagation loss of the model is calculated by using the inner product of the influence feature and the context feature. This reduces the computational difficulty and accurately represents the similarity between the two features, thus enabling the propagation loss to be calculated quickly and accurately.
[0272] For example, taking the information in the first row as the activation subgraph, the propagation loss of the recommendation model can be determined using the following formula:
[0273]
[0274] In this context, the account node is represented by 'u', and the media content node is represented by 'v'. To activate the subgraph, The set of paths corresponding to account node u. Let p be the set of paths corresponding to media content node v, p be any path in the activation subgraph, and i be the index of the edge on path p. <v i,r i > indicates that the edge type is r i Edge node v i spread, For node v i Influence characteristics along path p For node v i For edge type r i The context vector, χ(·), is the indicator function. The indicator function represents the context vector of the event. When it is a real event, Take 1, in the event When it is a false event, Take 0.
[0275] In step 309, the electronic device fuses the propagation loss and the interaction loss to obtain the model loss of the recommendation model.
[0276] In this embodiment, the implementation method of fusion is not limited. Taking summation as an example, the electronic device uses the sum of propagation loss and interaction loss as the model loss.
[0277] In some embodiments, the model loss also includes negative sampling loss. Negative sampling loss represents the loss obtained by training the recommendation model based on negative samples, while the interaction loss and propagation loss mentioned above are losses obtained by training the recommendation model based on positive samples. Here, positive samples are real behavioral data, and negative samples are fake behavioral data, meaning that at least two objects in each behavioral data point in a negative sample have not interacted.
[0278] Optionally, step 309 can be implemented by the electronic device fusing the interaction loss, propagation loss, and negative sampling loss to obtain the model loss of the recommendation model. The electronic device then uses the following formula to determine the model loss:
[0279]
[0280] in, For interaction loss, To spread the loss, It represents a negative sampling loss.
[0281] In some embodiments, the electronic device determines the negative sampling loss by: the electronic device determining a third object corresponding to each first object from the second behavioral information, the second behavioral information including newly added behavioral data and multiple historical behavioral data, and the third object being other objects besides the first object in the second behavioral information; determining a negative sampling loss negatively correlated with the third similarity, the third similarity being determined based on the similarity between the interaction features of the first object and the context features of the third object, the context features representing the features of the third object under the influence of other objects.
[0282] In some embodiments, the third object is a non-interactive object of the first object, meaning that the third object and the first object do not simultaneously belong to any historical behavior data. Taking an account as the first object, the non-interactive object of the account can be the account itself or media content. Since the account does not interact with the non-interactive object, it indicates that the user of the account has little interest in the media resources corresponding to the non-interactive object. Therefore, the similarity between the account's interaction features and the contextual features of the non-interactive object is relatively small. During the training of the recommendation model, the training objective should be to minimize the similarity between the interaction features of the first object and the contextual features of the third object.
[0283] In this embodiment of the disclosure, negative sampling is performed on the second line information to provide negative samples for the recommendation model. By determining the negative sampling loss of the recommendation model, an additional negative sampling loss is added on top of the propagation loss and interaction loss, enabling the recommendation model to be trained by combining positive and negative samples, thereby improving the accuracy of the recommendation model training.
[0284] In some embodiments, the electronic device determines the third object for each first object from the second row of information by means of: the electronic device determining the third object for each first object from the second row of information based on a target probability distribution. The target probability distribution can be set as needed, such as a random distribution, a uniform distribution, or a Gaussian distribution. For each first object, the electronic device determines the probability of each object in the second row of information other than the two first objects based on the target probability distribution, determines a random number whose value range is (0, 1), and the object whose probability corresponds to the range of the random number is taken as the third object. The electronic device can set the number of third objects, and then sequentially selects that number of third objects from the second row of information according to the above implementation method.
[0285] In some embodiments, features are represented as embedding vectors, and the similarity between two features can be represented by the inner product of the two features. The electronic device can then determine the negative sampling loss using the following formula:
[0286]
[0287] Where, n s Let s represent the number of third objects, s denote negative sampling, and j = 1, 2, 3, ..., n. s P Neg Let be the target probability distribution satisfied by negative sampling, k be the probability of the third object under the target probability distribution, E represent the expectation, q1 be the third object of the first object u, and q2 be the third object of the first object v. It is the contextual feature of the third object q1 for edge type r. For the interaction characteristics of the first object u, It is the contextual feature of the third object q2 for edge type r. The interaction characteristics of the first object v.
[0288] In this embodiment of the disclosure, the negative sampling loss of the recommendation model is calculated by using the inner product of the interaction features of the first object and the context features of the third object. This reduces the computational difficulty and accurately represents the similarity between the two features, thus enabling the negative sampling loss to be calculated quickly and accurately.
[0289] In this embodiment of the disclosure, the recommendation model also includes model parameters, so after the electronic device obtains the model loss, it performs the operation of step 310.
[0290] In step 310, the electronic device updates the model parameters and the first features of multiple objects in the recommendation model based on the model loss to obtain the trained recommendation model. The trained recommendation model includes the second features of multiple objects and is used to make recommendations based on the second features of multiple objects.
[0291] In some embodiments, during the i-th iteration of model training, the electronic device inputs new behavioral data into the recommendation model determined in the (i-1)-th iteration to obtain the model loss of the i-th iteration. Based on the model loss, the model parameters and the first features of multiple objects determined in the (i-1)-th iteration are updated, where i is a positive integer greater than 1. Based on the updated model parameters and the first features of multiple objects, the (i+1)-th iteration is performed, and the above training iteration process is repeated until the training meets the target conditions.
[0292] In some embodiments, the training objective is that the number of training iterations reaches a target number, which is a pre-set number of training iterations, such as 1000; or, the training objective is that the model loss meets a target threshold condition, such as the model loss being less than 0.00001. This disclosure does not limit the setting of the objective conditions.
[0293] In this embodiment of the disclosure, the model loss is obtained by fusing the propagation loss and the interaction loss. This model loss can reflect the loss caused by the second object being affected by the new behavioral data, as well as the loss caused by the interaction behavior between the two first objects on the first object. Thus, by iteratively training the recommendation model based on the model loss, better model parameters and the second features of the object can be trained to obtain a recommendation model with better prediction ability, thereby improving the prediction accuracy of the recommendation model.
[0294] In this embodiment, the electronic device can directly use the interaction loss as the model loss and train the recommendation model based on the interaction loss. That is, after executing steps 301-305, the electronic device directly executes step 310. Alternatively, the electronic device can directly use the propagation loss as the model loss and train the recommendation model based on the propagation loss. That is, after executing steps 301-303, the electronic device executes steps 306-308, and then executes step 310. Or, the electronic device can fuse the interaction loss and the propagation loss, and train the recommendation model based on the fused model loss. That is, after executing steps 301-308, the electronic device executes steps 309-310.
[0295] In this embodiment of the disclosure, the recommendation model is trained by combining the interaction loss determined based on the similarity between the decay features of two first objects and the propagation loss determined based on the similarity between the influence features of the second object and its own first features. This allows the recommendation model to refer to the two similarities during the training process, thereby improving the training accuracy.
[0296] It should be noted that the electronic device can also directly train the recommendation model based on the propagation loss and negative sampling loss. Therefore, the implementation method of the electronic device training the recommendation model based on the propagation loss negatively correlated with the first similarity includes: the electronic device trains the recommendation model based on the propagation loss negatively correlated with the first similarity and the negative sampling loss. Optionally, the implementation method of this process is the same as that of steps 309-310, and will not be repeated here.
[0297] In this embodiment of the disclosure, since the negative sampling loss is determined based on the similarity between the first feature of the third object obtained by negative sampling the second behavior information and the interaction feature of the first object, and the propagation loss is determined based on the similarity between the influence feature of the second object and its own first feature, by combining the negative sampling loss and the propagation loss to train the recommendation model, the recommendation model can refer to the above two similarities during the training process, thereby improving the training accuracy.
[0298] It should be noted that this embodiment is illustrated using an example where the number of newly added behavioral data is 1. In some embodiments, the electronic device stores each newly added behavioral data piece it acquires. When the number of stored newly added behavioral data pieces reaches a certain quantity, it acquires first behavioral information based on the stored multiple pieces of newly added behavioral data, thereby training the recommendation model. Specifically, in each iteration of the model, for each piece of newly added behavioral data, the electronic device determines the model loss according to steps 301-309 described above. That is, the electronic device sequentially inputs the first behavioral information corresponding to each piece of newly added behavioral data into the recommendation model to obtain the model loss. The electronic device fuses the multiple model losses to obtain the model loss for the current iteration. For example, the electronic device uses the sum of multiple model losses as the model loss for the current iteration.
[0299] The recommendation model processing method provided in this disclosure can effectively model heterogeneous graphs with multiple heterogeneities and streaming dynamics, that is, it can effectively model dynamically added behavioral data with diverse object types. Furthermore, unlike some recommendation models in related technologies that are trained using an inward aggregation approach, the recommendation model provided in this disclosure is trained using a sampling update propagation architecture, thereby avoiding the noise impact caused by drastic changes in neighboring nodes in the behavioral data. Further, in the modeling phase, for newly added behavioral data, the recommendation model samples the first behavioral information affected by the newly added behavioral data according to a specified sampling method set, thereby determining the interaction features of two first objects based on time information and object type, and propagating the interaction features to the second object in the first behavioral information, thereby determining the influence features of the second object based on time information and interaction type. In this way, the recommendation model considers both semantic and temporal information in its modeling.
[0300] Furthermore, because the recommendation model can be trained solely on dynamically generated new behavioral data, it can be updated in real-time based on new behavioral data in an online environment. It's important to note that this real-time updating includes updating the recommendation model every time a new behavioral data point is generated, and also updating the model based on a certain number of new behavioral data points.
[0301] For example, Figure 4This is a schematic diagram illustrating the training process of a recommendation model according to an exemplary embodiment. The second behavioral information is a dynamic multi-heterogeneous graph, the interaction behaviors corresponding to the behavioral data are edges in the dynamic multi-heterogeneous graph, and the objects are object nodes. The recommendation model consists of three modules: an active graph sampling module, a relation-specific update module, and a time-aware propagation module. The active graph sampling module samples the dynamic multi-heterogeneous graph to obtain an active subgraph. The relation-specific update module determines the decay characteristics of each first object node in the first edge, thereby determining the L1 interaction loss. The time-aware update module determines the influence characteristics of each second object node in the active subgraph, thereby determining the L2 propagation loss.
[0302] Where a is the author node, u is the user node, v is the video node, t is the occurrence time, and the interaction types include click, like, forward, and upload. The interaction type of a first edge, also known as a new click, is click. The two object nodes of the first edge are interactive nodes. The other object nodes in the activation subgraph are influenced nodes. The features of the object nodes include the first memory feature (long-term memory), the second memory feature (short-term memory), and the relation-specific context embedding. g represents the second decay parameter.
[0303] The SUPA (Sampling Update Propagation Architecture) recommendation model trained according to the recommendation model processing method provided in this disclosure embodiment achieves better recommendation performance on multiple datasets compared to other STOA (State of the Art) recommendation models. Compared to suboptimal models, when recommending media content to accounts, the MRR (Mean Reciprocal Rank) metric shows an average relative improvement of 23.62% when recalling 50 media content items. This indicates that the SUPA recommendation model provided in this disclosure embodiment considers the different impacts of different object types and interaction types on object features over time, better utilizes the semantic and temporal information in behavioral data, can better capture the rich semantic information in dynamic streaming data, and learns the differentiated expression of object features under different time and interactive behaviors.
[0304] In this embodiment of the disclosure, after two first objects interact to obtain new behavioral data, the interaction can affect a second object related to the first object. Based on the first feature of the first object and the interaction time difference between the second object and the first object, the influence feature representing the impact of the interaction corresponding to the new behavioral data on the second object can be determined. Furthermore, since the propagation loss is determined based on the first similarity between the influence feature of the second object and the first feature of the second object itself, the recommendation model can learn the influence of the interaction on the second object during training based on the propagation loss. This not only enables training of the recommendation model when a new interaction occurs, but also incorporates the influence of the new behavioral data on the second object during training, thereby greatly improving the training accuracy of the recommendation model.
[0305] The above Figure 3 The illustrated embodiment describes the training process of the recommendation model. In another embodiment, before training the recommendation model based on the first behavioral information, the electronic device can train the recommendation model based on sample behavioral data to obtain a recommendation model with a certain recommendation accuracy.
[0306] Figure 5 This is a flowchart illustrating a recommendation model processing method according to an exemplary embodiment, see [link to flowchart]. Figure 5 The method is executed by an electronic device and includes the following steps:
[0307] In step 501, the electronic device acquires multiple sample behavior data, each of which represents the interaction behavior between two sample objects of different types.
[0308] The sample objects are accounts or media content. In some embodiments, the sample behavioral data are behavioral data generated during historical interactions between the account and the media content. That is, the sample behavioral data can be historical behavioral data in the second behavioral information, excluding newly added behavioral data.
[0309] In step 502, the electronic device divides multiple sample behavior data into multiple sample sets according to the order of their occurrence from oldest to newest, with each sample set containing the same number of sample behavior data.
[0310] Multiple sample behavior data can be input into the recommendation model in the form of data edges, and the occurrence time of each sample behavior data can be represented in the form of a timestamp. In some embodiments, since the number of multiple sample behavior data is large, the electronic device trains the recommendation model in batches. Because the multiple sample behaviors are sorted according to the interaction time from oldest to youngest, the recommendation model can take into account the impact of the occurrence time of the behavior data on the determination of object features. Each adjacent target number (batch_size) of sample behavior data is considered as a batch. This disclosure does not limit the target number. For example, if the number of multiple sample behavior data is 1000, then every 100 sample behavior data can form a batch.
[0311] In step 503, the electronic device trains the recommendation model sequentially based on multiple sample sets.
[0312] In some embodiments, the electronic device iteratively trains the recommendation model within each sample set. At each target iteration (valid_interval), the effectiveness of the recommendation model is validated against a validation set, which can be a certain number (valid_size) of sample behavior data from later interactions within the current sample set. The training termination condition for each sample set, i.e., the target condition for training, can be either that the recommendation model's effectiveness continuously improves but reaches the maximum number of training iterations (max_iter), or that the recommendation model's effectiveness continuously declines for more than a maximum number of iterations (max_patient).
[0313] After the iterative training of each sample set terminates, the recommendation model with the best validation performance is selected to continue training the next sample set, until training of multiple sample sets is completed. In some embodiments, the implementation of step 503 for each sample set is the same as the implementation of steps 301-310, and will not be repeated here.
[0314] It should be noted that this disclosure uses a dynamic multi-heterogeneous graph as an example for illustration. Furthermore, the electronic device can also train on behavioral data in the form of isomorphic graphs or static graphs using the recommendation model provided in this disclosure. Here, an isomorphic graph is a graph where both the number of node types and the number of edge types are 1. A static graph is a graph where each edge occurs at the same time. Accordingly, when training on behavioral data in the form of isomorphic graphs, the electronic device sets both the interaction type and object type to 1. When training on behavioral data in the form of static graphs, the electronic device simply sets the occurrence time of each behavioral data point to the same time.
[0315] In this embodiment, since the interaction between accounts and media content is continuously generated, the amount of behavioral data included in the second behavioral information is constantly increasing. Therefore, by training the initial model based on existing behavioral data, a recommendation model with high accuracy is obtained. Then, the recommendation model is updated and trained based on newly added behavioral data. Thus, the recommendation model is trained using a single-pass training framework, eliminating the need to update and train the recommendation model with all historical behavioral data and the newly added behavioral data each time new behavioral data is acquired, thereby greatly improving model training efficiency.
[0316] In some embodiments, after a recommendation model has been trained, an electronic device can invoke that model to make recommendations. Figure 6 This is a flowchart illustrating a media content recommendation method according to an exemplary embodiment, see [link to flowchart]. Figure 6 The method is executed by an electronic device and includes the following steps:
[0317] In step 601, the electronic device obtains a recommendation model, which includes object features of multiple objects, including user accounts and media content.
[0318] In step 602, the electronic device determines the similarity between the first user account and the first media content based on the account characteristics of the first user account and the content characteristics of the first media content. The first user account can be any one of the user accounts, and the first media content can be any one of the media content.
[0319] In step 603, the electronic device determines to recommend the first media content to the first user account based on similarity.
[0320] The multiple objects include a first object and a second object. The first object is the object in the newly added behavioral data, and the second object is the object related to the first object. The recommendation model is trained based on the propagation loss that is negatively correlated with the first similarity. The first similarity is determined based on the similarity between the influence features of the second object and the object features of the second object. The influence features represent the features of the second object under the influence of the interaction behavior corresponding to the newly added behavioral data.
[0321] In some embodiments, the recommendation model includes at least one of the features corresponding to the user type of the account and the features corresponding to the author type. The recommendation model can recommend media content to accounts of user type, i.e., user accounts. When the account type is user type, the electronic device acquires the user type features; when the account has both author type and user type, the electronic device also acquires the user type features.
[0322] In this embodiment of the disclosure, the newly added behavioral data represents a new interactive behavior generated by a first object. This interactive behavior will affect a second object related to the first object. By determining the influence features of the second object affected by the interactive behavior corresponding to the newly added behavioral data, the recommendation model trained in this way has higher accuracy in the object features it includes. As a result, the accuracy of the similarity between the first user account and the first media content determined by the recommendation model is also higher, thereby improving the recommendation accuracy of the media content.
[0323] Figure 7 This is a flowchart illustrating a media content recommendation method according to an exemplary embodiment, see [link to flowchart]. Figure 7 The method is executed by an electronic device. This embodiment of the disclosure takes the electronic device recommending media content to an account as an example. The method includes the following steps:
[0324] In step 701, the electronic device obtains a recommendation model, which includes object features of multiple objects, including user accounts and media content.
[0325] The recommendation model is trained based on steps 301-310, which will not be described in detail here. An account has at least one account type. This embodiment of the disclosure uses recommending media content to user-type accounts, i.e., user accounts, as an example for illustration.
[0326] In step 702, the electronic device determines the fusion characteristics of the first user account based on the account characteristics of the first user account, and determines the fusion characteristics of the first media content based on the content characteristics of the first media content.
[0327] Wherein, the first user account can be any one of the user accounts, and the first media content can be any one of the media content. In some embodiments, the account features include a first memory feature and a second memory feature of the first user account, where the first memory feature represents the long-term features of the first user account, and the second memory feature represents the short-term features of the first user account; the content features include a first memory feature and a second memory feature of the first media content, where the first memory feature represents the long-term features of the first media content, and the second memory feature represents the short-term features of the first media content.
[0328] Optionally, the electronic device determines the fusion characteristics of the first user account based on the account characteristics of the first user account by fusing the first memory characteristics and the second memory characteristics of the first user account to obtain the fusion characteristics of the first user account. The electronic device determines the fusion characteristics of the first media content based on the content characteristics of the first media content by fusing the first memory characteristics and the second memory characteristics of the first media content to obtain the fusion characteristics of the first media content.
[0329] In this embodiment, the implementation method of fusion is not limited. Taking summation as an example, the electronic device uses the sum of the first memory feature and the second memory feature of the first user account as the fusion feature of the first user account, and uses the sum of the first memory feature and the second memory feature of the first media content as the fusion feature of the first media content.
[0330] In other embodiments, the account features also include contextual features of the first user account, which represent the characteristics of the first user account under the influence of other objects. The electronic device then fuses the first memory feature and the second memory feature of the first user account to obtain the fused feature of the first user account. This is achieved by the electronic device fusing the first memory feature, the second memory feature, and the contextual features of the first user account to obtain the fused feature of the first user account. The process for determining the fused feature of the first media content is similar and will not be elaborated here.
[0331] It should be noted that the contextual features of the first user account include the contextual features of the first user account for multiple interaction types, and the electronic device can determine the integrated features of the first user account for each interaction type. Similarly, the electronic device can also determine the integrated features of the first media content for each interaction type.
[0332] In this embodiment of the disclosure, since the fusion feature of the first user account is obtained by fusing the features of the first user account in multiple dimensions, the fusion feature not only refers to the memory features corresponding to the interactive behavior performed by the first user account itself, but also refers to the context features corresponding to the interactive behavior performed by the first user account under the influence of other objects, thereby improving the accuracy of the fusion feature.
[0333] In step 703, the electronic device determines the similarity between the fusion features of the first user account and the fusion features of the first media content.
[0334] The similarity can be cosine similarity or other parameters that measure the similarity between features. In this embodiment, cosine similarity is used as an example. In some embodiments, if the fused features include fused features for multiple interaction types, the electronic device determines the similarity between the first user account and the first media content for the same interaction type. For example, if the multiple interaction types include likes, shares, and favorites, the electronic device determines a similarity for each interaction type.
[0335] In some embodiments, steps 702-703 are an implementation method for an electronic device to determine the similarity between a first user account and a first media content based on the account characteristics of the first user account and the content characteristics of the first media content.
[0336] In this embodiment of the disclosure, since the object's fusion feature integrates the first memory feature and the second memory feature generated by the object through its own related behavioral data during dynamic interaction, that is, it not only integrates the object's long-term features, but also integrates the short-term features that have decayed based on the occurrence of recent interactive behaviors, the fusion feature can accurately represent the object's dynamic features. This allows the similarity determined based on the fusion feature of the first user account and the fusion feature of the first media content to refer to the changes in features of the first user account and the first media content under the influence of dynamically added behavioral data, thereby improving the accuracy of the similarity.
[0337] In step 704, the electronic device determines to recommend the first media content to the first user account based on similarity.
[0338] In some embodiments, the electronic device recommends first media content with a similarity greater than a similarity threshold to a first user account. Alternatively, the electronic device recommends a certain number of first media content items ranked high in similarity to the first user account. This number can be set as needed, and this disclosure does not limit it.
[0339] For example, taking a heterogeneous graph as an example, for a user account node in the graph, by calculating the similarity between the user account node and the media content node in the graph, the edges that the user account node may establish in the future can be determined.
[0340] In this embodiment of the disclosure, the newly added behavioral data represents a new interactive behavior generated by a first object. This interactive behavior will affect a second object related to the first object. By determining the influence features of the second object affected by the interactive behavior corresponding to the newly added behavioral data, the recommendation model trained in this way has higher accuracy in the object features it includes. As a result, the accuracy of the similarity between the first user account and the first media content determined by the recommendation model is also higher, thereby improving the recommendation accuracy of the media content.
[0341] Figure 8 This is a block diagram illustrating a media content recommendation device according to an exemplary embodiment. See also Figure 8 The device includes:
[0342] The first acquisition unit 801 is configured to acquire a recommendation model, which includes object features of multiple objects, including user accounts and media content.
[0343] The first determining unit 802 is configured to perform an analysis based on the account characteristics of the first user account and the content characteristics of the first media content to determine the similarity between the first user account and the first media content, wherein the first user account is any one of the user accounts and the first media content is any one of the media content.
[0344] Recommendation unit 803 is configured to perform a similarity-based recommendation of the first media content to the first user account;
[0345] The multiple objects include a first object and a second object. The first object is the object in the newly added behavioral data, and the second object is the object related to the first object. The recommendation model is trained based on the propagation loss that is negatively correlated with the first similarity. The first similarity is determined based on the similarity between the influence features of the second object and the object features of the second object. The influence features represent the features of the second object under the influence of the interaction behavior corresponding to the newly added behavioral data.
[0346] In some embodiments, account features include first memory features and second memory features of a first user account, where the first memory features represent long-term features of the first user account and the second memory features represent short-term features of the first user account; content features include first memory features and second memory features of a first media content, where the first memory features represent long-term features of the first media content and the second memory features represent short-term features of the first media content.
[0347] The first determining unit 802 is configured to perform the following operations: fusing the first memory feature and the second memory feature of the first user account to obtain the fused feature of the first user account; fusing the first memory feature and the second memory feature of the first media content to obtain the fused feature of the first media content; and determining the similarity between the fused feature of the first user account and the fused feature of the first media content.
[0348] In some embodiments, the account features also include contextual features of the first user account, which characterize the features of the first user account under the influence of other objects;
[0349] The first determining unit 802 is configured to perform the fusion of the first memory feature, the second memory feature and the context feature of the first user account to obtain the fused feature of the first user account.
[0350] In this embodiment of the disclosure, the newly added behavioral data represents a new interactive behavior generated by a first object. This interactive behavior will affect a second object related to the first object. By determining the influence features of the second object affected by the interactive behavior corresponding to the newly added behavioral data, the recommendation model trained in this way has higher accuracy in the object features it includes. As a result, the accuracy of the similarity between the first user account and the first media content determined by the recommendation model is also higher, thereby improving the recommendation accuracy of the media content.
[0351] Figure 9 This is a block diagram illustrating a recommendation model processing apparatus according to an exemplary embodiment. See also... Figure 9 The device includes:
[0352] The second acquisition unit 901 is configured to acquire first behavior information, which includes new behavior data and historical behavior data. The new behavior data is used to represent the interaction behavior between two first objects of different types, including accounts and media content. The historical behavior data is the historical behavior data corresponding to the second object associated with any first object.
[0353] The third acquisition unit 902 is configured to acquire a recommendation model, the recommendation model including first features of multiple objects, the multiple objects including two first objects and at least one second object in historical behavior data;
[0354] The second determining unit 903 is configured to perform, for each first object, determine the influence characteristics of the second object based on the first characteristic of the first object and the interaction time difference of the second object related to the first object. The influence characteristics of any second object characterize the characteristics of the second object under the influence of the interaction behavior corresponding to the newly added behavioral data. The interaction time difference of the second object is the time difference between the occurrence time of the newly added behavioral data and the occurrence time of the historical behavioral data to which the second object belongs.
[0355] Training unit 904 is configured to train the recommendation model by performing a propagation loss negatively correlated with a first similarity, the first similarity being determined based on the similarity between the influence features of each second object and the first features of each second object. The trained recommendation model includes the second features of multiple objects and is used to make recommendations based on the second features of multiple objects.
[0356] In some embodiments, the second determining unit 903 is configured to perform, for each first object, attenuate the first feature of the first object based on the interaction time difference of the first object to obtain the interaction feature of the first object, wherein the interaction time difference of the first object is the time difference between the occurrence time of the newly added behavioral data and the occurrence time of the historical behavioral data to which the first object belongs;
[0357] Based on the interaction characteristics of the first object and the interaction time difference of the second object that belongs to the same historical behavior data as the first object, the influence characteristics of the second object related to the first object are determined.
[0358] Continue to determine the influence characteristics of another second object based on the influence characteristics of the second object and the interaction time difference of another second object belonging to the same historical behavioral data as the second object, until the influence characteristics of each second object related to the first object in the first behavioral information are determined.
[0359] In some embodiments, the second determining unit 903 is configured to perform the following actions: if the interaction time difference is not greater than a time difference threshold, determine a first attenuation parameter negatively correlated with the interaction time difference, attenuate the interaction features of the first object according to the first attenuation parameter, and obtain the influence features of the second object; or...
[0360] The second determining unit is configured to determine the preset influence feature as the influence feature of the second object when the interaction time difference is greater than the time difference threshold.
[0361] In some embodiments, the first behavioral information includes at least two object nodes belonging to different node types and an edge connecting any two object nodes. The node types include account type and media content type. The at least two object nodes include two first object nodes belonging to different types and a second object node that is directly or indirectly connected to either of the first object nodes.
[0362] The two first object nodes and the first edge connecting the two first object nodes constitute the newly added behavior data;
[0363] A first object node and a second object node of different types, as well as the second edge connecting the first object node and the second object node, constitute a historical behavior data, and / or, any two second object nodes of different types, as well as the third edge connecting any two second object nodes, constitute a historical behavior data.
[0364] The second determining unit 903 is configured to perform, for each first object node, attenuate the first feature of the first object node based on the interaction time difference of the first object node to obtain the interaction feature of the first object node, wherein the interaction time difference of the first object node is the time difference between the occurrence time of the first side and the occurrence time of the second side connected to the first object node.
[0365] Based on the interaction characteristics of the first object node and the interaction time difference of the second object node directly connected to the first object node, the influence characteristics of the second object node are determined.
[0366] Continue to determine the influence characteristics of another second object node based on the influence characteristics of the second object node and the interaction time difference of another second object node directly connected to the second object node, until the influence characteristics of each second object node directly or indirectly connected to any first object node in the first line of information are determined.
[0367] In some embodiments, the apparatus further includes:
[0368] The third determining unit is configured to perform, for each first object, attenuate the first feature of the first object based on the interaction time difference of the first object to obtain the attenuated feature. The attenuated feature represents the feature of the first object after attenuation under the influence of the interaction behavior corresponding to the new behavior data. The interaction time difference of the first object is the time difference between the occurrence time of the new behavior data and the occurrence time of the historical behavior data to which the first object belongs.
[0369] Based on the decay features of the two first objects, an interaction loss negatively correlated with the second similarity is determined, where the second similarity is the similarity between the decay features of the two first objects.
[0370] The training unit is configured to train the recommendation model by performing propagation loss and interaction loss based on the first similarity.
[0371] In some embodiments, the first feature of the first object includes a first memory feature and a second memory feature, wherein the first memory feature represents the long-term features of the first object and the second memory feature represents the short-term features of the first object; the third determining unit is configured to perform attenuation of the second memory feature of the first object based on the interaction time difference of the first object; and to fuse the first memory feature of the first object with the attenuated second memory feature to obtain the attenuated feature of the first object.
[0372] In some embodiments, the third determining unit is configured to execute learning parameters based on the interaction time difference of the first object and the type of the first object to determine a second decay parameter; and to decay the second memory feature based on the second decay parameter.
[0373] In some embodiments, the first feature of the first object further includes a context feature, which characterizes the features of the first object under the influence of other objects; the third determining unit is configured to perform a weighted fusion of the first memory feature, the decayed second memory feature, and the context feature of the first object to obtain the decayed feature of the first object.
[0374] In some embodiments, the contextual features of the first object include the contextual features of the first object for multiple interaction types, and the newly added behavioral data includes the target interaction type corresponding to the interaction behavior.
[0375] The third determining unit is configured to perform the following: determine the context features corresponding to the target interaction type from the context features of the first object for multiple interaction types; and perform weighted fusion of the first memory features of the first object, the attenuated second memory features, and the context features corresponding to the target interaction type to obtain the attenuated features of the first object.
[0376] In some embodiments, the recommendation model further includes model parameters and a training unit 904 configured to perform a fusion of a propagation loss and an interaction loss that are negatively correlated with the first similarity to obtain a model loss for the recommendation model; based on the model loss, the model parameters and the first features of multiple objects in the recommendation model are updated to obtain a trained recommendation model.
[0377] In some embodiments, the apparatus further includes:
[0378] The fourth determining unit is configured to perform the following: determine the third object corresponding to each first object from the second behavioral information, the second behavioral information including newly added behavioral data and multiple historical behavioral data, the third object being other objects in the second behavioral information besides the first object; determine the negative sampling loss negatively correlated with the third similarity, the third similarity being determined based on the similarity between the interaction features of the first object and the context features of the third object, the context features representing the features of the third object under the influence of other objects;
[0379] Training unit 904 is configured to train the recommendation model by performing a propagation loss and a negative sampling loss based on the first similarity.
[0380] In some embodiments, the apparatus further includes:
[0381] The fourth determining unit is configured to determine the third object corresponding to each first object from the second behavior information. The second behavior information includes newly added behavior data and multiple historical behavior data. The third object is any other object in the second behavior information besides the first object.
[0382] A negative sampling loss is determined that is negatively correlated with the third similarity. The third similarity is determined based on the similarity between the interaction features of the first object and the context features of the third object. The context features characterize the features of the third object under the influence of other objects.
[0383] Training unit 904 is configured to train the recommendation model by performing propagation loss, interaction loss, and negative sampling loss based on the first similarity.
[0384] In some embodiments, the second acquisition unit 901 is configured to sample the second behavior information according to the two first objects in the newly added behavior data to obtain the first behavior information, wherein the second behavior information includes the newly added behavior data and multiple historical behavior data.
[0385] In some embodiments, the second acquisition unit 901 is configured to acquire a set of sampling methods, the set of sampling methods including multiple sampling methods; determine the sampling method for each first object from the set of sampling methods; for each first object, starting from the first object, sample the second behavior information according to the determined sampling method, and combine the sampled historical behavior data with the newly added behavior data to form the first behavior information.
[0386] In some embodiments, the first feature of the second object includes a context feature, which characterizes the features of the second object under the influence of other objects; the apparatus further includes:
[0387] The fifth determining unit is configured to perform the determination of the similarity between the influence features and context features of each second object; and to fuse the similarities of at least one second object to obtain a first similarity.
[0388] In some embodiments, the apparatus further includes:
[0389] Training unit 904 is also configured to acquire multiple sample behavior data, each of which represents the interaction behavior between two sample objects of different types; divide the multiple sample behavior data into multiple sample sets according to the order of occurrence from earliest to latest, with each sample set containing the same number of sample behavior data; and train the recommendation model sequentially based on the multiple sample sets.
[0390] In this embodiment of the disclosure, after two first objects interact to obtain new behavioral data, the interaction can affect a second object related to the first object. Based on the first feature of the first object and the interaction time difference between the second object and the first object, the influence feature representing the impact of the interaction corresponding to the new behavioral data on the second object can be determined. Furthermore, since the propagation loss is determined based on the first similarity between the influence feature of the second object and the first feature of the second object itself, the recommendation model can learn the influence of the interaction on the second object during training based on the propagation loss. This not only enables training of the recommendation model when a new interaction occurs, but also incorporates the influence of the new behavioral data on the second object during training, thereby greatly improving the training accuracy of the recommendation model.
[0391] Regarding the apparatus in the above embodiments, the specific manner in which each unit performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0392] In an exemplary embodiment, an electronic device is provided, the electronic device including one or more processors and a memory for storing the one or more processor-executable instructions; wherein the one or more processors are configured to execute the recommendation model processing method or the media content recommendation method in the above embodiments.
[0393] In some embodiments, the electronic device is provided as a terminal. Figure 10This is a structural block diagram of a terminal 1000 according to an exemplary embodiment. The terminal 1000 can be a portable mobile terminal, such as a smartphone, tablet computer, MP3 player (Moving Picture Experts Group Audio Layer III), MP4 player (Moving Picture Experts Group Audio Layer IV), laptop computer, or desktop computer. The terminal 1000 may also be referred to as a user device, portable terminal, laptop terminal, desktop terminal, or other names.
[0394] Terminal 1000 includes a processor 1001 and a memory 1002.
[0395] Processor 1001 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 1001 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 1001 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 1001 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the screen. In some embodiments, processor 1001 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0396] The memory 1002 may include one or more computer-readable storage media, which may be non-transitory. The memory 1002 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 1002 is used to store at least one executable instruction, which is executed by the processor 1001 to implement the recommendation model processing method or media content recommendation method provided in the method embodiments of this disclosure.
[0397] In some embodiments, the terminal 1000 may also optionally include a peripheral device interface 1003 and at least one peripheral device. The processor 1001, memory 1002, and peripheral device interface 1003 can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface 1003 via a bus, signal line, or circuit board. Specifically, the peripheral device includes at least one of the following: a radio frequency circuit 1004, a display screen 1005, a camera assembly 1006, an audio circuit 1007, a positioning assembly 1008, and a power supply 1009.
[0398] Peripheral device interface 1003 can be used to connect at least one I / O (Input / Output) related peripheral device to processor 1001 and memory 1002. In some embodiments, processor 1001, memory 1002 and peripheral device interface 1003 are integrated on the same chip or circuit board; in some other embodiments, any one or two of processor 1001, memory 1002 and peripheral device interface 1003 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.
[0399] The radio frequency (RF) circuit 1004 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 1004 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 1004 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals back into electrical signals. Optionally, the RF circuit 1004 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The RF circuit 1004 can communicate with other terminals via at least one wireless communication protocol. This wireless communication protocol includes, but is not limited to: the World Wide Web, metropolitan area networks, intranets, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit 1004 may also include circuitry related to NFC (Near Field Communication), which is not limited in this disclosure.
[0400] Display screen 1005 is used to display a UI (User Interface). This UI may include graphics, text, icons, videos, and any combination thereof. When display screen 1005 is a touch display screen, it also has the ability to collect touch signals on or above its surface. These touch signals can be input as control signals to processor 1001 for processing. In this case, display screen 1005 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there may be one display screen 1005, disposed on the front panel of terminal 1000; in other embodiments, there may be at least two display screens, disposed on different surfaces of terminal 1000 or in a folded design; in still other embodiments, display screen 1005 may be a flexible display screen, disposed on a curved or folded surface of terminal 1000. Furthermore, display screen 1005 may be configured as a non-rectangular, irregular shape, i.e., a non-rectangular screen. The display screen 1005 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).
[0401] The camera assembly 1006 is used to acquire images or videos. Optionally, the camera assembly 1006 includes a front-facing camera and a rear-facing camera. The front-facing camera is disposed on the front panel of the terminal, and the rear-facing camera is disposed on the back of the terminal. In some embodiments, there are at least two rear-facing cameras, which are any one of a main camera, a depth-sensing camera, a wide-angle camera, and a telephoto camera, to achieve background blurring by fusing the main camera and the depth-sensing camera, panoramic shooting by fusing the main camera and the wide-angle camera, VR (Virtual Reality) shooting, or other fusion shooting functions. In some embodiments, the camera assembly 1006 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cool light flash, which can be used for light compensation at different color temperatures.
[0402] The audio circuit 1007 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, converting the sound waves into electrical signals that are input to the processor 1001 for processing, or input to the radio frequency circuit 1004 for voice communication. For stereo sound acquisition or noise reduction purposes, multiple microphones may be used, each positioned at a different location on the terminal 1000. The microphone may also be an array microphone or an omnidirectional microphone. The speaker is used to convert electrical signals from the processor 1001 or the radio frequency circuit 1004 into sound waves. The speaker may be a conventional diaphragm speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can convert electrical signals not only into audible sound waves but also into inaudible sound waves for purposes such as distance measurement. In some embodiments, the audio circuit 1007 may also include a headphone jack.
[0403] The positioning component 1008 is used to locate the current geographical location of the terminal 1000 in order to enable navigation or LBS (Location Based Service). The positioning component 1008 can be a positioning component based on the US GPS (Global Positioning System), China's BeiDou system, Russia's Granas positioning system, or the European Union's Galileo positioning system.
[0404] Power supply 1009 is used to power the various components in terminal 1000. Power supply 1009 can be AC power, DC power, a disposable battery, or a rechargeable battery. When power supply 1009 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery that is charged via a wired line, and a wireless rechargeable battery is a battery that is charged via a wireless coil. The rechargeable battery can also be used to support fast charging technology.
[0405] In some embodiments, the terminal 1000 further includes one or more sensors 1010. The one or more sensors 1010 include, but are not limited to: an accelerometer 1011, a gyroscope 1012, a pressure sensor 1013, a fingerprint sensor 1014, an optical sensor 1015, and a proximity sensor 1016.
[0406] Accelerometer 1011 can detect the magnitude of acceleration along the three coordinate axes of a coordinate system established by terminal 1000. For example, accelerometer 1011 can be used to detect the components of gravitational acceleration along the three coordinate axes. Processor 1001 can control display screen 1005 to display the user interface in either a landscape or portrait view based on the gravitational acceleration signal acquired by accelerometer 1011. Accelerometer 1011 can also be used for games or for acquiring user motion data.
[0407] The gyroscope sensor 1012 can detect the orientation and rotation angle of the terminal 1000. The gyroscope sensor 1012, in conjunction with the accelerometer sensor 1011, can collect 3D motion data from the user on the terminal 1000. Based on the data collected by the gyroscope sensor 1012, the processor 1001 can perform the following functions: motion sensing (e.g., changing the UI based on the user's tilt), image stabilization during shooting, game control, and inertial navigation.
[0408] The pressure sensor 1013 can be disposed on the side bezel of the terminal 1000 and / or on the lower layer of the display screen 1005. When the pressure sensor 1013 is disposed on the side bezel of the terminal 1000, it can detect the user's grip signal on the terminal 1000, and the processor 1001 can perform left / right hand recognition or quick operation based on the grip signal collected by the pressure sensor 1013. When the pressure sensor 1013 is disposed on the lower layer of the display screen 1005, the processor 1001 can control the operable controls on the UI interface based on the user's pressure operation on the display screen 1005. The operable controls include at least one of button controls, scroll bar controls, icon controls, and menu controls.
[0409] The fingerprint sensor 1014 is used to collect a user's fingerprint. The processor 1001 identifies the user based on the fingerprint collected by the fingerprint sensor 1014, or vice versa. When the user's identity is identified as trusted, the processor 1001 authorizes the user to perform relevant sensitive operations, including unlocking the screen, viewing encrypted information, downloading software, making payments, and changing settings. The fingerprint sensor 1014 can be located on the front, back, or side of the terminal 1000. When the terminal 1000 has physical buttons or a manufacturer's logo, the fingerprint sensor 1014 can be integrated with the physical buttons or manufacturer's logo.
[0410] An optical sensor 1015 is used to collect ambient light intensity. In one embodiment, the processor 1001 can control the display brightness of the display screen 1005 based on the ambient light intensity collected by the optical sensor 1015. Specifically, when the ambient light intensity is high, the display brightness of the display screen 1005 is increased; when the ambient light intensity is low, the display brightness of the display screen 1005 is decreased. In another embodiment, the processor 1001 can also dynamically adjust the shooting parameters of the camera assembly 1006 based on the ambient light intensity collected by the optical sensor 1015.
[0411] The proximity sensor 1016, also known as a distance sensor, is installed on the front panel of the terminal 1000. The proximity sensor 1016 is used to detect the distance between the user and the front of the terminal 1000. In one embodiment, when the proximity sensor 1016 detects that the distance between the user and the front of the terminal 1000 is gradually decreasing, the processor 1001 controls the display screen 1005 to switch from a screen-on state to a screen-off state; when the proximity sensor 1016 detects that the distance between the user and the front of the terminal 1000 is gradually increasing, the processor 1001 controls the display screen 1005 to switch from a screen-off state to a screen-on state.
[0412] Those skilled in the art will understand that Figure 10 The structure shown does not constitute a limitation on terminal 1000 and may include more or fewer components than shown, or combine certain components, or use different component arrangements.
[0413] In other embodiments, the electronic device is provided as a server. Figure 11 This is a structural block diagram of a server according to an exemplary embodiment. The server 1100 can vary significantly due to different configurations or performance. It may include one or more Central Processing Units (CPUs) 1101 and one or more memories 1102. The memories 1102 store at least one executable instruction, which is loaded and executed by the processor 1101 to implement the methods provided in the various method embodiments described above. Of course, the server may also have wired or wireless network interfaces, a keyboard, and input / output interfaces for input / output. The server may also include other components for implementing device functions, which will not be elaborated upon here.
[0414] In an exemplary embodiment, a computer-readable storage medium is also provided, which, when executed by a processor of an electronic device, enables the electronic device to perform the aforementioned recommendation model processing method or media content recommendation method. Optionally, the computer-readable storage medium may be a ROM (Read Only Memory), RAM (Random Access Memory), CD-ROM (Compact Disc Read-Only Memory), magnetic tape, floppy disk, or optical data storage device, etc.
[0415] In an exemplary embodiment, a computer program product is also provided, which includes a computer program that is executed by a processor to implement the above-described recommendation model processing method or media content recommendation method.
[0416] In some embodiments, the computer program involved in the present application embodiments may be deployed and executed on a computer device, or executed on multiple computer devices located in one location, or executed on multiple computer devices distributed in multiple locations and interconnected through a communication network. Multiple computer devices distributed in multiple locations and interconnected through a communication network may constitute a blockchain system.
[0417] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0418] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A media content recommendation method, characterized in that, The method includes: Obtain a recommendation model, which includes object features of multiple objects, including user accounts and media content; Based on the account characteristics of the first user account and the content characteristics of the first media content, the similarity between the first user account and the first media content is determined, wherein the first user account is any one of the user accounts and the first media content is any one of the media content; Based on the similarity, the first media content is recommended to the first user account; The plurality of objects include a first object and a second object. The first object is an object in the newly added behavioral data, and the second object is an object related to the first object. The recommendation model is trained based on a propagation loss negatively correlated with a first similarity. The first similarity is determined based on the similarity between the influence feature of the second object and the object feature of the second object. The influence feature represents the characteristics of the second object under the influence of the interaction behavior corresponding to the newly added behavioral data. The influence feature of the second object is determined based on the first feature of the first object and the interaction time difference of the second object. The interaction time difference of the second object is the time difference between the occurrence time of the newly added behavioral data and the occurrence time of the historical behavioral data to which the second object belongs.
2. The media content recommendation method according to claim 1, characterized in that, The account features include a first memory feature and a second memory feature of the first user account, wherein the first memory feature represents the long-term features of the first user account and the second memory feature represents the short-term features of the first user account; the content features include a first memory feature and a second memory feature of the first media content, wherein the first memory feature represents the long-term features of the first media content and the second memory feature represents the short-term features of the first media content. The determination of the similarity between the first user account and the first media content based on the account characteristics of the first user account and the content characteristics of the first media content includes: The first memory feature and the second memory feature of the first user account are fused to obtain the fused feature of the first user account; and the first memory feature and the second memory feature of the first media content are fused to obtain the fused feature of the first media content. Determine the similarity between the fusion features of the first user account and the fusion features of the first media content.
3. The media content recommendation method according to claim 2, characterized in that, The account features also include the context features of the first user account, which characterize the features of the first user account under the influence of other objects; The process of fusing the first memory feature and the second memory feature of the first user account to obtain the fused feature of the first user account includes: The first memory feature, the second memory feature, and the context feature of the first user account are fused to obtain the fused feature of the first user account.
4. A recommendation model processing method, characterized in that, The method includes: Obtain first behavior information, which includes new behavior data and historical behavior data. The new behavior data is used to represent the interaction behavior between two first objects of different types, including accounts and media content. The historical behavior data is the historical behavior data corresponding to a second object related to any of the first objects. Obtain a recommendation model, the recommendation model including first features of multiple objects, the multiple objects including the two first objects and at least one second object from the historical behavior data; For each of the first objects, the influence characteristics of the second object are determined based on the first feature of the first object and the interaction time difference of the second object related to the first object. The influence characteristics of any second object characterize the characteristics of the second object under the influence of the interaction behavior corresponding to the new behavior data. The interaction time difference of the second object is the time difference between the occurrence time of the new behavior data and the occurrence time of the historical behavior data to which the second object belongs. The recommendation model is trained based on a propagation loss negatively correlated with the first similarity, where the first similarity is determined based on the similarity between the influence features of each second object and the first features of each second object. The trained recommendation model includes the second features of the plurality of objects and is used to make recommendations based on the second features of the plurality of objects.
5. The recommendation model processing method according to claim 4, characterized in that, For each of the first objects, determining the influence characteristics of the second object based on a first characteristic of the first object and the interaction time difference of the second object related to the first object includes: For each of the first objects, the first feature of the first object is attenuated based on the interaction time difference of the first object to obtain the interaction feature of the first object. The interaction time difference of the first object is the time difference between the occurrence time of the newly added behavior data and the occurrence time of the historical behavior data to which the first object belongs. Based on the interaction characteristics of the first object and the interaction time difference of the second object that belongs to the same historical behavior data as the first object, the influence characteristics of the second object related to the first object are determined. Based on the influence characteristics of the second object and the interaction time difference of another second object belonging to the same historical behavior data as the second object, the influence characteristics of another second object are determined until the influence characteristics of each second object related to the first object in the first behavior information are determined.
6. The recommendation model processing method according to claim 5, characterized in that, The step of determining the influence characteristics of the second object related to the first object based on the interaction characteristics of the first object and the interaction time difference of the second object belonging to the same historical behavior data as the first object includes: If the interaction time difference is not greater than a time difference threshold, a first attenuation parameter negatively correlated with the interaction time difference is determined, and the interaction characteristics of the first object are attenuated according to the first attenuation parameter to obtain the influence characteristics of the second object; or... If the interaction time difference is greater than the time difference threshold, the preset influence feature is determined as the influence feature of the second object.
7. The recommendation model processing method according to claim 4, characterized in that, The first behavioral information includes at least two object nodes belonging to different node types and an edge connecting any two object nodes. The node types include account type and media content type. The at least two object nodes include two first object nodes belonging to different types and a second object node that is directly or indirectly connected to any of the first object nodes. The two first object nodes and the first edge connecting the two first object nodes constitute the newly added behavior data; A first object node and a second object node of different types, as well as the second side connecting the first object node and the second object node, constitute a historical behavior data, and / or, any two second object nodes of different types, as well as the third side connecting any two second object nodes, constitute a historical behavior data. For each of the first objects, determining the influence characteristics of the second object based on a first characteristic of the first object and the interaction time difference of the second object related to the first object includes: For each of the first object nodes, the first feature of the first object node is attenuated based on the interaction time difference of the first object node to obtain the interaction feature of the first object node. The interaction time difference of the first object node is the time difference between the occurrence time of the first edge and the occurrence time of the second edge connected to the first object node. Based on the interaction characteristics of the first object node and the interaction time difference of the second object node directly connected to the first object node, the influence characteristics of the second object node are determined. Based on the influence characteristics of the second object node and the interaction time difference of another second object node directly connected to the second object node, the influence characteristics of another second object node are determined until the influence characteristics of each second object node directly or indirectly connected to any first object node in the first behavior information are determined.
8. The recommendation model processing method according to claim 4, characterized in that, The method further includes: For each of the first objects, the first feature of the first object is attenuated based on the interaction time difference of the first object to obtain the attenuated feature. The attenuated feature represents the feature of the first object after attenuation under the influence of the interaction behavior corresponding to the new behavior data. The interaction time difference of the first object is the time difference between the occurrence time of the new behavior data and the occurrence time of the historical behavior data to which the first object belongs. Based on the decay characteristics of the two first objects, an interaction loss negatively correlated with the second similarity is determined, where the second similarity is the similarity between the decay characteristics of the two first objects. The training of the recommendation model based on the propagation loss negatively correlated with the first similarity includes: The recommendation model is trained based on the propagation loss negatively correlated with the first similarity and the interaction loss.
9. The recommendation model processing method according to claim 8, characterized in that, The first feature of the first object includes a first memory feature and a second memory feature, wherein the first memory feature characterizes the long-term features of the first object, and the second memory feature characterizes the short-term features of the first object; the attenuation of the first feature of the first object based on the interaction time difference of the first object to obtain the attenuated feature includes: Based on the interaction time difference of the first object, the second memory feature of the first object is attenuated; The first memory feature of the first object is fused with the attenuated second memory feature to obtain the attenuated feature of the first object.
10. The recommendation model processing method according to claim 9, characterized in that, The attenuation of the second memory feature of the first object based on the interaction time difference of the first object includes: The second decay parameter is determined based on the interaction time difference of the first object and the learning parameters corresponding to the type of the first object. The second memory feature is attenuated based on the second attenuation parameter.
11. The recommendation model processing method according to claim 9, characterized in that, The first feature of the first object further includes a contextual feature, which characterizes the features of the first object under the influence of other objects; the fusion of the first memory feature of the first object with the decayed second memory feature to obtain the decayed feature of the first object includes: The first memory feature, the attenuated second memory feature, and the context feature of the first object are weighted and fused to obtain the attenuated feature of the first object.
12. The recommendation model processing method according to claim 11, characterized in that, The context features of the first object include the context features of the first object for multiple interaction types, and the newly added behavior data includes the target interaction type corresponding to the interaction behavior; The weighted fusion of the first memory feature, the attenuated second memory feature, and the context feature of the first object to obtain the attenuated feature of the first object includes: From the context features of the first object for multiple interaction types, determine the context features corresponding to the target interaction type; The first memory feature of the first object, the attenuated second memory feature, and the context feature corresponding to the target interaction type are weighted and fused to obtain the attenuated feature of the first object.
13. The recommendation model processing method according to claim 8, characterized in that, The recommendation model further includes model parameters, and the training of the recommendation model based on the propagation loss negatively correlated with the first similarity and the interaction loss includes: The propagation loss negatively correlated with the first similarity and the interaction loss are fused to obtain the model loss of the recommendation model; Based on the model loss, the model parameters and the first features of the multiple objects in the recommendation model are updated to obtain the trained recommendation model.
14. The recommendation model processing method according to claim 4, characterized in that, The method further includes: From the second behavior information, a third object corresponding to each first object is determined. The second behavior information includes the newly added behavior data and multiple historical behavior data. The third object is any other object in the second behavior information besides the first object. A negative sampling loss is determined that is negatively correlated with the third similarity, which is determined based on the similarity between the interaction features of the first object and the context features of the third object, wherein the context features characterize the features of the third object under the influence of other objects; The training of the recommendation model based on the propagation loss negatively correlated with the first similarity includes: The recommendation model is trained based on the propagation loss negatively correlated with the first similarity and the negative sampling loss.
15. The recommendation model processing method according to claim 8, characterized in that, The method further includes: From the second behavior information, a third object corresponding to each first object is determined. The second behavior information includes the newly added behavior data and multiple historical behavior data. The third object is any other object in the second behavior information besides the first object. A negative sampling loss is determined that is negatively correlated with the third similarity, which is determined based on the similarity between the interaction features of the first object and the context features of the third object, wherein the context features characterize the features of the third object under the influence of other objects; The step of training the recommendation model based on the propagation loss negatively correlated with the first similarity and the interaction loss includes: The recommendation model is trained based on the propagation loss negatively correlated with the first similarity, the interaction loss, and the negative sampling loss.
16. The recommendation model processing method according to claim 4, characterized in that, The acquisition of the first line of information includes: Based on the two first objects in the newly added behavior data, the second behavior information is sampled to obtain the first behavior information, which includes the newly added behavior data and multiple historical behavior data.
17. The recommendation model processing method according to claim 16, characterized in that, The step of sampling the second behavior information according to the two first objects in the newly added behavior data to obtain the first behavior information includes: Obtain a set of sampling methods, wherein the set of sampling methods includes multiple sampling methods; From the set of sampling methods, determine the sampling method for each of the first objects; For each of the first objects, starting from the first object, sampling is performed in the second behavior information according to the determined sampling method, and the sampled historical behavior data and the newly added behavior data constitute the first behavior information.
18. The recommendation model processing method according to claim 4, characterized in that, The first feature of the second object includes a contextual feature, which characterizes the features of the second object under the influence of other objects; The method further includes: Determine the similarity between the influence features and context features of each of the second objects; The similarity of the at least one second object is fused to obtain the first similarity.
19. The recommendation model processing method according to claim 4, characterized in that, Before acquiring new behavioral data, the method further includes: Multiple sample behavior data are obtained, and each sample behavior data is used to represent the interaction behavior between two sample objects of different types; The multiple sample behavior data are divided into multiple sample sets according to the order of their occurrence from oldest to most recent, and each sample set contains the same number of sample behavior data. The recommendation model is trained sequentially based on the multiple sample sets.
20. A media content recommendation device, characterized in that, The device includes: The first acquisition unit is configured to execute the acquisition of a recommendation model, the recommendation model including object features of multiple objects, the multiple objects including user accounts and media content; The first determining unit is configured to perform an operation based on the account characteristics of a first user account and the content characteristics of a first media content to determine the similarity between the first user account and the first media content, wherein the first user account is any one of the user accounts and the first media content is any one of the media content. The recommendation unit is configured to perform the task of recommending the first media content to the first user account based on the similarity. The plurality of objects include a first object and a second object. The first object is an object in the newly added behavioral data, and the second object is an object related to the first object. The recommendation model is trained based on a propagation loss negatively correlated with a first similarity. The first similarity is determined based on the similarity between the influence feature of the second object and the object feature of the second object. The influence feature represents the characteristics of the second object under the influence of the interaction behavior corresponding to the newly added behavioral data. The influence feature of the second object is determined based on the first feature of the first object and the interaction time difference of the second object. The interaction time difference of the second object is the time difference between the occurrence time of the newly added behavioral data and the occurrence time of the historical behavioral data to which the second object belongs.
21. The media content recommendation device according to claim 20, characterized in that, The account features include a first memory feature and a second memory feature of the first user account, wherein the first memory feature represents the long-term features of the first user account and the second memory feature represents the short-term features of the first user account; the content features include a first memory feature and a second memory feature of the first media content, wherein the first memory feature represents the long-term features of the first media content and the second memory feature represents the short-term features of the first media content. The first determining unit is configured to perform the fusion of the first memory feature and the second memory feature of the first user account to obtain the fused feature of the first user account, and to perform the fusion of the first memory feature and the second memory feature of the first media content to obtain the fused feature of the first media content. Determine the similarity between the fusion features of the first user account and the fusion features of the first media content.
22. The media content recommendation device according to claim 21, characterized in that, The account features also include the context features of the first user account, which characterize the features of the first user account under the influence of other objects; The first determining unit is configured to perform a fusion of the first memory feature, the second memory feature, and the context feature of the first user account to obtain a fused feature of the first user account.
23. A recommendation model processing device, characterized in that, The device includes: The second acquisition unit is configured to acquire first behavior information, which includes new behavior data and historical behavior data. The new behavior data is used to represent the interaction behavior between two first objects of different types, including accounts and media content. The historical behavior data is the historical behavior data corresponding to a second object related to any of the first objects. The third acquisition unit is configured to acquire a recommendation model, the recommendation model including first features of multiple objects, the multiple objects including the two first objects and at least one second object in the historical behavior data; The second determining unit is configured to perform, for each first object, determine the influence feature of the second object based on a first feature of the first object and the interaction time difference of the second object related to the first object. The influence feature of any second object characterizes the feature of the second object under the influence of the interaction behavior corresponding to the new behavior data. The interaction time difference of the second object is the time difference between the occurrence time of the new behavior data and the occurrence time of the historical behavior data to which the second object belongs. The training unit is configured to train the recommendation model by performing a propagation loss negatively correlated with a first similarity, the first similarity being determined based on the similarity between the influence features of each second object and the first features of each second object, the trained recommendation model including the second features of the plurality of objects, and the trained recommendation model being used to make recommendations based on the second features of the plurality of objects.
24. The recommendation model processing apparatus according to claim 23, characterized in that, The second determining unit is configured to execute: For each of the first objects, the first feature of the first object is attenuated based on the interaction time difference of the first object to obtain the interaction feature of the first object. The interaction time difference of the first object is the time difference between the occurrence time of the newly added behavior data and the occurrence time of the historical behavior data to which the first object belongs. Based on the interaction characteristics of the first object and the interaction time difference of the second object that belongs to the same historical behavior data as the first object, the influence characteristics of the second object related to the first object are determined. Based on the influence characteristics of the second object and the interaction time difference of another second object belonging to the same historical behavior data as the second object, the influence characteristics of another second object are determined until the influence characteristics of each second object related to the first object in the first behavior information are determined.
25. The recommendation model processing apparatus according to claim 24, characterized in that, The second determining unit is configured to, when the interaction time difference is not greater than a time difference threshold, determine a first attenuation parameter negatively correlated with the interaction time difference, attenuate the interaction features of the first object according to the first attenuation parameter, and obtain the influence features of the second object; or... The second determining unit is configured to determine a preset influence feature as the influence feature of the second object when the interaction time difference is greater than the time difference threshold.
26. The recommendation model processing apparatus according to claim 23, characterized in that, The first behavioral information includes at least two object nodes belonging to different node types and an edge connecting any two object nodes. The node types include account type and media content type. The at least two object nodes include two first object nodes belonging to different types and a second object node that is directly or indirectly connected to any of the first object nodes. The two first object nodes and the first edge connecting the two first object nodes constitute the newly added behavior data; A first object node and a second object node of different types, as well as the second side connecting the first object node and the second object node, constitute a historical behavior data, and / or, any two second object nodes of different types, as well as the third side connecting any two second object nodes, constitute a historical behavior data. The second determining unit is configured to execute: For each of the first object nodes, the first feature of the first object node is attenuated based on the interaction time difference of the first object node to obtain the interaction feature of the first object node. The interaction time difference of the first object node is the time difference between the occurrence time of the first edge and the occurrence time of the second edge connected to the first object node. Based on the interaction characteristics of the first object node and the interaction time difference of the second object node directly connected to the first object node, the influence characteristics of the second object node are determined. Based on the influence characteristics of the second object node and the interaction time difference of another second object node directly connected to the second object node, the influence characteristics of another second object node are determined until the influence characteristics of each second object node directly or indirectly connected to any first object node in the first behavior information are determined.
27. The recommendation model processing apparatus according to claim 23, characterized in that, The device further includes: The third determining unit is configured to execute: For each of the first objects, the first feature of the first object is attenuated based on the interaction time difference of the first object to obtain the attenuated feature. The attenuated feature represents the feature of the first object after attenuation under the influence of the interaction behavior corresponding to the new behavior data. The interaction time difference of the first object is the time difference between the occurrence time of the new behavior data and the occurrence time of the historical behavior data to which the first object belongs. Based on the decay characteristics of the two first objects, an interaction loss negatively correlated with the second similarity is determined, where the second similarity is the similarity between the decay characteristics of the two first objects. The training unit is configured to train the recommendation model based on the propagation loss negatively correlated with the first similarity and the interaction loss.
28. The recommendation model processing apparatus according to claim 27, characterized in that, The first feature of the first object includes a first memory feature and a second memory feature, wherein the first memory feature represents the long-term features of the first object and the second memory feature represents the short-term features of the first object; the third determining unit is configured to perform attenuation of the second memory feature of the first object based on the interaction time difference of the first object; The first memory feature of the first object is fused with the attenuated second memory feature to obtain the attenuated feature of the first object.
29. The recommendation model processing apparatus according to claim 28, characterized in that, The third determining unit is configured to execute learning parameters based on the interaction time difference of the first object and the type of the first object to determine the second decay parameter; and to decay the second memory feature based on the second decay parameter.
30. The recommendation model processing apparatus according to claim 28, characterized in that, The first feature of the first object further includes a context feature, which characterizes the features of the first object under the influence of other objects; the third determining unit is configured to perform a weighted fusion of the first memory feature, the attenuated second memory feature, and the context feature of the first object to obtain the attenuated feature of the first object.
31. The recommendation model processing apparatus according to claim 30, characterized in that, The context features of the first object include the context features of the first object for multiple interaction types, and the newly added behavior data includes the target interaction type corresponding to the interaction behavior; The third determining unit is configured to determine the context features corresponding to the target interaction type from the context features of the first object for multiple interaction types. The first memory feature of the first object, the attenuated second memory feature, and the context feature corresponding to the target interaction type are weighted and fused to obtain the attenuated feature of the first object.
32. The recommendation model processing apparatus according to claim 27, characterized in that, The recommendation model further includes model parameters. The training unit is configured to perform a process of fusing the propagation loss negatively correlated with the first similarity and the interaction loss to obtain the model loss of the recommendation model. Based on the model loss, the model parameters in the recommendation model and the first features of the multiple objects are updated to obtain the trained recommendation model.
33. The recommendation model processing apparatus according to claim 23, characterized in that, The device further includes: The fourth determining unit is configured to perform the following actions: determining a third object corresponding to each first object from the second behavioral information, wherein the second behavioral information includes the newly added behavioral data and multiple historical behavioral data, and the third object is any other object in the second behavioral information besides the first object; determining a negative sampling loss that is negatively correlated with a third similarity, wherein the third similarity is determined based on the similarity between the interaction features of the first object and the context features of the third object, and the context features characterize the features of the third object under the influence of other objects; The training unit is configured to train the recommendation model based on the propagation loss negatively correlated with the first similarity and the negative sampling loss.
34. The recommendation model processing apparatus according to claim 27, characterized in that, The device further includes: The fourth determining unit is configured to perform the following actions: determining a third object corresponding to each first object from the second behavioral information, wherein the second behavioral information includes the newly added behavioral data and multiple historical behavioral data, and the third object is any other object in the second behavioral information besides the first object; determining a negative sampling loss that is negatively correlated with a third similarity, wherein the third similarity is determined based on the similarity between the interaction features of the first object and the context features of the third object, and the context features characterize the features of the third object under the influence of other objects; The training unit is configured to train the recommendation model based on the propagation loss negatively correlated with the first similarity, the interaction loss, and the negative sampling loss.
35. The recommendation model processing apparatus according to claim 23, characterized in that, The second acquisition unit is configured to sample the second behavior information according to the two first objects in the newly added behavior data to obtain the first behavior information, wherein the second behavior information includes the newly added behavior data and multiple historical behavior data.
36. The recommendation model processing apparatus according to claim 35, characterized in that, The second acquisition unit is configured to acquire a set of sampling methods, the set of sampling methods including multiple sampling methods; determine the sampling method for each first object from the set of sampling methods; for each first object, starting from the first object, sample the second behavior information according to the determined sampling method, and combine the sampled historical behavior data with the newly added behavior data to form the first behavior information.
37. The recommendation model processing apparatus according to claim 23, characterized in that, The first feature of the second object includes a contextual feature, which characterizes the features of the second object under the influence of other objects; the device further includes: The fifth determining unit is configured to perform the following: determining the similarity between the influence features and context features of each second object; and fusing the similarities of the at least one second object to obtain the first similarity.
38. The recommendation model processing apparatus according to claim 23, characterized in that, The device further includes: The training unit is further configured to acquire multiple sample behavior data, each of which represents the interaction behavior between two sample objects of different types; divide the multiple sample behavior data into multiple sample sets according to the order of occurrence from earliest to latest, with each sample set containing the same number of sample behavior data; and train the recommendation model sequentially based on the multiple sample sets.
39. An electronic device, characterized in that, The electronic device includes: One or more processors; Memory for storing the one or more processor-executable instructions; The one or more processors are configured to perform the media content recommendation method as described in any one of claims 1 to 3, or to perform the recommendation model processing method as described in any one of claims 4 to 19.
40. A computer-readable storage medium, characterized in that, When the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device is able to perform the media content recommendation method as described in any one of claims 1 to 3, or to perform the recommendation model processing method as described in any one of claims 4 to 19.
41. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the media content recommendation method as described in any one of claims 1 to 3, or is capable of executing the recommendation model processing method as described in any one of claims 4 to 19.
Citation Information
Patent Citations
Object recommendation method and device, computer equipment and storage medium
CN110941764A
Content recommendation method and device, electronic equipment and storage medium
CN111737501A