Recommended model training method and device, computer device, and storage medium

By generating training data based on predictions and corrections using user preference information, the problem of long training time for item recommendation models is solved, achieving efficient training and accurate prediction of the model.

CN112069414BActive Publication Date: 2025-11-18TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010968629.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-15
Publication Date
2025-11-18
Estimated Expiration
2040-11-10

AI Technical Summary

Technical Problem

Existing item recommendation models take a long time to train, resulting in long parameter update cycles, which makes it difficult to meet the needs of rapid business deployment, and the accuracy of model prediction results is low.

Method used

By acquiring users' first preference information for purchased objects, predicting second preference information for unpurchased objects based on the similarity between users, and using user and object features for correction, training data is generated, reducing the complexity and time consumption of training data generation and improving model training efficiency.

Benefits of technology

The training cycle of the model has been shortened, enabling the model to be updated in a timely manner based on the latest user data, thereby improving the accuracy of the model's prediction results and ensuring that the output results meet the current user's preferences.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112069414B_ABST
    Figure CN112069414B_ABST
Patent Text Reader

Abstract

The application discloses a recommendation model training method and device, computer equipment and a storage medium, and belongs to the technical field of computers. The application preliminarily predicts second preference information of a user for an object that has not been purchased based on first preference information of the user for an object that has been purchased, extracts features of the user dimension and features of the object dimension from the obtained first preference information and second preference information, corrects the currently obtained preference information based on the features of the two dimensions, obtains third preference information with higher accuracy, generates training data according to the third preference information, thereby reducing the complexity and time consumption of the training data generation process without directly modeling data according to original online data, shortening the training period of the model, and enabling the model to be updated in time according to the latest user data, so that the output result of the model can better meet the current user preference.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computers, and in particular relates to a recommendation model training method and device, a computer device and a storage medium. BACKGROUND

[0002] With the development of Internet technology, item personalized recommendation relying on cloud computing and big data is widely applied, for example, it can be applied to the game field to recommend various virtual props to users. At present, when performing item recommendation, an item recommendation model constructed based on a deep neural network is usually applied. In the model training stage, user attribute features, item attribute features and user-item context features are extracted from a large amount of online data, data modeling is performed, a training data set is constructed, the item recommendation model is trained, and a trained item recommendation model is obtained.

[0003] However, in the above model training process, the amount of data to be processed for constructing training data is huge. The current method of directly extracting features from online data for data modeling is time-consuming, which leads to long model training time and is difficult to meet the demand of rapid online business. Moreover, due to the long time consumption of one model training, the update period of model parameters is also long. When the user's preference for items changes over time, the model prediction result accuracy is low because the model parameters are not updated in time according to the current user data. Therefore, how to construct training data to improve the efficiency of model training and the accuracy of model prediction is an important research direction in the model training stage. SUMMARY

[0004] The embodiments of the present application provide a recommendation model training method and device, a computer device and a storage medium, which can reduce the complexity and time consumption of training data generation, thereby improving the efficiency of model training. The technical scheme is as follows:

[0005] In one aspect, a recommendation model training method is provided, which comprises:

[0006] obtaining first preference information corresponding to a plurality of users, the first preference information being used to represent the preference degree of the user for a first object, the first object being an object on which the user has performed a transaction operation;

[0007] determining second preference information corresponding to the plurality of users based on the similarity between the first preference information corresponding to the plurality of users, the second preference information being used to represent the preference degree of the user for a second object, the second object being an object on which the user has not performed a transaction operation;

[0008] The first preference information and the second preference information are corrected based on preference features of each user on each object and association features between each object and the user, to obtain third preference information of each user on each object, the preference features and the association features being determined based on preference degrees of the each user on the each object;

[0009] The training data is generated based on any third preference information, a user attribute of a target user to which the any third preference information belongs, an object attribute of a target object to which the any third preference information belongs, and transaction information of the target user on the target object;

[0010] The target recommendation model is iteratively trained based on the training data, and a trained target recommendation model is obtained in response to an output result of the target recommendation model satisfying a training condition.

[0011] In a possible implementation, the weight corresponding to each parameter in the set of object use parameters comprises:

[0012] The prior score corresponding to each parameter is respectively obtained;

[0013] The weight corresponding to each parameter is determined based on the prior score and use information of each user on each first object.

[0014] In a possible implementation, the grouping of the each user based on the preference vector corresponding to the each user comprises:

[0015] The hash value of the preference vector corresponding to each user is respectively obtained;

[0016] At least two users are grouped into a group in response to the hash values of the preference vectors corresponding to the at least two users being same.

[0017] In an aspect, a recommendation model training apparatus is provided, and the apparatus comprises:

[0018] A first obtaining module is configured to obtain first preference information corresponding to a plurality of users, the first preference information being used to represent preference degrees of the users on first objects, the first objects being objects on which the users have performed transaction operations;

[0019] A determining module is configured to determine second preference information corresponding to the plurality of users based on similarities between the first preference information corresponding to the plurality of users, the second preference information being used to represent preference degrees of the users on second objects, the second objects being objects on which the users have not performed transaction operations;

[0020] The second obtaining module is configured to correct the first preference information and the second preference information based on a preference feature of each user for each object and an association feature between each object and the user, to obtain third preference information of each user for each object, the preference feature and the association feature being determined based on a preference degree of the each user for the each object;

[0021] The generating module is configured to generate training data based on any third preference information, a user attribute of a target user to which the any third preference information belongs, an object attribute of a target object to which the any third preference information belongs, and transaction information of the target user for the target object;

[0022] The training module is configured to iteratively train a target recommendation model based on the training data, and obtain a trained target recommendation model in response to an output result of the target recommendation model satisfying a training condition.

[0023] In a possible implementation, the first obtaining module comprises:

[0024] The parameter determining unit is configured to determine, for any user, a set of object use parameters corresponding to the any user based on use information of the any user for a first object;

[0025] The weight obtaining unit is configured to obtain a weight corresponding to each parameter in the set of object use parameters;

[0026] The information obtaining unit is configured to perform weighted operation on each parameter in the set of object use parameters, to obtain first preference information of the any user for the first object.

[0027] In a possible implementation, the use information of the any user for a first object comprises a first time at which the any user uses the first object for the first time, a second time at which the any user uses the first object for the last time, a total number of times at which the any user uses the first object, and a number of times at which the any user uses the first object in at least two reference time periods.

[0028] In a possible implementation, the parameter determining unit is configured to:

[0029] determine a time interval parameter based on the second time and a current time;

[0030] determine a use frequency parameter based on the first time, the current time, and the total number of times;

[0031] determine a preference parameter based on the first time, the second time, the current time, and the total number of times, the preference parameter indicating a preference degree of the any user for the first object at the current time;

[0032] determine a balance factor based on the number of times the any user uses the one first object in at least two reference time periods, the balance factor being used to balance the degree of preference of the any user for the one first object in the at least two reference time periods.

[0033] In a possible implementation, the weight obtaining unit is configured to:

[0034] obtain a prior score corresponding to each parameter respectively;

[0035] determine a weight corresponding to each parameter based on the prior score and the usage information of each user for each first object.

[0036] In a possible implementation, the determining module includes:

[0037] a grouping unit configured to determine similar users based on the similarity between the first preference information corresponding to the plurality of users, and group the similar users into a group;

[0038] an information determining unit configured to, for any user, determine second preference information of the any user for a second object based on the first preference information corresponding to the users belonging to the same group as the any user.

[0039] In a possible implementation, the grouping unit includes:

[0040] a vector constructing sub-unit configured to construct a preference vector corresponding to each user based on the first preference information of the each user for the first object respectively;

[0041] a grouping sub-unit configured to group the users based on the preference vectors corresponding to the users, and group the users with similar corresponding preference vectors into a group.

[0042] In a possible implementation, the grouping sub-unit is configured to:

[0043] obtain a hash value of the preference vector corresponding to each user respectively;

[0044] group at least two users into a group in response to the hash values of the preference vectors corresponding to the at least two users being the same.

[0045] In a possible implementation, the apparatus further includes:

[0046] a screening module configured to, in response to the number of users included in any group being greater than a number threshold, select a first reference number of users from the any group, and remove the users not selected from the any group.

[0047] In a possible implementation, the information determining unit is configured to:

[0048] For any user in a group of users, a second reference number of users similar to the any user from the group of users are obtained as reference users, when similarity of the any user meets a reference condition;

[0049] Second preference information of the any user for a second object is determined based on first preference information corresponding to the reference users.

[0050] In a possible implementation, the second obtaining module is configured to:

[0051] A first matrix is constructed based on the first preference information and the second preference information corresponding to each user, and an element in the first matrix represents preference information of a user for an object;

[0052] The first matrix is iteratively updated to obtain a second matrix, in each iteration, a second matrix obtained in a previous iteration is taken as a new first matrix, matrix decomposition is performed on the new first matrix to obtain preference features of each user for an object and association features between each object and a user, and an element in the new first matrix is corrected based on the preference features and the association features to obtain a new second matrix;

[0053] The third preference information is determined based on each element in the second matrix.

[0054] In a possible implementation, the generating module is configured to:

[0055] The any third preference information, a user attribute of a target user to which the one third preference information belongs, an object attribute of a target object to which the one third preference information belongs, and transaction information of the target user for the target object are spliced to obtain initial training data;

[0056] The initial training data is preprocessed to obtain the training data.

[0057] In a possible implementation, the apparatus further includes any of the following:

[0058] A first conversion module is configured to, in response to the usage information of the plurality of users for the first object including an object of a non-random access type, perform type conversion on the object to convert the object into an indexed sequential object;

[0059] A second conversion module is configured to convert a storage type of a user number in the usage information into a long integer.

[0060] In a possible implementation, the apparatus further includes:

