Data processing method, electronic device, and storage medium

By aggregating and training local model parameters between the client and server in the federated recommender system, the problems of user privacy leakage and poor model fusion effect are solved, thus improving the overall performance of the recommender system.

CN116010697BActive Publication Date: 2026-04-28SHENZHEN DACHENG COMM TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN DACHENG COMM TECH CO LTD
Filing Date
2023-01-04
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Existing federated recommendation systems suffer from issues such as user privacy leaks and poor model fusion performance. In particular, when users do not disable personalized recommendation features, the server can still collect user data, and the fusion of all model parameters results in recommendation performance that needs improvement.

Method used

By training graph neural network models using local data on multiple clients, sending model parameters that do not involve user privacy, and aggregating them with global model parameters sent by the server to form aggregated parameters for the next round of training, the direct fusion of all parameters is avoided.

Benefits of technology

While protecting user privacy, the recommendation performance of both edge and cloud models has been improved, resulting in better model fusion and recommendation performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116010697B_ABST
    Figure CN116010697B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a data processing method, an electronic device and a storage medium. The method comprises: a plurality of first clients respectively train a graph neural network model using respective local data, and respectively send model parameters obtained by training to a server after training ends; receiving model parameters of a global graph neural network model sent by the server, the global graph neural network model being obtained by training the graph neural network model based on collected second client data by the server; aggregating the model parameters obtained by training by the plurality of first clients and the model parameters of the global graph neural network model to obtain first aggregated parameters; and performing next round training on the graph neural network model after the previous round training based on the first aggregated parameters. The method improves the recommendation effect of the end-side model and the cloud-side model under the premise of protecting user data privacy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and more specifically, to a data processing method, an electronic device, and a storage medium. Background Technology

[0002] A federated recommender system consists of a central server and a large number of user terminals. Each user terminal trains its local recommender model using its own data. Each user terminal sends its trained model parameters to the central server, where an aggregation method is used to construct a global recommender model. The aggregated global recommender model parameters are then sent to the next user terminal for training. Federated learning ensures that users' original data remains locally. However, in practice, for users who haven't disabled personalized recommendations, the server can still collect their original data, potentially compromising user privacy. Furthermore, existing federated fusion schemes fuse all model parameters; due to the varying data distributions of the participants, the effectiveness of full model fusion still needs improvement. Summary of the Invention

[0003] In view of the above problems, this application proposes a data processing method, an electronic device, and a storage medium to improve the above problems.

[0004] In a first aspect, embodiments of this application provide a data processing method applied to multiple first clients. The method includes: each of the multiple first clients training a graph neural network model using its own local data, and sending the trained model parameters to the server after training, wherein none of the multiple first clients have enabled personalized recommendation functionality, and the model parameters represent model parameters that do not involve user privacy; receiving model parameters of a global graph neural network model sent by the server, wherein the global graph neural network model is obtained by the server training the graph neural network model based on data collected from multiple second clients; aggregating the model parameters trained by the multiple first clients and the model parameters of the global graph neural network model to obtain a first aggregated parameter; and performing a next round of training on the graph neural network model after the previous round of training based on the first aggregated parameter.

[0005] Secondly, embodiments of this application provide a data processing method applied to a server. The method includes: the server training a graph neural network model based on collected data from multiple second clients to obtain a global graph neural network model, and sending the model parameters of the global graph neural network model to multiple first clients respectively; receiving the trained model parameters sent by the multiple first clients respectively, wherein the trained model parameters are obtained by the multiple first clients using their respective local data to train the graph neural network model, and none of the multiple first clients have enabled personalized recommendation functions, and the model parameters represent model parameters that do not involve user privacy; aggregating the model parameters of the global graph neural network model with the received model parameters trained by the multiple first clients respectively to obtain second aggregated parameters; and performing a next round of training on the global graph neural network model obtained after the previous round of training based on the second aggregated parameters.

[0006] Thirdly, this application provides a data processing method applied to an edge-cloud recommendation system. The edge-cloud recommendation system includes multiple first clients and a server. The method includes: the multiple first clients respectively train a graph neural network model using their respective local data, and after training, send the trained model parameters to the server. None of the multiple first clients have enabled personalized recommendation functionality, and the model parameters represent model parameters that do not involve user privacy. The server trains the graph neural network model based on collected data from multiple second clients to obtain a global graph neural network model, and sends the model parameters of the global graph neural network model to the multiple first clients respectively. Each of the multiple first clients aggregates the model parameters trained by the multiple first clients and the model parameters of the global graph neural network model to obtain a first aggregated parameter, and performs a next round of training on the graph neural network model after the previous round of training based on the first aggregated parameter. The server aggregates the model parameters of the global graph neural network model with the received model parameters trained by the multiple first clients to obtain a second aggregated parameter, and performs a next round of training on the global graph neural network model after the previous round of training based on the second aggregated parameter.

