Data processing method, device, equipment and medium

By determining the user embedding vector locally on the participating parties and receiving the item embedding vector generated by the server in federated learning, the problem of insufficient computing power of mid-end devices in federated learning is solved, and the efficiency of model federation and the acquisition efficiency of predictive models are improved.

CN111898767BActive Publication Date: 2024-09-27WEBANK (CHINA)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010787194.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-06
Publication Date
2024-09-27
Estimated Expiration
2040-08-06

AI Technical Summary

Technical Problem

During the federated learning process, the computing capabilities of the participants' end devices are limited, resulting in low model federation efficiency and a large amount of computing and communication overhead.

Method used

The user embedding vector is determined locally by the participant, and the item embedding vector generated by the server is received. The preset prediction model is obtained through federated learning training, avoiding a large amount of local calculations and interactions.

Benefits of technology

It improves the efficiency of obtaining the preset prediction model, reduces computing and communication overhead, and improves the processing performance of the terminal device.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111898767B
    Figure CN111898767B
Patent Text Reader

Abstract

The present application discloses a data processing method, apparatus, device and medium, the method comprising: obtaining sample data, the sample data comprising user data and item data; determining the user embedding vector of the user data locally at the first participant, and receiving the item embedding vector sent by the server, the item embedding vector being generated locally at the server based on the item data; obtaining the preset prediction model of the first participant through federated learning training based on the user embedding vector and the item embedding vector. The present application solves the technical problem of low efficiency of the federation of terminal device models in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology in financial technology (Fintech), and in particular to a data processing method, device, equipment and medium. Background Art

[0002] With the continuous development of financial technology, especially Internet technology finance, more and more technologies (such as distributed, blockchain, artificial intelligence, etc.) are applied in the financial field, but the financial industry also has higher requirements for technology, such as higher requirements for data processing.

[0003] Federated learning is the joint training of machine learning models by multiple participants while ensuring data privacy. Currently, in the process of federated learning, the participants usually convert different sample data into an embedding vector and interact with the server for federated modeling. However, this method will generate a lot of computing and communication overhead, and the computing power of each participant, namely the end device, is usually limited, which will lead to a decrease in the processing performance of the end device and a decrease in the efficiency of model federation. Summary of the invention

[0004] The main purpose of this application is to provide a data processing method, apparatus, device and medium, aiming to solve the technical problem of low efficiency of the federation of mid-end device models in the prior art.

[0005] To achieve the above-mentioned purpose, the present application provides a data processing method, which is applied to a first participant, and the data processing method includes:

[0006] Acquire sample data, where the sample data includes user data and item data;

[0007] Determining, locally at the first participant, a user embedding vector of the user data, and receiving an item embedding vector sent by a server, wherein the item embedding vector is generated locally at the server based on the item data;

[0008] Based on the user embedding vector and the item embedding vector, a preset prediction model of the first participant is obtained through federated learning training.

[0009] Optionally, the step of determining, locally at the first participant, a user embedding vector of the user data and receiving an item embedding vector sent by a server comprises:

[0010] Generating, locally at the first participant, a one-hot encoding of the user data, and obtaining a user embedding vector of the user data based on the one-hot encoding;

[0011] Receive the item embedding vector sent by the server based on the preset item prediction model.

[0012] Optionally, the step of receiving the item embedding vector sent by the server and obtained based on a preset item prediction model includes:

[0013] receiving an item embedding vector representing item features obtained after inputting the item data into a corresponding preset item prediction model sent by the server;

[0014] The preset item prediction model is a target model obtained after iterative training of the first preset prediction model to be trained based on item training data with preset labels.

[0015] Optionally, the step of obtaining a preset prediction model of the first participant through federated learning training based on the user embedding vector and the item embedding vector includes:

[0016] Merging the user embedding vector and the item embedding vector of the same user in the sample data to obtain an integrated vector of the same user;

[0017] Obtain a second basic model to be trained, and based on the multiple integrated vectors, train and update the second basic model to be trained until the second basic model to be trained reaches a first preset training completion condition, and obtain an initial training model; for the item model variables in the initial training model, execute a preset horizontal federation process, and obtain a preset prediction model until the second basic model to be trained reaches a second preset training completion condition.

[0018] Optionally, the step of obtaining a second basic model to be trained, training and updating the second basic model to be trained based on the multiple integrated vectors until the second basic model to be trained reaches a first preset training completion condition, obtaining an initial training model, and executing a preset horizontal federation process for the item model variables in the initial training model until the second basic model to be trained reaches a second preset training completion condition, and obtaining a preset prediction model includes:

[0019] Obtain a second basic model to be trained;

[0020] Iteratively training the second basic model to be trained based on the multiple integrated vectors to train and update the object model variables in the second basic model to be trained, and determining whether the second basic model to be trained after the training update meets the first preset training completion condition;

[0021] If the second basic model to be trained after training and updating meets the first preset training completion condition, setting the second basic model to be trained after training and updating as the initial training model;

[0022] Sending the item model variables in the initial training model to the server end, so that the server end aggregates the item model variables sent by multiple other second participants and the item model variables in the initial training model to obtain aggregated item model variables;

[0023] Receive the aggregated product model variables fed back by the server, and replace and update the item model variables of the initial training model that is trained and updated with the aggregated product model variables;