[0061] A receiving module is configured to receive an object recommendation instruction, and the object recommendation instruction includes a user identifier;

[0062] a third obtaining module, configured to obtain, based on the user identifier, a user attribute indicated by the target identifier and log data including the user identifier;

[0063] a vector determining module, configured to determine a user feature vector based on the user attribute and the log data;

[0064] a fourth obtaining module, configured to input the user feature vector into the trained target recommendation model, and obtain an object recommendation result output by the target recommendation model.

[0065] In an aspect, a computer device is provided, which includes one or more processors and one or more memories having stored therein at least one program code, which is loaded and executed by the one or more processors to implement operations performed by the recommendation model training method.

[0066] In an aspect, a computer readable storage medium is provided, which has stored therein at least one program code, which is loaded and executed by a processor to implement operations performed by the recommendation model training method.

[0067] In an aspect, a computer program product is provided, which includes at least one program code stored in a computer readable storage medium. A processor of a computer device reads the at least one program code from the computer readable storage medium, and the processor executes the at least one program code to cause the computer device to implement operations performed by the recommendation model training method.

[0068] The technical scheme provided by the embodiments of the present application preliminarily predicts the second preference information of the user for the non-purchased object based on the first preference information of the user for the purchased object, extracts the user-dimension feature and the object-dimension feature from the obtained first preference information and second preference information, corrects the currently obtained preference information based on the features of the two dimensions, obtains third preference information with higher accuracy, generates training data according to the third preference information, thereby reducing the complexity and time consumption of the training data generation process without directly modeling the original online data, shortening the training period of the model, and enabling the model to be updated in time according to the latest user data, so that the output result of the model can better meet the current user preference. BRIEF DESCRIPTION OF DRAWINGS

[0069] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative effort based on these drawings.

[0070] Figure 1 is a schematic diagram of an implementation environment of a recommendation model training method provided by an embodiment of the present application;

[0071] Figure 2 is a flowchart of a recommendation model training method provided by an embodiment of the present application;

[0072] Figure 3 is a flowchart of a recommendation model training method provided by an embodiment of the present application;

[0073] Figure 4 is a schematic diagram of decomposition of a first matrix provided by an embodiment of the present application;

[0074] Figure 5 is a schematic diagram of a structure of a target recommendation model provided by an embodiment of the present application;

[0075] Figure 6 is a schematic diagram of a training data generation and target recommendation model training process provided by an embodiment of the present application;

[0076] Figure 7 is a schematic diagram of model accuracy provided by an embodiment of the present application;

[0077] Figure 8 is a schematic diagram of a display method of a recommended virtual prop provided by an embodiment of the present application;

[0078] Figure 9 is a schematic diagram of a structure of a recommendation model training device provided by an embodiment of the present application;

[0079] Figure 10 is a schematic diagram of a structure of a terminal provided by an embodiment of the present application;

[0080] Figure 11 is a schematic diagram of a structure of a server provided by an embodiment of the present application. DETAILED DESCRIPTION

[0081] In order to make the purposes, technical solutions and advantages of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the drawings. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work belong to the scope of protection of the present application.

[0082] The terms "first", "second", and the like are used to distinguish between the same or similar items having substantially the same function and should be understood not to have a logical or chronological dependency between "first", "second", and "nth", nor to limit the number and execution order.

[0083] Cloud technology refers to a kind of hosting technology that unifies a series of resources such as hardware, software, network, etc. in a wide area network or local area network to realize data calculation, storage, processing and sharing. Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on cloud computing business model application, which can form a resource pool, and be used on demand, flexibly and conveniently. Cloud computing technology will become an important support. The background service of the technical network system needs a large amount of calculation and storage resources, such as video websites, picture websites and more portals. With the high development and application of the Internet industry, every item in the future may have its own identification mark and needs to be transmitted to the background system for logical processing. Different levels of data will be processed separately, and various industry data will need strong system support, which can only be realized through cloud computing. The embodiments of the present application relate to big data processing in cloud technology, which needs to portrait users based on cloud data to determine the preference characteristics of users to various types of objects.

[0084] Big data refers to a collection of data that cannot be captured, managed and processed within a certain time range by conventional software tools, and is a massive, high-growth and diversified information asset that needs new processing mode to have stronger decision-making, insight discovery and process optimization capabilities. With the advent of the cloud era, big data has attracted more and more attention. Big data needs special technology to effectively process large amounts of data over time. The technologies suitable for big data include large-scale parallel processing database, data mining, distributed file system, distributed database, cloud computing platform, Internet and scalable storage system.

[0085] Figure 1 is a schematic diagram of an implementation environment of a recommendation model training method provided by the embodiments of the present application. The implementation environment includes a terminal 110 and an item recommendation platform 140.

[0086] The terminal 110 can be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The terminal 110 is installed and runs a target application program supporting object recommendation. For example, the target application program is a game application program, a shopping application program, a video application program, etc. It should be noted that the type of the target application program is not limited in the embodiments of the present application, and the target application program is taken as a game application program for example in the embodiments of the present application. The terminal 110 is an example of a terminal used by a user, and the application program running in the terminal 110 is logged in with a user account. The terminal 110 can be referred to as one of a plurality of terminals, and the embodiments of the present application are only taken as an example of the terminal 110.

[0087] The object recommendation platform 140 is used to provide background services for the target application program supporting object recommendation. Optionally, the object recommendation platform 140 undertakes the main object recommendation work, and the terminal 110 undertakes the secondary object recommendation work; or the object recommendation platform 140 undertakes the secondary object recommendation work, and the terminal 110 undertakes the main object recommendation work; or the object recommendation platform 140 or the terminal 110 can undertake the object recommendation work independently. Optionally, the object recommendation platform 140 includes an access server, an object recommendation server and a database. The access server is used to provide access services for the terminal 110. The object recommendation server is used to provide background services related to object recommendation. The object recommendation server can be one or more. When the object recommendation server is more than one, there are at least two object recommendation servers for providing different services, and / or there are at least two object recommendation servers for providing the same services, such as providing the same kind of services in a load balancing manner, which is not limited in the embodiments of the present application. The object recommendation server can be provided with a target recommendation model, and the object recommendation server supports the training and application process of the model. The above-mentioned servers can be independent physical servers, or a server cluster or a distributed system composed of multiple physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms, etc. basic cloud computing services.

[0088] The above-mentioned terminal 110 and the object recommendation platform 140 can be directly or indirectly connected through wired or wireless communication, which is not limited in the embodiments of the present application.

[0089] Those skilled in the art can know that the number of the above-mentioned terminals can be more or less. For example, the above-mentioned terminal can be only one, or the above-mentioned terminal can be dozens or hundreds, or more. The number and type of the terminal are not limited in the embodiments of the present application.

[0090] The embodiment of the present application provides a recommendation model training method, which can be applied to various scenes and combined with various types of application programs. For example, the present application is combined with a game application program, and in the virtual prop recommendation scene of the game, the target recommendation model is applied to recommend virtual props for the user; the present application is combined with a shopping application program, and the target recommendation model is applied to recommend various goods for the user. It should be noted that the technical solution provided by the embodiment of the present application can also be combined with other scenes, such as video recommendation and music recommendation, which are not limited in the embodiment of the present application. In the above various scenes, the technical solution provided by the embodiment of the present application can reduce the time consumption in the training data generation stage, thereby reducing the time consumption of one model training, improving the training efficiency of the model, enabling the model to be updated in time according to the latest data on the line, and ensuring that the prediction result of the model meets the current user's preference.

[0091] Figure 2 is a flowchart of a recommendation model training method provided by the embodiment of the present application. The method can be applied to the implementation environment described above, and in the embodiment of the present application, the server is taken as an execution subject to introduce the recommendation model training method, and the embodiment is described with reference to Figure 2 , which specifically includes the following steps:

[0092] 201. The server obtains first preference information corresponding to a plurality of users, the first preference information being used to represent the preference degree of the user for a first object, and the first object being an object on which the user has performed a transaction operation.

[0093] The first object is an object purchased by the user. For example, in a game application program, the object can be a virtual prop, a virtual character, an appearance of a virtual character, etc. set in the game, that is, an interactive prop, a hero, a skin, etc. in the game; in a shopping application program, the object can be a commodity sold in a shopping platform, etc. It should be noted that the specific form of the object is not limited in the embodiment of the present application.

[0094] In a possible implementation manner, the first preference information is associated with the use condition of the user for the first object, for example, the first preference information is associated with the use frequency of the user for the first object, the time interval between the current time and the last time of using the first object, etc. The first preference information can be represented in the form of a preference value, and the value of the first preference information is positively correlated with the preference degree of the user for the first object.

[0095] 202. The server determines second preference information corresponding to the plurality of users based on the similarity between the first preference information corresponding to the plurality of users, and the second preference information is used to represent the preference degree of the user for a second object, and the second object is an object on which the user has not performed a transaction operation.

[0096] The second object is an object that is not purchased by the user.

[0097] In a possible implementation, the server can determine similar users based on similarities between the first preference information corresponding to respective users, that is, determine users similar in preference for objects as similar users. For any user, the second preference information of the any user for a second object is predicted based on the first preference information corresponding to users similar to the any user. That is, the preference information of respective users for an object not purchased is predicted based on the preference information of respective users for objects purchased.

[0098] 203. The server corrects the first preference information and the second preference information based on preference features of respective users for objects and association features between respective objects and users, to obtain third preference information of respective users for respective objects, the preference features and the association features being determined based on preference degrees of the respective users for the respective objects.

[0099] In a possible implementation, the server can extract, from the first preference information and the second preference information corresponding to respective users, preference features in the user dimension and association features in the object dimension. The preference features are used to indicate preference of respective users for respective types of objects, and the association features are used to indicate preference of respective objects by respective types of users. The server can correct the first preference information and the second preference information from a global perspective based on the features in the two dimensions, to obtain third preference information of respective users for respective objects.