[0007] Fourthly, this application provides an electronic device including one or more processors and a memory; one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs being configured to perform the methods described in the first or second aspect above.

[0008] Fifthly, this application provides a computer-readable storage medium storing program code, wherein the method described in the first or second aspect is executed when the program code is run.

[0009] This application provides a data processing method, electronic device, and storage medium. Multiple first clients train a graph neural network model using their respective local data, and after training, each client sends the trained model parameters to a server. None of the first clients have personalized recommendation functionality enabled. The model parameters represent model parameters that do not involve user privacy. The method receives model parameters of a global graph neural network model sent by the server. This global graph neural network model is trained by the server based on data collected from multiple second clients. The method aggregates the model parameters trained by the multiple first clients and the model parameters of the global graph neural network model to obtain first aggregated parameters. The method then performs a next round of training on the graph neural network model after the previous round of training based on these first aggregated parameters. This approach achieves the fusion of model parameters that do not involve user privacy during model training, rather than fusing all model parameters, thereby improving the recommendation performance of both the edge-side and cloud-based models while protecting user data privacy. Attached Figure Description

[0010] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0011] Figure 1 A flowchart of a data processing method according to an embodiment of this application is shown.

[0012] Figure 2 A flowchart of a data processing method according to another embodiment of this application is shown.

[0013] Figure 3 A flowchart of a data processing method according to another embodiment of this application is shown.

[0014] Figure 4 A flowchart of a data processing method according to another embodiment of this application is shown.

[0015] Figure 5 A flowchart of a data processing method according to another embodiment of this application is shown.

[0016] Figure 6 A flowchart of a federated cloud recommendation process based on a graph neural network, as provided in an embodiment of this application, is shown.

[0017] Figure 7 A structural block diagram of an electronic device for performing a data processing method according to an embodiment of the present application is shown.

[0018] Figure 8 It is a storage unit in this application embodiment for storing or carrying program code that implements a data processing method according to this application embodiment. Detailed Implementation

[0019] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0020] Federated learning, as a novel distributed machine learning paradigm, aims to achieve distributed model training by exchanging intermediate information such as model parameters or gradients multiple times, rather than requiring users to upload their data to a server for centralized training. However, in practical applications, some users do not disable personalized recommendation features, allowing the server to still collect some user data, thus compromising user privacy to some extent. Furthermore, because different users have different data, the recommendation performance of the global model obtained by aggregating client-side models still needs improvement.

[0021] To facilitate understanding of the solutions described in the embodiments of this application, the terms involved in the embodiments of this application are briefly explained below:

[0022] FedAvg (Federated Learning Algorithm): Represents a federated learning algorithm.

[0023] P-FedAvg (Personalized Federated Learning Algorithm): A characterization-based personalized federated learning algorithm.

[0024] MP-FedAvg (Mutual Personalized Federated Learning Algorithm): Represents a bidirectional personalized federated learning algorithm.

[0025] Embedding (Embedding is a dense n-dimension vector mapped by the raw data based on certain embedding learning algorithms): Represents the embedded vectorized representation of data.

[0026] Encoder: Represents the encoder.

[0027] Decoder: Representation decoder.

[0028] The embodiments of this application will now be described in detail with reference to the accompanying drawings.

[0029] Please see Figure 1 One embodiment of this application provides a data processing method applicable to a first client, wherein the number of first clients is multiple, and the method includes:

[0030] Step S110: The multiple first clients train the graph neural network model using their respective local data, and after training, they send the trained model parameters to the server. None of the multiple first clients have enabled the personalized recommendation function. The model parameters represent some model parameters that do not involve user privacy.

[0031] In this application, the graph neural network model can be understood as a graph deep learning network model, and the specific type of graph neural network model is not limited.

[0032] In this embodiment, many of the first clients have not enabled personalized recommendation functionality. In this case, the model parameters of the graph neural network model represent model parameters that do not involve user privacy. In this application's implementation, the model parameters of the graph neural network model can represent users and products. Here, "products" are not limited to goods purchased by the user, but can also be documents, images, videos, or applications, etc. The representations of users and products can be derived from the analysis of historical behavioral data such as user browsing, commenting, rating, scoring, clicking, and / or purchasing of "products."

[0033] Each primary client corresponds to one user, and the local data of different primary clients can be different. For example, the "products" browsed by users corresponding to different primary clients can be different, and the historical behavioral data such as browsing, comments, ratings, and scores of the same "product" can also be different for users corresponding to different primary clients.

[0034] During the current training round, multiple client machines can each train the graph neural network model using their respective local data. As each client machine trains the model, it inputs its local data into the model. This allows the model to aggregate the user-product interactions within its respective client machine, learning representations of users and products. Based on these representations, the model can then predict user ratings for products. In other words, through training, the graph neural network model can acquire the ability to predict user ratings for products. For example, assuming client machines include client A and client B, client A can input its local data into the graph neural network model. The model can then aggregate the user-product interactions within client A, learning representations of users and products, and predicting user ratings based on these representations. Similarly, client B can input its local data into the graph neural network model. The model can then aggregate the user-product interactions within client B, learning representations of users and products, and predicting user ratings based on these representations.