[0024] Based on the replaced and updated item model variables, the iterative training of the second basic model to be trained is re-performed and a judgment is made as to whether the first preset training completion condition is met, until the second basic model to be trained meets the second preset training completion condition, thereby obtaining a preset prediction model.

[0025] Optionally, the step of sending the item model variables in the initial training model to the server side so that the server side aggregates the item model variables sent by multiple other second participants and the item model variables in the initial training model to obtain the aggregated item model variables includes:

[0026] Encrypting the item model variables in the initial training model and sending them to the server, so that the server can aggregate the item model variables sent by multiple other second participants and the item model variables in the initial training model to obtain aggregated item model variables;

[0027] The step of receiving the aggregated product model variables fed back by the server and replacing the item model variables of the initial training model updated by training with the aggregated product model variables includes:

[0028] The aggregated product model variables encrypted by the server-side feedback are received, and the item model variables of the initial training model updated through training are replaced and updated with the aggregated product model variables.

[0029] Optionally, after the step of obtaining the preset prediction model of the first participant through federated learning training based on the user embedding vector and the item embedding vector, the method further includes:

[0030] Acquire data to be processed, and input the data to be processed into the preset prediction model;

[0031] Based on the preset prediction model, the data to be processed is predicted to obtain a prediction result;

[0032] Calculating the item similarity result corresponding to the prediction result, and generating a similar item candidate set based on the item similarity result;

[0033] Based on the similar item candidate set, a preset item recommendation process is executed.

[0034] The present application also provides a data processing device, applied to a first participant, the data processing device comprising:

[0035] A first acquisition module, used to acquire sample data, wherein the sample data includes user data and item data;

[0036] A receiving module, configured to determine, locally at the first participant, a user embedding vector of the user data, and receive an item embedding vector sent by a server, wherein the item embedding vector is generated locally at the server based on the item data;

[0037] The second acquisition module is used to obtain the preset prediction model of the first participant through federated learning training based on the user embedding vector and the item embedding vector.

[0038] Optionally, the receiving module includes:

[0039] A generating unit, configured to generate a one-hot encoding of the user data locally at the first participant, and obtain a user embedding vector of the user data based on the one-hot encoding;

[0040] The receiving unit is used to receive the item embedding vector sent by the server and obtained based on the preset item prediction model.

[0041] Optionally, the receiving unit includes:

[0042] A receiving subunit, configured to receive an item embedding vector representing item features obtained after the item data is input into a corresponding preset item prediction model and sent by the server;

[0043] The preset item prediction model is a target model obtained after iterative training of the first preset prediction model to be trained based on item training data with preset labels.

[0044] Optionally, the second acquisition module includes:

[0045] a merging unit, configured to merge the user embedding vector and the item embedding vector of the same user in the sample data to obtain an integrated vector of the same user;

[0046] The federation unit is used to obtain a second basic model to be trained, and based on the multiple integrated vectors, train and update the second basic model to be trained until the second basic model to be trained reaches a first preset training completion condition, thereby obtaining an initial training model, and execute a preset horizontal federation process on the item model variables in the initial training model until the second basic model to be trained reaches a second preset training completion condition, thereby obtaining a preset prediction model.

[0047] Optionally, the federation unit is used to implement:

[0048] Obtain a second basic model to be trained;

[0049] Iteratively training the second basic model to be trained based on the multiple integrated vectors to train and update the object model variables in the second basic model to be trained, and determining whether the second basic model to be trained after the training update meets the first preset training completion condition;

[0050] If the second basic model to be trained after training and updating meets the first preset training completion condition, setting the second basic model to be trained after training and updating as the initial training model;

[0051] Sending the item model variables in the initial training model to the server end, so that the server end aggregates the item model variables sent by multiple other second participants and the item model variables in the initial training model to obtain aggregated item model variables;

[0052] Receive the aggregated product model variables fed back by the server, and replace and update the item model variables of the initial training model that is trained and updated with the aggregated product model variables;

[0053] Based on the replaced and updated item model variables, the iterative training of the second basic model to be trained is re-performed and a judgment is made as to whether the first preset training completion condition is met, until the second basic model to be trained meets the second preset training completion condition, thereby obtaining a preset prediction model.

[0054] Optionally, the federation unit is used to implement:

[0055] Encrypting the item model variables in the initial training model and sending them to the server, so that the server can aggregate the item model variables sent by multiple other second participants and the item model variables in the initial training model to obtain aggregated item model variables;

[0056] The federation unit is further used to implement:

[0057] The aggregated product model variables encrypted by the server-side feedback are received, and the item model variables of the initial training model updated through training are replaced and updated with the aggregated product model variables.

[0058] Optionally, the data processing device includes:

[0059] A third acquisition module is used to acquire the data to be processed and input the data to be processed into the preset prediction model;

[0060] A prediction module, used to perform prediction processing on the data to be processed based on the preset prediction model to obtain a prediction result;

[0061] A calculation module, used to calculate the item similarity result corresponding to the prediction result, and generate a similar item candidate set based on the item similarity result;

[0062] An execution module is used to execute a preset item recommendation process based on the similar item candidate set.

[0063] The present application also provides a data processing device, which is a physical device, and includes: a memory, a processor, and a program of the data processing method stored in the memory and executable on the processor. When the program of the data processing method is executed by the processor, the steps of the data processing method as described above can be implemented.