[0100] 204. The server generates training data based on any third preference information, a user attribute of a target user to which the any third preference information belongs, an object attribute of a target object to which the any third preference information belongs, and transaction information of the target user for the target object.

[0101] The user attribute can be gender, age, preference information, etc. of the user, and the object attribute can be a category, a use scenario, etc. of the object, which are not limited in the embodiments of the present application. For example, in a game scenario, the user attribute is gender, age, level in the game, type of virtual character used, etc. of the user, and the object attribute is attack type, use scenario, etc. of a virtual prop when the object is a virtual prop.

[0102] Taking generating a training data as an example, in a possible implementation manner, the server respectively acquires user attributes of a target user, object attributes of a target object, and transaction information of the target user to the target object based on the target user and the target object to which any third preference information belongs, quantizes the information, splices the any third preference information and the quantized information, and obtains a training data. Of course, the server can also acquire the third preference information through other manners, which is not limited in the embodiments of the present application.

[0103] 205、the server iteratively trains the target recommendation model based on the training data, and obtains a trained target recommendation model in response to an output result of the target recommendation model satisfying a training condition.

[0104] The target recommendation model can be a binary classification model constructed based on a deep neural network, and the target recommendation model can output a category to which sample data belongs and a probability of belonging to the category based on the sample data. For example, the sample data can be user attributes, object attributes and the like, and the category can include two categories of preference and non-preference.

[0105] In a possible implementation manner, the server inputs the plurality of training data into the target recommendation model, determines an error value between an output result of the target recommendation model and the third preference information in the training data. In response to the error value being insufficient for the training condition, the error value is back propagated to the target recommendation model, parameters of each operation layer in the target recommendation model are solved, and the training data is input into the target training model after the parameters are adjusted. In response to the error value satisfying the training condition, the model training is stopped, and the trained target recommendation model is obtained. The training condition can be set by a developer, which is not limited in the embodiments of the present application.

[0106] The technical scheme provided in the embodiments of the present application preliminarily predicts the second preference information of the user to the non-purchased object based on the first preference information of the user to the purchased object, extracts the user-dimension feature and the object-dimension feature from the acquired first preference information and second preference information, corrects the currently acquired preference information based on the features of the two dimensions, obtains the third preference information with higher accuracy, generates the training data according to the third preference information, thereby reducing the complexity and time consumption of the training data generation process without directly modeling the original online data, shortening the training period of the model, and enabling the model to be updated in time according to the latest user data, so that the output result of the model can better meet the current user preference.

[0107] The above embodiments are a brief introduction to the implementation manners of the present application, Figure 3 is a flowchart of a recommendation model training method provided by the embodiments of the present application, and the above description is combined with Figure 3The training process of the recommendation model is described in detail.

[0108] 301. The server obtains usage information of the first object by the user.

[0109] In a possible implementation, the server can obtain the usage information in response to a training instruction of the target recommendation model. The training instruction can be triggered by a developer, or triggered automatically based on a training period of the model, for example, the training period of the model can be set to one week. It should be noted that the embodiments of the present application do not limit the specific way of triggering the training instruction.

[0110] In a possible implementation, the usage information can be obtained from online user log data, which is not limited in the embodiments of the present application. In the embodiments of the present application, the usage information of a first object by any user includes a first time (FIRST_DATE) when the any user uses the first object for the first time, a second time (LAST_DATE) when the any user uses the first object for the last time, a total number (TOTAL_CNT) of times that the any user uses the first object, and a number of times that the any user uses the first object in at least two reference time periods. The reference time period can be set by a developer, for example, the reference time period can be set to a time within one day before the current time, a time within three days before the current time, etc., which is not limited in the embodiments of the present application. In the embodiments of the present application, the number of times that a user uses a first object in a certain reference time period is denoted as PV_N, N is a positive integer, representing N unit times, which can be set by a developer, for example, when the unit time is set to one day, PV_1 represents the number of times that the user uses a first object within one day before the current time, and PV_3 represents the number of times that the user uses a first object within 3 days before the current time. In the embodiments of the present application, PV_1, PV_3, PV_5, PV_7, PV_10, PV_15, PV_20, and PV_30 can be taken.

[0111] In the embodiments of the present application, the obtained use condition information of the user on the first object includes the object use condition of the user in different time periods, considers the problem that the user's preference for the object changes over time, introduces time sequence information in the training data generation process, so that when the target recommendation model is trained based on the training data, the model can learn the change of the user's preference for the object, and thus improve the fitting degree of the prediction result of the model to the current user preference. For example, in a game application, as the user's level in the game improves, the virtual props used will also change. The use condition of the user on the virtual props in different time periods is obtained from online log data, and based on this information, subsequent model training is performed, which can enable the model to learn the user's preference for the virtual props in different stages, so as to accurately recommend virtual props that the user is currently interested in.

[0112] 302. The server determines a set of object use parameters corresponding to any user based on the use condition information of the user on a first object.

[0113] In the embodiments of the present application, the server can determine use parameters in multiple dimensions based on the use condition information of the user on the first object. In a possible implementation manner, the server can determine the following four-dimensional use parameters:

[0114] 1) The server determines a time interval parameter (TODAY - LAST_DATE) based on the second time and the current time, that is, the time interval of the last use of the first object by the user. The parameter in this dimension can represent the preference degree of the user for the first object in the recent period, and the value of the time interval parameter is negatively correlated with the preference degree of the user for the first object in the recent period. In the embodiments of the present application, the time interval parameter is represented as P, and P is greater than 0.

[0115] 2) The server determines a use frequency parameter based on the first time, the current time and the total number of times, that is, the use frequency of the purchased object, that is, the first object, by the user in this period after purchasing the object. The parameter in this dimension can represent the preference degree of the user for the first object in the purchase period of the first object, and the value of the frequency parameter is positively correlated with the preference degree of the user for the first object. In the embodiments of the present application, the frequency parameter is represented as F, F is greater than 0, and the specific value of F is

[0116] 3) The server determines a preference parameter based on the first time, the second time, the current time and the total number of times. The preference parameter is used to indicate the preference degree of the user for the first object at the current time. In the embodiments of the present application, the preference parameter is represented as RF, RF is greater than 0, and the specific value of RF is If the time interval between the time when the user last uses the certain first object and the time when the user first uses the certain first object, i.e., the interval between the first time and the second time, LAST_DATE-FIRST_DATE, is represented as n, then the size of the preference parameter depends on the size of n / m, and the size of n / m is negatively correlated with the size of the preference parameter. The smaller the preference parameter is, the longer the time when the user uses the certain first object is, the shorter the time interval when the user last uses the certain first object is, and the greater the preference degree of the user for the certain first object is.

[0117] 4) The server determines a balance factor based on the number of times that the user uses the one first object in at least two reference time periods. In the embodiment of the present application, the balance factor is represented as formula (1) below:

[0118]

[0119] In the formula, P represents the balance factor, PV_N represents the number of times that the user uses the certain first object in the previous N unit times of the current time, in the embodiment of the present application, the value of N is 1, 3, 5, 7, 10, 15, 20, and 30 respectively, and one unit time is one day. a, b, c, d, e, f, g, and h represent weight values, which are used to balance the influence of the number of times of use in different time periods on the value of P, and the specific values of the weight values are set by the developer. In the embodiment of the present application, the balance factor is used to balance the preference degree of the user for the one first object in at least two reference time periods, and by setting different weight values for the number of times of use in different reference time periods, for example, by setting a smaller weight value for the number of times of use in a time period with a larger time span, the situation that the user has a high preference degree for the object because of the large number of times of use of the object in a historical time period can be reduced. For example, in a game scenario, taking that the object is a virtual prop as an example, a marketing activity for a certain virtual prop is set in a historical time period, which causes the number of times of use of the virtual prop to increase dramatically in the duration of the marketing activity, and after the marketing activity ends, the number of times of use of the virtual prop decreases dramatically. In the embodiment of the present application, by introducing the time sequence factor in the process of determining the balance factor, the influence of the historical marketing activity on the number of times of use of the object can be eliminated, the accuracy of the user preference information determined subsequently can be improved, and the determined preference information can better reflect the recent preference of the user for the object.

[0120] It should be noted that the above description of the multi-dimensional object usage parameter is only an example, and in the embodiments of the present application, other dimensions of object usage parameters can be obtained based on the usage information of each object by the user, and the embodiments of the present application do not limit this. In the embodiments of the present application, the time sequence information is introduced into the four dimensions of object usage parameters, which can effectively solve the problem of interest migration of the user to each object.

[0121] 303. The server obtains the weight corresponding to each parameter in the set of object usage parameters.

[0122] In the embodiments of the present application, in order to balance the influence degree of each parameter on the subsequent preference information determination, different weights need to be set for each parameter, i.e. R, F, RF and P. In one possible implementation, the server can use the analytic hierarchy process to determine the weight corresponding to each parameter. For example, the server obtains the prior score corresponding to each parameter, and determines the weight corresponding to each parameter based on the prior score and the usage information of each user to each first object. The prior score corresponding to each parameter can be set by those skilled in the art, and the prior score can be set in multiple groups, i.e. each parameter corresponds to multiple prior scores. Based on the prior score corresponding to each parameter and the usage information of the user to the first object, the server determines the weight corresponding to each parameter according to the analytic hierarchy process.

[0123] It should be noted that the above description of the weight of each parameter is only an example, and the embodiments of the present application do not limit which method is used to obtain the weight. In the embodiments of the present application, the prior score, i.e. expert score, is referred to when determining the weight of each parameter, which can effectively balance the influence of each parameter on the subsequent determination of the first preference information.