[0035] As one implementation method, the first client can adopt an Encoder and Decoder architecture. The Encoder aggregates the interaction relationship between users and products to learn the representation of users and products. Then, using the representation of users and products, the Decoder model is used to predict the user's rating of the product, thereby enabling the training of the graph neural network model using local data.

[0036] After the first client completes one round of training on the graph neural network model using local data, the trained graph neural network model can be obtained. In this way, the model parameters of the trained graph neural network model can be sent to the server, so that the server can train the global graph neural network model by aggregating the model parameters, thereby improving the recommendation effect of the server-side model.

[0037] As one approach, when multiple first clients send the trained model parameters to the server, the learned user and product representations can be sent to the server separately, thereby enabling the transmission of personalized user data to the server without leaking user privacy.

[0038] Step S120: Receive the model parameters of the global graph neural network model sent by the server. The global graph neural network model is obtained by the server training the graph neural network model based on data collected from multiple second clients.

[0039] In this system, the second client and the first client are different clients, and multiple second clients can all enable the personalized recommendation function. The server can collect historical user and product interaction data from multiple second clients based on the personalized recommendation function, and train a graph neural network model based on the collected data from multiple second clients to obtain a preliminary global graph neural network model. To enrich the recommendation effect of the model on the first client side, the server can send the model parameters of the global graph neural network model to multiple first clients, allowing the multiple first clients to receive the model parameters of the global graph neural network model sent by the server.

[0040] Step S130: Aggregate the model parameters obtained by the training of the multiple first clients and the model parameters of the global graph neural network model to obtain the first aggregated parameters.

[0041] In this embodiment, for each first client, the model parameters trained by multiple first clients and the model parameters of the global graph neural network model can be aggregated to obtain the first aggregated parameters. The aggregation in this embodiment can be understood as follows: by aggregating the model parameters trained by multiple first clients and the model parameters of the global graph neural network model, a better fusion of the client and cloud (i.e., server-side, hereinafter referred to as cloud) models can be achieved, thereby improving the recommendation performance of the client recommendation model.

[0042] As one implementation method, the model parameters obtained from training multiple first clients and the model parameters of the global graph neural network model can be aggregated based on the FedAvg algorithm to obtain the first aggregated parameters. Specifically, the first aggregated parameters can be obtained by aggregating the model parameters obtained from training multiple first clients and the model parameters of the global graph neural network model based on the following formula.

[0043]

[0044] Where t represents the training round, W t+1 This represents the model parameters for round t+1, where i represents the i-th first client (participant), and r... i r represents the number of samples from the i-th first client. e r represents the number of samples from all first clients. c This indicates the number of samples in the cloud. This represents the model parameters of the i-th first client in the t-th round. This represents the model parameters in the cloud during round t. This represents the proportion of the number of samples from the i-th first client to the sum of the number of samples from all first clients and the number of samples from the cloud. This represents the proportion of samples in the cloud to the sum of samples from all first clients and samples in the cloud. As shown in the formula above, the model parameters trained by multiple first clients can be aggregated first, and then this aggregated result can be aggregated with the model parameters of the global graph neural network model sent by the server to obtain the first aggregated parameter (i.e., W). t+1 It should be noted that the first aggregation parameter obtained by each of the multiple first clients is the same.

[0045] One implementation method is to first aggregate the model parameters trained by multiple first clients using the P-FedAvg algorithm, and then aggregate the aggregated result with the model parameters of the global graph neural network model sent by the server to obtain the first aggregated parameters. Specifically, the first aggregated parameters can be obtained by first aggregating the model parameters trained by multiple first clients using the following formula, and then aggregating the aggregated result with the model parameters of the global graph neural network model sent by the server according to the fusion ratio parameter.

[0046]

[0047] The P-FedAvg algorithm can fuse the model parameters from the first client side and the cloud side at different ratios. The α parameter represents the hyperparameter that adjusts the fusion ratio, i.e., the fusion ratio parameter. t represents the training epoch, and W... t+1 This represents the model parameters in training round t+1. The next round of model parameter updates will be in W. t+1 It is updated based on the above, where i represents the i-th client (participant), and r i r represents the number of samples from the i-th first client. e This represents the number of samples from all first clients. This represents the model parameters of the i-th first client in the t-th round. Represents the model parameters in the cloud during round t, when At that time, the P-FedAvg algorithm and the FedAvg algorithm are the same.

[0048] Step S140: Perform the next round of training on the graph neural network model after the previous round of training based on the first aggregation parameters.

