Information recommendation and model training method and device, equipment and storage medium
Patent Information
- Application Number
- CN202211393997.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-08
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2042-11-08
AI Technical Summary
[0014]应当理解,本部分所描述的内容并非旨在标识本公开的实施例的关键或重要特征,也不用于限制本公开的范围。本公开的其它特征将通过以下的说明书而变得容易理解。
Smart Images

Figure CN116127179B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, specifically to the fields of federated learning, deep learning, intelligent recommendation, and information security, and particularly to an information recommendation and model training method, apparatus, device, and storage medium. Background Technology
[0002] Federated Learning (FL) is an emerging foundational technology in artificial intelligence. Its design goal is to enable efficient machine learning among multiple participants or computing nodes while ensuring information security during big data exchange, protecting terminal and personal data privacy, and guaranteeing legal compliance. Recommendation systems (RS) utilize users' various knowledge and data to generate personalized recommendations. Recommendation systems can be implemented based on recommendation models. Summary of the Invention
[0003] This disclosure provides an information recommendation and model training method, apparatus, device, and storage medium.
[0004] According to one aspect of this disclosure, a training method for an information recommendation model is provided. The model includes a first network and a second network. The first network is deployed on a first client, and the second network is deployed on a second client. The method is applied to the first client and includes: using the first network to extract features from first object information to obtain first semantic features; encrypting the first semantic features to obtain a first set of encrypted information; based on the first set of encrypted information, obtaining a similarity between the first semantic features and a second semantic feature, wherein the second semantic feature is obtained by the second client using the second network to extract features from second object information; and adjusting the model parameters of the first network based on the similarity.
[0005] According to another aspect of this disclosure, a training method for an information recommendation model is provided. The model includes a first network and a second network. The first network is deployed on a first client, and the second network is deployed on a second client. The method is applied to a server. The method includes: receiving a first set of encrypted information sent by the first client; wherein the first set of encrypted information is obtained by the first client after encrypting a first semantic feature, and the first semantic feature is obtained by the first client after extracting features from first object information using the first network; receiving a second set of encrypted information sent by the second client; wherein the second set of encrypted information is obtained by the second client after encrypting a second semantic feature, and the second semantic feature is obtained by the second client after extracting features from second object information using the second network; determining a similarity between the first semantic feature and the second semantic feature based on the first set of encrypted information and the second set of encrypted information; sending the similarity to the first client and the second client, wherein the first client is used to adjust the model parameters of the first network based on the similarity, and the second client is used to adjust the model parameters of the second network based on the similarity.
[0006] According to another aspect of this disclosure, an information recommendation method is provided, comprising: acquiring first object information of a first object and second object information of at least one second object; processing the first object information and the second object information using an information recommendation model to obtain a first semantic feature and a second semantic feature; determining the similarity between the first semantic feature and the second semantic feature; determining recommended information in the at least one second object based on the similarity and displaying it to the first object; wherein the information recommendation model is obtained using the training method described in any of the preceding aspects.
[0007] According to another aspect of this disclosure, a training apparatus for an information recommendation model is provided. The model includes a first network and a second network. The first network is deployed on a first client, and the second network is deployed on a second client. The apparatus is applied to the first client and includes: an extraction module for extracting features from first object information using the first network to obtain first semantic features; an encryption module for encrypting the first semantic features to obtain a first set of encrypted information; an acquisition module for acquiring a similarity between the first semantic features and a second semantic feature based on the first set of encrypted information, wherein the second semantic feature is obtained by the second client after extracting features from second object information using the second network; and an adjustment module for adjusting the model parameters of the first network based on the similarity.
[0008] According to another aspect of this disclosure, a training apparatus for an information recommendation model is provided. The model includes a first network and a second network. The first network is deployed on a first client, and the second network is deployed on a second client. The apparatus is applied to a server. The apparatus includes: a first receiving module for receiving a first set of encrypted information sent by the first client; wherein the first set of encrypted information is obtained by the first client after encrypting a first semantic feature, and the first semantic feature is obtained by the first client after extracting features from first object information using the first network; a second receiving module for receiving a second set of encrypted information sent by the second client; wherein the second set of encrypted information is obtained by the second client after encrypting a second semantic feature, and the second semantic feature is obtained by the second client after extracting features from second object information using the second network; a determining module for determining the similarity between the first semantic feature and the second semantic feature based on the first set of encrypted information and the second set of encrypted information; and a sending module for sending the similarity to the first client and the second client, wherein the first client is used to adjust the model parameters of the first network based on the similarity, and the second client is used to adjust the model parameters of the second network based on the similarity.
[0009] According to another aspect of this disclosure, an information recommendation apparatus is provided, comprising: an acquisition module for acquiring first object information of a first object and second object information of at least one second object; an extraction module for processing the first object information and the second object information using an information recommendation model to obtain a first semantic feature and a second semantic feature; a determination module for determining the similarity between the first semantic feature and the second semantic feature; and a display module for determining recommended information in the at least one second object based on the similarity and displaying it to the first object; wherein the information recommendation model is obtained using the training method described in any of the preceding aspects.
[0010] According to another aspect of this disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to said at least one processor; wherein the memory stores instructions executable by said at least one processor, said instructions being executed by said at least one processor to enable said at least one processor to perform the method as described in any of the foregoing aspects.
[0011] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are configured to cause the computer to perform the method according to any of the preceding aspects.
[0012] According to another aspect of this disclosure, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the method according to any of the preceding aspects.
[0013] According to the technical solution disclosed herein, it is possible to realize an information recommendation model trained based on vertical federated learning and the corresponding information recommendation.
[0014] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0015] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:
[0016] Figure 1 This is a schematic diagram based on the first embodiment of the present disclosure;
[0017] Figure 2 This is a schematic diagram according to the second embodiment of the present disclosure;
[0018] Figure 3 This is a schematic diagram illustrating an application scenario provided according to embodiments of this disclosure;
[0019] Figure 4 This is a schematic diagram of the structure of the information recommendation model provided in the embodiments of this disclosure;
[0020] Figure 5 This is a schematic diagram according to the third embodiment of the present disclosure;
[0021] Figure 6 This is a schematic diagram according to the fourth embodiment of the present disclosure;
[0022] Figure 7 This is a schematic diagram according to the fifth embodiment of the present disclosure;
[0023] Figure 8 This is a schematic diagram according to the sixth embodiment of the present disclosure;
[0024] Figure 9 This is a schematic diagram according to the seventh embodiment of the present disclosure;
[0025] Figure 10 This is a schematic diagram of an electronic device used to implement the training method or information recommendation method of the information recommendation model in the embodiments of this disclosure. Detailed Implementation
[0026] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0027] Federated learning can be divided into horizontal federated learning and vertical federated learning. Horizontal federated learning, also known as sample-based federated learning, has less overlap in samples across different users (clients) but the same features. Vertical federated learning, also known as feature-based federated learning, has more overlap in samples across different users (clients) but the different features.
[0028] Specifically in the recommendation field, taking ad recommendation for users as an example, horizontal federated learning can deploy information recommendation models on each client. The input of the information recommendation model includes user information and ad information, and the user information and ad information have the same characteristics on different clients. For example, on different clients, the user information includes information with the same characteristics such as age and gender, and the ad information includes information with the same characteristics such as type and click-through rate.
[0029] In vertical federated learning, different clients provide samples of different categories; for example, client A provides user information and client B provides advertising information.
[0030] Among related technologies, there is a lack of solutions based on training information recommendation models using vertical federated learning.
[0031] The embodiments disclosed herein are primarily aimed at recommendation models based on information trained through vertical federated learning.
[0032] Figure 1 Based on a schematic diagram of the first embodiment of this disclosure, this embodiment provides a training method for an information recommendation model. The model includes a first network and a second network. The first network is deployed on a first client, and the second network is deployed on a second client. The method is applied to the first client, and the method includes:
[0033] 101. Using the first network, feature extraction is performed on the first object information to obtain the first semantic feature.
[0034] 102. Encrypt the first semantic feature to obtain the first set of encrypted information.
[0035] 103. Based on the first set of encrypted information, obtain the similarity between the first semantic feature and the second semantic feature, wherein the second semantic feature is obtained by the second client after extracting features from the second object information using the second network.
[0036] 104. Receive the similarity score sent by the server, and adjust the model parameters of the first network based on the similarity score.
[0037] This embodiment can be applied in the field of information recommendation, such as recommending advertisements to users.
[0038] The information recommendation model in this embodiment can be trained based on longitudinal federated learning.
[0039] The overall system of vertical federated learning can include a first client, a second client, and a server. Clients can also be called participants, and servers can be called coordinators. The first and second clients provide different types of information; for example, the first client provides user information, and the second client provides advertising information.
[0040] The execution flow of the first client and the second client is similar. This embodiment takes the execution of the first client as an example, and the second client can be executed in the same way.
[0041] The first object information is information provided by the first client, such as user information.
[0042] The second object information is information provided by the second client, such as advertising information.
[0043] In vertical federated learning, the information recommendation model, consisting of a first network and a second network, is deployed on different clients. For example, the first network is deployed on the first client, and the second network on the second client. After training on the first and second clients, the final first network and the final second network are obtained. These two networks then form the final information recommendation model. During the inference phase, this final information recommendation model can be used to recommend information, such as recommending advertisements to users.
[0044] The first client can use the first network deployed on it to extract features from the information of the first object in order to obtain the first semantic features.
[0045] The second client can use the second network deployed on it to extract features from the second object information in order to obtain second semantic features.
[0046] During model training, it is necessary to calculate the similarity between the first semantic feature and the second semantic feature. This similarity can be called the predicted similarity. In addition, the true similarity (which can be pre-labeled) can also be obtained. A loss function is constructed based on the predicted similarity and the true similarity. Then, based on the loss function, the backpropagation (BP) algorithm is used to calculate the model parameters of the locally deployed network (first network or second network) until the preset termination condition is met (such as reaching a preset number of iterations or meeting a preset convergence condition) to obtain the final model parameters of the locally deployed network. That is, the first client obtains the final first network, and the second client obtains the final second network.
[0047] Since the first semantic feature (such as user embedding feature) and the second semantic feature (such as ad embedding feature) are not provided by the same client during vertical federated learning, similarity can be calculated based on a unified server in order to complete the similarity calculation.
[0048] For security reasons, neither the first client nor the second client will directly send the first semantic feature or the second semantic feature to the server. In this embodiment, the first semantic feature and the second semantic feature need to be encrypted before the encrypted information is sent to the server.
[0049] The encrypted information obtained by the first client after encrypting the first semantic feature can be referred to as the first set of encrypted information. The first set of encrypted information may include one or more encrypted information. Further, referring to subsequent embodiments, the first set of encrypted information may include two, which can be referred to as the first encrypted information and the second encrypted information, denoted as p. X and m X .
[0050] The encrypted information obtained by the second client after encrypting the second semantic feature can be referred to as the second set of encrypted information. The second set of encrypted information may include one or more encrypted information. Further, referring to subsequent embodiments, the second set of encrypted information may include two, which can be referred to as the third encrypted information and the fourth encrypted information, respectively, denoted as p. Y and m Y .
[0051] In this embodiment, the first client can obtain the similarity between the first semantic feature and the second semantic feature based on the first set of encrypted information.
[0052] For example, a first client can send a first set of encrypted information to the server, and a second client can send a second set of encrypted information to the server. After receiving the first and second sets of encrypted information, the server can calculate the similarity between the first and second semantic features based on these two sets of encrypted information. The first semantic feature can be represented by X, the second semantic feature by Y, and the similarity between them can be expressed as cosine similarity. XY express.
[0053] The server can then send the similarity score to the first client and the second client respectively.
[0054] Taking the first client as an example, after receiving the similarity, the first client can construct a loss function based on the similarity and the pre-labeled real similarity, and then adjust the model parameters of the first network based on the loss function until the preset termination condition is met to obtain the final model parameters of the first network.
[0055] Similarly, the second client can construct a loss function based on the received similarity and the real similarity pre-labeled by the second client, and then adjust the model parameters of the second network based on the loss function until the preset termination condition is met to obtain the final model parameters of the second network.
[0056] In addition, the information recommendation model includes a first network and a second network, meaning that the final model parameters of the information recommendation model include the final model parameters of the first network and the final model parameters of the second network.
[0057] In this embodiment, by encrypting the first semantic feature and obtaining the similarity based on the first set of encrypted information, the security of client data can be guaranteed, and a recommendation model based on vertical federated learning can be implemented.
[0058] The above explanation uses client-side execution as an example. The server-side execution flow can be as follows.
[0059] Figure 2 This is a schematic diagram based on the second embodiment of the present disclosure. This embodiment provides a training method for an information recommendation model. The model includes a first network and a second network. The first network is deployed on a first client, and the second network is deployed on a second client. The method is applied to a server and includes:
[0060] 201. Receive the first set of encrypted information sent by the first client; wherein the first set of encrypted information is obtained by the first client after encrypting the first semantic feature, and the first semantic feature is obtained by the first client after extracting features from the first object information using the first network.
[0061] 202. Receive the second set of encrypted information sent by the second client; wherein the second set of encrypted information is obtained by the second client after encrypting the second semantic feature, and the second semantic feature is obtained by the second client after extracting features from the second object information using the second network.
[0062] 203. Based on the first set of encrypted information and the second set of encrypted information, determine the similarity between the first semantic feature and the second semantic feature.
[0063] 204. The similarity is sent to the first client and the second client. The first client is used to adjust the model parameters of the first network based on the similarity, and the second client is used to adjust the model parameters of the second network based on the similarity.
[0064] This embodiment can be applied in the field of information recommendation, such as recommending advertisements to users.
[0065] The information recommendation model in this embodiment can be trained based on longitudinal federated learning.
[0066] The overall system of vertical federated learning can include a first client, a second client, and a server. Clients can also be called participants, and servers can be called coordinators. The first and second clients provide different types of information; for example, the first client provides user information, and the second client provides advertising information.
[0067] This embodiment can be applied to the server side of vertical federated learning.
[0068] In vertical federated learning, the information recommendation model, consisting of a first network and a second network, is deployed on different clients. For example, the first network is deployed on the first client, and the second network on the second client. After training on the first and second clients, the final first network and the final second network are obtained. These two networks then form the final information recommendation model. During the inference phase, this final information recommendation model can be used to recommend information, such as recommending advertisements to users.
[0069] The first client can use the first network deployed on it to extract features from the information of the first object in order to obtain the first semantic features.
[0070] The second client can use the second network deployed on it to extract features from the second object information in order to obtain second semantic features.
[0071] The first object information is the information provided by the first client, such as user information, and the corresponding first semantic feature can be called the user embedding feature.
[0072] The second object information is information provided by the second client, such as advertising information. The corresponding second semantic feature can be called advertising embedding feature.
[0073] For security reasons, neither the first client nor the second client will directly send the first semantic feature or the second semantic feature to the server. In this embodiment, the first semantic feature and the second semantic feature need to be encrypted before the encrypted information is sent to the server.
[0074] Therefore, the server will receive the first set of encrypted information sent by the first client and the second set of encrypted information sent by the second client. The 201-202 statements mentioned above have no timing restrictions.
[0075] The server can calculate the similarity based on the two sets of encrypted information mentioned above, and send the similarity to the first client and the second client. The first client and the second client can then construct a loss function based on the similarity and their own pre-labeled true similarity, and adjust their respective model parameters based on the loss function to obtain the final information recommendation model.
[0076] In this embodiment, by receiving the first set of encrypted information and the second set of encrypted information, since they are not direct first and second semantic features, the security of client data can be guaranteed, and the training of the information recommendation model based on vertical federated learning can be realized.
[0077] To better understand the embodiments of this disclosure, the application scenarios to which the embodiments of this disclosure are applicable are described below.
[0078] like Figure 3 As shown, the overall architecture of vertical federated learning can include a first client 301, a second client 302, and a server 303. The clients (first client and second client) can be deployed on their respective user terminals, and the server can be deployed on a server. The user terminals can be personal computers, laptops, mobile devices (such as mobile phones), etc., and the servers can be local servers or cloud servers, and can be centralized servers or distributed servers.
[0079] In a vertical federated learning scenario, different clients provide different information. For example... Figure 3 As shown, assume that a first client provides first object information (such as user information), and a second client provides second object information (such as advertising information). The information recommendation model may include a first network and a second network, and the first network and the second network are deployed on different clients. Figure 3 Taking the example of deploying the first network on the first client and the second network on the second client.
[0080] For the first client, the first client uses the first network to extract semantic features of the first object information to obtain first semantic features. To ensure data security, the first client also encrypts the first semantic features to obtain a first set of encrypted information. Then, the first client can send the first set of encrypted information to the server.
[0081] For the second client, the second client uses the second network to extract semantic features of the second object information to obtain second semantic features. To ensure data security, the second client also encrypts the second semantic features to obtain a second set of encrypted information. Afterwards, the second client can send the first set of encrypted information to the server.
[0082] Taking the first set of encrypted information as an example, for the first client, it may include: obtaining the first set of encryption keys; using the first set of encryption keys to encrypt the first semantic feature to obtain the first set of encrypted information.
[0083] In this embodiment, encryption is performed based on an encryption key, which reduces the implementation complexity.
[0084] Information recommendation models are deep neural network models, taking the Deep Structured Semantic Model (DSSM) as an example.
[0085] like Figure 4 As shown, DSSM can include an input layer, a representation layer, and a matching layer.
[0086] The input layer is used to convert input information into input features, such as converting user information into user input features and advertising information into advertising input features.
[0087] Taking the user side as an example, the advertising side can follow the same approach. The input layer can use an encoding module to encode user information to obtain encoded features, and then obtain input features based on the encoded features.
[0088] If the user information has multiple categories, such as Figure 4As shown, taking user information, which includes both dense and sparse user features, as an example, different encoding methods can be used for different categories of user information. For instance, one-hot encoding can be used for dense user features, while embedding encoding can be used for sparse user features. The specific information used can be selected according to actual needs. For example, age group information (child, youth, middle-aged, or elderly) can be selected as dense user features, and province information can be selected as sparse user features. Since this is applied in horizontal federated learning, the user information features selected by different clients need to be the same, i.e., all clients should select age group information and province information.
[0089] If the user information is a single category, the encoded feature can be used as the input feature. Alternatively, if the user information is multiple categories, such as the two categories mentioned above, the encoded features corresponding to the two categories can be concatenated and used as the input feature. For example, if one feature is [0,1] and the other feature is [1,1], the concatenated feature will be [0,1,1,1].
[0090] The representation layer is used to convert input features into semantic features (or embedding features), such as converting user input features into user embeddings and advertising input features into advertising embeddings.
[0091] Taking the user side as an example, the advertising side can follow the same approach. The representation layer can include two fully connected layers and one user embedding layer. After processing by these layers, user input features can be transformed into user embedding features.
[0092] The matching layer is used to calculate the similarity between user embedded features and ad embedded features, for example, by using cosine similarity or other methods.
[0093] In addition, the similarity calculated during the training phase can be called the predicted similarity. Then, a loss function, such as a binary classification loss function, can be constructed based on the predicted similarity and the true similarity (which can be pre-labeled), and the model can be trained based on the loss function.
[0094] During model training, the model parameters are adjusted until a preset termination condition is reached. The model parameters at the point where the preset termination condition is reached are then used as the final model parameters. The preset termination condition may be, for example, a preset number of iterations or the fulfillment of a preset convergence condition.
[0095] When adjusting model parameters, you can specifically adjust the model parameters of the representation layer (which includes two fully connected layers and one embedding layer), or you can adjust the model parameters of the representation layer and the input layer.
[0096] DSSM is a dual-tower model that uses two independent networks to obtain user embedding features and ad embedding features respectively.
[0097] Taking adjusting the model parameters of the presentation layer as an example, it can specifically involve adjusting the model parameters of the user-side presentation layer and the model parameters of the advertising-side presentation layer.
[0098] Correspondingly, the user-side presentation layer can be called the first network, and the advertising-side presentation layer can be called the second network.
[0099] Understandably, if the model parameters of the input layer also need to be learned, then the first network includes a user-side representation layer and a user-side input layer, and the second network includes an ad-side representation layer and an ad-side input layer.
[0100] In vertical federated recommendation, different clients provide different object information and deploy different feature extraction networks, such as... Figure 4 The first network shown is deployed on the first client. Figure 4 The second network shown is deployed on the second client.
[0101] like Figure 4 As shown, the overall architecture also includes a matching layer, which needs to calculate the similarity between the first semantic feature (such as user embedding feature) and the second semantic feature (such as advertisement embedding feature).
[0102] During vertical federated recommendation, the similarity can be calculated by the server. For security reasons, the first client encrypts the first semantic feature to obtain the first set of encrypted information and sends the first set of encrypted information to the server; the second client encrypts the second semantic feature to obtain the second set of encrypted information and sends the second set of encrypted information to the server.
[0103] The server calculates the similarity based on the first and second sets of encrypted information using a cosine similarity algorithm or other algorithms.
[0104] After the server calculates the similarity, this calculated similarity can be called the predicted similarity. The predicted similarity is then sent to the first client and the second client.
[0105] Two clients can construct loss functions based on predicted similarity and true similarity, respectively. They can then use the backpropagation algorithm to adjust the model parameters of their respective networks (the first network or the second network) based on the loss functions, thereby obtaining the final model parameters of the information recommendation model, which includes the final model parameters of the first network and the final model parameters of the second network.
[0106] Once the final model parameters are obtained, the model with the final model parameters can be used in the inference stage to recommend information to users.
[0107] During the inference stage, taking the recommended information as an advertisement as an example, the final recommended advertisement can be obtained based on the calculated similarity. For example, if multiple candidate advertisements are stored in the database, the similarity between the user and each candidate advertisement can be calculated based on the user's embedding features and the advertisement's embedding features. Then, the advertisement with the highest similarity (or a relatively high preset number) is selected as the final recommended advertisement.
[0108] In conjunction with the above application scenarios, this disclosure also provides a training method for an information recommendation model.
[0109] Figure 5 Based on the schematic diagram of the third embodiment of this disclosure, this embodiment provides a training method for an information recommendation model, which includes:
[0110] 501. The first client and the second client determine the random number seed.
[0111] The random number seed s can be determined based on the key exchange (Diffie-Hellman, DH) protocol.
[0112] In this embodiment, since vertical federated learning is performed based on the DH protocol, the corresponding recommendation algorithm can be called the DH Vertical Federated Recommender (DHVHR).
[0113] Based on the DH protocol, the first client and the second client can determine the same random number seed.
[0114] In this embodiment, the random number seed is determined based on the DH protocol. Compared to other protocols such as SPDZ, this method is simpler to implement and reduces implementation complexity. SPDZ is a protocol framework for Secure Multi-Party Computation (MPC), which achieves secure multi-party computation based on homomorphic encryption, secret sharing, and other technologies. Furthermore, this method is applicable to various similarity calculation methods such as Pearson, Cosine, Euclidean Distance, and Manhattan Distance, demonstrating good scalability.
[0115] 502. The first client and the second client generate a first random number R and a second random number r based on the random number seed s.
[0116] The dimension of the random number is the same as the dimension of the first semantic feature and the second semantic feature. For example, if both the first semantic feature and the second semantic feature are n-dimensional, then n random numbers are randomly generated using a random number seed s, and these n random numbers form the first random number.
[0117] Alternatively, a random number seed s can be used to generate another random number, which can then be used as the second random number r.
[0118] The random number seed refers to the initial value used in the pseudo-random number generator to generate pseudo-random numbers. Based on the same random number seed, different clients can generate the same random numbers; that is, the first random number and the second random number generated by the first client and the second client are the same.
[0119] In this embodiment, random numbers are generated based on a random number seed. The same first random number and second random number can be generated on the first client and the second client. Using the same random number can ensure the accuracy of subsequent similarity calculations, thereby improving the accuracy of the model.
[0120] 503. The first client uses the first network to extract features from user information to obtain the first semantic feature X.
[0121] Similarly, the second client uses a second network to extract features from the advertising information to obtain a second semantic feature Y.
[0122] The first semantic feature can also be called the user embedding feature, see reference. Figure 4 If the first network refers to the representation layer, then the user information refers to the user information after being processed by the input layer. The input layer is predetermined, and its output can be called the user input features. Then the first network (the user-side representation layer) can be used to extract features from the user input features to obtain the user embedded features.
[0123] The processing flow for the second client is similar.
[0124] There are no timing restrictions between 502 and 503.
[0125] 504. The first client uses the first random number to perform a first preset processing on the first semantic feature to obtain the first encrypted information.
[0126] The first preset processing is, for example, a multiplication operation, that is, the calculation formula for the first encrypted information can be:
[0127] p X =R*X
[0128] Where, p X This is the first encrypted information;
[0129] R is the first random number;
[0130] X is the first semantic feature.
[0131] 505. The first client uses the second random number to perform a second preset processing on the L2 norm of the first semantic feature to obtain the second encrypted information.
[0132] The second preset processing can also be a multiplication operation, that is, the calculation formula for the second encrypted information can be:
[0133] m X =r*||X||2
[0134] Where, m X It is the second encrypted information;
[0135] r is the second random number;
[0136] X is the first semantic feature;
[0137] ||X||2 is the L2 norm of the first semantic feature, that is, X is an n-dimensional vector, and the L2 norm of X is the square root of the sum of squares of the elements in the vector.
[0138] There are no timing restrictions between 504 and 505.
[0139] The above describes the processing flow for the first client. For the second client, the processing principle is similar, but the specific calculation method is the reverse of that for the first client.
[0140] That is, if the first preset processing corresponding to the first client is the multiplication operation of R and X, then the second client can be the multiplication operation of the inverse factor of R (i.e., 1 / R) and Y (the second semantic feature);
[0141] The second preset processing corresponding to the first client is the multiplication operation of r with ||X||2. Then the second client can be the multiplication operation of the inverse factor of r (1 / r) with ||Y||2 (the L2 norm of the second semantic feature).
[0142] In addition, for the first client, the first encrypted information p X Second encrypted information m X This can form the first set of encrypted information; for the second client, the third encrypted information p Y and the fourth encrypted information m Y This can be used to form a second set of encrypted information.
[0143] In this embodiment, the first semantic feature is encrypted using a first random number to obtain the first encrypted information, and the L2 norm of the first semantic feature is encrypted using a second random number to obtain the second encrypted information. Since the similarity between the first semantic feature and the second semantic feature is related to the first semantic feature and the L2 norm of the first semantic feature, the server can calculate the similarity based on the first encrypted information and the second encrypted information. Furthermore, the data security can be guaranteed after encryption.
[0144] 506. The first client sends the first set of encrypted information to the server, and the second client sends the second set of encrypted information to the server.
[0145] 507. On the server side, based on the first set of encrypted information and the second set of encrypted information, calculate the similarity between the first semantic feature and the second semantic feature.
[0146] The first set of encrypted information includes the first encrypted information p. X Second encrypted information m X The first encrypted information is obtained by encrypting the first semantic feature using a first random number, and the second encrypted information is obtained by encrypting the L2 norm of the first semantic feature using a second random number.
[0147] The second set of encrypted information includes the third encrypted information p. Y and the fourth encrypted information m Y The third encrypted information is obtained by encrypting the second semantic feature using the first random number, and the fourth encrypted information is obtained by encrypting the L2 norm of the second semantic feature using the second random number.
[0148] Accordingly, the server can calculate a first parameter based on the first encrypted information and the third encrypted information; calculate a second parameter based on the second encrypted information and the fourth encrypted information; and calculate the similarity based on the first parameter and the second parameter.
[0149] Taking the calculation of cosine similarity, where both the first and second semantic features are n-dimensional row vectors, as an example, the cosine similarity between the two is... XY The calculation formula is:
[0150]
[0151] Where, x i It is the i-th element in X;
[0152] y i It is the i-th element in Y;
[0153] The superscript T indicates the transpose operation, such as Y. T It is the transpose of Y.
[0154] In addition, due to
[0155]
[0156] therefore,
[0157] Therefore, the server can calculate the aforementioned similarity based on the first set of encrypted information and the second set of encrypted information.
[0158] In this embodiment, the similarity between the first semantic feature and the second semantic feature can be calculated based on the encrypted information. Since the calculation is based on the encrypted information, data security can be guaranteed, and the calculation of similarity based on vertical federated learning can be realized, thereby completing the training of the information recommendation model based on vertical federated learning.
[0159] 508. The server sends the similarity score to the first client and the second client.
[0160] 509. First client, adjusts the model parameters of the first network based on similarity.
[0161] Similarly, the second client adjusts the model parameters of the second network based on similarity.
[0162] Taking the first client as an example, after receiving the similarity, the first client can construct a loss function based on the similarity and the pre-labeled real similarity, and then adjust the model parameters of the first network based on the loss function until the preset termination condition is met to obtain the final model parameters of the first network.
[0163] Similarly, the second client can construct a loss function based on the received similarity and the real similarity pre-labeled by the second client, and then adjust the model parameters of the second network based on the loss function until the preset termination condition is met to obtain the final model parameters of the second network.
[0164] In addition, the information recommendation model includes a first network and a second network, meaning that the final model parameters of the information recommendation model include the final model parameters of the first network and the final model parameters of the second network.
[0165] In this embodiment, a random number seed is generated based on the DH protocol, a random number is generated based on the random number seed, and then the semantic features are encrypted based on the random number. Since the DH protocol has the advantages of low time and space complexity and good universality, this embodiment can reduce the implementation complexity and has strong versatility. In addition, each client transmits the encrypted information to the server instead of the semantic features themselves, which can ensure data security and realize the training of the information recommendation model based on vertical federated learning.
[0166] The above embodiments describe the model training process. Through the above training process, an information recommendation model can be obtained, and information recommendation can be performed based on this information recommendation model.
[0167] Figure 6 This is a schematic diagram based on the fourth embodiment of the present disclosure. This embodiment provides an information recommendation method, including:
[0168] 601. Obtain the first object information of the first object and the second object information of at least one second object.
[0169] In this context, the first object is, for example, a user, and the second object is, for example, an advertisement. Accordingly, the information of the first object is, for example, user information, and the information of the second object is, for example, advertisement information.
[0170] Further, see Figure 4 User information can include dense user feature information and sparse user feature information; advertising information can include dense advertising feature information and sparse advertising feature information.
[0171] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0172] 602. An information recommendation model is used to process the first object information and the second object information to obtain the first semantic feature and the second semantic feature.
[0173] The information recommendation model may include a first network and a second network. The first network may be used to extract first semantic features, and the second network may be used to extract second semantic features.
[0174] The information recommendation model can be generated using the training method shown in the above embodiments.
[0175] 603. Determine the similarity between the first semantic feature and the second semantic feature.
[0176] Similarity can be calculated using methods such as the cosine function.
[0177] 604. Based on the similarity, determine the recommendation information in the at least one second object and display it to the first object.
[0178] For example, the advertisements with the highest similarity (or a large preset number) can be selected as the final recommendations to users.
[0179] Since the above model training process is based on vertical federated learning, an information recommendation model based on vertical federated learning can be obtained. Using this model for information recommendation can realize information recommendation based on vertical federated learning, thus solving the problem of the lack of information recommendation based on vertical federated learning in related technologies.
[0180] Figure 7 This is a schematic diagram according to the fifth embodiment of the present disclosure. This embodiment provides a training device for an information recommendation model. The model includes a first network and a second network. The first network is deployed on a first client, and the second network is deployed on a second client. The device is applied to the first client. The device 700 includes: an extraction module 701, an encryption module 702, an acquisition module 703, and an adjustment module 704.
[0181] Extraction module 701 is used to extract features from first object information using the first network to obtain first semantic features;
[0182] Encryption module 702 is used to encrypt the first semantic feature to obtain a first set of encrypted information;
[0183] The acquisition module 703 is used to acquire the similarity between the first semantic feature and the second semantic feature based on the first set of encrypted information. The second semantic feature is obtained by the second client after extracting features from the second object information using the second network.
[0184] The adjustment module 704 is used to adjust the model parameters of the first network based on the similarity.
[0185] In this embodiment, by encrypting the first semantic feature and obtaining the similarity based on the first set of encrypted information obtained after encryption, the security of client data can be guaranteed, and a recommendation model based on vertical federated learning can be implemented.
[0186] In some embodiments, the acquisition module 703 is further configured to: send the first set of encrypted information to the server so that the server obtains the similarity based on the first set of encrypted information and the second set of encrypted information, wherein the second set of encrypted information is obtained by the second client after encrypting the second semantic feature; and receive the similarity sent by the server.
[0187] In this embodiment, by sending the first set of encrypted information and the second set of encrypted information to the server, the server can calculate the similarity based on the first set of encrypted information and the second set of encrypted information. This can solve the similarity calculation problem when the first semantic feature and the second semantic feature are not on the same client. Furthermore, since the client and the server transmit encrypted information, data security can be guaranteed.
[0188] In some embodiments, the encryption module 702 is further configured to: obtain a first set of encryption keys; and use the first set of encryption keys to encrypt the first semantic feature to obtain the first set of encrypted information.
[0189] In this embodiment, encryption is performed based on an encryption key, which reduces the implementation complexity.
[0190] In some embodiments, the first set of encryption keys includes: a first random number and a second random number; the encryption module 702 is further configured to: negotiate a random number seed with the second client; and generate the first random number and the second random number based on the random number seed.
[0191] In this embodiment, random numbers are generated based on a random number seed. The same first random number and second random number can be generated on the first client and the second client. Using the same random number can ensure the accuracy of subsequent similarity calculations, thereby improving the accuracy of the model.
[0192] In some embodiments, the first set of encryption keys includes: a first random number and a second random number; the first set of encryption information includes: first encryption information and second encryption information; the encryption module 702 is further configured to: use the first random number to perform a first preset processing on the first semantic feature to obtain the first encryption information; use the second random number to perform a second preset processing on the L2 norm of the first semantic feature to obtain the second encryption information.
[0193] In this embodiment, the first semantic feature is encrypted using a first random number to obtain the first encrypted information, and the L2 norm of the first semantic feature is encrypted using a second random number to obtain the second encrypted information. Since the similarity between the first semantic feature and the second semantic feature is related to the first semantic feature and the L2 norm of the first semantic feature, the server can calculate the similarity based on the first encrypted information and the second encrypted information. Furthermore, the data security can be guaranteed after encryption.
[0194] Figure 8This is a schematic diagram according to the sixth embodiment of the present disclosure. This embodiment provides a training device for an information recommendation model. The model includes a first network and a second network. The first network is deployed on a first client, and the second network is deployed on a second client. The device is applied to a server. The device 800 includes: a first receiving module 801, a second receiving module 802, a determining module 803, and a sending module 804.
[0195] The first receiving module 801 is used to receive a first set of encrypted information sent by the first client; wherein, the first set of encrypted information is obtained by the first client after encrypting a first semantic feature, and the first semantic feature is obtained by the first client after extracting features from the first object information using the first network;
[0196] The second receiving module 802 is used to receive the second set of encrypted information sent by the second client; wherein, the second set of encrypted information is obtained by the second client after encrypting the second semantic feature, and the second semantic feature is obtained by the second client after extracting features from the second object information using the second network;
[0197] The determining module 803 is used to determine the similarity between the first semantic feature and the second semantic feature based on the first set of encrypted information and the second set of encrypted information;
[0198] The sending module 804 is used to send the similarity to the first client and the second client. The first client is used to adjust the model parameters of the first network based on the similarity, and the second client is used to adjust the model parameters of the second network based on the similarity.
[0199] In this embodiment, by receiving the first set of encrypted information and the second set of encrypted information, since they are not direct first and second semantic features, the security of client data can be guaranteed, and the training of the information recommendation model based on vertical federated learning can be realized.
[0200] In some embodiments, the first set of encrypted information includes: first encrypted information and second encrypted information; wherein, the first encrypted information is obtained by encrypting the first semantic feature using a first random number, and the second encrypted information is obtained by encrypting the L2 norm of the first semantic feature using a second random number; the second set of encrypted information includes: third encrypted information and fourth encrypted information; wherein, the third encrypted information is obtained by encrypting the second semantic feature using the first random number, and the fourth encrypted information is obtained by encrypting the L2 norm of the second semantic feature using the second random number; the determining module 803 is further configured to: calculate a first parameter based on the first encrypted information and the third encrypted information; calculate a second parameter based on the second encrypted information and the fourth encrypted information; and calculate the similarity based on the first parameter and the second parameter.
[0201] In this embodiment, the similarity between the first semantic feature and the second semantic feature can be calculated based on the encrypted information. Since the calculation is based on the encrypted information, data security can be guaranteed, and the calculation of similarity based on vertical federated learning can be realized, thereby completing the training of the information recommendation model based on vertical federated learning.
[0202] Figure 9 The diagram is based on the seventh embodiment of the present disclosure. This embodiment provides an information recommendation device 900, which includes: an acquisition module 901, an extraction module 902, a determination module 903, and a display module 904.
[0203] The acquisition module 901 is used to acquire the first object information of the first object and the second object information of at least one second object;
[0204] Extraction module 902 is used to process the first object information and the second object information using an information recommendation model to obtain first semantic features and second semantic features;
[0205] The determining module 903 is used to determine the similarity between the first semantic feature and the second semantic feature;
[0206] The display module 904 is used to determine recommendation information in the at least one second object based on the similarity and display it to the first object;
[0207] The information recommendation model is obtained using the relevant training methods described in the above embodiments.
[0208] Since the above model training process is based on vertical federated learning, an information recommendation model based on vertical federated learning can be obtained. Using this model for information recommendation can realize information recommendation based on vertical federated learning, thus solving the problem of the lack of information recommendation based on vertical federated learning in related technologies.
[0209] It is understood that the same or similar content in different embodiments of this disclosure can be referred to each other.
[0210] It is understood that the terms "first" and "second" in the embodiments of this disclosure are only used for distinction and do not indicate the degree of importance or the order of events.
[0211] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0212] Figure 10 A schematic block diagram of an example electronic device 1000 that can be used to implement embodiments of the present disclosure is shown. The electronic device 1000 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, servers, blade servers, mainframe computers, and other suitable computers. The electronic device 1000 may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0213] like Figure 10 As shown, the electronic device 1000 includes a computing unit 1001, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1002 or a computer program loaded from a storage unit 1008 into a random access memory (RAM) 1003. The RAM 1003 may also store various programs and data required for the operation of the electronic device 1000. The computing unit 1001, ROM 1002, and RAM 1003 are interconnected via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.
[0214] Multiple components in electronic device 1000 are connected to I / O interface 1005, including: input unit 1006, such as keyboard, mouse, etc.; output unit 1007, such as various types of displays, speakers, etc.; storage unit 1008, such as disk, optical disk, etc.; and communication unit 1009, such as network card, modem, wireless transceiver, etc. Communication unit 1009 allows electronic device 1000 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0215] The computing unit 1001 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 1001 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1001 performs the various methods and processes described above, such as information recommendation and model training methods. For example, in some embodiments, the information recommendation and model training methods can be implemented as computer software programs tangibly contained in a machine-readable medium, such as storage unit 1008. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 1000 via ROM 1002 and / or communication unit 1009. When the computer program is loaded into RAM 1003 and executed by the computing unit 1001, one or more steps of the information recommendation and model training methods described above can be performed. Alternatively, in other embodiments, the computing unit 1001 may be configured to perform information recommendation and model training methods by any other suitable means (e.g., by means of firmware).
[0216] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0217] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable retrieval device, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0218] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0219] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0220] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0221] Computer systems can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. A server can be a cloud server, also known as a cloud computing server or cloud host, a hosting product within the cloud computing service ecosystem, addressing the shortcomings of traditional physical hosts and VPS (Virtual Private Server, or simply "VPS") services, such as high management difficulty and weak business scalability. Servers can also be servers for distributed systems or servers incorporating blockchain technology.
[0222] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0223] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A training method for an information recommendation model, the model comprising a first network and a second network, the first network being deployed on a first client, the second network being deployed on a second client, the method being applied to the first client based on longitudinal federated learning, the method comprising: The first network is used to extract features from the information of the first object to obtain the first semantic features; The first semantic feature is encrypted to obtain the first set of encrypted information; Obtaining the similarity between a first semantic feature and a second semantic feature based on the first set of encrypted information and the second set of encrypted information includes: sending the first set of encrypted information to a server so that the server obtains the similarity based on the first set of encrypted information and the second set of encrypted information, wherein the second set of encrypted information is obtained by the second client after encrypting the second semantic feature; receiving the similarity sent by the server; wherein the second semantic feature is obtained by the second client after extracting features from the second object information using the second network; The model parameters of the first network are adjusted based on the similarity. The first object information and the second object information are different categories of information, both including dense feature information and sparse feature information using different encoding methods; The first set of encrypted information includes first encrypted information and second encrypted information. The first encrypted information is obtained by multiplying a first random number with the first semantic feature, and the second encrypted information is obtained by multiplying a second random number with the L2 norm of the first semantic feature. The second set of encrypted information includes third encrypted information and fourth encrypted information. The third encrypted information is obtained by multiplying the inverse factor of the first random number with the second semantic feature, and the fourth encrypted information is obtained by multiplying the inverse factor of the second random number with the L2 norm of the second semantic feature. The first random number and the second random number are determined based on a random number seed, which is the same number determined by the first client and the second client based on a key exchange protocol.
2. A training method for an information recommendation model, the model comprising a first network and a second network, the first network being deployed on a first client and the second network being deployed on a second client, the method being applied to a server based on longitudinal federated learning, the method comprising: The system receives a first set of encrypted information sent by the first client; wherein the first set of encrypted information is obtained by the first client after encrypting a first semantic feature, and the first semantic feature is obtained by the first client after extracting features from the first object information using the first network; The system receives a second set of encrypted information sent by the second client; wherein the second set of encrypted information is obtained by the second client after encrypting the second semantic feature, and the second semantic feature is obtained by the second client after extracting features from the second object information using the second network; Based on the first set of encrypted information and the second set of encrypted information, the similarity between the first semantic feature and the second semantic feature is determined; The similarity is sent to the first client and the second client. The first client is used to adjust the model parameters of the first network based on the similarity, and the second client is used to adjust the model parameters of the second network based on the similarity. The first object information and the second object information are different categories of information, both including dense feature information and sparse feature information using different encoding methods; The first set of encrypted information includes first encrypted information and second encrypted information. The first encrypted information is obtained by multiplying a first random number with the first semantic feature, and the second encrypted information is obtained by multiplying a second random number with the L2 norm of the first semantic feature. The second set of encrypted information includes third encrypted information and fourth encrypted information. The third encrypted information is obtained by multiplying the inverse factor of the first random number with the second semantic feature, and the fourth encrypted information is obtained by multiplying the inverse factor of the second random number with the L2 norm of the second semantic feature. The first random number and the second random number are determined based on a random number seed, which is the same number determined by the first client and the second client based on a key exchange protocol.
3. The method according to claim 2, wherein, The step of determining the similarity between the first semantic feature and the second semantic feature based on the first set of encrypted information and the second set of encrypted information includes: Calculate the first parameter based on the first encrypted information and the third encrypted information; Calculate the second parameter based on the second encryption information and the fourth encryption information; The similarity is calculated based on the first parameter and the second parameter.
4. An information recommendation method, comprising: Obtain the first object information of the first object and the second object information of at least one second object; An information recommendation model is used to process the first object information and the second object information to obtain the first semantic feature and the second semantic feature; Determine the similarity between the first semantic feature and the second semantic feature; Based on the similarity, recommendation information is determined in the at least one second object and displayed to the first object; The information recommendation model is obtained using the training method described in any one of claims 1-3.
5. A training apparatus for an information recommendation model, the model comprising a first network and a second network, the first network being deployed on a first client, the second network being deployed on a second client, the apparatus being applied to the first client based on longitudinal federated learning, the apparatus comprising: The extraction module is used to extract features from the first object information using the first network to obtain first semantic features; An encryption module is used to encrypt the first semantic feature to obtain a first set of encrypted information; The acquisition module is used to acquire a similarity between a first semantic feature and a second semantic feature based on a first set of encrypted information and a second set of encrypted information, including: sending the first set of encrypted information to a server so that the server can obtain the similarity based on the first set of encrypted information and the second set of encrypted information, wherein the second set of encrypted information is obtained by the second client after encrypting the second semantic feature; receiving the similarity sent by the server; wherein the second semantic feature is obtained by the second client after extracting features from the second object information using the second network; An adjustment module is used to adjust the model parameters of the first network based on the similarity. The first object information and the second object information are different categories of information, both including dense feature information and sparse feature information using different encoding methods; The first set of encrypted information includes first encrypted information and second encrypted information. The first encrypted information is obtained by multiplying a first random number with the first semantic feature, and the second encrypted information is obtained by multiplying a second random number with the L2 norm of the first semantic feature. The second set of encrypted information includes third encrypted information and fourth encrypted information. The third encrypted information is obtained by multiplying the inverse factor of the first random number with the second semantic feature, and the fourth encrypted information is obtained by multiplying the inverse factor of the second random number with the L2 norm of the second semantic feature. The first random number and the second random number are determined based on a random number seed, which is the same number determined by the first client and the second client based on a key exchange protocol.
6. A training apparatus for an information recommendation model, the model comprising a first network and a second network, the first network being deployed on a first client and the second network being deployed on a second client, the apparatus being applied to a server based on longitudinal federated learning, the apparatus comprising: The first receiving module is configured to receive a first set of encrypted information sent by the first client; wherein the first set of encrypted information is obtained by the first client after encrypting a first semantic feature, and the first semantic feature is obtained by the first client after extracting features from the first object information using the first network; The second receiving module is used to receive the second set of encrypted information sent by the second client; wherein the second set of encrypted information is obtained by the second client after encrypting the second semantic feature, and the second semantic feature is obtained by the second client after extracting features from the second object information using the second network; The determining module is used to determine the similarity between the first semantic feature and the second semantic feature based on the first set of encrypted information and the second set of encrypted information; A sending module is used to send the similarity to the first client and the second client, wherein the first client is used to adjust the model parameters of the first network based on the similarity, and the second client is used to adjust the model parameters of the second network based on the similarity; The first object information and the second object information are different categories of information, both including dense feature information and sparse feature information using different encoding methods; The first set of encrypted information includes first encrypted information and second encrypted information. The first encrypted information is obtained by multiplying a first random number with the first semantic feature, and the second encrypted information is obtained by multiplying a second random number with the L2 norm of the first semantic feature. The second set of encrypted information includes third encrypted information and fourth encrypted information. The third encrypted information is obtained by multiplying the inverse factor of the first random number with the second semantic feature, and the fourth encrypted information is obtained by multiplying the inverse factor of the second random number with the L2 norm of the second semantic feature. The first random number and the second random number are determined based on a random number seed, which is the same number determined by the first client and the second client based on a key exchange protocol.
7. The apparatus according to claim 6, wherein, The determining module is further used for: Calculate the first parameter based on the first encrypted information and the third encrypted information; Calculate the second parameter based on the second encryption information and the fourth encryption information; The similarity is calculated based on the first parameter and the second parameter.
8. An information recommendation device, comprising: The acquisition module is used to acquire the first object information of the first object and the second object information of at least one second object; The extraction module is used to process the first object information and the second object information using an information recommendation model to obtain the first semantic feature and the second semantic feature; A determining module is used to determine the similarity between the first semantic feature and the second semantic feature; A display module is used to determine recommendation information among the at least one second object based on the similarity and display it to the first object; The information recommendation model is obtained using the training method described in any one of claims 1-3.
9. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-4.
10. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-4.
11. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-4.
Citation Information
Patent Citations
Information recommendation model training method and device, electronic equipment and storage medium
CN113378049A
Method and device for determining recommendation information based on double-tower model, equipment and medium
CN113407851A