[0124] 304. The server performs weighted operation on each parameter in the set of object usage parameters to obtain the first preference information of the user to the first object.

[0125] In a possible implementation, in the process of determining the first preference information based on the set of object usage parameters, a decay factor can also be introduced, which is used to reduce the influence of historical data far away from the current time interval on the first preference information. For example, the decay factor can be determined based on the time interval parameter P, and different ranges of values of the time interval parameter P correspond to different decay factors. For example, when the time interval parameter P is larger, that is, the farther away from the time when the user last used the object, the influence of P on the determination of the first preference information can be reduced by setting the decay factor. It should be noted that the above description of the setting method of the decay factor is only an example of a possible implementation, and the embodiments of the present application do not limit which method is used to set the decay factor.

[0126] In a possible implementation, the server can perform weighted operation on each parameter based on the decay factor and the weight corresponding to each parameter, to obtain the first preference information. Specifically, for example, after the server obtains a set of object usage parameters of any user for a first object, a seven-tuple vector (USER, ITEM, TOTAL_CNT, R, F, RF, P) can be constructed. USER represents the user number of the any user, ITEM represents the object number of a first object, and TOTAL_CNT represents the total number of uses of the any user for a first object. The server converts the seven-tuple vector into a three-tuple vector (USER, ITEM, ALL_SCORE) based on the weight corresponding to each usage parameter and the decay factor, where ALL_SCORE represents the first preference information. In the embodiments of the present application, the first preference information is represented in the form of a preference value, and the value of the first preference information is positively correlated with the preference degree of the user for each object in the recent period. It should be noted that the above description of the determination method of the first preference information is only an example of a possible implementation, and the embodiments of the present application do not limit which method is used to determine the first preference information.

[0127] It should be noted that the steps 301 to 303 are steps of obtaining the first preference information corresponding to a plurality of users, which is used to represent the preference degree of the user for a first object, and the first object is an object for which the user has performed a transaction operation. In the embodiments of the present application, when the first preference information, that is, the preference of the user for the purchased object, is determined, the frequency factor, the weighting factor, the balance factor, the decay factor, and the like are introduced, which focuses more on the use of time sequence information in the user data, so that the determined first preference information can fully integrate the latest user preference features and be closer to the current preference of the user.

[0128] 305、The server determines similar users based on the similarity between the first preference information corresponding to a plurality of users, and divides the similar users into a group.

[0129] In a possible implementation, the server can group the users based on an LSH (locality sensitive hashing) algorithm, which can include the following steps:

[0130] Step one, the server respectively constructs a preference vector corresponding to each user based on the first preference information of the user for the first object.

[0131] An element in the preference vector is used to indicate the preference information of the user for an object. In a possible implementation, each position of the preference vector corresponds to an object. In response to an object being an object that has been purchased by the user, i.e., the first object, the element at the position corresponding to the object in the preference vector takes the value of the first preference information of the user for the object; in response to an object being an object that has not been purchased by the user, i.e., the second object, the element at the position corresponding to the object in the preference vector takes the value of 0. For example, the preference vector corresponding to a user is (5.1, 0, 2.3, 0, 0). It should be noted that the above description of the method for determining the preference vector is only an example, and the embodiments of the present application do not limit which method is used to determine the preference vector corresponding to each user.

[0132] Step two, the server groups the users based on the preference vectors corresponding to the users, and groups the users with similar preference vectors into a group.

[0133] In a possible implementation, the server respectively obtains the hash value of the preference vector corresponding to each user; in response to the hash values of the preference vectors corresponding to at least two users being the same, the at least two users are grouped into a group. In a possible implementation, to avoid the phenomenon of data aggregation in a group being too much, i.e., a group including too many users, the number of users included in each group can be limited. For example, in response to the number of users included in any group being greater than a threshold number, the server selects a first reference number of users from the any group, and removes the users not selected from the any group. The first reference number is set by a developer, and the embodiments of the present application do not limit this. In the embodiments of the present application, by limiting the number of users included in each group, the phenomenon of data aggregation in a group being too much can be avoided, the amount of data in a single group can be prevented from exceeding the core memory of the server, and the normal data processing of the server can be ensured.

[0134] In the embodiments of the present application, the users are grouped by using the locality sensitive hashing algorithm, and in the subsequent operation process, data analysis is respectively performed based on the similar users in each group, which can effectively reduce the amount of operation in each data processing process and improve the data processing efficiency.

[0135] 306、For any user, the server determines second preference information of the any user on a second object based on the first preference information corresponding to the users belonging to the same group as the any user.

[0136] In a possible implementation, for any user, the server can predict the second preference information corresponding to the any user based on the first preference information corresponding to all the users belonging to the same group as the any user. In the embodiment of the present application, to reduce the data processing amount of the second preference information determination process, the server can further screen the users belonging to the same group as the any user. That is, when determining the second preference information corresponding to the any user, at least one user with greater similarity to the any user is first determined from the group, and then the second preference information of the any user on the second object is predicted based on the preference of the at least one user on the first object. For example, for any user in a group of users, the server obtains, as reference users, a second reference number of users with similarity to the any user satisfying a reference condition from the group of users; and then determines the second preference information of the any user on the second object based on the preference vectors corresponding to the reference users, for example, by applying a collaborative filtering algorithm to determine the second preference information. The reference condition and the second reference number are set by a developer, and the embodiment of the present application does not limit the specific method of determining the second preference information.

[0137] In a possible implementation, the process of determining the reference users includes: for any user in a group of users, the server determines the distance between the preference vector corresponding to the any user and the preference vectors corresponding to the other users in the group of users; and then sorts the distances in descending order, and determines the users corresponding to the first second reference number of distances as the reference users satisfying the reference condition. The distance between the preference vectors corresponding to two users can be the cosine distance between the vectors. It should be noted that the above description of the method of determining the reference users is only an example, and the embodiment of the present application does not limit the specific method of determining the reference users.

[0138] In the embodiment of the present application, when predicting the second preference information corresponding to a certain user, the users in the same group are further screened, and only a few users most similar to the certain user are selected to participate in the calculation, which can improve the accuracy of predicting the second preference information and effectively reduce the operation amount of the data prediction process.

[0139] It should be noted that the steps 204 to 205 are steps of determining the second preference information of the users based on the similarity between the first preference information of the users, the second preference information being used to indicate the preference degree of the users to the second object, the second object being an object to which the users have not performed a transaction operation. In the embodiments of the present application, the reference users are selected from the groups based on the similarity between the users, and the reference users are selected from the groups instead of all the users, so that the data processing amount of this step can be effectively reduced, and the second preference information is predicted based on the user data of a small number of reference users, so that the efficiency and accuracy of obtaining the second preference information can be improved.

[0140] 307. The server constructs a first matrix based on the first preference information and the second preference information of the users.

[0141] An element in the first matrix indicates the preference information of a user to an object.

[0142] In a possible implementation, the first matrix can be constructed based on the correspondence between the preference information, the users and the objects. For example, the horizontal axis of the first matrix corresponds to the object number, and the vertical axis corresponds to the user number. For the first matrix of A*B, A users and B objects are indicated, where A and B are positive integers. An object number and a user number can be used to determine a position in the first matrix, and the value of the position is the value of the preference information of the user to the object.

[0143] 308. The server iteratively updates the first matrix to obtain a second matrix, and determines the third preference information based on the elements in the second matrix.

[0144] In a possible implementation, the server can iteratively update the first matrix based on the ALS (Alternating Least Squares) algorithm. Taking the first iteration update process as an example, in a possible implementation, the server first performs matrix decomposition on the first matrix to obtain a user sub-matrix and an object sub-matrix, where the user sub-matrix is used to indicate the preference features of the users to the objects, and the object sub-matrix is used to indicate the association features between the objects and the users. Figure 4 is a decomposition schematic diagram of a first matrix provided by the embodiments of the present application, referring to FIG. 3, the first matrix is decomposed into a user sub-matrix and an object sub-matrix. Figure 4For the first matrix 401 with the dimension of A*B, the horizontal direction is the user dimension and the vertical direction is the object dimension, after matrix decomposition is performed on the first matrix, a user sub-matrix 402 with the dimension of A*L and an object sub-matrix 403 with the dimension of B*L are obtained, where A, B and L are positive integers, and embodiments of the present application do not limit the specific value of L. A row eigenvector in the user sub-matrix 402 is used to represent the preference feature of a user to an object, and a column vector in the object sub-matrix is used to indicate the association feature between an object and each user, that is, the case that the object is liked by each user. It should be noted that embodiments of the present application do not limit which method is used to perform matrix decomposition. The server can re-solve the value of each element in the first matrix based on the user sub-matrix and the object sub-matrix, for example, the process can be represented as the following formula (2):

[0145]

[0146] where u represents the object number of an object, i represents the user number of a user; r ui represents the calculated preference information of the user u to the object i; x u represents the user sub-matrix, y i represents the object sub-matrix, and L(X, Y) represents the target function.

[0147] In embodiments of the present application, the server updates the value of each element in the first matrix based on r ui to obtain a second matrix. In a possible implementation manner, after the server obtains the second matrix, the server needs to judge the accuracy of the element value in the second matrix. For example, the server determines a second error between the second matrix and the first matrix, in response to the second error being less than a second error threshold, it is determined that the second matrix with accurate data is obtained, and the iterative updating process is stopped; in response to the second error being greater than the second error threshold, the second matrix obtained in the present iteration updating process is determined as a new first matrix, the value of each element in the new first matrix is updated to obtain a new second matrix. The server determines a third preference information based on the second matrix obtained in the last iteration updating, that is, an element in the second matrix is determined as a third preference information.