[0064] The present application also provides a medium, on which is stored a program for implementing the above-mentioned data processing method, and when the program of the data processing method is executed by a processor, the steps of the above-mentioned data processing method are implemented.

[0065] The present application provides a data processing method, apparatus, device and medium. Compared with the current practice of participants converting different sample data into an embedding vector and performing interactive federated modeling with a server, the present application obtains sample data, wherein the sample data includes user data and item data; determines a user embedding vector of the user data locally at the first participant, and receives an item embedding vector sent by the server, wherein the item embedding vector is generated locally at the server based on the item data; and obtains a preset prediction model of the first participant through federated learning training based on the user embedding vector and the item embedding vector. In the present application, after obtaining the sample data, the user embedding vector of the user data is determined locally on the first participant, and the item embedding vector determined based on the item data on the server side is received, and then based on the user embedding vector and the item embedding vector, the preset prediction model of the first participant is obtained through federated learning training, that is, different sample data are converted into different embedding vectors in the present application, and specifically, the item data that will generate a large amount of computational effort is placed on the server side to generate the item embedding vector, and only interactive federated modeling of the item embedding vector is performed with the server side without interacting with the user embedding vector, so as to avoid generating a large amount of computational overhead and communication overhead on the local participant, thereby improving the efficiency of obtaining the preset prediction model. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0067] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0068] Figure 1 This is a flow chart of the first embodiment of the data processing method of the present application;

[0069] Figure 2 This is a schematic flow chart of the detailed steps of performing speech recognition on speech data to be recognized to obtain candidate results of the speech data to be recognized in the first embodiment of the data processing method of the present application;

[0070] Figure 3 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present application.

[0071] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0072] 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.

[0073] The present application embodiment provides a data processing method. In the first embodiment of the data processing method of the present application, refer to Figure 1 , applied to a first participant, the first participant is connected to a server for communication, the data processing method comprising:

[0074] Step S10, obtaining sample data, wherein the sample data includes user data and item data;

[0075] Step S20, determining, at the first participant's local location, a user embedding vector of the user data, and receiving an item embedding vector sent by a server, wherein the item embedding vector is generated at the server's local location based on the item data;

[0076] Step S30: Based on the user embedding vector and the item embedding vector, a preset prediction model of the first participant is obtained through federated learning training.

[0077] The specific steps are as follows:

[0078] Step S10, obtaining sample data, wherein the sample data includes user data and item data;

[0079] In this embodiment, the data processing method is applied to the first participant, and the first participant and other second participants are respectively connected to the server side for communication, and the first participant, the second participant and the server side together constitute a data processing system, which belongs to a data processing device. It should be noted that for each participant, the required resources are obtained through the server side of each website such as a social networking site or a shopping website. In this embodiment, the example of each participant shopping through the server side is used for specific description, that is, the sample data is shopping data (including item data and user data), wherein the user data includes the user's name, the user's ID number, the user's attributes, etc., and the item data includes the characteristics of different items, such as the number of times the item is shown, the length of time the item is shown, the number of clicks on the item, the number of collections of the item, etc. For example, if the first participant is a user in area A and the second participant is a user in area B, then both the first participant and the second participant purchase items through a certain shopping website. Shopping is implemented on the server side of a shopping website. For the shopping website, the corresponding server side retains the shopping records of users in various regions. The shopping records include the purchased items, the time spent viewing the items during purchase, the number of item clicks during purchase, and other data. Due to privacy protection, the data between the various participants cannot be directly exchanged. Therefore, horizontal federated learning is used to train the models of the various participants to improve the accuracy of the models of the various participants. In the prior art, when the models of the various participants are trained through the horizontal federation method, the shopping data (sample data, including data such as a user purchasing a certain item) of the various participants stored on the server side need to be sent to the local part of the participant for the local part of the participant to perform one-hot encoding of all the shopping data, and then the one-hot encoded shopping data (sample data) is preprocessed through the embedding layer to obtain the embedding vector corresponding to the shopping data, and the subsequent training or prediction processing is performed based on the embedding vector as the input of the model.

[0080] That is, in the prior art, shopping data (sample data, including item data and user data) are simultaneously converted into high-dimensional one hot encodings at the local participant. For example, shopping data (including user data and item data) are all mapped into multiple arrays / lists, where each word in the shopping data is mapped with a unique array / list, so that each series of shopping data can be integrated into multiple sparse matrices. When the sparse matrix is ​​too sparse, it will occupy excessive resources. Therefore, it is necessary to learn the one hot encoding to obtain a low-dimensional vector containing data features. The low-dimensional vector containing data features can be an embedding vector, that is, before the one hot encoding is used as a model input, it is necessary to learn and extract features in the shopping data to further obtain an embedding vector. However, since the local data composed of user data and item data is usually huge in number, and the one hot encoding usually has a high dimension, a large amount of computing overhead will be generated at the local participant in the process of obtaining the embedding vector of all shopping data. Since the computing power of each participant, that is, the end device, is usually limited, this leads to a decrease in the processing performance of the end device, resulting in a decrease in the efficiency of horizontal federation. Therefore, in this embodiment, the item feature vector is pre-processed on the server side to avoid the consumption of local computing resources of the participating parties.

[0081] Step S20, determining, at the first participant's local location, a user embedding vector of the user data, and receiving an item embedding vector sent by a server, wherein the item embedding vector is generated at the server's local location based on the item data;

