Training method, device, electronic device and storage medium for information recommendation model
By extracting user interest characteristics in the client, performing user clustering and local model training, the problems of missing user portrait data and incomplete labels in the existing information recommendation model are solved, and more efficient model training and personalized information recommendation effects are achieved.
Patent Information
- Application Number
- CN202110649819.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-10
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2041-06-10
AI Technical Summary
During the training process, existing information recommendation models are prone to missing user portrait data and incomplete labels, resulting in poor user personalized information recommendation results.
The user's interest characteristics are extracted from the client, user clustering is performed, user clusters are generated, and local model training is performed based on these clusters. Upload the local model to the central server for joint training to generate a global information recommendation model.
Through the clustering of user interest characteristics and training of local models, we supplement and improve user portraits, reduce the iteration rounds of model parameter updates, improve model training speed, and reduce the consumption cost of the central server.
Smart Images

Figure CN113378049B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a training method, device, electronic device and storage medium for an information recommendation model. Background Art
[0002] The information recommendation model is used to help users get rid of information they are not interested in, so that users can quickly obtain information of interest from massive amounts of information. With the development of the information age, Internet information is becoming more and more complex, and user behavior is also becoming more complex and diverse. At present, most of the existing information recommendation models are trained using the individual behavior of a single user. By extracting features from each historical user data, the weight parameters are uploaded to the central server for joint training, and the parameters are updated in a loop and sent to each participating local model for updating. Since each user's data needs to participate in the model training and the individual label learning lacks the correlation between user groups with similar interest characteristics, it is easy to have the problem of missing user portrait data and incomplete labels when training the information recommendation model, resulting in poor personalized information recommendation effects for users. Summary of the invention
[0003] In view of this, the embodiments of the present application provide a training method, apparatus, device and storage medium for an information recommendation model, which can solve the problem that the characteristics of a single user are incomplete and the information recommendation effect does not meet expectations.
[0004] A first aspect of an embodiment of the present application provides a method for training an information recommendation model, the method being applied to a client and comprising:
[0005] Extracting interest features of all users from the local database of the client;
[0006] Perform user clustering based on the interest characteristics of all users to obtain a user cluster of the client;
[0007] Extracting historical behavior data of users from the local database as training samples according to the user cluster to perform local model training and generate a local model of the client;
[0008] The local model of the client is uploaded to the central server, so that the central server performs joint training based on the local model of the client and the local models of other clients to obtain a global information recommendation model, wherein the local models of other clients are local models obtained by local training of other clients participating in federated learning.
[0009] In combination with the first aspect, in a first possible implementation manner of the first aspect, the step of extracting interest features of all users from the local database of the client includes:
[0010] Acquire historical behavior data of a target user from a local database of the client, wherein the target user is any user of the client, and the historical behavior data includes historical operation records of the target user in the client;
[0011] The behavior data of the target user is input into a preset feature extraction model, so that the preset feature extraction model extracts interest features from the historical behavior data of the target user according to time sensitivity, thereby obtaining the interest features of the target user.
[0012] In combination with the first aspect or the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, the step of clustering the interest features of all users to obtain the user cluster of the client includes:
[0013] For any two users in the client, calculating a feature similarity value between the two users according to the interest features of the two users;
[0014] The feature similarity value between the two users is compared with a preset similarity threshold. If the feature similarity between the two users reaches the preset similarity threshold requirement, the two users are clustered into the same user cluster; otherwise, the two users are classified into two different user clusters until all local users of the client have corresponding user clusters.
[0015] In combination with the first aspect, in a third possible implementation manner of the first aspect, the step of extracting historical behavior data of users from the local database as training samples for performing local model training according to the user cluster to generate a local model of the client includes:
[0016] Constructing information recommendation categories based on the extracted historical behavior data of the user;
[0017] Using a multi-classification probability distribution function, the historical behavior recorded in the historical behavior data of the user is mapped to a probability interval of (0,1) according to the information recommendation classification, and a local model containing a multi-classification probability function for predicting user behavior is generated.
[0018] In combination with the third possible implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, after the step of generating a local model containing a multi-classification probability function for predicting user behavior, the method further includes:
[0019] A loss function is configured for the output of the local model, wherein the loss function is used to determine the gap between the actual output of the local model and the expected output.
[0020] In combination with the first aspect, in a fifth possible implementation manner of the first aspect, the step of uploading the local model of the client to the central server so that the central server performs joint training according to the local model of the client and local models of other clients to obtain a global information recommendation model includes:
[0021] Obtaining a training weight value of the client in federated learning;
[0022] The local model of the client and its training weight value in federated learning are uploaded to the central server, so that the central server combines the local models of each client participating in federated learning and the training weight value of each client participating in federated learning for joint training to obtain a global information recommendation model.
[0023] In combination with the fifth possible implementation manner of the first aspect, in a sixth possible implementation manner of the first aspect, the step of uploading the local model of the client and its training weight value in federated learning to the central server, so that the central server combines the local models of each client participating in the federated learning and the training weight values of each client participating in the federated learning in the federated learning to perform joint training to obtain a global information recommendation model, further includes:
[0024] Training weights are respectively configured for the output results of the local model and the clustering results of the user clusters, and the output results of the local model and the clustering results of the user clusters are respectively configured with training weights and uploaded to the central server for joint training to obtain a global information recommendation model.
[0025] A second aspect of an embodiment of the present application provides a training device for an information recommendation model, wherein the training device for an information recommendation model is applied to a client and includes:
[0026] A user interest feature extraction module is used to extract interest features of all users from the local database of the client;
[0027] A user cluster acquisition module, used to cluster the interest features of all users to obtain the user cluster of the client;
[0028] A local model training module, used to extract historical behavior data of users from the local database as training samples according to the user cluster to perform local model training and generate a local model of the client;
[0029] The local model uploading module is used to upload the local model of the client to the central server, so that the central server can jointly train the local model of the client with the local models of other clients to obtain a global information recommendation model, wherein the local models of other clients are local models obtained by local training of other clients participating in federated learning.
[0030] A third aspect of an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the electronic device, wherein the processor implements the steps of the training method for the information recommendation model provided in the first aspect when executing the computer program.
[0031] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the training method of the information recommendation model provided in the first aspect are implemented.
[0032] The training method, device, electronic device and storage medium of an information recommendation model provided in the embodiments of the present application have the following beneficial effects:
[0033] The method described in the present application is to extract the interest features of all users from the local database of the client in the client; cluster the interest features of all users to obtain the user cluster of the client; extract the historical behavior data of users from the local database as training samples according to the user cluster to perform local model training to generate the local model of the client; upload the local model of the client to the central server, so that the central server can perform joint training based on the local model and the local models of other clients to obtain a global information recommendation model, wherein the local models of other clients are local models obtained by local training of other clients participating in federated learning. When training the local model of the client, the above method extracts the interest features of users and builds user clusters based on the interest features of users, and then obtains training samples according to the user clusters for model training, utilizes the similarity relationship between user interests, supplements and improves user portraits, reduces the iteration rounds of the local model when updating parameters, improves the model training speed, and reduces the consumption cost of the central server. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0035] Figure 1 A flowchart of a training method for an information recommendation model provided in an embodiment of the present application;
[0036] Figure 2 A flow chart of a method for extracting user interest features in a training method for an information recommendation model provided in an embodiment of the present application;
[0037] Figure 3 A schematic diagram of a GFE neural network model in a training method for an information recommendation model provided in an embodiment of the present application;
[0038] Figure 4 A flow chart of a method for obtaining a user cluster of a client in a training method for an information recommendation model provided in an embodiment of the present application;
[0039] Figure 5 A flowchart of a method for generating a local model of a client in a training method for an information recommendation model provided in an embodiment of the present application;
[0040] Figure 6 A flow chart of a method for obtaining a global information recommendation model through joint training in the information recommendation model training method provided in an embodiment of the present application;
[0041] Figure 7 A basic structural block diagram of a training device for an information recommendation model provided in an embodiment of the present application;
[0042] Figure 8 A basic structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0044] The training method of the information recommendation model provided in this application is mainly used in the field of advertising recommendation, aiming to solve the problem that with the development of the information age, user behaviors have become complex and diverse, advertisers have invested a lot of advertising fees and materials in the media during the advertising process, but the return on investment is low, the user purchase or download volume is insufficient, and the advertising click conversion is not ideal, resulting in a lot of resource waste, and the user personalized recommendation effect is not good. This application specifically uses the correlation between user interests to cluster users with highly similar interests to form user clusters, and provides training samples required for model training according to user clusters. Through federated learning, the model is trained by combining the order conversion data in the advertiser client and the user browsing data in the recommendation media client, improving the user portrait, and solving the problem of imperfect single user characteristics and unsatisfactory information recommendation effects.
[0045] See also Figure 1 , Figure 1 This is a flowchart of a training method for an information recommendation model provided in an embodiment of the present application. The details are as follows:
[0046] Step S11: extracting interest features of all users from the local database of the client.
[0047] In this embodiment, a federated learning method is used to train and acquire an information recommendation model, that is, the training process of the information recommendation model has multiple clients participating in the federated learning. In practical applications, the information recommendation model is used for advertising recommendation, and the clients include advertiser clients, recommendation media clients, etc. It should be noted that each client participating in the federated learning is respectively provided with a local database for storing user data, which can be used to save the previous browsing behavior, ordering consumption behavior, downloading behavior and other behavioral data of each user in the client. In this embodiment, for each client participating in the federated learning during the training process of the information recommendation model, the client can extract the interest characteristics of all users in the client by obtaining the behavioral data of each user and extracting the interest features of each user based on the obtained behavioral data.
[0048] In some specific embodiments of this application, please refer to Figure 2 , Figure 2 A flow chart of a method for extracting user interest features in the training method of the information recommendation model provided in the embodiment of the present application. The details are as follows:
[0049] Step S21: acquiring historical behavior data of a target user from a local database of the client, wherein the target user is any user of the client, and the historical behavior data includes historical operation records of the target user in the client;
[0050] Step, S22: input the behavior data of the target user into a preset feature extraction model, so that the preset feature extraction model extracts interest features from the historical behavior data of the target user according to time sensitivity, and obtains the interest features of the target user.
[0051] In this embodiment, the user's historical behavior data, such as browsing behavior, ordering consumption behavior, and downloading behavior, has time-sensitive characteristics, and the user's behavior is easily affected by environmental or personal factors. In this case, when recommending information based on the user's historical behavior data, it is difficult to determine whether the recommended information meets the user's current needs. In this embodiment, the client can use the GFE (Group Feature Extraction) neural network model to extract interest features. Please refer to Figure 3 , Figure 3 Schematic diagram of the GFE neural network model in the training method of the information recommendation model provided in the embodiment of the present application. Figure 3 As shown, in the GFE neural network model, the model can split the user's historical behavior data in the past period of time by time period in the feature dimension, and put the user's historical behavior data on a time axis, so that the GFE neural network model extracts interest features from the user's historical behavior data according to time sensitivity, and obtains the user's current interest features. Among them, after the client divides the user's historical behavior data by time period, different time periods represent different time sensitivities. The closer the time period is to the current moment, the better the time sensitivity of the historical behavior data in the time period is, and the more relevant the historical behavior data in the time period is to the user's current interest. Since the user's interest is less likely to change in a relatively short period of time, when using the GFE neural network model to extract interest features, it can be considered that the user's current behavior has a certain degree of correlation with the behavior in the previous relatively short period of time, and the user's interest features are continuously updated according to the past user behavior combined with the current user information to realize the time memory function. Therefore, when using the GFE neural network model to extract the user's interest features, the accuracy of the user's interest feature extraction can be improved.
[0052] Step S12: clustering the interest features of all the users to obtain the user cluster of the client.
[0053] In this embodiment, users in the client can be clustered according to their interest characteristics, so that all users in the client can be divided into multiple user clusters according to different interest characteristics. In this embodiment, a GFE (Group Feature Extraction) feature clustering model can be used to cluster all users in the client according to their interest characteristics, so as to obtain user clusters of the client. The core idea of GFE clustering is to calculate the similarity between interest characteristics and cluster users with high similarity.
[0054] In some specific embodiments of this application, please refer to Figure 4 , Figure 4 A flow chart of a method for obtaining a user cluster of a client in a training method of an information recommendation model provided in an embodiment of the present application. Details are as follows:
[0055] Step S41: for any two users in the client, calculating a feature similarity value between the two users according to their respective user features;
[0056] Step S42: Compare the feature similarity value between the two users with a preset similarity threshold. If the feature similarity between the two users meets the preset similarity threshold requirement, cluster the two users into the same user cluster; otherwise, classify the two users into two different user clusters until all local users of the client have corresponding user clusters.
[0057] In this embodiment, the feature similarity value between any two users in the client can be calculated based on the interest features of the two users. Specifically, the cosine similarity algorithm can be used to calculate the feature similarity value between the two users, and the interest features of the two users are respectively represented as feature vectors, and the cosine value between the two feature vectors is calculated, and the cosine value obtained by the calculation is used as the feature similarity value between the two users. Among them, the smaller the calculated cosine value, the more similar the interest preferences between the two users are, and the larger the cosine value, the more dissimilar the interest preferences between the two users are. The feature similarity value calculation relationship is as follows:
[0058]
[0059] Where A and B represent two users in the client; cos(A,B) represents the feature similarity value between user A and user B; n represents the number of interest categories; A i represents the i-th interest category of user A, B irepresents the i-th interest category of user B. It should be noted that, in this embodiment, the interest category can be obtained by statistics based on the user's historical behavior data, such as historical consumption records, product browsing time, number of product sharing times, etc.
[0060] According to the calculated feature similarity value between the two users, the feature similarity value between the two users is compared with the preset similarity threshold. If the comparison result shows that the feature similarity value between the two users is less than or equal to the similarity threshold, it means that the interest features of the two users are highly similar, and the two users are clustered into a unified user cluster. If the comparison result shows that the similarity value between the two users is greater than the similarity threshold, it means that the interest features of the two users are not similar. At this time, the two users are classified into two different user clusters. In this embodiment, by calculating the feature similarity of all users in the client in pairs and clustering them according to the feature similarity value, all users in the client can be clustered one by one into their corresponding user clusters, so that each user has a corresponding user cluster.
[0061] Exemplarily, in this embodiment, when clustering users in a client, a first user can be arbitrarily selected from all users of the client to construct a first cluster, and then the interest characteristics of the first user and the remaining users in the client are respectively calculated for feature similarity, all users with highly similar interest characteristics to the first user are found, and these users are clustered into the first cluster where the first user is located, thereby forming a user cluster of the client. Then, a second user who does not belong to the first cluster is selected to construct a new second cluster, and then the interest characteristics of the second user and the remaining users in the client that do not belong to the first cluster are respectively calculated for feature similarity, and users with highly similar interest characteristics to the second user are found from the remaining users that do not belong to the first cluster, and then these users are clustered into the second cluster where the second user is located, thereby forming another user cluster of the client, and so on, until all users in the client have user clusters to which they belong.
[0062] Step S13: extracting historical behavior data of users from the local database as training samples according to the user cluster to perform local model training and generate a local model of the client.
[0063] In this embodiment, user data is obtained from the local database of the client as training samples according to user clusters. The obtained training samples are based on the similarity relationship between user interests. In the obtained training samples, the characteristics of each user are supplemented by the characteristics of the user cluster that is highly similar to their interests, making the user portrait more complete. When the local model is trained using the obtained sample data on the client, the number of iterations of updating the local model parameters can be reduced based on the feature supplement of the user cluster, thereby speeding up the model training. It should be noted that when the client is training the local model, data exchange and cross-access between the client and other clients are prohibited, and each client can only store and access data on its local device.
[0064] In some specific embodiments of this application, please refer to Figure 5 , Figure 5 A flowchart of a method for generating a local model of a client in a training method for an information recommendation model provided in an embodiment of the present application.
[0065] Details are as follows:
[0066] Step S51: constructing information recommendation categories based on the extracted historical behavior data of the user;
[0067] Step S52: using a multi-classification probability distribution function, mapping the historical behaviors recorded in the historical behavior data of the user to a probability interval of (0,1) according to the information recommendation classification, and generating a local model containing a multi-classification probability function for predicting user behaviors.
[0068] In this embodiment, when training a local model, the recommended information classification of the local model can be constructed based on the training samples, such as the advertising classification in the advertising recommendation. Then, the historical behavior data of each user in the training samples, such as consumption behavior, browsing behavior, downloading behavior, sharing behavior, etc., are traversed, and a multi-classification probability distribution function is used to map the historical behaviors recorded in the user's historical behavior data to the probability interval (0,1) one by one according to the information recommendation classification in the classification problem, thereby training and obtaining a multi-classification probability distribution function for predicting user behavior applied to the local model. Based on this pair of classification probability distribution functions, when recommending information to a user, the local model can find the recommended information that the user likes or the recommended information with the highest application probability from the multi-classification probability distribution function by probability, and then recommend information to the user according to the probability. The multi-classification probability distribution function can be expressed as follows:
[0069]
[0070] Where i is the number of predicted recommendation information, S is the score prediction function output after the GFE neural network feature is updated, and S irepresents the predicted score of the i-th recommended information under the current recommended information category. C represents the number of all recommended information categories, S c Represents the prediction score of the i-th recommended information in each recommended information category.
[0071] In this embodiment, the probability of each recommended information category in all categories can be calculated through the above-mentioned multi-classification probability distribution function. The higher the probability, the higher the weight of the recommended information of the category is predicted when recommending information to the user. It should be noted that the sum of the probability values calculated for all recommended information categories is 1, and the probability value of each category is between 0 and 1. Moreover, in this embodiment, the exponential operation of the natural base e is used in the multi-classification probability distribution function to amplify the gap between the predicted score values, and the amplification process can make the values of each category independent and non-interfering.
[0072] In some specific embodiments of the present application, the output result of the local model is characterized by the accuracy of the local model in predicting the recommended information for the user. In this embodiment, a loss function is configured for the output result of the local model, and the loss function is used to determine the difference between the actual output of the local model and the expected output. In this embodiment, the loss function can be expressed as follows:
[0073] H(q,p)=∑q(S i )log p(S i )
[0074] Among them, H(q,p) represents the gap between the actual output of the local model and the expected output; p(S i ) is calculated by the multi-classification probability distribution function obtained by training in the local model; q(S i ) represents the probability that the local model correctly recommends the information needed by the user, which can be obtained by calculating the proportion of recommended information used by the user to all pushed information. The loss function reflects the probability of the local model recommending the information of interest to the user by calculating the distance between the probability distribution of the local model prediction and the true recommendation. The smaller the distance, the greater the probability that the local model recommends the information of interest to the user.
[0075] Step S14: Upload the local model of the client to the central server, so that the central server performs joint training based on the local model of the client and the local models of other clients to obtain a global information recommendation model, wherein the local models of other clients are local models obtained by local training of other clients participating in federated learning.
[0076] In this embodiment, federated learning includes uploading the local models obtained by the local training of multiple clients participating in the federated learning to the central server for joint training to train and obtain a global information recommendation model. In this embodiment, after the central server obtains the global information recommendation model through joint training, the updated model parameters of the global information recommendation model are returned to each client, so that each client can update and iterate the model parameters of its local model locally, and then re-upload the updated and iterated local model to the central server for a new round of joint training until the global information recommendation model obtained by the joint training of the central server reaches the preset prediction effect. When the central server stops the joint training, the last obtained global information recommendation model is returned to each client, so that each client can run the last obtained global information recommendation model on its respective local device to recommend the information required by the user to the user. It should be noted that in the process of uploading the local model obtained by the client training to the central server, an encryption algorithm is used for confidential transmission to prevent attackers and the central server from restoring user data, thereby protecting the privacy of user data.
[0077] In some embodiments of this application, please refer to Figure 6 , Figure 6 A flowchart of a method for obtaining a global information recommendation model through joint training in the training method of the information recommendation model provided in the embodiment of the present application. The details are as follows:
[0078] Step S61: Obtaining a training weight value of the client in federated learning;
[0079] Step S62: Upload the local model of the client and its training weight value in federated learning to the central server, so that the central server combines the local models of each client participating in federated learning and the training weight values of each client participating in federated learning for joint training to obtain a global information recommendation model.
[0080] In this embodiment, at the beginning of model training, an initial training weight is configured for each client participating in federated learning, and the initial training weight can be updated as the local models of each client are jointly trained in the central server. In this embodiment, before uploading the local model, the client can also obtain its training weight in this federated learning, and then upload the local model of the client and its training weight value in federated learning to the central server, so that the central server can combine the local models of each client participating in federated learning and the training weight values of each client participating in federated learning in federated learning for joint training to obtain a global information recommendation model. It is understandable that the training weight of each client can be obtained after the client is updated in the previous joint training.
[0081] In some specific embodiments of the present application, when performing joint training, the output results of the local model and the clustering results of user clusters with highly similar interests can also be introduced, and corresponding training weights are configured for the output results and the user cluster results to calculate the accuracy of the recommended information of the user clusters with highly similar interests. Specifically, the accuracy of the recommended information of the user cluster can be calculated by the following relationship:
[0082]
[0083] Among them, H(qp) and cos(A,B) are the accuracy of predicting recommended information for a single user and the clustering results of users with highly similar interests, respectively, and λ1 and λ2 represent the training weights configured by H(qp) and cos(A,B), respectively.
[0084] In this embodiment, H(qp) and cos(A, B) are added to the weight coefficients λ1 and λ2, and the weight coefficients are uploaded to the central server, so that they are jointly trained with the weight coefficients corresponding to the local models of each client, and the optimal parameter value is returned after multiple cycles, and the parameter is kept updated. The model result with the highest prediction probability is output through the above-mentioned relationship of the accuracy of the user cluster recommendation information, which is used as the basis for whether to recommend information to the user.
[0085] In this embodiment, when performing joint training, if the effect of predicting recommended information based on a single user is not good, the training weight λ1 configured based on the accuracy of predicting recommended information based on a single user is reduced; if the clustering effect of users with highly similar interests is not good, the training weight λ2 configured for the clustering result is reduced. The values of the two training weights are continuously adjusted during the joint training process until the global information recommendation model is trained to the optimal level.
[0086] From the above, it can be seen that when training the local model of the client, the training method of the information recommendation model provided in this embodiment extracts the user's interest characteristics, builds user clusters based on the user's interest characteristics, and then obtains training samples according to the user clusters for model training. The similarity relationship between user interests can be used to supplement and improve user portraits, so that the local model can reduce the iteration rounds when updating parameters, improve the model training speed, and reduce the consumption cost of the central server.
[0087] It is understandable that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0088] In some embodiments of this application, please refer to Figure 7 , Figure 7 This is a basic structural block diagram of a training device for an information recommendation model provided in an embodiment of the present application. The various units included in the device in this embodiment are used to execute the various steps in the above method embodiment. For details, please refer to the relevant description in the above method embodiment. For ease of explanation, only the parts related to this embodiment are shown. Figure 5 As shown, the training device of the information recommendation model includes: a user interest feature extraction module 71, a user cluster acquisition module 72, a local model training module 73 and a local model upload module 74. Among them: the user interest feature extraction module 71 is used to extract the interest features of all users from the local database of the client. The user cluster acquisition module 72 is used to cluster the interest features of all users to obtain the user cluster of the client. The local model training module 73 is used to extract the user's historical behavior data from the local database according to the user cluster as a training sample to perform local model training and generate a local model of the client. The local model upload module 74 is used to upload the local model of the client to the central server, so that the central server performs joint training based on the local model of the client and the local models of other clients to obtain a global information recommendation model, wherein the local models of other clients are local models obtained by local training of other clients participating in federated learning.
[0089] It should be understood that the training device of the above-mentioned information recommendation model corresponds one-to-one to the training method of the above-mentioned information recommendation model, and will not be described in detail here.
[0090] In some embodiments of this application, please refer to Figure 8 , Figure 8 This is a basic structural block diagram of an electronic device provided in an embodiment of the present application. Figure 8As shown, the electronic device 8 of this embodiment includes: a processor 81, a memory 82, and a computer program 83 stored in the memory 82 and executable on the processor 81, such as a program for a training method for an information recommendation model. When the processor 81 executes the computer program 83, the steps in each embodiment of the training method for each information recommendation model described above are implemented. Alternatively, when the processor 81 executes the computer program 83, the functions of each module in the embodiment corresponding to the training device for the information recommendation model described above are implemented. Please refer to the relevant description in the embodiment for details, which will not be repeated here.
[0091] Exemplarily, the computer program 83 may be divided into one or more modules (units), which are stored in the memory 82 and executed by the processor 81 to complete the present application. The one or more modules may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 83 in the electronic device 8. For example, the computer program 83 may be divided into an acquisition module, a processing module, and an execution module, and the specific functions of each module are as described above.
[0092] The turntable device may include, but is not limited to, a processor 81 and a memory 82. Those skilled in the art will appreciate that Figure 8 It is only an example of the electronic device 8 and does not constitute a limitation of the electronic device 8. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the turntable device may also include input and output devices, network access devices, buses, etc.
[0093] The processor 81 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0094] The memory 82 may be an internal storage unit of the electronic device 8, such as a hard disk or memory of the electronic device 8. The memory 82 may also be an external storage device of the electronic device 8, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 8. Further, the memory 82 may include both an internal storage unit and an external storage device of the electronic device 8. The memory 82 is used to store the computer program and other programs and data required by the turntable device. The memory 82 may also be used to temporarily store data that has been output or is to be output.
[0095] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0096] The embodiment of the present application also provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented. In this embodiment, the computer-readable storage medium can be non-volatile or volatile.
[0097] An embodiment of the present application provides a computer program product. When the computer program product runs on a mobile terminal, the mobile terminal can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0098] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0099] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0100] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0101] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A training method for an information recommendation model, characterized in that: The method is applied to a client and includes: Extracting interest features of all users from the local database of the client; Using a grouping feature extraction feature clustering model to perform user clustering on the interest features of all users, and obtain a user cluster of the client; Extracting historical behavior data of users from the local database as training samples according to the user cluster to perform local model training, and generate a local model of the client; Uploading the local model of the client to the central server, so that the central server performs joint training based on the local model of the client and the local models of other clients to obtain a global information recommendation model, wherein the local models of other clients are local models obtained by local training of other clients participating in federated learning; The step of clustering the interest features of all users to obtain the user cluster of the client includes: For any two users in the client, calculating a feature similarity value between the two users according to the interest features of the two users; Comparing the feature similarity value between the two users with a preset similarity threshold, if the feature similarity between the two users reaches the preset similarity threshold requirement, clustering the two users into the same user cluster, otherwise, clustering the two users into two different user clusters, until all local users of the client have corresponding user clusters; The step of extracting interest features of all users from the local database of the client includes: Acquire historical behavior data of a target user from a local database of the client, wherein the target user is any user of the client, and the historical behavior data includes historical operation records of the target user in the client; The behavior data of the target user is input into a preset feature extraction model, so that the preset feature extraction model extracts interest features from the historical behavior data of the target user according to time sensitivity, thereby obtaining the interest features of the target user.
2. The information recommendation model training method according to claim 1, characterized in that: The step of extracting the historical behavior data of the user from the local database as training samples for local model training according to the user cluster to generate the local model of the client includes: Constructing information recommendation categories based on the extracted historical behavior data of the user; Using a multi-classification probability distribution function, the historical behavior recorded in the historical behavior data of the user is mapped to a probability interval of (0,1) according to the information recommendation classification, and a local model containing a multi-classification probability function for predicting user behavior is generated.
3. The information recommendation model training method according to claim 2, characterized in that: After the step of generating a local model containing a multi-classification probability function for predicting user behavior, the method further includes: A loss function is configured for the output result of the local model, wherein the loss function is used to determine the gap between the actual output and the expected output of the local model.
4. The information recommendation model training method according to claim 1, characterized in that: The step of uploading the local model of the client to the central server so that the central server performs joint training based on the local model of the client and local models of other clients to obtain a global information recommendation model includes: Obtaining a training weight value of the client in federated learning; The local model of the client and its training weight value in federated learning are uploaded to the central server together, so that the central server combines the local models of each client participating in federated learning and the training weight values of each client participating in federated learning for joint training to obtain a global information recommendation model.
5. The information recommendation model training method according to claim 4, characterized in that: The step of uploading the local model of the client and its training weight value in federated learning to the central server, so that the central server combines the local models of each client participating in the federated learning and the training weight value of each client participating in the federated learning to perform joint training to obtain a global information recommendation model, further includes: Training weights are respectively configured for the output results of the local model and the clustering results of the user clusters, and the output results of the local model and the clustering results of the user clusters are respectively configured with training weights and uploaded to the central server for joint training to obtain a global information recommendation model.
6. A training device for an information recommendation model, characterized in that: The device is applied to a client and includes: A user interest feature extraction module is used to extract interest features of all users from the local database of the client; A user cluster acquisition module, used to perform user clustering on the interest features of all users by using a grouping feature extraction feature clustering model to obtain a user cluster of the client; A local model training module, used to extract historical behavior data of users from the local database as training samples according to the user cluster to perform local model training and generate a local model of the client; A local model uploading module is used to upload the local model of the client to the central server, so that the central server performs joint training based on the local model of the client and the local models of other clients to obtain a global information recommendation model, wherein the local models of other clients are local models obtained by local training of other clients participating in federated learning; The user cluster acquisition module is specifically used to calculate the feature similarity value between any two users in the client according to the interest features of the two users; compare the feature similarity value between the two users with a preset similarity threshold, and if the feature similarity between the two users meets the preset similarity threshold requirement, cluster the two users into the same user cluster, otherwise, classify the two users into two different user clusters, until all local users of the client have corresponding user clusters; Among them, the user interest feature extraction module is specifically used to obtain the historical behavior data of the target user from the local database of the client, wherein the target user is any user in the client, and the historical behavior data includes the historical operation records of the target user in the client; the behavior data of the target user is input into a preset feature extraction model, so that the preset feature extraction model extracts interest features from the historical behavior data of the target user according to time sensitivity, and obtains the interest features of the target user.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.
8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Federated learning-based recommendation model training method, terminal and storage medium
CN110297848A
Federated learning method and device
CN110443375A
Online user group classification method and device based on clustering and association rules
CN110532429A