[0148] It should be noted that the above description of the iterative updating method for the first matrix is only an example, and embodiments of the present application do not limit which method is used to update the first matrix. In embodiments of the present application, the preference feature of the user dimension and the association feature of the object dimension are extracted based on the global information, and the determined preference information is iteratively updated based on the features of the two dimensions, that is, the determined preference information is corrected based on the global information, and the accuracy of the obtained preference information is improved.

[0149] 309. The server generates training data based on any third-party preference information, the user attributes of the target user to which the third-party preference information belongs, the object attributes of the target object to which the third-party preference information belongs, and the transaction information of the target user to the target object.

[0150] The user attributes may include the user's gender, age, and win rate when using the target object. The object attributes may include the type and effect of the target object. It should be noted that this application embodiment does not limit the specific information included in the user attributes and object attributes. The transaction information of the target user regarding the target object is used to indicate whether the target user has purchased the target object. If the target object has been purchased, the value of the transaction information is 1; if not, the value is 0. That is, the transaction information is a binary scalar and can be used as a label for the training data. In this application embodiment, the constructed training data is represented in the form of VL (Vector-Label), where the third preference information, user attributes, object attributes, etc., are used to constitute the feature part, and the transaction information is used to determine the label. In this application embodiment, the label can be used to indicate whether a training data point is a positive or negative sample.

[0151] In one possible implementation, the server concatenates a third preference information from the second matrix, the user attributes of the target user to which the third preference information belongs, the object attributes of the target object to which the third preference information belongs, and the transaction information of the target user to the target object to obtain initial training data. Of course, the initial training data may also include data from other dimensions, which is not limited in this embodiment.

[0152] In one possible implementation, the server also needs to preprocess the initial training data to obtain training data. The data preprocessing process may include standardization, missing data completion, continuous feature discretization, data encoding, and outlier removal. For example, in the data encoding stage, the server applies one-hot encoding to encode a portion of the initial training data, converting data such as gender into binary character sequences. In the continuous feature discretization stage, based on the discrete interval [k1, k2, ..., k...]... n To requantize the data, where k n This represents a discrete interval value that monotonically increases with increasing n. During the standardization phase, data normalization is used to adjust the initial training data numerically. This data normalization method can be expressed as the following formula (3):

[0153]

[0154] Where, x ijdenotes the value of the jth dimension feature of the initial training data i, μ j denotes the mean of the jth dimension feature, σ j denotes the standard deviation of the jth dimension feature, x' ij denotes the value of the jth dimension feature of the normalized initial training data i. It should be noted that the above description of the data preprocessing process is only an exemplary description, and the embodiments of the present application do not limit which method is used to perform data preprocessing. In the embodiments of the present application, the server can generate a plurality of training data based on a plurality of third preference information, and construct a training data set.

[0155] It should be noted that the above description of the training data generation method is only an exemplary description, and the embodiments of the present application do not limit the generation method of the training data and the specific information contained in the training data. For example, in a game application, when the object is a virtual prop or a virtual character, the training data can also include interactive messages sent by the user when using the virtual prop or the virtual character, and the user's position in the game, and can also include information such as whether the user's use frequency of the virtual prop or the virtual character is normal.

[0156] 310, the server iteratively trains the target recommendation model based on the training data, and obtains a trained target recommendation model in response to the output result of the target recommendation model satisfying a training condition.

[0157] The target recommendation model is a model constructed based on a deep neural network, and in the embodiments of the present application, a binary classification model is taken as an example for description. Figure 5 is a structural schematic diagram of a target recommendation model provided by the embodiments of the present application, see Figure 5The target recommendation model includes an embedding layer 501, a local full connection layer 502, a full connection layer 503, an activation layer 504, and a softmax layer 505. In the embodiment of the present application, three full connection layers are included, and each full connection layer is connected with an activation layer. The embedding layer 501 is used to convert the input sparse data into a dense matrix, the number of input neurons included in the embedding layer 501 is consistent with the dimension of the training data set; the local full connection layer 502 is used to perform nonlinear mapping transformation on the same type of features, and learn the nonlinear transformation relationship between the features and the labels; the full connection layer 503 is used to establish the cross combination between the features of each hidden layer; the activation layer 504 is used to improve the nonlinearity of the model network structure, and improve the complexity and robustness of the model; the softmax layer 505 is used to normalize the discrete probability distribution of a limited item, and output the class of the sample and the probability belonging to each class. It should be noted that the above description of the structure of the target recommendation model is only an example, and the specific structure of the target recommendation model is not limited in the embodiment of the present application. In a possible implementation manner, the local full connection layer and the full connection layer can be represented by the following formula (4):

[0158] O ij =Leakly ReLU(b j +w ij *x i-1,j ) (4)

[0159] Wherein, i represents the neuron number of each layer, j represents the network layer number, b j represents the bias of the network layer j, w ij represents the weight value of neuron i in the network layer j, x i,j represents the value of neuron i in the network layer j, O ij represents the output result.

[0160] The activation function applied by the activation function layer can be represented by the following formula (5):

[0161]

[0162] Wherein, i represents the neuron number of each layer, j represents the network layer number, x i,j represents the value of neuron i in the network layer j; β is a hyperparameter, and its value is set by the developer, and in the embodiment of the present application, β is set to 10.

[0163] The cross entropy function of the softmax layer can be represented by the following formula (6):

[0164]

[0165] wherein K represents the number of label categories, in the embodiments of the present application, K is 2; x represents the input vector of the softmax layer, w i represents the neuron weight of the softmax layer, and i represents the neuron number of the softmax layer.

[0166] In a possible implementation, the server extracts data from the training data set based on a first reference ratio for training the target recommendation model, and extracts data from the training data set as verification data based on a second reference ratio for verifying the training effect of the target recommendation model. The first reference ratio and the second reference ratio are set by the developer, and the embodiments of the present application do not limit this. In the embodiments of the present application, the determination of the parameters of the target recommendation model by the application training data is taken as an example for description. In a possible implementation, the server inputs the training data into the target recommendation model, obtains the output result of the target recommendation model, and determines the first error between the output result and the labeled information of the training data, for example, the predicted third preference information in the training data can be taken as the labeled information. The server responds to the first error greater than or equal to the first error threshold value, and propagates the first error to the target recommendation model in reverse, re-solves the parameters of each operation layer in the target recommendation model, and continues to read the next training data into the target recommendation model. The server responds to the first error less than the first error threshold value, and directly reads the next training data into the target recommendation model. After multiple iterations of training, the server responds to the output result of the target recommendation model meeting the training condition, and determines that the model training is completed. The training condition is set by the developer, and the embodiments of the present application do not limit this. For example, the training condition can be set as the first error between the target number of output results and the training data being less than the first error threshold value. It should be noted that the above description of the training method of the target recommendation model is only an example, and the embodiments of the present application do not limit which method is used to train the target recommendation model.

[0167] The technical solutions provided by the embodiments of the present application preliminarily predict the second preference information of the user for the non-purchased object based on the first preference information of the user for the purchased object, extract the user-dimension feature and the object-dimension feature from the obtained first preference information and second preference information, correct the currently obtained preference information based on the features of the two dimensions, obtain third preference information with higher accuracy, generate training data according to the third preference information, thereby reducing the complexity and time consumption of the training data generation process without directly modeling the original online data, further shortening the training period of the model, enabling the model to be updated in time according to the latest user data, and enabling the output result of the model to better fit the current user preference.

[0168] Figure 6is a schematic diagram of a training data generation and target recommendation model training process provided by an embodiment of the present application, combined with Figure 6 The above-described recommendation model training method is applied to a game application as an example, and the above-described process is described. In a possible implementation manner, when training a target recommendation model for recommending virtual props, the server first obtains system log data from a cloud database, performs user attribute extraction and data structuring based on the system log data 601, inputs the extracted information into a user-prop preference calculation model 602, and preliminarily predicts the preference information of the user for each virtual prop, that is, the processes of steps 304 to 306 are performed; then, the preliminarily predicted data is corrected by using a GPU-accelerated collaborative filtering algorithm 603, that is, the processes of steps 307 to 308 are performed; the corrected preference information is used to construct a VL training data set 604, and the data preprocessing step 605 is performed for each data in the training data set. In the embodiment of the present application, the training data set can be divided into a training set and a validation set, and then the step 606 of training the target recommendation model is performed to obtain the trained target recommendation model, that is, the target recommendation model can be deployed online to recommend virtual props to users based on online traffic. The embodiment of the present application provides an item recommendation method based on multi-model fusion, introduces a user-prop preference calculation model based on an LSH (Locality Sensitive Hashing, locality sensitive hashing) algorithm and an ALS algorithm model in the training data generation stage to predict the preference information of the user for each virtual prop, thereby generating training data to train the target recommendation model, and the present scheme realizes multi-layer recall by multi-model fusion, and the predicted preference information is corrected multiple times, thereby obtaining more accurate training data. Figure 7 is a model accuracy condition schematic diagram provided by an embodiment of the present application, referring to Figure 7 Taking the prediction of the first six objects of interest of the user as an example, the curve 701 represents the first accuracy of the output result of the target recommendation model in the embodiment of the present application, which is about 65%, the curves 702 and 703 represent the second accuracy and the third accuracy of the output result of the model obtained by using other training methods, and the values and stability of the second accuracy and the third accuracy are lower than those of the first accuracy, as shown in Figure 7 The technical scheme provided by the embodiment of the present application introduces time sequence information in the training data generation stage, and adjusts the predicted preference information from coarse to fine based on the multi-layer recall strategy, thereby improving the accuracy of the training data and the accuracy of the model training result.