[0082] In order to avoid the consumption of local computing resources of the participating parties, in this embodiment, the user embedding vector of the user data is determined locally at the first participating party, and the item embedding vector sent by the server is received, and the preset prediction model of the first participating party is determined based on the user embedding vector and the item embedding vector, wherein the item embedding vector is generated locally at the server based on the item data.

[0083] Specifically, the user embedding vector of the sample data (obtained based on the user data) is obtained locally on each participant, and the item embedding vector (based on the item data) is obtained on the server side. Since the server side has strong computing power, it will not affect the efficiency of the federation process. The item embedding vector on the server side can be obtained through model training.

[0084] In this embodiment, since the server only trains the object data (obtains the object embedding vector) instead of all the sample data, that is, does not include the user data, the user privacy will not be leaked.

[0085] The step of determining the user embedding vector of the user data locally at the first participant and receiving the item embedding vector sent by the server comprises:

[0086] Step S21: generating a one-hot encoding of the user data locally at the first participant, and obtaining a user embedding vector of the user data based on the one-hot encoding;

[0087] In this embodiment, the first participant generates a one-hot code that uniquely identifies the user in the user data, such as a one-hot code of the user name and ID number, and extracts user features based on the one-hot code to obtain a user embedding vector for the user data.

[0088] Specifically, assuming that the one-hot encoding of the user data is 01000000, a user embedding vector of the one-hot encoding 01000000 can be generated accordingly. For example, the user embedding vector may be 01 (obtained by a preset user data preprocessing model).

[0089] The step of generating a one-hot encoding of the user data locally at the first participant, and obtaining a user embedding vector of the user data based on the one-hot encoding comprises:

[0090] Step S211, generating a one-hot encoding of the ID feature of the user in the user data locally at the first participant;

[0091] Step S212: obtaining a user embedding vector of the user data based on the one-hot encoding of the user ID feature.

[0092] It should be noted that, at the local site of the first participant, in order to reduce the amount of computation required for encoding, in this embodiment, the user can be one-hot encoded only based on the user's ID feature or unique identifier in the user data. One-hot encoding of the user based on the user's ID feature or unique identifier can reduce the amount of computation because compared with the user's name and ID number, the user's unique ID requires less data processing, and then the user embedding vector of the user data is obtained based on the one-hot encoding.

[0093] In addition, it should be noted that in this embodiment, one-hot encoding is performed on users based on their ID features, rather than on the server side. That is, one-hot encoding is not performed on all users on the server side, but on the user set of each participant (end device) separately. Since the user set of each end device is smaller than the user set of all end devices, that is, high-dimensional one-hot encoding vectors are usually not generated on the end device, the amount of data calculation of the end device is reduced from the source. For example, assuming that device 1 contains two users A and B, and device 2 contains two users C and D, then on device 1, user A and user B are encoded as 10 and 01; on device 2, user C and user D are encoded as 10 and 01. If one-hot encoding is performed on the server side to process the user's ID feature, at least one-hot encodings such as 0100, 1000, 0010, 0001 are required to uniquely determine user A, user B, user C and user D.

[0094] That is, in this embodiment, the user is one-hot encoded based on the ID feature in the user data, and the obtained one-hot encoding plays a technical role in reducing the dimension of the one-hot encoding from different levels.

[0095] It should be noted that, in this embodiment, in addition to being associated with the one-hot encoding of each user's ID feature, the user embedding vector can also locally obtain user data such as each user's behavioral features, thereby obtaining the feature similarity between each user, and then obtaining the user embedding vector based on the user's ID feature and the feature similarity between each user.

[0096] Step S22, receiving the item embedding vector sent by the server and obtained based on the preset item prediction model.

[0097] In this embodiment, the server also trains a preprocessing model (preset item prediction model) to accurately obtain an item embedding vector of an item (which may include information). The item embedding vector is an item feature representation vector such as the probability of an item being purchased or an interest tag representing the item (information).

[0098] The step of receiving the item embedding vector sent by the server and obtained based on the preset item prediction model includes:

[0099] Step S221, receiving an item embedding vector representing item features obtained after inputting the item data into a corresponding preset item prediction model, which is sent by the server;

[0100] The preset item prediction model is a target model obtained after iterative training of the first preset prediction model to be trained based on item training data with preset labels.

[0101] For the preset item prediction model, the input data can be the one-hot encoding corresponding to the preset item data (which can come from all participants), and the output data is the item embedding vector.

[0102] After receiving the item data sent by the server and inputting it into the corresponding preset item prediction model, the item embedding vector representing the item characteristics is obtained. Specifically, the item data in the participant's sample data, such as the item unique hot encoding, is input into the preprocessing model to obtain the item embedding vector. It should be noted that the preset item prediction model is based on the item training data with preset labels. After iterative training of the first preset prediction model to be trained, the target model is obtained. Specifically, the second preset basic model is iteratively trained to obtain a model that can obtain item feature representation (item embedding vector). For example, item data or item information records the associated data of the item, such as the user's browsing time, click times, and purchase quantity of the target item. In addition, the item information also records the attribute information of the item, such as the type of item, the price of the item, etc. At this time, the item information can be represented by a string of one-hot codes, which is 010000000000000. The one-hot code (large sparse vector) is converted into a low-dimensional space representation through a preset preprocessing model. For example, assuming that a one-hot code is 010000000000000, and it indicates that the user has purchased 10 clothes , the preset preprocessing model can be used to process the unique hot encoding to determine that the clothing item item embedding vector (feature representation variable) is a real number 10, indicating that the number of clicks on the clothing is 10 times, or assuming that a unique hot encoding is 0100000000011110, and it indicates that the user's purchase probability of the clothing is 80%, the preset preprocessing model can be used to process the unique hot encoding to determine that the clothing item item embedding vector (feature representation variable) is a real number 0.8, wherein, after obtaining the item embedding vector, the server sends the item embedding vector to the first participant. In this embodiment, the item embedding vector is obtained on the server side, which reduces the amount of calculation of the terminal device.