[0049] After each first client obtains the first aggregation parameters, it can perform the next round of training on the graph neural network model obtained from the previous round of training based on the first aggregation parameters, until the training rounds reach the preset hyperparameters, or until the loss function of the graph neural network model obtained after training converges. It should be noted that in each round of training, each first client can complete the training and proceed to the next round of training according to the above logic, which will not be elaborated further here.

[0050] This application provides a data processing method. Multiple first clients train a graph neural network model using their respective local data, and after training, each client sends the trained model parameters to a server. None of the first clients have personalized recommendation functionality enabled. The model parameters represent model parameters that do not involve user privacy. The method then receives model parameters of a global graph neural network model sent by the server. This global graph neural network model is trained by the server using data collected from multiple second clients. The method aggregates the model parameters trained by the first clients and the model parameters of the global graph neural network model to obtain first aggregated parameters. Based on these first aggregated parameters, the graph neural network model trained in the previous round is trained for the next round. This method achieves the fusion of model parameters that do not involve user privacy during model training, rather than fusing all model parameters, thereby improving the recommendation performance of both the client-side and cloud-based models while protecting user data privacy.

[0051] Please see Figure 2 Another embodiment of this application provides a data processing method applicable to a first client, wherein the number of first clients is multiple, and the method includes:

[0052] Step S210: The multiple first clients train the graph neural network model using their respective local data, and after training, they send the trained model parameters to the server. None of the multiple first clients have enabled the personalized recommendation function. The model parameters represent some model parameters that do not involve user privacy.

[0053] The specific implementation of step S210 can be referred to the relevant description of step S110 in the foregoing embodiments, and will not be repeated here.

[0054] Step S220: Receive the model parameters of the global graph neural network model sent by the server. The global graph neural network model is obtained by the server training the graph neural network model based on data collected from multiple second clients.

[0055] The specific implementation of step S220 can be referred to the relevant description of step S120 in the foregoing embodiments, and will not be repeated here.

[0056] Step S230: Each of the plurality of first clients aggregates the trained model parameters and the received model parameters of the global graph neural network model to obtain a plurality of aggregated parameters.

[0057] In one approach, when aggregating the model parameters trained by the multiple first clients and the model parameters of the global graph neural network model, each first client can first aggregate the model parameters trained locally and the model parameters of the received global graph neural network model to obtain multiple aggregated parameters.

[0058] As a specific implementation method, each of the multiple first clients can aggregate the trained model parameters and the received global graph neural network model parameters according to the first fusion ratio parameter to obtain multiple end-side aggregated parameters.

[0059] Step S240: Aggregate the multiple aggregation parameters to obtain the first aggregation parameter.

[0060] Furthermore, each of the multiple first clients can aggregate the multiple aggregation parameters to obtain a first aggregation parameter.

[0061] In the above embodiments, the multiple edge-side aggregation parameters can be aggregated based on a first specified algorithm to obtain the first aggregation parameter. The first specified algorithm is the algorithm used to calculate edge-side model parameters in the MP-FedAvg algorithm, a further modification of P-FedAvg. Compared to P-FedAvg, which has only one hyperparameter controlling the edge-cloud model fusion ratio, MP-FedAvg proposes that the edge and cloud sides are controlled by different hyperparameters to control the model fusion ratio. The first specified algorithm is as follows:

[0062]

[0063] in, This indicates that the model parameters for training the first client are used in round t+1, β represents the first fusion ratio parameter, and r i r represents the number of samples from the i-th first client. e This represents the number of samples from all first clients. This represents the model parameters of the i-th first client in the t-th round. This represents the model parameters in the cloud during round t.

[0064] Step S250: Perform the next round of training on the graph neural network model after the previous round of training based on the first aggregation parameters.

[0065] The specific implementation of step S250 can be referred to the relevant description of step S140 in the foregoing embodiments, and will not be repeated here.

[0066] This application provides a data processing method. Multiple first clients train a graph neural network model using their respective local data, and after training, each client sends the trained model parameters to a server. None of the first clients have personalized recommendation functionality enabled, and the model parameters represent model parameters that do not involve user privacy. The method also receives model parameters of a global graph neural network model sent by the server. This global graph neural network model is trained by the server based on data collected from multiple second clients. Each of the first clients aggregates the trained model parameters and the received global graph neural network model parameters to obtain multiple aggregated parameters. These aggregated parameters are then aggregated to obtain a first aggregated parameter. The graph neural network model trained in the previous round is then trained again based on this first aggregated parameter. This method achieves the fusion of model parameters that do not involve user privacy during model training, rather than fusing all model parameters, thereby improving the recommendation performance of both the client-side and cloud-based models while protecting user data privacy.

[0067] Please see Figure 3 Another embodiment of this application provides a data processing method that can be applied to a server, the method comprising:

[0068] Step S310: The server trains the graph neural network model based on the collected data from multiple second clients to obtain a global graph neural network model, and sends the model parameters of the global graph neural network model to multiple first clients respectively.

[0069] The server can train a graph neural network model based on data collected from multiple second clients, resulting in a global graph neural network model. Since the server has significantly more user data than a single first client, the global graph neural network model performs better in recommendations than a graph neural network model trained on local data by a single first client.

[0070] During the process of training the graph neural network model on the server based on the collected data from multiple second clients, the server can input the collected data from multiple second clients into the graph neural network model respectively, so that the graph neural network model can learn the representation of multiple users and products by aggregating the interaction relationship between users and products in the corresponding second client according to each second client data. Then, the representations of multiple users and products are aggregated to obtain the aggregated representations of users and products. Finally, the user's rating of the product is predicted based on the aggregated representations of users and products, so that the graph neural network model obtained after training is used as the global graph neural network model.

[0071] As one approach, when the server sends the model parameters of the global graph neural network model to multiple first clients, the aggregated user and product representations described above can also be sent to multiple first clients separately. This allows the first clients to aggregate the server's model parameters, thereby improving the recommendation performance of the first client's side graph neural network model.

[0072] Step S320: Receive the trained model parameters sent by the plurality of first clients respectively. The trained model parameters are obtained by the plurality of first clients using their respective local data to train the graph neural network model. None of the plurality of first clients have enabled the personalized recommendation function. The model parameters represent some model parameters that do not involve user privacy.

[0073] While the server trains the graph neural network model based on data collected from multiple second clients, multiple first clients can each train the graph neural network model using their own local data and send the trained model parameters to the server. This allows the server to receive the trained model parameters sent by the multiple first clients. None of the first clients have enabled personalized recommendation functionality, while all the second clients have enabled personalized recommendation functionality. The model parameters represent model parameters that do not involve user privacy.

[0074] Step S330: Aggregate the model parameters of the global graph neural network model with the model parameters obtained by the multiple first clients respectively to obtain the second aggregated parameters.

[0075] As one implementation method, on the server side, when aggregating the model parameters of the global graph neural network model with the model parameters trained by the multiple first clients respectively, as described in the previous embodiments, the model parameters trained by the multiple first clients can be aggregated first, and then the aggregation result can be aggregated with the model parameters of the global graph neural network model to obtain the second aggregated parameters.

[0076] As a specific implementation method, the model parameters obtained by training multiple first clients can be aggregated based on the P-FedAvg algorithm as described above, and then the aggregation result can be aggregated with the model parameters of the global graph neural network model to obtain the second aggregated parameters.

[0077] Step S340: Perform the next round of training on the global graph neural network model obtained after the previous round of training based on the second aggregation parameters.

[0078] After obtaining the second aggregation parameters, the server can use these parameters to train the global graph neural network model obtained from the previous training round in the next round, until the preset hyperparameters are reached, or until the loss function of the trained graph neural network model converges. It should be noted that the server can complete the training and proceed to the next round according to the above logic in each training round, which will not be elaborated further here.

[0079] This application provides a data processing method. A server trains a graph neural network model based on collected data from multiple second clients to obtain a global graph neural network model. The model parameters of the global graph neural network model are then sent to multiple first clients. The method receives training parameters from each of the first clients, where each client trained the graph neural network model using its own local data. None of the first clients have enabled personalized recommendation functionality, and these model parameters represent parameters that do not involve user privacy. The method aggregates the global graph neural network model parameters with the received training parameters from the first clients to obtain second aggregated parameters. The global graph neural network model obtained in the previous training round is then trained again based on these second aggregated parameters. This method achieves the fusion of model parameters that do not involve user privacy during model training, rather than fusing all model parameters, thereby improving the recommendation performance of both the edge and cloud models while protecting user data privacy.

[0080] Please see Figure 4 Another embodiment of this application provides a data processing method that can be applied to a server, the method comprising:

[0081] Step S410: The server trains the graph neural network model based on the collected data from multiple second clients to obtain a global graph neural network model, and sends the model parameters of the global graph neural network model to multiple first clients respectively.

[0082] The specific implementation of step S410 can be referred to the relevant description of step S310 in the foregoing embodiments, and will not be repeated here.

[0083] Step S420: Receive the trained model parameters sent by the plurality of first clients respectively. The trained model parameters are obtained by the plurality of first clients using their respective local data to train the graph neural network model. None of the plurality of first clients have enabled the personalized recommendation function. The model parameters represent some model parameters that do not involve user privacy.

[0084] The specific implementation of step S420 can be referred to the relevant description of step S320 in the foregoing embodiments, and will not be repeated here.

[0085] Step S430: Aggregate the model parameters obtained by the multiple first clients respectively to obtain the terminal-side aggregated parameters.

