Personalized model training method, electronic device and medium based on joint learning
By constructing a joint learning method of clustering prior model and personalized model on client devices, the problem that the existing technology cannot realize personalized modeling is solved, and personalized recommendations are realized without uploading user data. Improves the accuracy of recommendations and the training efficiency of the model.
Patent Information
- Application Number
- CN202010128181.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-02-27
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2040-02-27
AI Technical Summary
The prior art cannot meet the needs of personalized modeling while protecting user privacy, especially without uploading user data, making it difficult to achieve personalized recommendations.
The client device uploads business data to the server to build a clustered prior model, uses this model and local privacy data to train a personalized model, and uploads the model update information to the cloud side for global model updates to realize personalized modeling, and uses it at the same time The exponential weighted average method combines global and local models for prediction.
Without leaking user privacy data, the need for personalized modeling is achieved, the accuracy and generalization of personalized recommendations are improved, and the model is prevented from overfitting by dynamically adjusting the learning rate.
Smart Images

Figure CN113312543B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a personalized model training method based on joint learning, an electronic device, and a computer-readable storage medium. Background Art
[0002] With the continuous advancement of artificial intelligence technology and the continuous development of society, personalized recommendations have been widely used in many aspects such as news, shopping, and food. Using big data analysis and modeling can provide more accurate personalized recommendation services.
[0003] At present, when using big data analysis and modeling, it is generally necessary to collect user personal privacy data on the client side. However, as user personal privacy data is increasingly valued and the frequent leakage of user personal privacy data exposes data security issues, the current solution of collecting user personal privacy data to the cloud server for big data analysis and modeling has been questioned and challenged.
[0004] Based on this, Google proposed the concept of federated learning, which allows modeling to be performed through end-side devices without uploading user data, and trains the model on the end-side devices, and only uploads the model weights trained on the end-side to the cloud side. Then, the cloud side uniformly updates the cloud-side model according to the model weights to achieve federated modeling. Although this solution can achieve big data modeling while protecting user privacy data, all users share one model, which is not suitable for personalized recommendation scenarios. In other words, the existing solutions are more for protecting user privacy data and efficiently training models, and fail to consider the needs of personalized modeling. Summary of the invention
[0005] The embodiments of the present application provide a personalized model training method, an electronic device, and a computer-readable storage medium based on joint learning to solve the problem that the existing technology cannot meet the needs of personalized modeling.
[0006] In a first aspect, an embodiment of the present application provides a personalized model training method based on joint learning, including:
[0007] The client device uploads the first user service data to the server to instruct the server to build a clustering prior model according to the first user service data;
[0008] The client device obtains the clustering prior model and the personalized model transmitted by the server;
[0009] The client device trains the personalized model according to the clustering prior model, the first user service data and the user privacy data to obtain a local personalized model and model update information;
[0010] The client device uploads the model update information to the server to instruct the server to update the personalized model on the cloud side according to the model update information to obtain a global personalized model;
[0011] The client device receives the global personalization model transmitted by the server.
[0012] In an embodiment of the present application, the client device uploads the user business data to the server, and the server constructs a clustering prior model based on the user business data to provide prior knowledge for the personalized model training of the client device. The client device analyzes which personalized recommendation model the local user belongs to based on the prior knowledge provided by the server, and uses different user data to train different personalized models, thereby meeting the needs of personalized modeling without uploading user privacy data, that is, protecting user privacy.
[0013] In a possible implementation manner of the first aspect, after the client device receives the global personalized model transmitted by the server, the method further includes:
[0014] The client device updates the model according to the global personalized model and the local personalized model to obtain a target personalized model for prediction.
[0015] In a possible implementation manner of the first aspect, the client device performs model updating according to the global personalized model and the local personalized model to obtain a target personalized model for prediction, including:
[0016] The client device fuses the global personalized model and the local personalized model by using an exponential weighted average method to obtain the target personalized model.
[0017] In a possible implementation manner of the first aspect, after the client device updates the model according to the global personalized model and the local personalized model to obtain a target personalized model for prediction, the method further includes:
[0018] The client device obtains the second user service data;
[0019] The client device uses a local priori model to determine a target personalized model to which the second user service data belongs;
[0020] The client device concatenates the second user service data and the user privacy data to obtain data to be predicted;
[0021] The client device predicts, according to the data to be predicted, using the target personalized model to which the second user service data belongs, to obtain a prediction result of the target personalized model;
[0022] The client device obtains personalized recommendation results according to the prediction results.
[0023] In this implementation, the client device uses multiple local target personalized models to make predictions, and obtains the final personalized recommendation results based on the multiple prediction results, that is, multiple target personalized models are used to make joint decisions, which improves the accuracy and generalizability of personalized recommendations.
[0024] In a possible implementation manner of the first aspect, the client device trains the personalized model according to the clustering prior model, the first user service data, and the user privacy data to obtain a local personalized model and model update information, including:
[0025] The client device uses the clustering prior model to determine the personalized model to which the first user service data belongs;
[0026] The client device concatenates the first user service data and the user privacy data to obtain training data;
[0027] The client device uses the training data to train the personalized model to which the first user service data belongs, and obtains the local personalized model and the model update information.
[0028] In this implementation, the client device fully utilizes the cloud side's prior knowledge of user business data, and uses local user privacy data and user business data to train different personalized models, constraining the training direction of the personalized model. At the same time, multiple different personalized models can be trained in the client device.
[0029] In a possible implementation manner of the first aspect, the model update information is a gradient.
[0030] In this implementation, the client device uploads gradients to the cloud instead of model weights, so that the server can dynamically adjust the learning rate and update the cloud model according to the degree of gradient accumulation in different dimensions, thereby ensuring the training efficiency of the model and preventing overfitting.
[0031] In a second aspect, the embodiment of the present application provides a personalized model training method based on joint learning, including:
[0032] The server obtains the first user service data uploaded by the client device;
[0033] The server constructs a clustering priori model according to the first user service data, and transmits the clustering priori model and the personalized model to the client device to instruct the client device to train the personalized model according to the clustering priori model, the first user service data and the user privacy data;
[0034] The server obtains model update information of the personalized model uploaded by the client device;
[0035] The server updates the personalized model on the cloud side according to the model update information to obtain a global personalized model, and transmits the global personalized model to the client device.
[0036] In a possible implementation manner of the second aspect, the model update information is a gradient, and the server updates the personalized model on the cloud side according to the model update information to obtain a global personalized model, including:
[0037] The server adjusts the learning rate of the global personalized model according to the gradient;
[0038] The server updates the personalized recommendation model on the cloud side according to the adjusted learning rate to obtain the global personalized model.
[0039] In the implementation, the server dynamically adjusts the learning rate according to the gradient uploaded by the client device to ensure the training efficiency of the model and prevent the model from overfitting as much as possible.
[0040] In a possible implementation manner of the second aspect, the server constructs a clustering priori model according to the first user service data, and transmits the clustering priori model and the personalized model to the client device, including:
[0041] The server uses a clustering model to analyze the first user service data to obtain a clustering prior model;
[0042] The server initializes the personalized model corresponding to the clustering prior model according to the clustering prior model;
[0043] The server transmits the initialized personalized model and the clustering prior model to the client device.
[0044] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method described in any one of the first aspect or the second aspect is implemented.
[0045] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any one of the first aspect or the second aspect is implemented.
[0046] In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes the method described in any one of the first aspect or the second aspect.
[0047] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 A schematic block diagram of the hardware structure of the mobile phone 100 provided in an embodiment of the present application;
[0049] Figure 2 A software structure block diagram of the mobile phone 100 provided in an embodiment of the present application;
[0050] Figure 3 A schematic block diagram of the system architecture provided in an embodiment of the present application;
[0051] Figure 4 A flowchart of a personalized model training method based on joint learning provided in an embodiment of the present application;
[0052] Figure 5 A schematic flow chart of the model prediction process provided in the embodiment of the present application;
[0053] Figure 6 A flowchart of a personalized model training method based on joint learning provided in an embodiment of the present application;
[0054] Figure 7 A schematic diagram of the interaction between a client device and a server provided in an embodiment of the present application;
[0055] Figure 8 A schematic diagram of a news recommendation business scenario provided in an embodiment of the present application;
[0056] Fig. 9 A schematic block diagram of the structure of a personalized model training device based on joint learning provided in an embodiment of the present application;
[0057] Fig.10 A schematic block diagram of the structure of a personalized model training device based on joint learning provided in an embodiment of the present application;
[0058] Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0059] In the following description, for the purpose of explanation rather than limitation, specific details such as specific system structures and technologies are provided to facilitate a thorough understanding of the embodiments of the present application.
[0060] The following first introduces the system architecture that may be involved in the embodiments of the present application.
[0061] The system architecture involved in the embodiments of the present application may include a cloud side and a terminal side, wherein the cloud side may specifically include one or more server computing devices, and the terminal side may include one or more client devices. The client device is connected to the server on the cloud side in a communication manner, and the communication connection method may be arbitrary.
[0062] In specific applications, the client device may be, for example, a mobile phone, a tablet computer, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), and no limitation is imposed on the specific type of the client device.
[0063] As an example but not limitation, take the client device as a mobile phone as an example. Figure 1 As shown, the mobile phone 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195. The sensor module 180 may include but is not limited to one or more of a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, and a bone conduction sensor.
[0064] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the structure of the mobile phone 100. In other embodiments of the present application, the mobile phone 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0065] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated into one or more processors. The controller may generate an operation control signal according to the instruction opcode and the timing signal to complete the control of fetching and executing instructions.
[0066] The charging management module 140 is used to receive charging input from a charger, where the charger can be a wireless charger or a wired charger.
[0067] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.
[0068] The wireless communication function of the mobile phone 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0069] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in mobile phone 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0070] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the mobile phone 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0071] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.
[0072] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), low-power Bluetooth (BLE), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the mobile phone 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0073] The mobile phone 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0074] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. In some embodiments, the mobile phone 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0075] The mobile phone 100 can realize the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194 and the application processor.
[0076] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.
[0077] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the mobile phone 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0078] Video codecs are used to compress or decompress digital videos. Mobile phone 100 may support one or more video codecs. Thus, mobile phone 100 may play or record videos in various coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0079] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, the intelligent cognition of the mobile phone 100 can be realized, such as: image recognition, face recognition, voice recognition, text understanding, etc.
[0080] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile phone 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0081] The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the mobile phone 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the mobile phone 100 by running instructions stored in the internal memory 121 and / or instructions stored in a memory provided in the processor.
[0082] The mobile phone 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor.
[0083] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.
[0084] A touch sensor is also called a "touch control device". The touch sensor can be arranged on the display screen 194. The touch sensor and the display screen 194 form a touch screen, also called a "touch control screen". The touch sensor is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. A visual output related to the touch operation can be provided through the display screen. In other embodiments, the touch sensor can also be arranged on the surface of the mobile phone 100, which is different from the position of the display screen 194.
[0085] The key 190 includes a power key, a volume key, etc. The key 190 can be a mechanical key or a touch key. The mobile phone 100 can receive key input and generate key signal input related to the user settings and function control of the mobile phone 100.
[0086] The SIM card interface 195 is used to connect the SIM card. The SIM card can be connected to and separated from the mobile phone 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195. The mobile phone 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The mobile phone 100 interacts with the network through the SIM card to realize functions such as calls and data communications. In some embodiments, the mobile phone 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the mobile phone 100 and cannot be separated from the mobile phone 100.
[0087] After introducing the hardware structure of the mobile phone, Figure 2 The software structure block diagram of the mobile phone 100 is shown.
[0088] like Figure 2 As shown, the software system of the mobile phone 100 can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system of the layered architecture as an example to exemplify the software structure of the mobile phone 100.
[0089] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.
[0090] The application layer can include a series of application packages.
[0091] like Figure 2 As shown, the application package may include applications such as camera, photo album, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, wireless screen projection, file transfer, and multi-screen interaction.
[0092] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0093] like Figure 2As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.
[0094] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc. The content provider is used to store and obtain data and make the data accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0095] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
[0096] The phone manager is used to provide communication functions of the mobile phone 100, such as management of call status (including answering, hanging up, etc.).
[0097] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, etc. The notification manager allows applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify the completion of downloads, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is prompted in the status bar, a prompt sound is emitted, the phone vibrates, the indicator light flashes, etc.
[0098] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.
[0099] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
[0100] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0101] The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
[0102] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
[0103] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0104] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing. The 2D graphics engine is a drawing engine for 2D drawing. The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
[0105] In order to better introduce the system architecture that may be involved in the embodiments of the present application, Figure 3 The schematic block diagram of the system architecture is shown for introduction.
[0106] like Figure 3 As shown, the system architecture may include a client device 31 and a server device 32. User privacy data 311 and user business data 312 are stored on the client device 31, and the client device 31 includes a model selection module 313, a data fusion module 314, a local model update module 315, a model training module 316, a model prediction module 317 and a local model library 318. Among them, the local model faster module 315 may include a clustering prior model 319 and a local model update unit 320. The server device 32 includes a business data mining module 321, a cloud-side model update module 322 and a cloud-side model library 323. Among them, the cloud-side model update module 322 includes a clustering prior model 324 and a cloud-side model update unit 325.
[0107] After the client device 31 obtains the user service data 312, it uploads the user service data to the service device 32. The server device 32 mines the connections between the user service data through the service data mining module 321, and provides prior knowledge for the personalized model training of the client device. In a specific application, the service data mining module 321 can perform cluster analysis on the user service data to obtain the number of cluster clusters, and then build a cluster prior model according to the number of cluster clusters, and initialize the corresponding personalized model. After the server device 32 obtains the cluster prior model and the personalized model, it sends the two to the client device 31.
[0108] After receiving the clustering prior model and the personalized model, the client device 31 can analyze the user service data using the clustering prior model sent by the cloud side through the model selection module 313 to determine which personalized model the user service data belongs to. After confirming the personalized model to which the user service data belongs, the client device 31 then splices the user service data and the user privacy data through the data fusion module 314 to obtain training data.
[0109] Next, the client device 31 uses the spliced training data to train one or more personalized models through the model training module 316, obtains the personalized model after the current training and the update information of the current model training, stores the personalized model after the current training in the local model library, and uploads the model update information of the current training to the server device 32.
[0110] After receiving the model update information, the server device 32 updates the personalized model on the cloud side through the cloud side model update unit in the cloud side model update module 322 to obtain a global personalized model, and then sends the updated global personalized model to the client device 31 .
[0111] In a specific application, after receiving the model update information uploaded by each client device, the cloud-side server can first identify which personalized model the model update information belongs to, and then update the corresponding personalized model according to the model update information.
[0112] It should be pointed out that at the same time, there may be multiple different personalized models being trained on the client device, and multiple different global personalized models may be updated on the cloud server.
[0113] At this point, one round of training is over. When entering the next round of model training, repeat the above steps to continuously train the global personalized model. After one or more rounds of training, you can enter the model prediction stage.
[0114] It should be noted that model training and model prediction can be performed synchronously or asynchronously. Generally, the client device can perform model prediction first, and then train the personalized model.
[0115] In the model prediction stage, after the client device 31 receives the global personalized model sent by the cloud side, the local model update unit in the local model update module 315 updates the local personalized model to obtain the target personalized model. The target personalized model can be used for prediction. In specific applications, the client device can merge the global personalized model sent by the cloud side with the local personalized model to obtain the target personalized model.
[0116] After the client device 31 and the server device 32 perform one or more rounds of personalized model training in sequence, a personalized model for prediction can be obtained. Then, the trained personalized model can be used for personalized recommendation.
[0117] In the prediction stage, the client device 31 can use the local clustering prior model to analyze the user service data, determine the target personalized model to which the user service data belongs, and then splice the user privacy data and the user service data to obtain the predicted data. The client device 31 then performs prediction through the model prediction module 317 to obtain the prediction result. After obtaining the prediction result, a personalized recommendation result can be obtained according to the prediction result.
[0118] Understandably, Figure 3 The functions of each module in the client device and the server device can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions, and the modules can be software and / or hardware.
[0119] After introducing the system architecture that may be involved in the embodiments of the present application, the relevant contents on the client device side and the server side will be introduced respectively.
[0120] The following first introduces the relevant content on the client device side.
[0121] See also Figure 4 A flowchart of a personalized model training method based on joint learning is shown, and the method is applied to a client device. The method may include the following steps:
[0122] Step S401: The client device uploads first user service data to the server to instruct the server to build a clustering prior model according to the first user service data.
[0123] It should be noted that the above-mentioned first user business data refers to the business data collected and recorded by the client device in the business scenario. In different business scenarios, the first user business data may be correspondingly different. For example, in the business scenario of news information flow recommendation, the first user business data may include one or more of the user's news browsing record data, news click record data, news category, news keywords and browsing time period, etc. For example, in the business scenario of shopping recommendation, the first user business data may include the user's browsing footprint data, search data and click record data, etc.
[0124] The client device uploads the collected first user service data to the server, and the server can perform cluster analysis on the first user service data to obtain clustering results, and then build a clustering prior model based on the clustering results. The server then determines the personalized model corresponding to the clustering prior model, initializes the corresponding personalized model based on the clustering prior knowledge, and then sends the personalized model and the clustering prior model to the client device.
[0125] In a specific application, the server can use an unsupervised clustering method to perform cluster analysis on the first user service data uploaded by the client device to obtain a clustering result. The unsupervised clustering method can be, but is not limited to, a k-means clustering algorithm (k-means clustering, K-means) or a density-based spatial clustering algorithm (Density-based spatial clustering of applications with noise, DBSCAN). After obtaining m clustering results, the server constructs a clustering prior model and determines the corresponding m personalized models. After initializing m personalized recommendation models, the server sends the m personalized models and the clustering prior model to the client device, where m is a positive integer.
[0126] Step S402: The client device obtains the clustering prior model and the personalized model transmitted by the server.
[0127] Step S403: The client device trains a personalized model according to the clustering prior model, the first user service data and the user privacy data to obtain a local personalized model and model update information.
[0128] It is understandable that what the client device uploads to the cloud side is the first user business data that does not involve user privacy, and the user privacy data is not uploaded to the cloud side, but is stored locally on the client device. User privacy data may include but is not limited to user age, gender, occupation, income level, marital status, mobile phone usage habits and address.
[0129] In some embodiments, the client device may first use a clustering prior model to determine the personalized model to which the first user service data belongs. That is, the clustering prior model is used to determine which personalized model the current first user service data belongs to. For example, the clustering prior model is used to determine that the first user service data belongs to personalized model A.
[0130] Next, the client device concatenates the first user service data and the user privacy data to obtain training data.
[0131] Then, the client device uses the training data to train the personalized model to which the first user service data belongs, and obtains a local personalized model and model update information.
[0132] In specific applications, after determining which personalized model the first user service data belongs to, it is possible to determine which data participates in the training of which personalized model. For example, data a belongs to personalized model A, data b belongs to personalized model B, and data c belongs to personalized model A and personalized model B. The training data obtained by splicing data a and user privacy data, and the training data obtained by splicing data c and user privacy data are used to train the personalized model A. Similarly, the training data obtained by splicing data b and user privacy data, and the training data obtained by splicing data c and user privacy data are used to train the personalized model B.
[0133] It can be seen that the client device can train one or more personalized models at the same time. At this time, the training data on the client device side can participate in the training of different personalized models respectively, that is, multiple personalized models under different business scenarios will be trained and updated at the same time, with a high degree of parallelism.
[0134] It should be noted that the same user may correspond to different personalized models. For example, the same user may correspond to different personalized models in different business scenarios. Different users may also correspond to different personalized models. The embodiment of the present application may train different personalized models of the same user at the same time, or may train the same personalized model shared by multiple users.
[0135] The specific type of the personalized model can be various, which can be a machine learning model, a deep learning model, or other types of models, which are not limited here. For example, the personalized model can be a logistic regression model (LR). After the personalized model is trained, the client device can obtain the trained personalized model and model update information, which is obtained during the training process. The model update information is generally a model parameter, which can be a model gradient.
[0136] The client device makes full use of the prior knowledge of user business data on the cloud side, combines user privacy data and user business data locally on the client, and trains different personalized models, which constrains the training direction of the personalized model.
[0137] Step S404: The client device uploads the model update information to the server to instruct the server to update the personalized model on the cloud side according to the model update information to obtain a global personalized model.
[0138] Specifically, after the client device obtains the trained personalized model and model update information, it can store the trained personalized model in the local model library to obtain the local personalized model, and upload the model update information to the server. The server can update the personalized model on the cloud side according to the model update information to obtain the global personalized model.
[0139] It should be noted that for the same or the same type of personalized model, the server can update the global personalized model according to the model update information uploaded by one or more client devices. As an example and not a limitation, a personalized model A is stored on the server, and the server sends the personalized model A to N client devices and R client devices respectively. The personalized model A on the N client devices and R client devices can be called a local personalized model, and the personalized model A stored on the cloud side can be called a global personalized model. At this time, the server can update the personalized model A stored on the cloud side, that is, the global personalized model, according to the model information of the personalized model A on the N client devices and the R client devices.
[0140] In some embodiments, the above model update information is a gradient, that is, what the client device uploads to the cloud side is the gradient, not the model weight. In this way, the server can dynamically adjust the learning rate according to the degree of gradient accumulation in different dimensions, update the cloud side model, ensure the training efficiency of the model, and prevent the model from overfitting.
[0141] Step S405: The client device receives the global personalized model transmitted by the server.
[0142] It should be noted that the client local model training may be carried out for multiple rounds. At this time, in the next round of model training, the client device still uploads the user business data. After the cloud side performs cluster analysis on the user business data, the prior knowledge is sent to the client device. The client device uses the cluster prior model, user business data and user privacy data to train the global personalized model obtained in the previous round of training to obtain the updated global personalized model and model update information. The client device then uploads the model update information to the cloud side, and the cloud side updates the global personalized model based on the model update information. And so on, the global personalized model is continuously trained.
[0143] After a certain number of training rounds, the global personalized model and the local personalized model obtained through training can be fused to obtain a target personalized model for model prediction.
[0144] Optionally, the process may further include step S406, where the client device updates the model according to the global personalized model and the local personalized model to obtain a target personalized model for prediction.
[0145] Specifically, after the server updates the global personalized model according to the model update information uploaded by the client device, the updated global personalized model can be sent to the client device. After one or more rounds of training, the client device can perform model update in combination with the updated global personalized model sent by the cloud side and the trained local personalized model to obtain an updated local personalized model.
[0146] In some embodiments, the client device may fuse the global personalized model and the local personalized model using an exponential weighted average method to obtain an updated local personalized model.
[0147] It should be noted that the global personalized model and the local personalized model used for fusion may be models obtained after multiple rounds of training.
[0148] For example, in the first round of training, the personalized model sent by the cloud to the client device is m1. After training, the client device obtains the local personalized model M1 and model update information, and uploads the model update information to the cloud. The cloud updates m1 according to the model update information to obtain the global personalized model m2, and then sends m2 to the client device.
[0149] In the second round of training, the training process is similar to the first round of training. The client device uses the training data to train the global personalized model m2, obtains the local personalized model M2 and model update information, and then uploads the model update information to the cloud side. The cloud side updates m2 according to the model update information, obtains the global personalized model m3, and then sends m3 to the client device.
[0150] In the third round of training, the training process is similar to the first round. The client device uses the training data to train the global personalized model m3, obtains the local personalized model M3 and model update information, and then uploads the model update information to the cloud side. The cloud side updates m3 according to the model update information, obtains the global personalized model m4, and then sends m4 to the client device.
[0151] And so on, multiple rounds of model training are performed.
[0152] In the above process, after three rounds of training, when entering the prediction stage, the local personalized model M3 and the global personalized model m4 are fused in an exponential average manner to obtain a target personalized model for prediction.
[0153] In specific applications, multiple rounds of model training are usually performed, and then the personalized models obtained through training are integrated to obtain a target personalized model, which is then used for prediction.
[0154] In an embodiment of the present application, the client device uploads the user business data to the server, and the server constructs a clustering prior model based on the user business data to provide prior knowledge for the personalized model training of the client device. The client device trains different personalized models based on the user business data and user privacy data according to the prior knowledge provided by the server, thereby meeting the needs of personalized modeling without uploading user privacy data, that is, protecting user privacy.
[0155] After one or more rounds of model training, the target personalized models obtained through training are stored on the client device, and these trained target personalized models can be used to provide personalized recommendation services for users.
[0156] In some embodiments, see Figure 5 The schematic flow chart of the model prediction process shown in the figure shows that after the client device updates the model according to the global personalized model and the local personalized model to obtain the updated local personalized model, the method may further include:
[0157] Step S501: The client device obtains service data of a second user.
[0158] It should be noted that the first user business data and the second user business data are both user business data, and their meanings can be the same. The use of "first" and "second" is to make it clear that one data is used for the model training stage, and the other data is used for the model prediction stage.
[0159] Step S502: The client device uses a local priori model to determine a target personalized model to which the second user service data belongs.
[0160] It should be noted that the above-mentioned local prior model can be a clustering prior model sent down by the cloud side, or it can be a model obtained according to relevant rules sent down by the cloud side.
[0161] Step S503: The client device concatenates the second user service data and the user privacy data to obtain data to be predicted.
[0162] In a specific application, the client device may use a clustering prior model to analyze which personalized model the second user's service data belongs to, and then concatenate or fuse the second user's service data and the user's privacy data to obtain the data to be predicted.
[0163] Step S504: The client device performs prediction based on the data to be predicted using the target personalized model to which the second user service data belongs, to obtain prediction results of each target personalized model.
[0164] Step S505: The client device obtains personalized recommendation results based on the prediction results.
[0165] In specific applications, a user may correspond to multiple personalized recommendation models, and multiple target personalized models are used to perform predictions respectively to obtain multiple prediction results. The prediction results can be expressed as probability values, and the client device can select personalized recommendation results based on the probability values. For example, the prediction results corresponding to the first k probability values are selected as personalized recommendation results, or the prediction result with the highest probability value is selected as the personalized recommendation result.
[0166] It can be seen that the client device uses multiple local target personalized models to make predictions, and obtains the final personalized recommendation results based on multiple prediction results, that is, multiple target personalized models are used to make joint decisions, which improves the accuracy and generalizability of personalized recommendations.
[0167] After introducing the relevant content on the client device side, the relevant content on the server side will be introduced below.
[0168] See also Figure 6 A flowchart of a personalized model training method based on joint learning is shown, and the method is applied to a server. The method may include the following steps:
[0169] Step S601: The server obtains first user service data uploaded by a client device.
[0170] Step S602: The server constructs a clustering prior model according to the first user business data, and transmits the clustering prior model and the personalized model to the client device to instruct the client device to train the personalized model according to the clustering prior model, the first user business data and the user privacy data.
[0171] In a specific application, the server may first use the clustering model to perform cluster analysis on the first user service data to obtain a clustering prior model; then, based on the clustering prior model, initialize the personalized model corresponding to the clustering prior model; finally, the server transmits the initialized personalized model and the clustering prior model to the client device. For example, when the clustering result includes m clustering results, then initialize m personalized models.
[0172] Step S603: The server obtains model update information of the personalized model uploaded by the client device.
[0173] Step S604: The server updates the personalized model on the cloud side according to the model update information to obtain a global personalized model, and transmits the global personalized model to the client device.
[0174] In a specific application, after receiving the global personalized model, the client device may update the model according to the global personalized model and the local personalized model to obtain a target personalized model for prediction.
[0175] In some embodiments, the above-mentioned model update information is a gradient. In this case, the server may adjust the learning rate of the global personalized model according to the gradient; and then update the global personalized model according to the adjusted learning rate.
[0176] It can be seen that the server dynamically adjusts the learning rate according to the gradient uploaded by the client device to ensure the training efficiency of the model and prevent the model from overfitting as much as possible.
[0177] It should be noted that the process on the client device side and the process on the server side are corresponding, and related or similar contents can be referenced to each other, which will not be repeated here.
[0178] After introducing the relevant contents of the client device and the server respectively, the interaction process between the client device and the server will be introduced below.
[0179] See also Figure 7 The schematic diagram of the interaction between the client device and the server is shown, and the interaction process may include the following model training phase and prediction phase.
[0180] Model training phase:
[0181] Step S701: The client device uploads user service data to the server.
[0182] Step S702: The server constructs a clustering prior model based on user service data.
[0183] Step S703: The server sends the clustering prior model and the corresponding personalized model to the client device.
[0184] Step S704: The client device uses the clustering prior model to determine the personalized model to which the user service data belongs.
[0185] Step S705: The client device concatenates the user business data and the user privacy data to obtain training data.
[0186] Step S706: The client device uses the training data to train the corresponding personalized model to obtain the trained personalized model and the gradient of the model update.
[0187] Step S707: The client device uploads the gradient to the server.
[0188] Step S708: The server adjusts the learning rate according to the gradient and then updates the global personalized model.
[0189] Step S709: The server sends the global personalized model to the client device.
[0190] After one or more rounds of model training, the process may proceed to step S710.
[0191] Step S710: The client device fuses the global personalized model and the trained personalized model to obtain a target personalized model for prediction.
[0192] Prediction stage:
[0193] Step S711: After analyzing the user service data using the local clustering prior model, the client device concatenates the user service data and the user privacy data to obtain data to be predicted.
[0194] In specific applications, after the client device collects user business data, it can use the local clustering prior model to analyze which target personalization model the current user business data belongs to, and then splice the user business data and user privacy data.
[0195] Step S712: The client device uses multiple local target personalized models to perform predictions based on the data to be predicted, and obtains prediction results.
[0196] Specifically, after the client device uses the local clustering prior model to determine the target personalized model to which the user business data belongs, the user business data and the user privacy data can be concatenated and given to the corresponding target personalized model for prediction to obtain the prediction results of each target personalized model.
[0197] Step S713: The client device obtains personalized recommendation results according to the prediction results.
[0198] It should be noted that Figure 7 For the similarities or differences between the corresponding embodiments and the above embodiments, please refer to the corresponding contents above and will not be repeated here.
[0199] The personalized model training scheme provided in the embodiment of the present application can be applied to various personalized recommendation business scenarios or search business scenarios. For example, shopping recommendation business scenarios and takeaway ordering recommendation business scenarios. The personalized model used in the embodiment of the present application is arbitrary and can be set according to actual application needs. The following will introduce the technical solution provided in the embodiment of the present application with the personalized model as the LR model and the business scenario as the news information flow recommendation business scenario.
[0200] In the news information flow recommendation scenario, the user's browsing history data and the data of clicking on news can be used as user business data, and data such as user age, user gender, occupation and address can be used as user privacy data. The mobile phone is used as a client device, and the corresponding news APP is installed on the mobile phone.
[0201] The news APP on the mobile phone records the user's privacy data and user's business data, and uploads the user's business data to the cloud-side server without including the user ID. The server can perform cluster analysis on the user's business data, and mine the time period, news source, news category, and news keywords of the user's browsing and clicking on the news to build a user portrait prior model. In some other embodiments, the user's privacy data can also be provided by the system.
[0202] For example, the user profile prior model constructed by the server through clustering can be as follows:
[0203] User Profile A
[0204] Time: Evening
[0205] News category preference: Entertainment, Fashion
[0206] User Profile B
[0207] Time: Noon
[0208] News category preference: Games, Animation
[0209] User Profile C
[0210] Time: Morning
[0211] News category preference: Real estate
[0212] Combine the following Figure 8 The news recommendation business scenario diagram is shown for introduction.
[0213] like Figure 8 As shown, it includes the cloud side and the end side, and the end side includes mobile phone A 81, mobile phone B 82 and mobile phone C 83. The cloud side performs cluster analysis on the user service data uploaded by the mobile phone to obtain the user portrait prior model A and the user portrait prior model B. The cloud side sends the user portrait prior model A to mobile phones B and C, and sends the user portrait prior model B to mobile phones A and C. The three mobile phones use the sent user portrait prior models respectively to analyze the data of users browsing and clicking news locally on the mobile phone to determine which user portrait. For example, user a belongs to user portrait prior model A, user b belongs to user portrait prior model B, and user c belongs to user portrait prior models A and B. User a corresponds to mobile phone A, user b corresponds to mobile phone B, and user c corresponds to mobile phone C.
[0214] Each user profile prior model corresponds to a corresponding personalized model. For example, user profile prior model A corresponds to Model A, and user profile prior model B corresponds to Model B.
[0215] After the mobile phone combines the user's business data and user's privacy data (such as age, gender, occupation, income level, marital status, mobile phone usage habits and address) into training data, it distributes the training data to the corresponding personalized model for model training. For example, if the business data of user a belongs to user portrait prior model A, the training data obtained by combining the business data of user a is distributed to Model A.
[0216] After each mobile phone completes model training, it uploads the model update gradient to the server, and the server dynamically adjusts the learning rate based on the gradient to update the global personalized model on the cloud side. The server on the cloud side can receive the gradients of different personalized models uploaded by each client.
[0217] For example, a piece of training data of user b (corresponding to mobile phone B) has a browsing period of evening, and browses news categories of entertainment and fashion. The corresponding user profile is the above-mentioned user profile A, and the personalized model corresponding to user profile A is Model A. The user business data and user privacy data are spliced to obtain training data i A Model A is an LR model, and the update method of the LR model is w A,t+1 =w A,t -ηΔl A (w A,t ;i A ). After model training, upload the updated gradient Δl of the model A (w A,t ;i A ) to the cloud-side server.
[0218] The cloud-side server receives the gradient Δl m (The gradient of the mth personalized model) can be updated using the Adam algorithm. Specifically, the following steps can be used to dynamically adjust the learning rate and update the cloud-side global personalized model parameter w.
[0219] p t =β1p t-1 +(1-β1)Δl m
[0220]
[0221]
[0222]
[0223]
[0224] Initial value: β1=0.9, β2=0.999, ε=10 -8
[0225] Among them, p t and v t Initialized to the zero vector.
[0226] After the cloud-side server updates the global personalized model, it sends the updated model to the mobile phone. The mobile phone uses the exponential weighted average method to integrate the global personalized model w sent by the cloud side. m,t And local training to get local personalized model Get the updated local personalized model.
[0227]
[0228] Among them, w m,t+1 It is an updated local personalized model.
[0229] According to the above steps, multiple rounds of model training can be performed to obtain a trained personalized model. Then, these trained personalized models can be used to provide users with personalized news recommendation services.
[0230] In the prediction stage, the mobile phone combines the user’s business data and user’s privacy data into training data i A , and use m user portrait prior models to determine the user's portrait, and then use the news recommendation model w to which the user portrait belongs m Make a prediction, select the k news with the highest click probability as the probability that the current news may be clicked, and then recommend the corresponding news to the user.
[0231] It should be noted that the news recommendation business scenario submitted above is only an example, and the relevant processes of other business scenarios are similar to the news recommendation business scenario, which will not be repeated here.
[0232] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0233] Corresponding to the personalized model training method based on joint learning described in the above embodiment, Fig. 9 The structure schematic block diagram of the personalized model training device based on joint learning provided by the embodiment of the present application is shown, and the device can be applied to a client device. For ease of explanation, only the part related to the embodiment of the present application is shown.
[0234] See also Fig. 9 , the device may include:
[0235] A service data uploading module 91, configured to upload the first user service data to the server, so as to instruct the server to construct a clustering prior model according to the first user service data;
[0236] A model acquisition module 92, used to acquire a clustering prior model and a personalized model transmitted by a server;
[0237] A training module 93, configured to train a personalized model according to the clustering prior model, the first user service data and the user privacy data, and obtain a local personalized model and model update information;
[0238] A model update information uploading module 94 is used to upload the model update information to the server to instruct the server to update the personalized model on the cloud side according to the model update information to obtain a global personalized model;
[0239] The receiving module 95 is used to receive the global personalized model transmitted by the server.
[0240] In a possible implementation, the above device may further include:
[0241] The model updating module is used to update the model according to the global personalized model and the local personalized model to obtain a target personalized model for prediction.
[0242] Furthermore, the above model updating module can be specifically used for:
[0243] The global personalized model and the local personalized model are fused using an exponentially weighted average method to obtain a target personalized model.
[0244] In a possible implementation, the above device may further include:
[0245] A service data acquisition module, used to acquire service data of a second user;
[0246] A determination module, configured to use a local priori model to determine a target personalized model to which the second user service data belongs;
[0247] A data splicing module, used to splice the second user's business data and the user's privacy data to obtain data to be predicted;
[0248] A prediction module, configured to predict, based on the data to be predicted, using a target personalized model to which the second user service data belongs, to obtain a prediction result of the target personalized model;
[0249] The personalized recommendation module is used to obtain personalized recommendation results based on the prediction results.
[0250] In a possible implementation, the training module is specifically used to:
[0251] Using a clustering prior model, determining a personalized model to which the first user service data belongs;
[0252] The first user business data and the user privacy data are concatenated to obtain training data;
[0253] The training data is used to train the personalized model to which the first user service data belongs, and a local personalized model and model update information are obtained.
[0254] In a possible implementation, the model update information is a gradient.
[0255] Corresponding to the personalized model training method based on joint learning described in the above embodiment, Fig.10 The structure schematic block diagram of the personalized model training device based on joint learning provided by the embodiment of the present application is shown, and the device can be applied to a server. For the convenience of explanation, only the part related to the embodiment of the present application is shown.
[0256] See also Fig.10 , the device may include:
[0257] The first user service data acquisition module 101 is used to acquire the first user service data uploaded by the client device;
[0258] A transmission module, configured to construct a clustering prior model according to the first user service data, and transmit the clustering prior model and the personalized model to the client device to instruct the client device to train the personalized model according to the clustering prior model, the first user service data and the user privacy data;
[0259] The model update information acquisition module 102 is used to acquire the model update information of the personalized model uploaded by the client device;
[0260] The updating module 103 is used to update the personalized model on the cloud side according to the model update information, obtain a global personalized model, and transmit the global personalized model to the client device.
[0261] In a possible implementation, the model update information is a gradient, and the above update module is specifically used to:
[0262] Adjust the learning rate of the global personalized model based on the gradient;
[0263] The personalized recommendation model on the cloud side is updated according to the adjusted learning rate to obtain a global personalized model.
[0264] In a possible implementation, the transmission module is specifically used to:
[0265] Use the clustering model to analyze the first user service data to obtain a clustering prior model;
[0266] According to the clustering prior model, initialize the personalized model corresponding to the clustering prior model;
[0267] The initialized personalization model and clustering prior model are transmitted to the client device.
[0268] The above-mentioned personalized model training device based on joint learning has the function of implementing the above-mentioned personalized model training method based on joint learning. This function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above-mentioned functions, and the modules can be software and / or hardware.
[0269] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / modules are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0270] Fig.11 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Fig.11 As shown, the electronic device 11 of this embodiment includes: at least one processor 110, a memory 111, and a computer program 112 stored in the memory 111 and executable on the at least one processor 110, and when the processor 110 executes the computer program 112, the steps in any of the above-mentioned method embodiments are implemented.
[0271] The electronic device 11 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The electronic device may include, but is not limited to, a processor 110 and a memory 111. Those skilled in the art will appreciate that Fig.11 It is only an example of the electronic device 11 and does not constitute a limitation on the electronic device 11. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.
[0272] The processor 110 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0273] In some embodiments, the memory 111 may be an internal storage unit of the electronic device 11, such as a hard disk or memory of the electronic device 11. In other embodiments, the memory 111 may also be an external storage device of the electronic device 11, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 11. Further, the memory 111 may also include both an internal storage unit of the electronic device 11 and an external storage device. The memory 111 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program. The memory 111 may also be used to temporarily store data that has been output or is to be output.
[0274] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0275] The embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0276] An embodiment of the present application provides a computer program product. When the computer program product runs on an electronic device, the electronic device can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0277] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0278] Finally, it should be noted that the above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A personalized model training method based on joint learning, characterized in that: include: The client device uploads the first user service data to the server to instruct the server to build a clustering prior model according to the first user service data; The client device obtains the clustering prior model and the personalized model transmitted by the server; The client device determines, according to the clustering prior model, a personalized model to which the first user service data belongs; The client device trains the personalized model to which the first user service data belongs according to the first user service data and the user privacy data, and obtains a local personalized model and model update information; The client device uploads the model update information to the server to instruct the server to update the personalized model on the cloud side according to the model update information to obtain a global personalized model; The client device receives the global personalization model transmitted by the server.
2. The method according to claim 1, characterized in that: After the client device receives the global personalization model transmitted by the server, the method further includes: The client device updates the model according to the global personalized model and the local personalized model to obtain a target personalized model for prediction.
3. The method according to claim 2, characterized in that The client device performs model updating according to the global personalized model and the local personalized model to obtain a target personalized model for prediction, including: The client device fuses the global personalized model and the local personalized model by using an exponential weighted average method to obtain the target personalized model.
4. The method according to claim 2, characterized in that: After the client device updates the model according to the global personalized model and the local personalized model to obtain a target personalized model for prediction, the method further includes: The client device obtains the second user service data; The client device uses a local priori model to determine a target personalized model to which the second user service data belongs; The client device concatenates the second user service data and the user privacy data to obtain data to be predicted; The client device predicts, according to the data to be predicted, using the target personalized model to which the second user service data belongs, to obtain a prediction result of the target personalized model; The client device obtains personalized recommendation results according to the prediction results.
5. The method according to claim 1, characterized in that The client device trains the personalized model to which the first user service data belongs according to the first user service data and the user privacy data to obtain a local personalized model and model update information, including: The client device concatenates the first user service data and the user privacy data to obtain training data; The client device uses the training data to train the personalized model to which the first user service data belongs, and obtains the local personalized model and the model update information.
6. The method according to claim 4, characterized in that The model update information is a gradient.
7. A personalized model training method based on joint learning, characterized in that: include: The server obtains the first user service data uploaded by the client device; The server constructs a clustering priori model according to the first user service data, and transmits the clustering priori model and the personalized model to the client device, so as to instruct the client device to determine the personalized model to which the first user service data belongs according to the clustering priori model, and then train the personalized model to which the first user service data belongs according to the first user service data and the user privacy data to obtain model update information; The server obtains model update information of the personalized model uploaded by the client device; The server updates the personalized model on the cloud side according to the model update information to obtain a global personalized model, and transmits the global personalized model to the client device.
8. The method according to claim 7, characterized in that The model update information is a gradient, and the server updates the personalized model on the cloud side according to the model update information to obtain a global personalized model, including: The server adjusts the learning rate of the global personalized model according to the gradient; The server updates the personalized recommendation model on the cloud side according to the adjusted learning rate to obtain the global personalized model.
9. The method according to claim 7 or 8, characterized in that: The server constructs a clustering priori model according to the first user service data, and transmits the clustering priori model and the personalized model to the client device, including: The server uses a clustering model to analyze the first user service data to obtain a clustering prior model; The server initializes the personalized model corresponding to the clustering prior model according to the clustering prior model; The server transmits the initialized personalized model and the clustering prior model to the client device.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 6 or 7 to 9 is implemented.
11. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 or 7 to 9 is implemented.