[0103] Step S30: Based on the user embedding vector and the item embedding vector, a preset prediction model of the first participant is obtained through federated learning training.

[0104] Specifically, the user embedding vector and the item embedding vector received from the server are input as training data into the local second basic model to be trained at the first participant. Since the training data has corresponding preset labels, the model parameters of the second basic model to be trained can be feedback adjusted to obtain a preset prediction model.

[0105] In this embodiment, since the preset prediction model has been trained, the data to be processed can be predicted based on the preset prediction model to obtain a prediction result.

[0106] The present application provides a data processing method, apparatus, device and medium. Compared with the current practice of participants converting different sample data into an embedding vector and performing interactive federated modeling with a server, the present application obtains sample data, wherein the sample data includes user data and item data; determines a user embedding vector of the user data locally at the first participant, and receives an item embedding vector sent by the server, wherein the item embedding vector is generated locally at the server based on the item data; and obtains a preset prediction model of the first participant through federated learning training based on the user embedding vector and the item embedding vector. In the present application, after obtaining the sample data, the user embedding vector of the user data is determined locally on the first participant, and the item embedding vector determined based on the item data on the server side is received, and then based on the user embedding vector and the item embedding vector, the preset prediction model of the first participant is obtained through federated learning training, that is, different sample data are converted into different embedding vectors in the present application, and specifically, the item data that will generate a large amount of computational effort is placed on the server side to generate the item embedding vector, and only interactive federated modeling of the item embedding vector is performed with the server side without interacting with the user embedding vector, so as to avoid generating a large amount of computational overhead and communication overhead on the local participant, thereby improving the efficiency of obtaining the preset prediction model.

[0107] The present application embodiment provides a data processing method. In another embodiment of the data processing method of the present application, the step of obtaining the preset prediction model of the first participant through federated learning training based on the user embedding vector and the item embedding vector includes:

[0108] Step A1, merging the user embedding vector and the item embedding vector of the same user in the sample data to obtain an integrated vector of the same user;

[0109] Step A2, obtaining a second basic model to be trained, and based on the multiple integrated vectors, training and updating the second basic model to be trained until the second basic model to be trained reaches the first preset training completion condition, and obtaining an initial training model, and executing a preset horizontal federation process for the item model variables in the initial training model, until the second basic model to be trained reaches the second preset training completion condition, and obtaining a preset prediction model.

[0110] In this embodiment, after obtaining the user embedding vector and the item embedding vector of the same user, the user embedding vector and the item embedding vector of the same user are vector merged to obtain an integrated vector of the same user. For example, if the user embedding vector is (1, 0) and the item embedding vector is 0.8, then the integrated vector is (1, 0, 0.8). After obtaining the integrated vector, the preset prediction model of the first participant is determined through federated learning based on multiple integrated vectors.

[0111] Specifically, a second basic model to be trained is obtained, and based on the multiple integrated vectors, the second basic model to be trained is updated until the second basic model to be trained reaches a first preset training completion condition, thereby obtaining an initial training model; for the item model variables in the initial training model, a preset horizontal federation process is executed until the second basic model to be trained reaches a second preset training completion condition, thereby obtaining a preset prediction model.

[0112] The step of obtaining a second basic model to be trained, training and updating the second basic model to be trained based on the plurality of integration vectors until the second basic model to be trained reaches a first preset training completion condition, obtaining an initial training model, and executing a preset horizontal federation process for the item model variables in the initial training model until the second basic model to be trained reaches a second preset training completion condition, and obtaining a preset prediction model includes:

[0113] Step B1, obtaining a second basic model to be trained;

[0114] Step B2, iteratively training the second basic model to be trained based on the multiple integrated vectors to train and update the object model variables in the second basic model to be trained, and determining whether the second basic model to be trained after the training update meets the first preset training completion condition;

[0115] Step B3: if the second basic model to be trained after training and updating meets the first preset training completion condition, setting the second basic model to be trained after training and updating as the initial training model;

[0116] Based on the multiple integrated vectors, the second basic model to be trained is iteratively trained. The method for iteratively training the second basic model to be trained includes but is not limited to a gradient descent method. If the second basic model to be trained after training and updating meets the first preset training completion condition, the second basic model to be trained after training and updating is set as an initial training model.

[0117] Step B4, sending the item model variables in the initial training model to the server end, so that the server end aggregates the item model variables sent by multiple other second participants and the item model variables in the initial training model to obtain aggregated item model variables;

[0118] Step B5, receiving the aggregated product model variables fed back by the server, and replacing and updating the item model variables of the initial training model that is trained and updated with the aggregated product model variables;

