An information recommendation method and device, electronic equipment and storage medium
By acquiring new user location information and calculating the distance between object feature vectors, the problem of inaccurate recommendations for new users in information recommendation systems is solved, and personalized recommendation effects are achieved.
Patent Information
- Application Number
- CN202010404570.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-05-13
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2040-05-13
AI Technical Summary
The information recommendation system is unable to personalize information recommendations for new users, resulting in low recommendation accuracy.
By obtaining the location information of new users, a set of objects to be recommended within their location range is determined, the distance between the object features and the feature vectors of currently popular categories is calculated, and objects with a distance less than a preset distance are recommended to new users.
It enables personalized recommendations of objects that new users may be interested in, thus improving the accuracy of the recommendations.
Smart Images

Figure CN111782936B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of Internet, in particular to an information recommendation method and device, electronic equipment and storage medium. BACKGROUND
[0002] With the rapid development of Internet technology, more and more information can be pushed to users by information recommendation system. Specifically, the information recommendation system is essentially to predict the future behavior and interest of the user according to the user's historical behavior and interest, that is, to recommend information that the user may be interested in according to the user's historical behavior data.
[0003] However, in practical application, there are a large number of new users, and these new users have no user historical behavior data, at this time, the information recommendation system cannot recommend information for new users according to user historical behavior data.
[0004] In related technologies, the way the information recommendation system recommends information for new users is usually to recommend the same information to a large number of new users, which cannot individualize the information recommendation for new users, and the accuracy of the information recommended by the information recommendation system for new users is low. SUMMARY
[0005] In order to solve the technical problem that the information recommendation system in the related art recommends the same information to a large number of new users when recommending information for new users, that is, cannot individualize the information recommendation for new users, resulting in low accuracy of the information recommended by the information recommendation system for new users, the embodiments of the present application provide an information recommendation method, device, electronic equipment and storage medium.
[0006] In a first aspect, the embodiments of the present application provide an information recommendation method, which comprises:
[0007] Obtaining the location information of a first user, the first user being a user whose number of current user historical behavior data is less than a preset number;
[0008] According to the location information of the first user, determining a set of to-be-recommended objects within a preset range of the location information of the first user;
[0009] Obtaining the object features of each to-be-recommended object in the set of to-be-recommended objects, wherein the object features of a to-be-recommended object include a first feature vector corresponding to the category identifier of the category to which the to-be-recommended object belongs;
[0010] Calculate the distance between the first feature vector included in the object features of each to-be-recommended object and the second feature vector corresponding to the category identifier of the current popular category determined based on the user historical behavior data of a second user whose number of current user historical behavior data is greater than the preset number;
[0011] recommending a target recommendation object to the terminal corresponding to the first user, the target recommendation object being a recommendation object in the set of to-be-recommended objects that is within a preset distance.
[0012] Optionally, the obtaining of the object feature of each to-be-recommended object in the set of to-be-recommended objects comprises:
[0013] obtaining an object identifier of each to-be-recommended object and a category identifier of a category to which the to-be-recommended object belongs;
[0014] inputting the object identifier of each to-be-recommended object and the category identifier of the category to which each to-be-recommended object belongs into a pre-trained vectorization model to obtain a vector corresponding to the object identifier of each to-be-recommended object;
[0015] inputting the vector corresponding to the object identifier of each to-be-recommended object into a pre-trained clustering model to obtain a first feature vector corresponding to the category identifier of the category to which each to-be-recommended object belongs,
[0016] wherein the first feature vector corresponding to one category identifier is obtained by summing the vectors corresponding to the object identifiers of the objects belonging to the category identifier.
[0017] Optionally, the calculating of the distance between the first feature vector included in the object feature of each to-be-recommended object and a second feature vector corresponding to the category identifier of a pre-determined currently popular category comprises:
[0018] for each to-be-recommended object, calculating a first distance between the first feature vector included in the object feature of the to-be-recommended object and the second feature vector corresponding to the category identifier of each currently popular category;
[0019] for each to-be-recommended object, performing weighted summation on each first distance corresponding to the to-be-recommended object and a corresponding weight coefficient to obtain a second distance corresponding to the to-be-recommended object, and determining the second distance as the distance between the first feature vector included in the to-be-recommended object and the second feature vector corresponding to the category identifier of the pre-determined currently popular category;
[0020] wherein each currently popular category corresponds to one weight coefficient, and the weight coefficient corresponding to each currently popular category is determined based on an attention mechanism model.
[0021] Optionally, the pre-determination of the second feature vector corresponding to the category identifier of a currently popular category comprises:
[0022] updating user historical behavior data of the second user every preset period, the user historical behavior data comprising: a consumption frequency of an object consumed by the second user, an object identifier of the object consumed by the second user, and a category identifier of a category to which the object consumed by the second user belongs;
[0023] determining target user historical behavior data that is currently popular in the user historical behavior data of the second user based on the consumption frequency of the object consumed by the second user;
[0024] inputting the object identifier of the object consumed by the second user and the category identifier of the category to which the object consumed by the second user belongs, which are included in the target user historical behavior data, into a pre-trained vectorization model to obtain a vector corresponding to the object identifier of the object consumed by the second user;
[0025] inputting the vector corresponding to the object identifier of the object consumed by the second user into a pre-trained clustering model to obtain a second feature vector corresponding to the category identifier of a currently popular category;
[0026] The second feature vector corresponding to the category identifier of a currently popular category is obtained by performing summation operation on vectors corresponding to object identifiers of objects belonging to the currently popular category.
[0027] Optionally, the determining of the target user historical behavior data that is currently popular in the user historical behavior data of the second user based on the consumption frequency of the object consumed by the second user comprises:
[0028] deleting user historical behavior data that meets a preset condition from the user historical behavior data of the second user to obtain deleted user historical behavior data, the preset condition comprising at least one of the following: the consumption frequency is less than a first preset consumption frequency, the consumption frequency is greater than a second preset consumption frequency, and the consumption frequency remains unchanged within a preset time length;
[0029] determining target user historical behavior data that is currently popular in the deleted user historical behavior data based on the consumption frequency of the object consumed by the second user.
[0030] In a second aspect, an embodiment of the present application provides an information recommendation device, the device comprising:
[0031] a position information acquisition module configured to acquire position information of a first user, the first user being a new user without user historical behavior data;
[0032] a to-be-recommended object set determination module configured to determine a to-be-recommended object set within a preset range of the position information of the first user according to the position information of the first user;
[0033] An object feature obtaining module is configured to obtain object features of each to-be-recommended object in the to-be-recommended object set, wherein the object features of one to-be-recommended object comprise a first feature vector corresponding to a category identifier of a category to which the to-be-recommended object belongs.
[0034] A vector distance calculating module is configured to calculate distances between the first feature vector comprised in the object features of each to-be-recommended object and a second feature vector corresponding to a category identifier of a pre-determined current popular category, wherein the current popular category is determined based on user historical behavior data of a second user currently having the user historical behavior data.
[0035] An object recommending module is configured to recommend a target recommended object to a terminal corresponding to the first user, wherein the target recommended object is a recommended object in the to-be-recommended object set and having a distance less than a preset distance.
[0036] Optionally, the object feature obtaining module is specifically configured to:
[0037] obtain object identifiers of each to-be-recommended object in the to-be-recommended object set and category identifiers of categories to which the to-be-recommended objects belong;
[0038] input the object identifiers of each to-be-recommended object and the category identifiers of the categories to which the to-be-recommended objects belong into a pre-trained vectorization model to obtain vectors corresponding to the object identifiers of each to-be-recommended object;
[0039] input the vectors corresponding to the object identifiers of each to-be-recommended object into a pre-trained clustering model to obtain first feature vectors corresponding to the category identifiers of the categories to which the to-be-recommended objects belong,
[0040] wherein the first feature vector corresponding to one category identifier is obtained by performing summation operation on the vectors corresponding to the object identifiers of the objects belonging to the category identifier.
[0041] Optionally, the vector distance calculating module is specifically configured to:
[0042] for each to-be-recommended object, calculate first distances between the first feature vector comprised in the object features of the to-be-recommended object and second feature vectors corresponding to the category identifiers of each current popular category;
[0043] for each to-be-recommended object, perform weighted summation on each first distance corresponding to the to-be-recommended object and a corresponding weight coefficient to obtain a second distance corresponding to the to-be-recommended object, and determine the second distance as the distance between the first feature vector comprised in the to-be-recommended object and the second feature vector corresponding to the category identifier of the pre-determined current popular category;
[0044] Each current popular category corresponds to a weight coefficient, and the weight coefficient corresponding to each current popular category is determined based on an attention mechanism model.
[0045] Optionally, the apparatus further includes a feature vector determination module.
[0046] The feature vector determination module includes:
[0047] An updating unit configured to update the user historical behavior data of the second user every preset period, the user historical behavior data including a consumption frequency of an object consumed by the second user, an object identifier of the object consumed by the second user, and a category identifier of a category to which the object consumed by the second user belongs.
[0048] A determination unit configured to determine, based on the consumption frequency of the object consumed by the second user, target user historical behavior data that is currently popular in the user historical behavior data of the second user.
[0049] A vectorization unit configured to input the object identifier of the object consumed by the second user and the category identifier of the category to which the object consumed by the second user belongs, which are included in the target user historical behavior data, into a pre-trained vectorization model to obtain a vector corresponding to the object identifier of the object consumed by the second user.
[0050] A clustering unit configured to input the vector corresponding to the object identifier of the object consumed by the second user into a pre-trained clustering model to obtain a second feature vector corresponding to the category identifier of a current popular category.
[0051] The second feature vector corresponding to the category identifier of a current popular category is obtained by performing a summation operation on vectors corresponding to object identifiers of objects belonging to the current popular category.
[0052] Optionally, the determination unit is specifically configured to:
[0053] delete, from the user historical behavior data of the second user, user historical behavior data that meets a preset condition to obtain deleted user historical behavior data, the preset condition including at least one of the following: a consumption frequency less than a first preset consumption frequency, a consumption frequency greater than a second preset consumption frequency, and a consumption frequency remaining unchanged within a preset time length.
[0054] determine, based on the consumption frequency of the object consumed by the second user, target user historical behavior data that is currently popular in the deleted user historical behavior data.
[0055] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor implements the steps of the information recommendation method according to the first aspect when executing the program.
[0056] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program, when executed by a processor, implements the steps of the information recommendation method according to the first aspect.
[0057] By the technical solution provided by the embodiment of the present application, when recommending objects for the first user (new user), the distance between the first feature vector included in the object feature of each object near the new user and the second feature vector corresponding to the category identifier of the current popular category can be calculated, and the recommended object in the to-be-recommended object set with a distance less than a preset distance is recommended to the new user, so that the new user can be personalized recommended with the objects that the new user is likely to be interested in, and the accuracy of the recommended objects for the new user is improved. BRIEF DESCRIPTION OF DRAWINGS
[0058] Figure 1 is a step flow chart of an information recommendation method provided by an embodiment of the present application;
[0059] Figure 2 is a step flow chart of one implementation of S130 in the embodiment shown in Figure 1
[0060] Figure 3 is a schematic diagram of a training process of a vectorization model;
[0061] Figure 4 is a step flow chart of one implementation of S140 in the embodiment shown in Figure 1
[0062] Figure 5 is a step flow chart of a specific implementation of the second feature vector corresponding to the category identifier of the current popular category provided by an embodiment of the present application;
[0063] Figure 6 is a system block diagram of a food store recommendation system provided by an embodiment of the present application;
[0064] Figure 7 is a structural block diagram of an information recommendation device provided by an embodiment of the present application;
[0065] Figure 8 is a structural block diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0066] In order to make the above objectives, characteristics and advantages of the present application more apparent, comprehensible and easier to understand, the present application will be described in further detail below with reference to the accompanying drawings and specific embodiments.
[0067] In order to solve the technical problem that the information recommendation system in the related art cannot recommend information to new users individually when recommending information to new users, i.e., the information recommendation system recommends the same information to a large number of new users, thereby resulting in low accuracy of the information recommended by the information recommendation system to new users, embodiments of the present application provide an information recommendation method, device, electronic equipment and storage medium.
[0068] In a first aspect, a detailed introduction is first made to the information recommendation method provided by the embodiments of the present application.
[0069] As shown in Figure 1 The information recommendation method provided by the embodiments of the present application can include the following steps:
[0070] S110, obtaining position information of a first user.
[0071] The first user is a user whose number of current user historical behavior data is less than a preset number.
[0072] Specifically, the size of the preset number can be set according to actual conditions, and the embodiments of the present application do not make specific limitations thereon. The number of current user historical behavior data of the first user can be 0, or the number of current user historical behavior data of the first user can be small, i.e., the first user is a new user. The embodiments of the present application do not make specific limitations on the number of current user historical behavior data of the first user.
[0073] In order to accurately recommend information to the first user in the subsequent steps, i.e., to recommend objects such as stores that the first user likes to consume, the position information of the first user can be obtained, wherein the position information of the first user can be obtained from the positioning data of the terminal used by the first user.
[0074] S120, determining a set of to-be-recommended objects within a preset range of the position information of the first user according to the position information of the first user.
[0075] The to-be-recommended object can be a to-be-recommended store, a to-be-recommended food, etc., and the embodiments of the present application do not make specific limitations thereon.
[0076] After obtaining the position information of the first user, a preset range can be determined with the position information of the first user as the center and a preset value as the radius. The size of the preset value can be determined according to actual conditions, and the embodiments of the present application do not make specific limitations thereon.
[0077] After the preset range is determined, the objects in the preset range are objects near the first user, and the objects near the first user are objects that the user can want to consume, and therefore, all the objects in the preset range can constitute a set of to-be-recommended objects.
[0078] It should be noted that the object category of the to-be-recommended objects included in the set of to-be-recommended objects can be determined according to actual conditions. For example, if the first user enters a food channel, the to-be-recommended objects included in the set of to-be-recommended objects can be food stores. If the first user enters a hotel channel, the to-be-recommended objects included in the set of to-be-recommended objects can be hotel stores. If the first user enters a movie channel, the to-be-recommended objects included in the set of to-be-recommended objects can be movie theater stores.
[0079] In S130, object features of each to-be-recommended object in the set of to-be-recommended objects are obtained.
[0080] The object features of one to-be-recommended object include a first feature vector corresponding to a category identifier of a category to which the to-be-recommended object belongs.
[0081] Specifically, after the set of to-be-recommended objects in the preset range of the location information of the first user is determined, in order to determine a target recommended object to be recommended to the first user from the set of to-be-recommended objects in subsequent steps, the object features of each to-be-recommended object in the set of to-be-recommended objects can be extracted.
[0082] The object features of one to-be-recommended object can include a first feature vector corresponding to a category identifier of a category to which the to-be-recommended object belongs. The category identifier of the category to which the to-be-recommended object belongs refers to a category identifier of a category to which the to-be-recommended object belongs. For example, the to-be-recommended object is a food store, and the category identifier of the category to which the food store belongs can be hot pot, barbecue, buffet, milk tea, and the like.
[0083] Of course, the object features of one to-be-recommended object can also include user features of a user who has consumed the to-be-recommended object, and object attribute features of the to-be-recommended object. The object attribute features of one to-be-recommended object can be a ranking of the to-be-recommended object among all objects, a position of the to-be-recommended object, and the like. The object attributes of the to-be-recommended object are not limited in the embodiments of the present application.
[0084] In order to clearly describe the scheme, the object features of each to-be-recommended object in the set of to-be-recommended objects will be described in detail in the following embodiments.
[0085] In S140, a distance between a first feature vector included in the object features of each to-be-recommended object and a second feature vector corresponding to a category identifier of a currently popular category determined in advance is calculated.
[0086] The current popular category is determined based on user historical behavior data of a second user whose number of current user historical behavior data is greater than a preset number.
[0087] Specifically, after obtaining the object feature of each to-be-recommended object, a distance between a first feature vector included in the object feature of each to-be-recommended object and a second feature vector corresponding to a category identifier of a pre-determined current popular category can be calculated. For example, a cosine distance or a Euclidean distance between the first feature vector and the second feature vector can be calculated, and the present embodiment does not make a specific limitation on the calculation manner of the first feature vector and the second feature vector.
[0088] It should be noted that the current popular category is determined based on user historical behavior data of a second user whose number of current user historical behavior data is greater than a preset number, that is, the current popular category can be determined based on user historical behavior data of an old user. The second user can be a user in the same city as the first user. It can be understood that if the second user, that is, the old user, has a relatively high number of consumption times of objects in several categories, the several categories can be determined as the current popular category. The number of the current popular category can be one or multiple, and the present embodiment does not make a specific limitation thereon. For example, if the second user has a relatively high number of consumption times in hot pot restaurants and barbecue restaurants, the current popular category can be hot pot and barbecue.
[0089] To make the scheme clear, the specific implementation of calculating the distance between the first feature vector included in the object feature of each to-be-recommended object and the second feature vector corresponding to the category identifier of the pre-determined current popular category will be described in detail below.
[0090] S150, recommending a target recommended object to a terminal corresponding to the first user.
[0091] The target recommended object is a recommended object in the set of to-be-recommended objects whose distance is less than a preset distance.
[0092] It can be understood that if the distance between the first feature vector included in the object feature of a to-be-recommended object and the second feature vector corresponding to the category identifier of the pre-determined current popular category is relatively small, that is, the distance is less than a preset distance, it indicates that the probability that the category to which the to-be-recommended object belongs is the current popular category is relatively high, and the probability that the first user likes to consume the to-be-recommended object is relatively high. Therefore, the to-be-recommended object can be determined as the target recommended object.
[0093] On the contrary, if the distance between the first feature vector included in the object feature of the to-be-recommended object and the second feature vector corresponding to the category identifier of the pre-determined current popular category is large, it indicates that the probability that the category to which the to-be-recommended object belongs is the current popular category is low, i.e., the distance is greater than the pre-set distance, and the probability that the first user likes to consume the to-be-recommended object is low, so the to-be-recommended object is not the target recommended object.
[0094] The size of the pre-set distance can be determined according to actual conditions, and the embodiment of the present application does not specifically limit the size of the pre-set distance.
[0095] In actual application, the number of target recommended objects is usually multiple, so when the target recommended object is determined, the to-be-recommended objects can also be sorted in descending order according to the distances corresponding to the to-be-recommended objects from large to small, and the to-be-recommended objects in the descending order within the pre-set sorting range are determined as the target recommended objects.
[0096] As described above, the target recommended object is the object that the first user likes to consume with a high probability, so the target recommended object can be recommended to the terminal corresponding to the first user. It can be seen that through the technical solution provided by the embodiment of the present application, the object that the new user is interested in can be personalized recommended to the new user, and the accuracy of the object recommended to the new user is improved.
[0097] Through the technical solution provided by the embodiment of the present application, when the object is recommended to the first user, i.e., the new user, the distance between the first feature vector included in the object feature of each object near the new user and the second feature vector corresponding to the category identifier of the current popular category can be calculated, and the to-be-recommended object in the to-be-recommended object set whose distance is less than the pre-set distance is recommended to the new user, so that the object that the new user is interested in can be personalized recommended to the new user, and the accuracy of the object recommended to the new user is improved.
[0098] In order to clearly describe the scheme, the object feature of each to-be-recommended object in the to-be-recommended object set will be described in detail in the following embodiment.
[0099] In an implementation mode, S130, the object feature of each to-be-recommended object in the to-be-recommended object set is obtained, as shown in the following steps. Figure 2
[0100] S210, the object identifier of each to-be-recommended object in the to-be-recommended object set and the category identifier of the category to which the to-be-recommended object belongs are obtained.
[0101] Specifically, after determining the set of objects to be recommended within the location information range of the first user, the object identifier corresponding to each object to be recommended in the set and the category identifier of the category to which the object to be recommended belongs can be obtained. The object identifier corresponding to the object to be recommended can be the name of the object to be recommended or the object's location, etc. This embodiment of the invention does not specifically limit the object identifier of the object to be recommended.
[0102] The category identifier of the recommended object can be the category identifier of the category to which the recommended object belongs. For example, taking a restaurant as an example, the category identifier of the restaurant could be hot pot, barbecue, buffet, milk tea, etc. This embodiment of the invention does not specifically limit the category identifier of the restaurant.
[0103] S220: Input the object identifier of each object to be recommended and the category identifier of the category to which each object to be recommended belongs into the pre-trained vectorization model to obtain the vector corresponding to the object identifier of each object to be recommended.
[0104] Specifically, after obtaining the object identifier of each object to be recommended and the category identifier of the category to which each object to be recommended belongs, the object identifier of each object to be recommended and the category identifier of the category to which each object to be recommended belongs can be input into a pre-trained vectorization model to obtain the vector corresponding to the object identifier of each object to be recommended.
[0105] Among them, the vector corresponding to the object identifier of the object to be recommended can be a 128-dimensional vector, which is composed of a 64-dimensional vector corresponding to the object identifier and a 64-dimensional vector corresponding to the category identifier of the category to which the object belongs.
[0106] Furthermore, the training process for the vectorized model can be achieved by training a CBOW model using Word2Vec. Specifically, the training process for the vectorized model can be as follows: input the vector corresponding to an object identifier context-associated with an object identifier into the CBOW model, train the CBOW model until it outputs the vector corresponding to that object identifier.
[0107] For example, such as Figure 3 As shown, a user's historical consumption records are: historical consumption store 1, historical consumption store 2, historical consumption store 3, historical consumption store 4, and historical consumption store 5. Then, the store identifiers associated with the context of historical consumption store 3 are: historical consumption store 1, historical consumption store 2, historical consumption store 4, and historical consumption store 5. Therefore, the vectors corresponding to historical consumption store 1, historical consumption store 2, historical consumption store 5, and historical consumption store 5 can be input into the CBOW model to obtain the vector corresponding to historical consumption store 3.
[0108] S230, inputting the object identifier corresponding vector of each to-be-recommended object into the pre-trained clustering model to obtain the first feature vector corresponding to the category identifier of the category to which each to-be-recommended object belongs.
[0109] The first feature vector corresponding to one category identifier is obtained by performing a sum operation on the vectors corresponding to the object identifiers of the objects belonging to the category identifier.
[0110] Specifically, after obtaining the vector corresponding to each to-be-recommended object identifier, the vector corresponding to the object identifier of the to-be-recommended object can be input into the pre-trained clustering model, wherein the clustering model can use the K-Means clustering analysis method to perform K clustering analysis on the object identifier and the vector corresponding to the object identifier. K needs to be selected as an empirical parameter, and in general cases, the size of K is the number of categories.
[0111] The first feature vector corresponding to one category identifier is obtained by performing a sum operation on the vectors corresponding to the object identifiers of the objects belonging to the category identifier. When the vector corresponding to the object identifier is a 128-dimensional vector, the first feature vector corresponding to the category identifier can also be a 128-dimensional vector.
[0112] It can be seen that through the technical solution provided in this embodiment, the first feature vector corresponding to the category identifier of the category to which each to-be-recommended object belongs can be accurately obtained, that is, the object features of each to-be-recommended object can be accurately obtained, which is beneficial to accurately recommending objects to new users in subsequent steps.
[0113] In order to clearly describe the scheme, the specific implementation of calculating the distance between the first feature vector included in the object features of each to-be-recommended object and the second feature vector corresponding to the category identifier of the pre-determined current popular category will be described in detail.
[0114] In one embodiment, S140, calculating the distance between the first feature vector included in the object features of each to-be-recommended object and the second feature vector corresponding to the category identifier of the pre-determined current popular category, as shown in Figure 4 may include the following steps:
[0115] S410, for each to-be-recommended object, calculating the first distance between the first feature vector included in the object features of the to-be-recommended object and the second feature vector corresponding to the category identifier of each current popular category.
[0116] Specifically, when calculating the distance between the first feature vector included in each to-be-recommended object and the second feature vector corresponding to the category identifier of the pre-determined current popular category, the cosine distance or the Euclidean distance between the first feature vector included in the object feature of the to-be-recommended object and the second feature vector corresponding to the category identifier of each current popular category can be calculated first, and the calculated cosine distance or Euclidean distance is taken as the first distance.
[0117] S420, for each to-be-recommended object, the first distance corresponding to the to-be-recommended object is weighted and summed with the corresponding weight coefficient to obtain the second distance corresponding to the to-be-recommended object, and the second distance is determined as the distance between the first feature vector included in the to-be-recommended object and the second feature vector corresponding to the category identifier of the pre-determined current popular category.
[0118] wherein each current popular category corresponds to a weight coefficient, and the weight coefficient corresponding to each current popular category is determined based on an attention mechanism model.
[0119] Specifically, the attention technology draws on the attention mechanism of human beings and has a wide range of applications in the fields of ranking recommendation, natural language processing, image processing, etc. In the embodiment of the present application, the new user can be given different weight coefficients for different current popular categories according to the attention mechanism model. For example, people in the south usually do not like to eat hot pot in summer, so a smaller weight coefficient can be given to the category of hot pot.
[0120] Those skilled in the art can understand the training process of the attention mechanism model, which is not specifically limited in the embodiment of the present application.
[0121] After the first distance between the first feature vector included in the object feature of the to-be-recommended object and the second feature vector corresponding to the category identifier of each current popular category is calculated, the first distance corresponding to the to-be-recommended object can be weighted and summed with the corresponding weight coefficient to obtain the second distance corresponding to the to-be-recommended object.
[0122] For example, there are three current popular categories, namely the first popular category, the second popular category and the third popular category; and the weight coefficient corresponding to the first popular category is the first weight coefficient, the weight coefficient corresponding to the second popular category is the second weight coefficient, and the weight coefficient corresponding to the third popular category is the third weight coefficient. At this time, the second distance corresponding to the to-be-recommended object can be: the first distance between the first feature vector and the second feature vector corresponding to the first popular category * the first weight coefficient + the first distance between the first feature vector and the second feature vector corresponding to the second popular category * the second weight coefficient + the first distance between the first feature vector and the second feature vector corresponding to the third popular category * the third weight coefficient.
[0123] It can be seen that, by the technical scheme provided by the embodiment, when calculating the distance between the first feature vector and the second feature vector, the attention mechanism of the new user is also considered, and by setting a weight coefficient for each current popular category, the distance between the calculated first feature vector and the second feature vector is more accurate, which is conducive to further improving the accuracy of the object recommended for the new user.
[0124] In order to clearly describe the scheme, the specific embodiments of determining the second feature vector corresponding to the category identifier of the current popular category will be described in detail below.
[0125] As shown in Figure 5 , the step of determining the second feature vector corresponding to the category identifier of the current popular category can include the following steps:
[0126] S510, updating the user historical behavior data of the second user every preset period.
[0127] The user historical behavior data includes the consumption times of the objects consumed by the second user, the object identifiers of the objects consumed by the second user, and the category identifiers of the categories to which the objects consumed by the second user belong.
[0128] Specifically, the purpose of updating the user historical behavior data of the second user every preset period is to ensure that the user historical behavior data of the second user is the latest data, so that the user historical behavior data of the second user conforms to the season, so that the object recommended for the new user in the subsequent steps can better meet the needs of the user.
[0129] The user historical behavior data of the second user can include the consumption times corresponding to each object consumed by the second user, the object identifiers of the objects consumed by the second user, and the category identifiers of the categories to which the objects consumed by the second user belong. Of course, it can also include other user historical behavior data of the second user, which is not limited by the embodiments of the application.
[0130] S520, determining the target user historical behavior data of the current popular category in the user historical behavior data of the second user based on the consumption times of the objects consumed by the second user.
[0131] Specifically, after obtaining the consumption times of the objects consumed by the second user, the consumption times of each object consumed by the second user can be counted. If the consumption times of a certain object consumed by the second user are relatively high, it indicates that a large number of old users consume the object, and therefore, the user historical behavior data including the consumption times of the object can be determined as the target user historical behavior data currently popular. In actual applications, the top N target user historical behavior data currently popular can be determined according to the consumption times of the objects consumed by the second user, where N can be 5, and the size of N is not limited in the embodiment of the present application.
[0132] As an implementation manner of the embodiment of the present application, S520, determining the target user historical behavior data currently popular in the user historical behavior data of the second user based on the consumption times of the objects consumed by the second user, can include the following steps, step a1 and step a2 respectively.
[0133] Step a1, deleting the user historical behavior data satisfying a preset condition in the user historical behavior data of the second user, to obtain the user historical behavior data after deletion.
[0134] The preset condition includes at least one of the following: the consumption times are less than a first preset consumption times, the consumption times are greater than a second preset consumption times, and the consumption times remain unchanged within a preset time length.
[0135] In this step, after obtaining the user historical behavior data of the second user, the long tail data in the user historical behavior data of the second user can be processed.
[0136] Specifically, the user historical behavior data with consumption times less than the first preset consumption times can be deleted, and the first preset consumption times can be 2, of course, the first preset consumption times is not limited in the embodiment of the present application.
[0137] And, the user historical behavior data with consumption times greater than the second preset consumption times can also be deleted, and the second preset consumption times can be 15, of course, the second preset consumption times is not limited in the embodiment of the present application.
[0138] And, the user historical behavior data with consumption times remaining unchanged within a preset time length can also be deleted. It can be understood that the consumption times remaining unchanged within a preset time length indicates that the object has been offline, and therefore, this part of user historical behavior data can be deleted.
[0139] Step a2, determining the target user historical behavior data currently popular in the user historical behavior data after deletion based on the consumption times of the objects consumed by the second user.
[0140] In this step, after the long tail data in the user historical behavior data of the second user is deleted, the deleted user historical behavior data is obtained, and the user historical behavior data in which the second user consumes the object more times can be determined as the target user historical behavior data of the current hot object. In this way, the determined target user historical behavior data of the current hot object is more accurate.
[0141] S530, input the object identifier of the object consumed by the second user and the category identifier of the category to which the object consumed by the second user belongs included in the target user historical behavior data into the pre-trained vectorization model to obtain the vector corresponding to the object identifier of the object consumed by the second user.
[0142] The vector corresponding to the object identifier of the object consumed by the second user is composed of the first sub-vector corresponding to the object identifier of the object consumed by the second user and the second sub-vector corresponding to the category identifier of the category to which the object consumed by the second user belongs.
[0143] Specifically, after obtaining the target user historical behavior data of the current hot object, the object identifier of the object consumed by the second user and the category identifier of the category to which the object consumed by the second user belongs included in the target user historical behavior data can be input into the pre-trained vectorization model to obtain the vector corresponding to the object identifier of the object consumed by the second user.
[0144] The vector corresponding to the object identifier of the object to be recommended can be a 128-dimensional vector, which is composed of a 64-dimensional vector corresponding to the object identifier, i.e. the first sub-vector, and a 64-dimensional vector corresponding to the category identifier of the category to which the object belongs, i.e. the second sub-vector.
[0145] Moreover, the training process of the vectorization model is described in the embodiment shown in Figure 3 and will not be repeated here.
[0146] S540, input the vector corresponding to the object identifier of the object consumed by the second user into the pre-trained clustering model to obtain the second feature vector corresponding to the category identifier of the current hot category.
[0147] The second feature vector corresponding to the category identifier of a current hot category is obtained by adding the vectors corresponding to the object identifiers of the objects belonging to the current hot category.
[0148] Specifically, after obtaining the vector corresponding to the object identifier of the object consumed by the second user, the vector corresponding to the object identifier of the object consumed by the user in the history can be input into the pre-trained clustering model. The clustering model can use the K-Means clustering analysis method to perform K clustering analysis on the object identifier of the object consumed by the second user and the vector corresponding to the object identifier of the object consumed by the second user. K needs to be selected as an empirical parameter. In general, the size of K is the number of categories.
[0149] The second feature vector corresponding to the category identifier of a current popular category is obtained by adding the vectors corresponding to the object identifiers of the objects belonging to the current popular category. When the vector corresponding to the object identifier is a 128-dimensional vector, the second feature vector corresponding to the category identifier of the current popular category can also be a 128-dimensional vector.
[0150] It can be seen that the technical solution provided by the embodiment can accurately obtain the second feature vector corresponding to the category identifier of the current popular category, which is beneficial to accurately recommending objects for new users in subsequent steps.
[0151] In order to clearly describe the scheme, a food store recommendation system provided by the embodiment of the application will be introduced below in combination with specific examples. As shown in Figure 6 , it is a system block diagram of a food store recommendation system provided by the embodiment of the application.
[0152] In the first step, when recommending a food store for a new user, a set of food stores to be recommended near the new user can be obtained (as shown in Figure 6 , the food stores to be recommended).
[0153] In the second step, the store features of the food stores are obtained. The store features can include the first feature vector corresponding to the category identifier of the category to which the food store belongs, the category identifier can be hot pot, barbecue, buffet, milk tea, etc. The store features can also include the user features of the users who have consumed the food store, and the context features of the food store, as shown in Figure 6 .
[0154] In the third step, the first distance, such as the cosine distance or the Euclidean distance, between the first feature vector and the second feature vector corresponding to the category identifier of the pre-determined current popular category can be calculated by the activation unit.
[0155] In the fourth step, the first distances and the corresponding weight coefficients are weighted and summed by the pooling layer to obtain the second distance corresponding to the food store, that is, the scoring of the food store is realized.
[0156] In the fifth step, the store information of the recommended store with a second distance less than a preset distance is output, that is, the target recommended store is recommended to the terminal corresponding to the new user.
[0157] By means of the technical scheme provided by the embodiment of the present application, when a store is recommended to a new user, the distance between the first feature vector included in the store feature of each store near the new user and the second feature vector corresponding to the category identifier of the current popular category can be calculated, and the recommendation object in the to-be-recommended store set with a distance less than a preset distance is recommended to the new user, so that the new user can be personalized recommended with the store that the new user is likely to be interested in, and the accuracy of the store recommended to the new user is improved.
[0158] It should be noted that, for the method embodiments, in order to simply describe, they are all described as a series of action combinations, but those skilled in the art should know that the present application is not limited to the action sequence described, because according to the present application, certain steps can be performed in other sequences or at the same time. Secondly, those skilled in the art should know that the embodiments described in the specification are all optional embodiments, and the actions involved are not necessarily required by the present application.
[0159] In a second aspect, the embodiments of the present application provide an information recommendation device, as shown in the figure, the device comprises: Figure 7
[0160] The position information acquisition module 710 is configured to acquire the position information of a first user, the first user being a new user with a number of historical behavior data less than a preset number;
[0161] The to-be-recommended object set determination module 720 is configured to determine a to-be-recommended object set within a preset range of the position information of the first user according to the position information of the first user;
[0162] The object feature acquisition module 730 is configured to acquire the object feature of each to-be-recommended object in the to-be-recommended object set, wherein the object feature of a to-be-recommended object comprises a first feature vector corresponding to the category identifier of the category to which the to-be-recommended object belongs;
[0163] The vector distance calculation module 740 is configured to calculate the distance between the first feature vector included in the object feature of each to-be-recommended object and the second feature vector corresponding to the category identifier of the current popular category, the current popular category being determined based on the historical behavior data of a second user with a number of historical behavior data greater than a preset number;
[0164] The object recommendation module 750 is configured to recommend a target recommended object to the terminal corresponding to the first user, the target recommended object being a recommended object in the to-be-recommended object set with a distance less than a preset distance.
[0165] By means provided by the embodiments of the present application, when recommending objects for the first user, i.e., the new user, the distance between the first feature vector included in the object feature of each object near the new user and the second feature vector corresponding to the category identifier of the current popular category can be calculated, and the recommended object in the set of to-be-recommended objects with a distance less than a preset distance is recommended to the new user, so that the new user can be personalized recommended with the objects that the new user is likely to be interested in, and the accuracy of the recommended objects for the new user is improved.
[0166] Optionally, the object feature acquisition module is specifically configured to:
[0167] acquire the object identifier of each to-be-recommended object in the set of to-be-recommended objects and the category identifier of the category to which the to-be-recommended object belongs;
[0168] input the object identifier of each to-be-recommended object and the category identifier of the category to which each to-be-recommended object belongs into a pre-trained vectorization model to obtain a vector corresponding to the object identifier of each to-be-recommended object;
[0169] input the vector corresponding to the object identifier of each to-be-recommended object into a pre-trained clustering model to obtain a first feature vector corresponding to the category identifier of the category to which each to-be-recommended object belongs,
[0170] wherein the first feature vector corresponding to one category identifier is obtained by performing summation operation on the vectors corresponding to the object identifiers of the objects belonging to the category identifier.
[0171] Optionally, the vector distance calculation module is specifically configured to:
[0172] for each to-be-recommended object, calculate a first distance between the first feature vector included in the object feature of the to-be-recommended object and the second feature vector corresponding to the category identifier of each current popular category;
[0173] for each to-be-recommended object, perform weighted summation on each first distance corresponding to the to-be-recommended object and the corresponding weight coefficient to obtain a second distance corresponding to the to-be-recommended object, and determine the second distance as the distance between the first feature vector included in the to-be-recommended object and the second feature vector corresponding to the category identifier of the pre-determined current popular category;
[0174] wherein each current popular category corresponds to one weight coefficient, and the weight coefficient corresponding to each current popular category is determined based on an attention mechanism model.
[0175] Optionally, the apparatus further comprises a feature vector determination module.
[0176] The feature vector determination module comprises:
[0177] an updating unit configured to update, at a preset period, user historical behavior data of a second user, the user historical behavior data comprising: a consumption frequency of an object consumed by the second user, an object identifier of the object consumed by the second user, and a category identifier of a category to which the object consumed by the second user belongs;
[0178] a determining unit configured to determine, based on the consumption frequency of the object consumed by the second user, target user historical behavior data that is currently popular in the user historical behavior data of the second user;
[0179] a vectorizing unit configured to input, into a pre-trained vectorization model, the object identifier of the object consumed by the second user and the category identifier of the category to which the object consumed by the second user belongs, which are included in the target user historical behavior data, to obtain a vector corresponding to the object identifier of the object consumed by the second user;
[0180] a clustering unit configured to input, into a pre-trained clustering model, the vector corresponding to the object identifier of the object consumed by the second user to obtain a second feature vector corresponding to the category identifier of a currently popular category;
[0181] wherein the second feature vector corresponding to the category identifier of the currently popular category is obtained by summing vectors corresponding to object identifiers of objects belonging to the currently popular category.
[0182] Optionally, the determining unit is specifically configured to:
[0183] delete, from the user historical behavior data of the second user, user historical behavior data that meets a preset condition to obtain deleted user historical behavior data, the preset condition comprising at least one of: a consumption frequency less than a first preset consumption frequency, a consumption frequency greater than a second preset consumption frequency, and a consumption frequency remaining unchanged within a preset time length;
[0184] determine, based on the consumption frequency of the object consumed by the second user, target user historical behavior data that is currently popular in the deleted user historical behavior data.
[0185] For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and relevant parts refer to the part of the method embodiment.
[0186] In a third aspect, an embodiment of the present application provides an electronic device, as shown in the accompanying drawings, comprising a memory 810, a processor 820, and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the information recommendation method of the first aspect when executing the program. Figure 8
[0187] The technical scheme provided by the embodiment of the present application can calculate the distance between the first feature vector included in the object feature of each object near the new user and the second feature vector corresponding to the category identifier of the current popular category when recommending the object to the first user, i.e., the new user, and recommend the object in the to-be-recommended object set with the distance less than the preset distance to the new user, so that the new user can be recommended the object that the new user may be interested in in a personalized manner, and the accuracy of the object recommended to the new user is improved.
[0188] In a fourth aspect, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program. The computer program is executed by a processor to implement the steps of the information recommendation method according to the first aspect.
[0189] The technical scheme provided by the embodiment of the present application can calculate the distance between the first feature vector included in the object feature of each object near the new user and the second feature vector corresponding to the category identifier of the current popular category when recommending the object to the first user, i.e., the new user, and recommend the object in the to-be-recommended object set with the distance less than the preset distance to the new user, so that the new user can be recommended the object that the new user may be interested in in a personalized manner, and the accuracy of the object recommended to the new user is improved.
[0190] Each embodiment in the specification is described in a progressive manner, and each embodiment focuses on the difference from other embodiments. The same or similar parts of each embodiment can be referred to each other.
[0191] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, device, or computer program product. Therefore, the present application can adopt a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) containing computer usable program code.
[0192] The present application is described with reference to flowcharts and / or block diagrams of the method, terminal device (system), and computer program product according to the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of the flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device produce a machine that implements the flowcharts and / or block diagrams. Figure 1 one flow or multiple flows and / or blocksFigure 1 A device that provides the functions specified in one or more boxes.
[0193] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0194] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 Figure 1 The steps of the function specified in one or more boxes.
[0195] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the invention.
[0196] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.
[0197] The information recommendation method, device, electronic equipment and storage medium provided by the present application are described in detail above, and the principles and implementation manners of the present application are described by applying specific examples. The above description of the embodiments is only used to help understand the method of the present application and its core idea. Meanwhile, for those skilled in the art, according to the idea of the present application, the specific implementation manners and application ranges will be changed, and the above description of the present application should not be understood as a limitation.
Claims
1. An information recommendation method characterized by comprising: The method comprises: obtaining position information of a first user, the first user being a user whose quantity of historical behavior data is less than a preset quantity; determining a set of to-be-recommended objects within a preset range of the position information of the first user according to the position information of the first user; obtaining object features of each to-be-recommended object in the set of to-be-recommended objects, wherein the object features of a to-be-recommended object comprise a first feature vector corresponding to a category identifier of a category to which the to-be-recommended object belongs; calculating distances between the first feature vectors comprised in the object features of each to-be-recommended object and second feature vectors corresponding to category identifiers of currently popular categories determined based on historical behavior data of a second user whose quantity of historical behavior data is greater than the preset quantity; recommending a target recommended object to a terminal corresponding to the first user, the target recommended object being a recommended object in the set of to-be-recommended objects whose distance is less than a preset distance; the obtaining of the object features of each to-be-recommended object in the set of to-be-recommended objects comprises: obtaining object identifiers of each to-be-recommended object and category identifiers of categories to which the to-be-recommended objects belong; inputting the object identifiers of each to-be-recommended object and the category identifiers of the categories to which the to-be-recommended objects belong into a pre-trained vectorization model to obtain vectors corresponding to the object identifiers of each to-be-recommended object; inputting the vectors corresponding to the object identifiers of each to-be-recommended object into a pre-trained clustering model to obtain first feature vectors corresponding to the category identifiers of the categories to which the to-be-recommended objects belong, wherein a first feature vector corresponding to a category identifier is obtained by summing vectors corresponding to object identifiers of objects belonging to the category identifier.
2. The method of claim 1, wherein, The calculating of the distances between the first feature vectors comprised in the object features of each to-be-recommended object and the second feature vectors corresponding to the category identifiers of the currently popular categories comprises: for each to-be-recommended object, calculating first distances between the first feature vector comprised in the object features of the to-be-recommended object and second feature vectors corresponding to the category identifiers of the currently popular categories; for each to-be-recommended object, performing weighted summation on each first distance corresponding to the to-be-recommended object and a corresponding weight coefficient to obtain a second distance corresponding to the to-be-recommended object, and determining the second distance as the distance between the first feature vector comprised in the to-be-recommended object and the second feature vector corresponding to the category identifier of the currently popular category determined in advance; wherein each currently popular category corresponds to a weight coefficient, and the weight coefficient corresponding to each currently popular category is determined based on an attention mechanism model.
3. The method according to any one of claims 1 to 2, characterized in that, The pre-determination of the second feature vectors corresponding to the category identifiers of the currently popular categories comprises: updating the historical behavior data of the second user every preset period, the historical behavior data of the second user comprising: a consumption frequency of objects consumed by the second user, object identifiers of the objects consumed by the second user, and category identifiers of categories to which the objects consumed by the second user belong; determine target user historical behavior data that is currently popular in the user historical behavior data of the second user based on the number of times of consumption of the objects consumed by the second user; input the object identifier of the object consumed by the second user and the category identifier of the category to which the object consumed by the second user belongs, which are included in the target user historical behavior data, into a pre-trained vectorization model to obtain a vector corresponding to the object identifier of the object consumed by the second user; input the vector corresponding to the object identifier of the object consumed by the second user into a pre-trained clustering model to obtain a second feature vector corresponding to the category identifier of the currently popular category; wherein the second feature vector corresponding to the category identifier of the currently popular category is obtained by performing summation operation on vectors corresponding to object identifiers of objects belonging to the currently popular category.
4. The method of claim 3, wherein, The determining of the target user historical behavior data that is currently popular in the user historical behavior data of the second user based on the number of times of consumption of the objects consumed by the second user comprises: deleting user historical behavior data that meets a preset condition from the user historical behavior data of the second user to obtain deleted user historical behavior data, the preset condition comprising at least one of the following: the number of times of consumption being less than a first preset number of times of consumption, the number of times of consumption being greater than a second preset number of times of consumption, and the number of times of consumption remaining unchanged within a preset time length; The determining of the target user historical behavior data that is currently popular in the deleted user historical behavior data based on the number of times of consumption of the objects consumed by the second user.
5. An information recommendation device characterized by comprising: The apparatus comprises: a position information acquisition module configured to acquire position information of a first user, the first user being a user whose number of current user historical behavior data is less than a preset number; a to-be-recommended object set determination module configured to determine a to-be-recommended object set within a preset range of the position information of the first user according to the position information of the first user; an object feature acquisition module configured to acquire object features of each to-be-recommended object in the to-be-recommended object set, wherein the object features of a to-be-recommended object comprise a first feature vector corresponding to a category identifier of a category to which the to-be-recommended object belongs; a vector distance calculation module configured to calculate distances between the first feature vectors included in the object features of the to-be-recommended objects and a second feature vector corresponding to a category identifier of a currently popular category, the currently popular category being determined based on user historical behavior data of a second user whose number of current user historical behavior data is greater than the preset number; an object recommendation module configured to recommend a target recommended object to a terminal corresponding to the first user, the target recommended object being a recommended object in the to-be-recommended object set whose distance is less than a preset distance; and the object feature acquisition module is specifically configured to acquire object identifiers of each to-be-recommended object in the to-be-recommended object set and the category identifiers of the categories to which the to-be-recommended objects belong; input the object identifiers of each to-be-recommended object and the category identifiers of the categories to which the to-be-recommended objects belong into a pre-trained vectorization model to obtain vectors corresponding to the object identifiers of the to-be-recommended objects. The object identifier corresponding to each of the to-be-recommended objects is input into a pre-trained clustering model to obtain a first feature vector corresponding to a category identifier of a category to which each of the to-be-recommended objects belongs, wherein the first feature vector corresponding to one category identifier is obtained by performing a sum operation on vectors corresponding to object identifiers of objects belonging to the category identifier.
6. The apparatus of claim 5, wherein, The vector distance calculation module is specifically configured to: For each to-be-recommended object, a first distance between the first feature vector included in the object feature of the to-be-recommended object and a second feature vector corresponding to a category identifier of each current popular category is calculated. For each to-be-recommended object, each first distance corresponding to the to-be-recommended object is weighted and summed with a corresponding weight coefficient to obtain a second distance corresponding to the to-be-recommended object, and the second distance is determined as a distance between the first feature vector included in the to-be-recommended object and a second feature vector corresponding to a pre-determined category identifier of a current popular category. Each current popular category corresponds to one weight coefficient, and the weight coefficient corresponding to each current popular category is determined based on an attention mechanism model.
7. The apparatus of any one of claims 5 to 6, wherein, The apparatus further includes a feature vector determination module. The feature vector determination module includes: An updating unit configured to update user historical behavior data of the second user every preset period, the user historical behavior data including a consumption frequency of an object consumed by the second user, an object identifier of the object consumed by the second user, and a category identifier of a category to which the object consumed by the second user belongs. A determination unit configured to determine target user historical behavior data that is currently popular in the user historical behavior data of the second user based on the consumption frequency of the object consumed by the second user. A vectorization unit configured to input the object identifier of the object consumed by the second user and the category identifier of the category to which the object consumed by the second user belongs, which are included in the target user historical behavior data, into a pre-trained vectorization model to obtain a vector corresponding to the object identifier of the object consumed by the second user. A clustering unit configured to input the vector corresponding to the object identifier of the object consumed by the second user into a pre-trained clustering model to obtain a second feature vector corresponding to a category identifier of a current popular category. The second feature vector corresponding to one category identifier of a current popular category is obtained by performing a sum operation on vectors corresponding to object identifiers of objects belonging to the current popular category.
8. The apparatus of claim 7, wherein, The determination unit is specifically configured to: Delete user historical behavior data that meets a preset condition from the user historical behavior data of the second user to obtain deleted user historical behavior data, the preset condition including at least one of the following: a consumption frequency less than a first preset consumption frequency, a consumption frequency greater than a second preset consumption frequency, and a consumption frequency remaining unchanged within a preset time length. Determine target user historical behavior data that is currently popular in the deleted user historical behavior data based on the consumption frequency of the object consumed by the second user.
9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor implements the steps of the information recommendation method of any one of claims 1 to 4 when executing the program.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program, when executed by a processor, implements the steps of the information recommendation method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Recommendation method, device and equipment
CN109688178A
Video platform monitoring and analyzing system
US20170142482A1