[0086] As one approach, when the server aggregates the model parameters of the global graph neural network model with the model parameters trained by the multiple first clients respectively, it can first aggregate the model parameters trained by the multiple first clients respectively to obtain the end-side aggregated parameters. The end-side aggregated parameters can be understood as the model parameters obtained by aggregating the model parameters trained by the multiple first clients respectively.

[0087] Step S440: Aggregate the model parameters of the global graph neural network model with the end-side aggregation parameters to obtain the second aggregation parameters.

[0088] As one implementation method, the model parameters of the global graph neural network model can be aggregated with the edge-side aggregation parameters according to a second specified algorithm and a second fusion ratio parameter to obtain the second aggregation parameters. The second specified algorithm is the algorithm used to calculate the server-side (cloud-side) model parameters in the MP-FedAvg algorithm, which is a further modification of P-FedAvg. The second specified algorithm is as follows:

[0089]

[0090] in, This represents the model parameters on the server side in round t+1, α represents the second fusion ratio parameter, and r i r represents the number of samples from the i-th first client. e This represents the number of samples from all first clients. This represents the model parameters of the i-th first client in the t-th round. This represents the model parameters on the server side in round t.

[0091] Step S450: Perform the next round of training on the global graph neural network model obtained after the previous round of training based on the second aggregation parameters.

[0092] The specific implementation of step S450 can be referred to the relevant description of step S340 in the foregoing embodiments, and will not be repeated here.

[0093] This application provides a data processing method. A server trains a graph neural network model based on collected data from multiple second clients to obtain a global graph neural network model. The model parameters of the global graph neural network model are then sent to multiple first clients. The method receives training parameters from each of the first clients, where each client trained the graph neural network model using its own local data. None of the first clients have enabled personalized recommendation functionality, and these model parameters represent parameters that do not involve user privacy. The received model parameters from the first clients are aggregated to obtain endpoint aggregated parameters. The model parameters of the global graph neural network model are then aggregated with the endpoint aggregated parameters to obtain second aggregated parameters. The global graph neural network model is then trained again based on these second aggregated parameters. This method achieves the fusion of model parameters that do not involve user privacy during model training, rather than fusing all model parameters, thereby improving the recommendation performance of both endpoint and cloud models while protecting user data privacy.

[0094] Please see Figure 5 Another embodiment of this application provides a data processing method applicable to an edge-cloud recommendation system, the edge-cloud recommendation system including multiple first clients and a server, the method including:

[0095] Step S510: The multiple first clients train the graph neural network model using their respective local data, and after training, they send the trained model parameters to the server. None of the multiple first clients have enabled the personalized recommendation function, and the model parameters represent some model parameters that do not involve user privacy.

[0096] The specific implementation of step S510 can be referred to the relevant descriptions of steps S110 and S210 in the foregoing embodiments, and will not be repeated here.

[0097] Step S520: The server trains the graph neural network model based on the collected data from multiple second clients to obtain a global graph neural network model, and sends the model parameters of the global graph neural network model to the multiple first clients respectively.

[0098] The specific implementation of step S520 can be referred to the relevant descriptions of steps S310 and S410 in the foregoing embodiments, and will not be repeated here.

[0099] Step S530: Each of the plurality of first clients aggregates the model parameters obtained by the plurality of first clients and the model parameters of the global graph neural network model to obtain a first aggregated parameter, and performs the next round of training on the graph neural network model after the previous round of training based on the first aggregated parameter.

[0100] The specific implementation of step S530 can be referred to the relevant descriptions of steps S130, S230 and S240 in the foregoing embodiments, and will not be repeated here.

[0101] Step S540: The server aggregates the model parameters of the global graph neural network model with the model parameters obtained by the multiple first clients respectively to obtain second aggregated parameters, and performs the next round of training on the global graph neural network model obtained after the previous round of training based on the second aggregated parameters.

[0102] The specific implementation of step S540 can be referred to the relevant descriptions of steps S330, S430 and S440 in the foregoing embodiments, and will not be repeated here.

[0103] Please see Figure 6 This illustrates a flowchart of a federated cloud recommendation process based on a graph neural network, as provided in an embodiment of this application. Figure 6 As shown, multiple first clients may include client A and client B. Users of client A can interact with client-side products, forming local user-interaction product data (referred to as local data). The process of forming local data is the same as the process described in the previous embodiment where the first client trains the graph neural network model. Similarly, users of client B can interact with client-side products, forming local user-interaction product data. Both client A and client B upload their formed local data to the cloud. The cloud then learns the graph neural network model based on the collected interaction data between users and cloud-based products from multiple clients (referring to clients other than client A and client B), obtaining a global graph neural network model. The cloud then aggregates the user and product representations (Embeddings) in the global graph neural network model with the local data uploaded by clients A and B (which can also be understood as user and product representations). This aggregation process is... Figure 6 The cloud model interpolates and aggregates the data to obtain the second aggregation parameters. The cloud can then use these second aggregation parameters to train the global graph neural network model obtained in the previous round of training, i.e., update the model's parameters in the next round.