[0119] In this embodiment, if the second basic model to be trained after training meets the first preset training completion condition, the preset horizontal federation process is executed, that is, horizontal federation is performed with other second participants, and the item model variables (excluding user model variables) of the second basic model to be trained after training and update are replaced and updated. Specifically, if the second basic model to be trained meets the first preset training completion condition, the item model parameters that are being trained and updated in the second basic model to be trained are directly replaced with the aggregate model parameters (obtained jointly with other second participants); if the second basic model to be trained does not meet the first preset training completion condition, the second basic model to be trained is iteratively trained until the second basic model to be trained meets the first preset training completion condition.

[0120] It should be noted that, in the process of replacing and updating the model variables of the second base model to be trained after training and updating, the model parameters of the user embedding layer are not included, that is, only the model parameters of the item embedding layer are federated and replaced and updated.

[0121] Specifically, for example, the item purchase probability of a new user M is predicted to be 80% on the server side, and the first participant predicts that the user M has a user similarity of 70% with a historical user of the first participant. Then the predicted probability of the M user purchasing the corresponding item is 70%*80%. In fact, the user has already purchased the item. Therefore, all item model parameters need to be adjusted according to the actual results and the predicted results. After the adjustment, only the model parameters of the item embedding vector are horizontally federated.

[0122] Specifically, the step of sending the item model variables in the initial training model to the server side so that the server side aggregates the item model variables sent by multiple other second participants and the item model variables in the initial training model to obtain the aggregated item model variables includes:

[0123] Step C1, encrypting the item model variables in the initial training model and sending them to the server end, so that the server end aggregates the item model variables sent by multiple other second participants and the item model variables in the initial training model to obtain aggregated item model variables;

[0124] The step of receiving the aggregated product model variables fed back by the server and replacing the item model variables of the initial training model updated by training with the aggregated product model variables includes:

[0125] Step C2, receiving the aggregated product model variables encrypted and fed back by the server, and replacing and updating the item model variables of the initial training model that is trained and updated with the aggregated product model variables.

[0126] In this embodiment, the object model variables in the initial training model are encrypted and sent to the server, and the server receives the encrypted aggregate model variables based on the object model variables to obtain the aggregate model variables, so as to avoid information leakage and improve security.

[0127] Step B6, based on the replaced and updated item model variables, re-iteratively train the second basic model to be trained and determine whether the first preset training completion condition is met, until the second basic model to be trained meets the second preset training completion condition, and obtain the preset prediction model.

[0128] In this embodiment, based on the replaced and updated item model variables, the iterative training of the second basic model to be trained and the judgment of whether the first preset training completion condition is met are re-performed until the second basic model to be trained finally meets the second preset training completion condition to obtain a preset prediction model. For example, assuming that the first preset training completion condition is that the number of iterations reaches 500 times, the first basic model to be trained sends the item model variable once every 500 iterations to receive the corresponding feedback aggregation model variable, and replaces and updates the item model variable in the basic model to be trained with the corresponding aggregation model variable.

[0129] In this embodiment, the user embedding vector and the item embedding vector of the same user in the sample data are vector-merged to obtain an integrated vector of the same user; a second basic model to be trained is obtained, and based on a plurality of the integrated vectors, the second basic model to be trained is trained and updated until the second basic model to be trained reaches a first preset training completion condition, and an initial training model is obtained; and a preset horizontal federation process is executed for the item model variables in the initial training model until the second basic model to be trained reaches a second preset training completion condition, and a preset prediction model is obtained. In this embodiment, the federation of user model parameters is not performed, and only the federation of item model parameters is performed, which reduces the communication of model parameters and improves the computing efficiency of the first participant, i.e., the terminal device.

[0130] The present application provides a data processing method. In another embodiment of the data processing method of the present application, after the step of performing prediction processing on the data to be processed based on the preset prediction model to obtain the prediction result, the method includes:

[0131] Step D1, obtaining data to be processed, and inputting the data to be processed into a preset prediction model;

[0132] Step D2, based on the preset prediction model, performing prediction processing on the data to be processed to obtain a prediction result;

[0133] Step D3, calculating the item similarity result corresponding to the prediction result, and generating a similar item candidate set based on the item similarity result;

[0134] Step D4: executing a preset item recommendation process based on the similar item candidate set.

[0135] In this embodiment, after obtaining the preset prediction model, the data to be processed is predicted based on the preset prediction model to obtain a prediction result. After obtaining the prediction result, the item similarity result corresponding to the prediction result, that is, the similarity between items, is determined, and a candidate set of similar items is generated based on the item similarity result to make accurate recommendations to users.

[0136] Reference Figure 3 , Figure 3 It is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present application.

[0137] like Figure 3As shown, the data processing device may include: a processor 1001, such as a CPU, a memory 1005, and a communication bus 1002. The communication bus 1002 is used to realize the connection and communication between the processor 1001 and the memory 1005. The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0138] Optionally, the data processing device may also include a rectangular user interface, a network interface, a camera, an RF (Radio Frequency) circuit, a sensor, an audio circuit, a WiFi module, etc. The rectangular user interface may include a display screen (Display), an input submodule such as a keyboard (Keyboard), and the optional rectangular user interface may also include a standard wired interface and a wireless interface. The network interface may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).

[0139] Those skilled in the art will understand that Figure 3 The data processing device structure shown in the figure does not constitute a limitation of the data processing device, and may include more or less components than shown in the figure, or combine some components, or arrange the components differently.