[0169] In the embodiments of the present application, the training data generation process described above can be implemented by Spark (a computing engine), for example, Spark is applied to predict the preference information of a user based on the number of user log streams. In a possible implementation, before Spark reads data, data format conversion can be performed first. For example, data such as user numbers is usually stored in a string format when stored, and data stored in this format consumes a large amount of memory when processed. In the embodiments of the present application, the storage type of the user number is converted to a long integer, for example, the user number and other data is converted to a long format hash number through hash transformation, and the mapping relationship between the original user number and the hash number is stored.

[0170] In a possible implementation, the server converts the type of the object in response to the data read, for example, the use case information of the first object by a plurality of users, and the data includes a non-random access type object, and converts the object to an indexed sequence object. For example, in the process of grouping similar users described above, if the type of the obtained object is an Iterable type, the object of this type cannot be randomly accessed, and the object type needs to be converted to an IndexedSeq type that supports random access. In the embodiments of the present application, the non-random access object is converted once before data aggregation, and the object can be accessed repeatedly in subsequent application processes, so that object type conversion is not required each time the object is accessed, thereby avoiding a decrease in data processing speed caused by data skew, greatly improving device performance, and ensuring data processing efficiency. Moreover, in the embodiments of the present application, a data volume limitation mechanism is introduced when data is aggregated, the data aggregated on a certain key value is controlled, that is, the number of users belonging to the same group is controlled, to reduce the operation amount of one data processing and ensure data processing efficiency.

[0171] In a possible implementation, in the similar user grouping, that is, the data aggregation stage, to improve the data processing speed, each preference vector can be divided into t bands, and the size of each band is z, and the preference vectors are compared in the band dimension, where t and z are positive integers. If the similarity between two user vectors is s, the probability that the two users become similar users presents an S-shaped curve when t and z take different values. Based on the characteristics of the S-shaped curve, after exceeding one threshold value, the probability that the two users become similar users rapidly increases and approaches 1. In the embodiments of the present application, to maintain a faster data processing speed and reduce grouping errors, the one threshold value needs to be selected in the region where the S-shaped curve is steepest. In the embodiments of the present application, by splitting the preference vectors during data aggregation, the data processing efficiency is improved, and by selecting the threshold value in the region where the S-shaped curve is steepest, the accuracy of data aggregation is improved.

[0172] The above embodiments introduce a method for constructing training data and training a target recommendation model. In the embodiments of the present application, the target recommendation model can be combined with various application scenarios. In a possible implementation manner, applying the target recommendation model for object recommendation can include the following steps.

[0173] Step one, the server responds to the object recommendation instruction, and obtains the user attribute indicated by the target identifier and the log data including the user identifier based on the user identifier carried by the object recommendation instruction.

[0174] In a possible implementation manner, the terminal generates an object recommendation instruction in response to user login or a viewing operation on an object recommendation interface, and the object recommendation instruction includes a user identifier of the user. The terminal sends the object recommendation instruction to the server, and the server obtains data indicated by the user identifier based on the user identifier, for example, user attributes, log data of the user, and the like. The embodiments of the present application do not limit the specific data to be obtained. It should be noted that the above description of the triggering manner of the object recommendation instruction is only an exemplary description, and the embodiments of the present application do not limit the specific method for triggering the object recommendation instruction.

[0175] Step two, the server determines a user feature vector based on the user attribute and the log data.

[0176] In a possible implementation manner, the server can splice and preprocess the obtained various data to obtain a user feature vector, which is represented by the following formula (7):

[0177] v=[x1,x2,x3,…,x n ] (7)

[0178] Wherein, x n represents the user data of each dimension. It should be noted that the embodiments of the present application do not limit the specific generation method of the user feature vector.

[0179] Step three, the server inputs the user feature vector into the trained target recommendation model to obtain an object recommendation result output by the target recommendation model.

[0180] In a possible implementation manner, the step three can be represented by the following formula (8):

[0181] y=sort(f(v)) (8)

[0182] Wherein, f() represents the target recommendation model, sort() represents sorting the output result of the target recommendation model, y represents the sorted object recommendation result, and v represents the user feature vector.

[0183] In a possible implementation manner, the server sends the object recommendation result to the terminal, and the terminal displays the recommended object based on the object recommendation result. For example, the terminal can display an icon of the recommended object on an object recommendation interface, or display the icon of the recommended object in the form of a pop-up window. The specific display manner of the recommended object is not limited in the embodiments of the present application. Taking an example of that the target recommendation model is applied to a game application, the target recommendation model can recommend virtual props based on user features, Figure 8 is a display manner of a recommended virtual prop provided by the embodiments of the present application. As shown in the interface, Figure 8 for example, the server responds to user login and pops up a pop-up window 801 on a starting interface of the game. The icon of each recommended virtual prop is displayed in the pop-up window 801.

[0184] All the optional technical solutions described above can be combined to form optional embodiments of the present application, and will not be repeated here.

[0185] Figure 9 is a structure schematic diagram of a recommendation model training apparatus provided by the embodiments of the present application. As shown in Figure 9 the apparatus comprises:

[0186] The first obtaining module 901 is configured to obtain first preference information corresponding to a plurality of users. The first preference information is used to indicate a preference degree of the user for a first object. The first object is an object on which the user has performed a transaction operation.

[0187] The determining module 902 is configured to determine second preference information corresponding to the plurality of users based on similarities between the first preference information corresponding to the plurality of users. The second preference information is used to indicate a preference degree of the user for a second object. The second object is an object on which the user has not performed a transaction operation.

[0188] The second obtaining module 903 is configured to correct the first preference information and the second preference information based on preference features of each user for each object and association features between each object and the user, to obtain third preference information of each user for each object. The preference features and the association features are determined based on the preference degree of the each user for the each object.

[0189] The generating module 904 is configured to generate training data based on any third preference information, a user attribute of a target user to which the any third preference information belongs, an object attribute of a target object to which the any third preference information belongs, and transaction information of the target user for the target object.

[0190] The training module 905 is configured to iteratively train a target recommendation model based on the training data, and obtain a trained target recommendation model in response to that an output result of the target recommendation model satisfies a training condition.

[0191] In a possible implementation, the first obtaining module 901 includes:

[0192] a parameter determining unit, configured to determine, for any user, a set of object use parameters corresponding to the any user based on use information of the any user on a first object;

[0193] a weight obtaining unit, configured to obtain a weight corresponding to each parameter in the set of object use parameters;

[0194] an information obtaining unit, configured to perform weighted operation on each parameter in the set of object use parameters to obtain first preference information of the any user on the first object.

[0195] In a possible implementation, the use information of the any user on a first object includes a first time when the any user uses the first object for the first time, a second time when the any user uses the first object for the last time, a total number of times that the any user uses the first object, and a number of times that the any user uses the first object in at least two reference time periods.

[0196] In a possible implementation, the parameter determining unit is configured to:

[0197] determine a time interval parameter based on the second time and a current time;

[0198] determine a use frequency parameter based on the first time, the current time, and the total number of times;

[0199] determine a preference parameter based on the first time, the second time, the current time, and the total number of times, the preference parameter being used to indicate a preference degree of the any user on the first object at the current time;

[0200] determine a balance factor based on the number of times that the any user uses the first object in at least two reference time periods, the balance factor being used to balance the preference degree of the any user on the first object in the at least two reference time periods.

[0201] In a possible implementation, the weight obtaining unit is configured to:

[0202] obtain a prior score corresponding to each parameter respectively;

[0203] determine a weight corresponding to each parameter based on the prior score and use information of each user on each first object.

[0204] In a possible implementation, the determining module 902 includes:

[0205] grouping unit, configured to determine similar users based on similarities between the first preference information corresponding to the plurality of users, and group the similar users into a group;

[0206] information determining unit, configured to determine, for any user, second preference information of the any user for a second object based on the first preference information corresponding to users belonging to a same group as the any user.

[0207] In a possible implementation, the grouping unit comprises:

[0208] vector constructing sub-unit, configured to construct, respectively, a preference vector corresponding to each user based on the first preference information of the each user for the first object;

[0209] grouping sub-unit, configured to group the each user based on the preference vector corresponding to the each user, and group users with similar corresponding preference vectors into a group.

[0210] In a possible implementation, the grouping sub-unit is configured to:

[0211] respectively acquire a hash value of the preference vector corresponding to the each user;

[0212] in response to the hash values of the preference vectors corresponding to at least two users being the same, group the at least two users into a group.

[0213] In a possible implementation, the apparatus further comprises:

[0214] a screening module, configured to, in response to a number of users included in any group being greater than a number threshold, select a first reference number of users from the any group, and remove users not selected from the any group.

[0215] In a possible implementation, the information determining unit is configured to:

[0216] for any user in a group of users, acquire, from the group of users, a second reference number of users similar to the any user as reference users, the similarity satisfying a reference condition;

[0217] determine, based on the first preference information corresponding to the reference users, second preference information of the any user for a second object.

[0218] In a possible implementation, the second acquiring module 903 is configured to:

[0219] construct a first matrix based on the first preference information and the second preference information corresponding to the each user, an element in the first matrix representing preference information of a user for an object;

[0220] The first matrix is iteratively updated to obtain a second matrix, in each iteration, the second matrix obtained in the last round of updating is taken as a new first matrix, the new first matrix is decomposed to obtain the preference features of the users to the objects and the association features between the objects and the users, the elements in the new first matrix are corrected based on the preference features and the association features to obtain a new second matrix;

[0221] The third preference information is determined based on the elements in the second matrix.

[0222] In a possible implementation, the generation module 904 is configured to:

[0223] The initial training data is obtained by splicing the any third preference information, the user attribute of the target user to which the one third preference information belongs, the object attribute of the target object to which the one third preference information belongs, and the transaction information of the target user to the target object.

[0224] The initial training data is preprocessed to obtain the training data.

[0225] In a possible implementation, the apparatus further includes any of the following:

[0226] The first conversion module is configured to, in response to the usage information of the plurality of users to the first object including an object of a non-random access type, convert the object to an indexed sequence object.