[0104] Similarly, both client A and client B will aggregate local data and user and product representations distributed from the cloud; this aggregation process is called... Figure 6 The client-side model interpolation shown yields edge-side aggregated parameters. In this method, client A can directly train the graph neural network model after the previous round of training based on the edge-side aggregated parameters, thereby improving the recommendation effect of the client recommendation model by fusing the model parameters from the cloud. Optionally, client A can also continue to aggregate the obtained edge-side aggregated parameters with those obtained by client B to obtain first aggregated parameters, and then directly train the graph neural network model after the previous round of training based on the first aggregated parameters.

[0105] It should be noted that the edge-cloud federated training method proposed in this application is not limited to recommendation systems, but can also be used in other systems besides recommendation systems, such as edge-cloud speech recognition systems, edge-cloud image recognition systems, etc., as long as only a portion of the model parameters are fused when fusing edge-cloud model parameters, so as to improve the performance of edge and cloud models while protecting data privacy.

[0106] This application provides a data processing method in which multiple first clients train a graph neural network model using their respective local data, and after training, send the trained model parameters to a server. None of the first clients have enabled personalized recommendation functionality, and the model parameters represent model parameters that do not involve user privacy. The server trains the graph neural network model based on collected data from multiple second clients to obtain a global graph neural network model, and sends the model parameters of the global graph neural network model to the multiple first clients. Each of the multiple first clients aggregates the model parameters trained by the multiple first clients and the model parameters of the global graph neural network model to obtain a first aggregated parameter, and performs a next round of training on the graph neural network model after the previous round of training based on the first aggregated parameter. The server aggregates the model parameters of the global graph neural network model with the received model parameters trained by the multiple first clients to obtain a second aggregated parameter, and performs a next round of training on the global graph neural network model after the previous round of training based on the second aggregated parameter. This approach allows for the fusion of model parameters that do not involve user privacy during model training, rather than fusing all model parameters. This improves the recommendation performance of both the edge and cloud models while protecting user data privacy.

[0107] Please see Figure 7Based on the above-described data processing method, this application also provides an electronic device 100 capable of executing the aforementioned data processing method. In this application embodiment, the electronic device 100 can be a client or a server. The electronic device 100 includes a memory 102 and one or more (only one is shown in the figure) processors 104 coupled to each other, with a communication line connecting the memory 102 and the processors 104. The memory 102 stores a program capable of executing the contents of the aforementioned embodiments, and the processors 104 can execute the program stored in the memory 102.

[0108] The processor 104 may include one or more processing cores. The processor 104 connects to various parts within the electronic device 100 using various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 102, and by calling data stored in the memory 102. Optionally, the processor 104 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 104 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the displayed content; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 104 and may be implemented separately using a communication chip.

[0109] The memory 102 may include random access memory (RAM) or read-only memory (ROM). The memory 102 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 102 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as touch functionality, sound playback functionality, image playback functionality, etc.), and instructions for implementing the aforementioned embodiments. The data storage area may also store data created by the electronic device 100 during use (such as phonebook data, audio and video data, chat log data, etc.).

[0110] Please refer to Figure 8This diagram illustrates a structural block diagram of a computer-readable storage medium provided in an embodiment of this application. The computer-readable storage medium 600 stores program code that can be called by a processor to execute the methods described in the above method embodiments.

[0111] The computer-readable storage medium 600 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 600 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 600 has storage space for program code 610 that performs any of the method steps described above. This program code can be read from or written to one or more computer program products. The program code 610 may be compressed, for example, in a suitable form.

[0112] In summary, the data processing method, electronic device, and storage medium provided in this application train a graph neural network model using their respective local data from multiple first clients. After training, each client sends the trained model parameters to the server. None of the first clients have personalized recommendation functionality enabled, and the model parameters represent model parameters that do not involve user privacy. The method receives model parameters of a global graph neural network model sent by the server. This global graph neural network model is trained by the server using data collected from multiple second clients. The method aggregates the model parameters trained by the multiple first clients and the model parameters of the global graph neural network model to obtain first aggregated parameters. The method then trains the graph neural network model from the previous training round based on these first aggregated parameters. This approach achieves the fusion of model parameters that do not involve user privacy during model training, rather than fusing all model parameters, thereby improving the recommendation performance of both the edge and cloud models while protecting user data privacy.

[0113] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A data processing method, characterized in that, Applied to a first client, wherein there are multiple first clients, the method includes: The multiple first clients each use their own local data to train the graph neural network model, and after training, they send the trained model parameters to the server. None of the multiple first clients have enabled the personalized recommendation function, and the model parameters represent some model parameters that do not involve user privacy. The server receives model parameters of a global graph neural network model, which is obtained by the server training the graph neural network model based on data collected from multiple second clients. The model parameters obtained by training the multiple first clients and the model parameters of the global graph neural network model are aggregated to obtain the first aggregated parameters; The graph neural network model trained in the previous round is trained again based on the first aggregation parameters.