[0140] like Figure 3 As shown, the memory 1005 as a computer medium may include an operating system, a network communication module and a data processing program. The operating system is a program that manages and controls the hardware and software resources of the data processing device, and supports the operation of the data processing program and other software and / or programs. The network communication module is used to realize the communication between the components inside the memory 1005, and the communication with other hardware and software in the data processing system.

[0141] exist Figure 3 In the data processing device shown, the processor 1001 is used to execute the data processing program stored in the memory 1005 to implement the steps of any of the above-mentioned data processing methods.

[0142] The specific implementation of the data processing device of the present application is basically the same as the various embodiments of the above-mentioned data processing method, and will not be repeated here.

[0143] The present application also provides a data processing device, applied to a first participant, the data processing device comprising:

[0144] A first acquisition module, used to acquire sample data, wherein the sample data includes user data and item data;

[0145] A receiving module, configured to determine, locally at the first participant, a user embedding vector of the user data, and receive an item embedding vector sent by a server, wherein the item embedding vector is generated locally at the server based on the item data;

[0146] The second acquisition module is used to obtain the preset prediction model of the first participant through federated learning training based on the user embedding vector and the item embedding vector.

[0147] Optionally, the receiving module includes:

[0148] A generating unit, configured to generate a one-hot encoding of the user data locally at the first participant, and obtain a user embedding vector of the user data based on the one-hot encoding;

[0149] The receiving unit is used to receive the item embedding vector sent by the server and obtained based on the preset item prediction model.

[0150] Optionally, the receiving unit includes:

[0151] A receiving subunit, configured to receive an item embedding vector representing item features obtained after the item data is input into a corresponding preset item prediction model and sent by the server;

[0152] The preset item prediction model is a target model obtained after iterative training of the first preset prediction model to be trained based on item training data with preset labels.

[0153] Optionally, the second acquisition module includes:

[0154] a merging unit, configured to merge the user embedding vector and the item embedding vector of the same user in the sample data to obtain an integrated vector of the same user;

[0155] The federation unit is used to obtain a second basic model to be trained, and based on the multiple integrated vectors, train and update the second basic model to be trained until the second basic model to be trained reaches a first preset training completion condition, thereby obtaining an initial training model, and execute a preset horizontal federation process on the item model variables in the initial training model until the second basic model to be trained reaches a second preset training completion condition, thereby obtaining a preset prediction model.

[0156] Optionally, the federation unit is used to implement:

[0157] Obtain a second basic model to be trained;

[0158] Iteratively training the second basic model to be trained based on the multiple integrated vectors to train and update the object model variables in the second basic model to be trained, and determining whether the second basic model to be trained after the training update meets the first preset training completion condition;

[0159] If the second basic model to be trained after training and updating meets the first preset training completion condition, setting the second basic model to be trained after training and updating as the initial training model;

[0160] Sending the item model variables in the initial training model to the server end, so that the server end aggregates the item model variables sent by multiple other second participants and the item model variables in the initial training model to obtain aggregated item model variables;

[0161] Receive the aggregated product model variables fed back by the server, and replace and update the item model variables of the initial training model that is trained and updated with the aggregated product model variables;

[0162] Based on the replaced and updated item model variables, the iterative training of the second basic model to be trained is re-performed and a judgment is made as to whether the first preset training completion condition is met, until the second basic model to be trained meets the second preset training completion condition, thereby obtaining a preset prediction model.

[0163] Optionally, the federation unit is used to implement:

[0164] Encrypting the item model variables in the initial training model and sending them to the server, so that the server can aggregate the item model variables sent by multiple other second participants and the item model variables in the initial training model to obtain aggregated item model variables;

[0165] The federation unit is further used to implement:

[0166] The aggregated product model variables encrypted by the server-side feedback are received, and the item model variables of the initial training model updated through training are replaced and updated with the aggregated product model variables.

[0167] Optionally, the data processing device includes:

[0168] A third acquisition module is used to acquire the data to be processed and input the data to be processed into the preset prediction model;

[0169] A prediction module, used to perform prediction processing on the data to be processed based on the preset prediction model to obtain a prediction result;

[0170] A calculation module, used to calculate the item similarity result corresponding to the prediction result, and generate a similar item candidate set based on the item similarity result;

[0171] The execution module is used to execute a preset item recommendation process based on the candidate set of similar items. The specific implementation of the data processing device of the present application is basically the same as the above-mentioned data processing method embodiments, and will not be repeated here.

[0172] An embodiment of the present application provides a medium, and the medium stores one or more programs, and the one or more programs can also be executed by one or more processors to implement the steps of any of the above-mentioned data processing methods.

[0173] The specific implementation of the medium of the present application is basically the same as the embodiments of the above-mentioned data processing method, and will not be repeated here.

[0174] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent processing scope of the present application.

Claims