[0227] The second conversion module is configured to convert the storage type of the user number in the usage information to a long integer.

[0228] In a possible implementation, the apparatus further includes:

[0229] The receiving module is configured to receive an object recommendation instruction, the object recommendation instruction including a user identifier.

[0230] The third obtaining module is configured to, based on the user identifier, obtain a user attribute indicated by the target identifier and log data including the user identifier.

[0231] The vector determination module is configured to determine a user feature vector based on the user attribute and the log data.

[0232] The fourth obtaining module is configured to input the user feature vector into the trained target recommendation model, and obtain an object recommendation result output by the target recommendation model.

[0233] The device provided by the embodiments of the present application preliminarily predicts second preference information of a user for an object that has not been purchased based on first preference information of the user for an object that has been purchased, extracts user-dimension features and object-dimension features from the obtained first preference information and second preference information, corrects the currently obtained preference information based on the features of the two dimensions, obtains third preference information with higher accuracy, generates training data according to the third preference information, thereby reducing the complexity and time consumption of the training data generation process without directly modeling data according to original online data, shortening the training period of the model, and enabling the model to be updated in time according to the latest user data, so that the output result of the model can better meet the current user preference.

[0234] It should be noted that the recommendation model training device provided by the above embodiments is only used for example to illustrate the division of the above functional modules in the training of the recommendation model, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the recommendation model training device and the recommendation model training method provided by the above embodiments belong to the same concept, and the specific implementation process is described in detail in the method embodiments, which will not be repeated here.

[0235] Figure 10 Fig. 1 is a structural schematic diagram of a terminal provided by an embodiment of the present application. The terminal 1000 can be a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 player (Moving Picture Experts Group Audio Layer IV), a notebook computer or a desktop computer. The terminal 1000 can also be referred to as a user equipment, a portable terminal, a laptop terminal, a desktop terminal or other names.

[0236] Generally, the terminal 1000 includes one or more processors 1001 and one or more memories 1002.

[0237] The processor 1001 can include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 1001 can be implemented in at least one of a hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), a PLA (Programmable Logic Array). The processor 1001 can also include a main processor and a coprocessor, the main processor being a processor for processing data in an awake state, also referred to as a CPU (Central Processing Unit), and the coprocessor being a low-power processor for processing data in a standby state. In some embodiments, the processor 1001 can be integrated with a GPU (Graphics Processing Unit) that is responsible for rendering and drawing of content required to be displayed by the display screen. In some embodiments, the processor 1001 can further include an AI (Artificial Intelligence) processor for processing computing operations related to machine learning.

[0238] The memory 1002 can include one or more computer-readable storage media that can be non-transitory. The memory 1002 can also include high-speed random access memory and nonvolatile, computer-readable storage media such as one or more magnetic disk storage devices, flash memory devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 1002 is used to store at least one program code for being executed by the processor 1001 to implement the recommendation model training method provided by the method embodiments of the present application.

[0239] In some embodiments, the terminal 1000 can also optionally include a peripheral device interface 1003 and at least one peripheral device. The processor 1001, the memory 1002, and the peripheral device interface 1003 can be connected through a bus or a signal line. Each peripheral device can be connected to the peripheral device interface 1003 through a bus, a signal line, or a circuit board. Specifically, the peripheral device includes at least one of 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.

[0240] The peripheral interface 1003 can be used to connect at least one I / O (Input / Output) related peripheral device to the processor 1001 and the memory 1002. In some embodiments, the processor 1001, the memory 1002 and the peripheral interface 1003 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1001, the memory 1002 and the peripheral interface 1003 can be implemented on a separate chip or circuit board, and the present embodiments are not limited in this regard.

[0241] The radio frequency circuit 1004 is configured to receive and send RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 1004 communicates with communication networks and other communication devices through electromagnetic signals. The radio frequency circuit 1004 converts electrical signals into electromagnetic signals for transmission, or converts electromagnetic signals received into electrical signals. Optionally, the radio frequency 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 subscriber identity module card, and the like. The radio frequency circuit 1004 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes but is not limited to: a metropolitan area network, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 1004 can also include NFC (Near Field Communication) related circuitry, and the present application is not limited in this regard.

[0242] The display screen 1005 is configured to display a UI (User Interface). The UI can include graphics, text, icons, video, and any combination thereof. When the display screen 1005 is a touch display screen, the display screen 1005 is further configured to capture touch signals on or above the surface of the display screen 1005. The touch signals can be input to the processor 1001 as control signals for processing. In this case, the display screen 1005 can also be configured to provide virtual buttons and / or virtual keyboard, also known as soft buttons and / or soft keyboard. In some embodiments, the display screen 1005 can be one, arranged on the front panel of the terminal 1000; in other embodiments, the display screen 1005 can be at least two, arranged on different surfaces of the terminal 1000 or in a folding design; in some embodiments, the display screen 1005 can be a flexible display screen, arranged on a curved surface or a folding surface of the terminal 1000. Even, the display screen 1005 can also be arranged in an irregular shape other than a rectangle, i.e., a special-shaped screen. The display screen 1005 can be made of materials such as LCD (Liquid Crystal Display) or OLED (Organic Light-Emitting Diode).

[0243] The camera assembly 1006 is configured to capture images or videos. Optionally, the camera assembly 1006 includes a front-facing camera and a rear-facing camera. Typically, the front-facing camera is arranged on the front panel of the terminal, and the rear-facing camera is arranged on the back of the terminal. In some embodiments, the rear-facing camera is at least two, which is any one of a main camera, a depth-of-field camera, a wide-angle camera, and a telephoto camera, to realize the background blur function by fusing the main camera and the depth-of-field camera, the panoramic shooting and VR (Virtual Reality) shooting function by fusing the main camera and the wide-angle camera, or other fusion shooting functions. In some embodiments, the camera assembly 1006 can further include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. The dual-color temperature flash refers to the combination of a warm light flash and a cold light flash, which can be used for light compensation under different color temperatures.

[0244] The audio circuit 1007 can include a microphone and a speaker. The microphone is used to collect sound waves of a user and an environment, and convert the sound waves into an electrical signal input to the processor 1001 for processing, or input to the radio frequency circuit 1004 to realize voice communication. For the purpose of stereo sound collection or noise reduction, the microphone can be multiple, respectively arranged at different parts of the terminal 1000. The microphone can also be an array microphone or an omnidirectional collection type microphone. The speaker is used to convert an electrical signal from the processor 1001 or the radio frequency circuit 1004 into sound waves. The speaker can be a traditional diaphragm speaker, or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, not only can the electrical signal be converted into a sound wave audible to humans, but also can be converted into a sound wave inaudible to humans for ranging purposes. In some embodiments, the audio circuit 1007 can also include a headphone jack.

[0245] The positioning component 1008 is used to position the current geographic position of the terminal 1000 to realize navigation or LBS (Location Based Service). The positioning component 1008 can be a positioning component based on the GPS (Global Positioning System) of the United States, the Beidou system of China, the Glonass system of Russia or the Galileo system of the European Union.

[0246] The power supply 1009 is used to supply power to each component in the terminal 1000. The power supply 1009 can be alternating current, direct current, disposable battery or rechargeable battery. When the power supply 1009 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.

[0247] 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 acceleration sensor 1011, a gyroscope sensor 1012, a pressure sensor 1013, a fingerprint sensor 1014, an optical sensor 1015 and a proximity sensor 1016.

[0248] The acceleration sensor 1011 can detect the acceleration magnitude in three coordinate axes of the coordinate system established by the terminal 1000. For example, the acceleration sensor 1011 can be used to detect the components of the gravitational acceleration in three coordinate axes. The processor 1001 can control the display screen 1005 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 1011. The acceleration sensor 1011 can also be used for game or user motion data collection.

[0249] The gyroscope sensor 1012 can detect the body direction and rotation angle of the terminal 1000, and can collect 3D motions of the user on the terminal 1000 in cooperation with the acceleration sensor 1011. The processor 1001 can implement the following functions according to the data collected by the gyroscope sensor 1012: motion sensing (such as changing the UI according to the tilt operation of the user), image stabilization when shooting, game control, and inertial navigation.

[0250] The pressure sensor 1013 can be arranged on the side frame of the terminal 1000 and / or the lower layer of the display screen 1005. When the pressure sensor 1013 is arranged on the side frame of the terminal 1000, the holding signal of the user on the terminal 1000 can be detected, and the left-hand or right-hand recognition or shortcut operation can be performed by the processor 1001 according to the holding signal collected by the pressure sensor 1013. When the pressure sensor 1013 is arranged on the lower layer of the display screen 1005, the controllable control on the UI interface can be controlled by the processor 1001 according to the pressure operation of the user on the display screen 1005. The controllable control includes at least one of a button control, a scroll bar control, an icon control, and a menu control.

[0251] The fingerprint sensor 1014 is used to collect the fingerprint of the user, and the identity of the user can be recognized by the processor 1001 according to the fingerprint collected by the fingerprint sensor 1014, or by the fingerprint sensor 1014 according to the collected fingerprint. When the identity of the user is recognized as a trusted identity, the processor 1001 authorizes the user to perform related sensitive operations, including unlocking the screen, viewing encrypted information, downloading software, payment, and changing settings. The fingerprint sensor 1014 can be arranged on the front, back or side of the terminal 1000. When the terminal 1000 is provided with a physical button or a manufacturer's logo, the fingerprint sensor 1014 can be integrated with the physical button or the manufacturer's logo.

[0252] The optical sensor 1015 is used to collect the ambient light intensity. In one embodiment, the processor 1001 can control the display brightness of the display screen 1005 according to 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 according to the ambient light intensity collected by the optical sensor 1015.