2. The method according to claim 1, characterized in that, The step of aggregating the model parameters obtained by training the plurality of first clients and the model parameters of the global graph neural network model to obtain the first aggregated parameters includes: Each of the plurality of first clients aggregates the trained model parameters and the received model parameters of the global graph neural network model to obtain a plurality of aggregated parameters; The multiple aggregation parameters are aggregated to obtain the first aggregation parameter.

3. The method according to claim 2, characterized in that, Each of the plurality of first clients aggregates the trained model parameters and the received model parameters of the global graph neural network model to obtain a plurality of aggregated parameters; The multiple aggregation parameters are aggregated to obtain a first aggregation parameter, including: Each of the plurality of first clients aggregates the trained model parameters and the received model parameters of the global graph neural network model according to a first fusion ratio parameter to obtain a plurality of end-side aggregated parameters; The multiple end-side aggregation parameters are aggregated based on the first specified algorithm to obtain the first aggregation parameter.

4. The method according to claim 1, characterized in that, The multiple first clients each use their respective local data to train the graph neural network model, including: The plurality of first clients respectively input their local data into the graph neural network model, so that the graph neural network model can learn the representation of users and products by aggregating the interaction relationship between users and products in the corresponding first clients based on their local data. Predict user ratings for products based on the characteristics of the users and products.

5. A data processing method, characterized in that, Applied to a server, the method includes: The server trains the graph neural network model based on collected data from multiple second clients to obtain a global graph neural network model, and sends the model parameters of the global graph neural network model to multiple first clients respectively. The system receives trained model parameters sent by the plurality of first clients respectively. The trained model parameters are obtained by the plurality of first clients training the graph neural network model using their respective local data. None of the plurality of first clients have enabled the personalized recommendation function. The model parameters represent some model parameters that do not involve user privacy. The model parameters of the global graph neural network model are aggregated with the model parameters trained by the multiple first clients respectively to obtain the second aggregated parameters; The global graph neural network model obtained after the previous training is trained in the next round based on the second aggregation parameter.

6. The method according to claim 5, characterized in that, The step of aggregating the model parameters of the global graph neural network model with the model parameters trained by the multiple first clients respectively to obtain the second aggregated parameters includes: The received model parameters obtained by training the multiple first clients are aggregated to obtain the terminal-side aggregated parameters; The model parameters of the global graph neural network model are aggregated with the end-side aggregation parameters to obtain the second aggregation parameters.

7. The method according to claim 6, characterized in that, The step of aggregating the model parameters of the global graph neural network model with the edge aggregation parameters to obtain the second aggregation parameters includes: Based on the second specified algorithm, the model parameters of the global graph neural network model are aggregated with the end-side aggregation parameters according to the second fusion ratio parameter to obtain the second aggregation parameter.

8. The method according to claim 5, characterized in that, The server trains a graph neural network model based on collected data from multiple second clients to obtain a global graph neural network model, including: The server inputs the collected data from multiple second clients into the graph neural network model, so that the graph neural network model can learn the representation of multiple users and products by aggregating the interaction relationship between users and products in the corresponding second client based on each second client data. The representations of the multiple users and products are aggregated to obtain aggregated representations of users and products. Based on the aggregated user and product representations, predict user ratings for products.

9. A data processing method, characterized in that, Applied to an edge-cloud recommendation system, the edge-cloud recommendation system including multiple first clients and a server, the method includes: The multiple first clients each use their own local data to train the graph neural network model, and after training, they send the trained model parameters to the server. None of the multiple first clients have enabled the personalized recommendation function, and the model parameters represent some model parameters that do not involve user privacy. The server trains the graph neural network model based on collected data from multiple second clients to obtain a global graph neural network model, and sends the model parameters of the global graph neural network model to the multiple first clients respectively. Each of the plurality of first clients aggregates the model parameters obtained by the plurality of first clients and the model parameters of the global graph neural network model to obtain a first aggregated parameter, and performs the next round of training on the graph neural network model after the previous round of training based on the first aggregated parameter; The server aggregates the model parameters of the global graph neural network model with the model parameters obtained by the multiple first clients respectively to obtain second aggregated parameters, and performs the next round of training on the global graph neural network model obtained after the previous round of training based on the second aggregated parameters.

10. An electronic device, characterized in that, Includes one or more processors and memory; One or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs being configured to perform the method of any one of claims 1-4 or 5-8.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program code, wherein the program code, when executed by a processor, performs the method according to any one of claims 1-4 or 5-8.

Citation Information

Patent Citations

  • Full-connection neural network model aggregation method in federated learning scene

    CN112749790A

  • Data processing method, device and system and readable storage medium

    CN113297175A