1. A data processing method, characterized in that: Applied to the first participant, the data processing method includes: Acquire sample data, where the sample data includes user data and item data; Determining, locally at the first participant, a user embedding vector of the user data, and receiving an item embedding vector sent by a server, wherein the item embedding vector is generated locally at the server based on the item data; Based on the user embedding vector and the item embedding vector, a preset prediction model of the first participant is obtained through federated learning training, and the user embedding vector and the item embedding vector of the same user in the sample data are vector-merged to obtain an integrated vector of the same user; a second basic model to be trained is obtained, and based on a plurality of the integrated vectors, the second basic model to be trained is trained and updated until the second basic model to be trained meets a first preset training completion condition, and an initial training model is obtained; for the item model variables in the initial training model, a preset horizontal federation process is executed until the second basic model to be trained meets a second preset training completion condition, and a preset prediction model is obtained; The step of determining the user embedding vector of the user data locally at the first participant and receiving the item embedding vector sent by the server comprises: Generating, locally at the first participant, a one-hot encoding of the user data, and obtaining a user embedding vector of the user data based on the one-hot encoding; Receive the item embedding vector sent by the server based on the preset item prediction model; The step of receiving the item embedding vector sent by the server and obtained based on the preset item prediction model includes: receiving an item embedding vector representing item features obtained after inputting the item data into a corresponding preset item prediction model sent by the server; The preset item prediction model is a target model obtained after iterative training of the first preset prediction model to be trained based on item training data with preset labels.

2. The data processing method according to claim 1, characterized in that: The step of obtaining a second basic model to be trained, training and updating the second basic model to be trained based on the plurality of integration vectors until the second basic model to be trained reaches a first preset training completion condition, obtaining an initial training model, and executing a preset horizontal federation process for the item model variables in the initial training model until the second basic model to be trained reaches a second preset training completion condition, and obtaining a preset prediction model includes: Obtain a second basic model to be trained; Iteratively training the second basic model to be trained based on the multiple integrated vectors to train and update the object model variables in the second basic model to be trained, and determining whether the second basic model to be trained after the training update meets the first preset training completion condition; If the second basic model to be trained after training and updating meets the first preset training completion condition, setting the second basic model to be trained after training and updating as the initial training model; Sending the item model variables in the initial training model to the server end, so that the server end aggregates the item model variables sent by multiple other second participants and the item model variables in the initial training model to obtain aggregated item model variables; Receive the aggregated product model variables fed back by the server, and replace and update the item model variables of the initial training model that is trained and updated with the aggregated product model variables; Based on the replaced and updated item model variables, the iterative training of the second basic model to be trained is re-performed and a judgment is made as to whether the first preset training completion condition is met, until the second basic model to be trained meets the second preset training completion condition, thereby obtaining a preset prediction model.

3. The data processing method according to claim 2, characterized in that: The step of sending the item model variables in the initial training model to the server end so that the server end aggregates the item model variables sent by multiple other second participants and the item model variables in the initial training model to obtain the aggregated item model variables includes: Encrypting the item model variables in the initial training model and sending them to the server, so that the server can aggregate the item model variables sent by multiple other second participants and the item model variables in the initial training model to obtain aggregated item model variables; The step of receiving the aggregated product model variables fed back by the server and replacing the item model variables of the initial training model updated by training with the aggregated product model variables includes: The aggregated product model variables encrypted by the server-side feedback are received, and the item model variables of the initial training model updated through training are replaced and updated with the aggregated product model variables.

4. The data processing method according to claim 1, characterized in that: After the step of obtaining the preset prediction model of the first participant through federated learning training based on the user embedding vector and the item embedding vector, the method further includes: Acquire data to be processed, and input the data to be processed into the preset prediction model; Based on the preset prediction model, the data to be processed is predicted to obtain a prediction result; Calculating an item similarity result corresponding to the prediction result, and generating a similar item candidate set based on the item similarity result; Based on the similar item candidate set, a preset item recommendation process is executed.

5. A data processing device, characterized in that: Applied to the first participant, the data processing device comprises: A first acquisition module, used to acquire sample data, wherein the sample data includes user data and item data; A receiving module, configured to determine, locally at the first participant, a user embedding vector of the user data, and receive an item embedding vector sent by a server, wherein the item embedding vector is generated locally at the server based on the item data; A second acquisition module is used to obtain a preset prediction model of the first participant through federated learning training based on the user embedding vector and the item embedding vector, and to merge the user embedding vector and the item embedding vector of the same user in the sample data to obtain an integrated vector of the same user; to obtain a second basic model to be trained, and to train and update the second basic model to be trained based on a plurality of the integrated vectors until the second basic model to be trained meets a first preset training completion condition, thereby obtaining an initial training model, and to execute a preset horizontal federation process on the item model variables in the initial training model until the second basic model to be trained meets a second preset training completion condition, thereby obtaining a preset prediction model; The data processing device is also used to implement: Generating, locally at the first participant, a one-hot encoding of the user data, and obtaining a user embedding vector of the user data based on the one-hot encoding; Receive the item embedding vector sent by the server based on the preset item prediction model; The data processing device is also used to implement: receiving an item embedding vector representing item features obtained after inputting the item data into a corresponding preset item prediction model sent by the server; The preset item prediction model is a target model obtained after iterative training of the first preset prediction model to be trained based on item training data with preset labels.

6. A data processing device, characterized in that: The data processing device comprises: a memory, a processor, and a program stored in the memory for implementing the data processing method. The memory is used to store a program for implementing the data processing method; The processor is used to execute a program for implementing the data processing method, so as to implement the steps of the data processing method according to any one of claims 1 to 4.

7. A medium, characterized in that The medium stores a program for implementing the data processing method, and the program for implementing the data processing method is executed by a processor to implement the steps of the data processing method according to any one of claims 1 to 4.