[0253] The proximity sensor 1016, also referred to as a distance sensor, is usually arranged on the front panel of the terminal 1000. The proximity sensor 1016 is used to collect the distance between the user and the front of the terminal 1000. In an embodiment, when the proximity sensor 1016 detects that the distance between the user and the front of the terminal 1000 gradually decreases, the display screen 1005 is switched from the bright screen state to the screen-off state under the control of the processor 1001; when the proximity sensor 1016 detects that the distance between the user and the front of the terminal 1000 gradually increases, the display screen 1005 is switched from the screen-off state to the bright screen state under the control of the processor 1001.

[0254] Those skilled in the art can understand that the structure shown in the foregoing embodiments is not a limitation on the terminal 1000, and the terminal 1000 can include more or fewer components than those shown in the drawings, or combine certain components, or adopt a different arrangement of components. Figure 10

[0255] Figure 11 FIG. 11 is a structural schematic diagram of a server provided by an embodiment of the present application. The server 1100 can have great differences due to different configurations or performances, and can include one or more processors (Central Processing Units, CPUs) 1101 and one or more memories 1102. The one or more memories 1102 store at least one program code, which is loaded and executed by the one or more processors 1101 to implement the method provided by each of the above-mentioned method embodiments. Of course, the server 1100 can also have a wired or wireless network interface, a keyboard, an input and output interface, and other components for realizing the functions of the device, and details are not described herein.

[0256] In an exemplary embodiment, a computer readable storage medium is also provided, for example, a memory including at least one program code, and the at least one program code can be executed by a processor to complete the recommendation model training method in the above-mentioned embodiments. For example, the computer readable storage medium can be a Read-Only Memory (ROM), a Random Access Memory (RAM), a Compact Disc Read-Only Memory (CD-ROM), a magnetic tape, a floppy disk, and an optical data storage device, etc.

[0257] ​In an example embodiment, a computer program product is also provided, which includes at least one program code stored in a computer readable storage medium. A processor of a computer device reads the at least one program code from the computer readable storage medium, and the processor executes the at least one program code, so that the computer device implements operations performed by the recommendation model training method.

[0258] Those of ordinary skill in the art can understand that all or part of the steps of the above-mentioned embodiments can be completed by hardware, or by at least one program code related to hardware, and the program can be stored in a computer readable storage medium. The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.

[0259] The above is only an optional embodiment of the present application, and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for training a recommendation model, characterized in that, The method includes: Obtain first preference information corresponding to multiple users, the first preference information being used to represent the user's degree of preference for a first object, the first object being an object to which the user has performed transaction operations; Based on the similarity between the first preference information corresponding to the multiple users, second preference information corresponding to the multiple users is determined. The second preference information is used to represent the degree of preference of the user for a second object, which is an object that the user has not performed a transaction on. From the first preference information and the second preference information corresponding to each user, the user-dimensional preference features and the object-dimensional association features are extracted. The preference features are used to indicate the preference of each user for each type of object, and the association features are used to indicate the preference of each object for each type of user. Based on the preference characteristics of each user for each object and the association characteristics between each object and the user, the first preference information and the second preference information are corrected to obtain the third preference information of each user for each object. The preference characteristics and the association characteristics are determined based on the degree of preference of each user for each object. Training data is generated based on any third preference information, the user attributes of the target user to which the third preference information belongs, the object attributes of the target object to which the third preference information belongs, and the transaction information of the target user to the target object. The target recommendation model is iteratively trained based on the training data. When the output of the target recommendation model satisfies the training conditions, a well-trained target recommendation model is obtained.

2. The method according to claim 1, characterized in that, The step of obtaining the first preference information corresponding to multiple users includes: For any user, based on the user's usage information of a first object, determine a set of object usage parameters corresponding to that user; Obtain the weights corresponding to each parameter in the set of object usage parameters; The first preference information of any user for a first object is obtained by weighting each parameter in the set of objects.

3. The method according to claim 2, characterized in that, The usage information of any user on a first object includes the first time when any user first uses the first object, the second time when any user last uses the first object, the total number of times any user uses the first object, and the number of times any user uses the first object within at least two reference time periods.

4. The method according to claim 3, characterized in that, The step of determining a set of object usage parameters corresponding to any user based on the usage information of any user for a first object includes: Based on the second time and the current time, determine the time interval parameter; Based on the first time, the current time, and the total number of times, the usage frequency parameter is determined; Based on the first time, the second time, the current time, and the total number of times, a preference parameter is determined, which is used to indicate the degree of preference of any user for the first object at the current time. A balance factor is determined based on the number of times any user uses the first object within at least two reference time periods. The balance factor is used to balance the degree of preference of any user for the first object within the at least two reference time periods.

5. The method according to claim 1, characterized in that, The step of determining the second preference information corresponding to the multiple users based on the similarity among the first preference information corresponding to the multiple users includes: Based on the similarity between the first preference information corresponding to the multiple users, similar users are identified and grouped together. For any user, based on the first preference information corresponding to users belonging to the same group as the user, the second preference information of the user for the second object is determined.

6. The method according to claim 5, characterized in that, The step of determining similar users based on the similarity among the first preference information corresponding to the multiple users, and grouping similar users into a group, includes: Based on the first preference information of each user for the first object, a preference vector corresponding to each user is constructed respectively; Based on the preference vectors corresponding to each user, the users are grouped together, and users with similar preference vectors are grouped together.

7. The method according to claim 5, characterized in that, After determining similar users based on the similarity among the first preference information corresponding to the multiple users, and grouping the similar users into a group, the method further includes: In response to a situation where the number of users included in any group exceeds a threshold, a first reference number of users are selected from the group, and the unselected users are removed from the group.

8. The method according to claim 5, characterized in that, For any user, determining the second preference information of the user for the second object based on the first preference information corresponding to users belonging to the same group as the user includes: For any user in a group of users, a second number of users whose similarity to any user meets the reference conditions are obtained from the group of users and used as reference users; Based on the first preference information corresponding to the reference user, determine the second preference information of any user for the second object.

9. The method according to claim 1, characterized in that, The process involves refining the first and second preference information based on each user's preference characteristics for objects and the association characteristics between each object and user to obtain third preference information for each user towards each object, including: Based on the first preference information and the second preference information corresponding to each user, a first matrix is ​​constructed, where an element in the first matrix represents a user's preference information for an object. The first matrix is ​​iteratively updated to obtain the second matrix. In each iteration, the second matrix obtained in the previous update is obtained as the new first matrix. The new first matrix is ​​matrix decomposed to obtain the preference features of each user to the object and the association features between each object and the user. Based on the preference features and the association features, the elements in the new first matrix are corrected to obtain the new second matrix. The third preference information is determined based on each element in the second matrix.

10. The method according to claim 1, characterized in that, The training data is generated based on any third preference information, the user attributes of the target user to which the third preference information belongs, the object attributes of the target object to which the third preference information belongs, and the transaction information of the target user to the target object, including: The initial training data is obtained by concatenating any third preference information, the user attributes of the target user to which the third preference information belongs, the object attributes of the target object to which the third preference information belongs, and the transaction information of the target user to the target object. The initial training data is preprocessed to obtain the training data.

11. The method according to claim 1, characterized in that, Before obtaining the first preference information corresponding to multiple users, the method further includes any one of the following: In response to the fact that the usage information of the first object by the multiple users includes objects of non-random access type, the object is converted into an indexed sequence object; Convert the storage type of the user ID in the usage information to a long integer.

12. The method according to claim 1, characterized in that, After iteratively training the target recommendation model based on the training data, and obtaining the trained target recommendation model in response to the output of the target recommendation model satisfying the training conditions, the method further includes: Receive an object recommendation instruction, wherein the object recommendation instruction includes a user identifier; Based on the user identifier, obtain the user attributes indicated by the user identifier and log data including the user identifier; Based on the user attributes and the log data, determine the user feature vector; The user feature vector is input into the trained target recommendation model to obtain the object recommendation result output by the target recommendation model.

13. A recommendation model training device, characterized in that, The device includes: The first acquisition module is used to acquire first preference information corresponding to multiple users. The first preference information is used to represent the user's preference for a first object, and the first object is an object to which the user has performed a transaction operation. The determining module is used to determine second preference information corresponding to the multiple users based on the similarity between the first preference information corresponding to the multiple users. The second preference information is used to represent the degree of preference of the user for a second object, where the second object is an object for which the user has not performed a transaction operation. From the first preference information and the second preference information corresponding to each user, the module extracts preference features at the user dimension and association features at the object dimension. The preference features are used to indicate the preference of each user for each type of object, and the association features are used to indicate the preference of each object for each type of user. The second acquisition module is used to modify the first preference information and the second preference information based on the preference features of each user for each object and the association features between each object and the user, so as to obtain the third preference information of each user for each object. The preference features and the association features are determined based on the degree of preference of each user for each object. The generation module is used to generate training data based on any third preference information, the user attributes of the target user to which the third preference information belongs, the object attributes of the target object to which the third preference information belongs, and the transaction information of the target user to the target object. The training module is used to iteratively train the target recommendation model based on the training data, and obtain the trained target recommendation model in response to the output result of the target recommendation model satisfying the training conditions.

14. A computer device, characterized in that, The computer device includes one or more processors and one or more memories, wherein at least one piece of program code is stored in the one or more memories, and the at least one piece of program code is loaded and executed by the one or more processors to perform the operations performed by the recommendation model training method as described in any one of claims 1 to 12.

15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one piece of program code, which is loaded and executed by a processor to perform the operations of the recommendation model training method as described in any one of claims 1 to 12.

Citation Information

Patent Citations

  • Self-adaptive sampling method based on user preferences

    CN105740327A

  • Recommendation algorithm combining Word2vec word vector and LSH (Local Sensitive Hash)

    CN111061996A