Privacy protection recommendation method and system based on matrix decomposition
By matrix decomposing and distributed processing of the user history rating matrix, combined with the security computing technology of triple servers, the problems of data sparseness and low computing efficiency in the existing privacy protection recommendation methods are solved, and high-quality personalized recommendations and user data security protection are achieved.
Patent Information
- Application Number
- CN202411787452.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-12-06
AI Technical Summary
In the existing privacy protection recommendation methods, the user-project scoring matrix is highly sparse, the model is difficult to capture the user's real preferences, the recommendation results are inaccurate, the matrix decomposition calculation is high in complexity, low in computing efficiency, and no secure computing technology is introduced, making it difficult to meet the protection needs of user data privacy, resulting in security risks in collaborative computing in distributed environments.
By matrix decomposing the user's historical scoring matrix, generating a shared scoring matrix, reducing data sparseness, realizing a distributed processing architecture, using a triple server to generate internal product and multiplication triple, ensuring that data interaction and calculation are carried out under the premise of privacy protection, computing error sharing matrix and multiplication triple optimization, significantly improving computing efficiency.
It effectively alleviates the sparseness problem of the user-project scoring matrix, improves the quality of recommendations, realizes the processing of large-scale data sets, ensures the security of user data, and improves the computing efficiency and model stability and accuracy.
Smart Images

Figure CN119622105A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of privacy protection recommendation, and in particular to a privacy protection recommendation method and system based on matrix decomposition. Background Art
[0002] The privacy-preserving recommendation method based on matrix decomposition is a recommendation system method that combines matrix decomposition technology with privacy protection mechanism. Matrix decomposition is a commonly used technology in recommendation systems. It decomposes the rating matrix of users and items into user feature matrix and item feature matrix to discover implicit user preferences and item characteristics.
[0003] In today's digital age, personalized recommendation systems have become an indispensable part of industries such as e-commerce, social media, online advertising, and telecommunications services. Privacy-preserving recommendation methods based on matrix decomposition can improve system security and user trust through secure computing technology. While ensuring recommendation accuracy, they can effectively protect user privacy and meet user data security needs and relevant laws and regulations.
[0004] However, the user-item rating matrix of existing privacy-preserving recommendation methods is highly sparse, the model has difficulty capturing the user's true preferences, and the recommendation results are inaccurate. On large-scale data sets, the matrix decomposition computational complexity is high and the computational efficiency is too low. Secure computing technology is not introduced when sharing data, making it difficult to meet the needs of protecting user data privacy, resulting in security risks in collaborative computing in distributed environments. Summary of the invention
[0005] In view of the fact that the user-item rating matrix of the existing privacy-preserving recommendation methods in the prior art is highly sparse, the model is difficult to capture the user's true preferences, the recommendation results are inaccurate, the matrix decomposition calculation complexity is high and the calculation efficiency is too low on large-scale data sets, and the secure computing technology is not introduced when sharing data, which makes it difficult to meet the protection needs of user data privacy, resulting in technical problems such as insufficient security risks in collaborative computing in distributed environments. The present invention provides a privacy-preserving recommendation method and system based on matrix decomposition.
[0006] In a first aspect of the present invention, a privacy protection recommendation method based on matrix decomposition is proposed, the method comprising:
[0007] S1, obtaining the user's historical rating matrix, where each element in the historical rating matrix is used to describe the user's preference for different items;
[0008] S2, performing matrix decomposition on the historical rating matrix to obtain a shared rating matrix, wherein the shared rating matrix includes a first shared rating matrix and a second shared rating matrix;
[0009] S3, sending the first shared rating matrix and the rated item set to the first recommendation server, sending the second shared rating matrix and the rated item set to the second recommendation server, generating public parameters, a decomposition matrix, and a decomposition matrix shared value, wherein the public parameters include a threshold value describing a decomposition matrix vector, and the decomposition matrix includes a user feature matrix and an item feature matrix;
[0010] S4, using the triple server to generate inner product triples and multiplication triples;
[0011] S5, according to the shared rating matrix, the public parameter, the decomposition matrix, the decomposition matrix shared value and the inner product triplet, respectively using the first recommendation server and the second recommendation server to calculate the error between the real rating and the predicted rating, and generate an error sharing matrix, wherein the predicted rating is the vector inner product between the user feature matrix and the item feature matrix, and the real rating is the element of the historical rating matrix;
[0012] S6, optimizing the obtained error sharing matrices according to the multiplication triplets respectively until the sum of square errors of each error sharing matrix is less than a threshold;
[0013] S7, based on the optimized error sharing matrix and the multiplication triplet, calculate the partial derivative of the loss function with respect to the decomposition matrix to obtain a gradient sharing matrix, wherein the gradient sharing matrix includes a user gradient sharing matrix and an item gradient sharing matrix, wherein the loss function is used to describe the loss value of the user feature matrix element and the loss value of the item feature matrix element;
[0014] S8, updating the decomposition matrix according to the gradient sharing matrix to obtain a user decomposition sharing matrix, wherein each element in the user decomposition sharing matrix is used to describe the user's preference for different items;
[0015] S9, utilizes the user decomposition sharing matrix to generate the user's privacy-preserving recommendation results.
[0016] The beneficial effects of the present invention are as follows:
[0017] In an embodiment of the present invention, by performing matrix decomposition on the user's historical rating matrix to generate a shared rating matrix, the sparsity problem of the user-item rating matrix is effectively alleviated, potential associations can be mined from sparse data, and the recommendation quality can be improved. By sending the shared rating matrix to different recommendation servers respectively, a decomposition matrix and a decomposition matrix shared value are generated, a distributed processing architecture is implemented, and large-scale data sets can be processed, reducing the computing pressure of a single server, ensuring the security of user data in the entire recommendation process, and avoiding data leakage and abuse. The inner product triples and multiplication triples are generated by the triple server, ensuring that data interaction and calculation in the recommendation process are completed under the premise of privacy protection. The error sharing matrix is calculated according to the shared rating matrix, and the error is optimized by the multiplication triples, which significantly improves the computing efficiency and ensures the stability and accuracy of the model. By calculating the gradient sharing matrix and updating the decomposition matrix, the system can more accurately characterize the user's preference for different items. The generation of the user decomposition sharing matrix enables the recommendation system to perform personalized recommendations more efficiently and accurately. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings are only used to illustrate specific embodiments and are not considered to limit the present invention. In the entire drawings, the same reference symbols represent the same components. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings.
[0019] Figure 1 It is a flowchart of a privacy protection recommendation method based on matrix decomposition provided by an embodiment of the present invention;
[0020] Figure 2 It is a flowchart of a privacy protection recommendation solution based on matrix decomposition provided by an embodiment of the present invention;
[0021] Figure 3 It is a structural diagram of a privacy protection recommendation model based on matrix decomposition provided by an embodiment of the present invention;
[0022] Figure 4 A circuit diagram of a recommendation server calculating an error provided by an embodiment of the present invention;
[0023] Figure 5 A circuit diagram of a recommendation server calculating a sum of squared errors provided by an embodiment of the present invention;
[0024] Figure 6 A circuit diagram of a recommendation server for calculating partial derivatives provided by an embodiment of the present invention;
[0025] Figure 7 An update decomposition matrix circuit diagram provided by an embodiment of the present invention;
[0026] Figure 8 It is a structural diagram of a privacy protection recommendation system based on matrix decomposition provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. It should be understood that these descriptions are only exemplary and are not intended to limit the scope of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in the field without making creative work should fall within the scope of protection of the present invention.
[0028] Furthermore, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessarily obscuring the concepts disclosed in the present invention.
[0029] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the orientation or position relationship indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inside", "outside", etc. is based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation of the present invention. In addition, the terms "first", "second", and "third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. The terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be a connection between the two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0030] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of methods and systems consistent with some aspects of the present invention as detailed in the appended claims.
[0031] The present invention proposes a privacy-preserving recommendation method and system based on matrix decomposition to solve the problems of cold start, sparse data and relatively simple recommendation in traditional recommendation methods, which lead to a decrease in user experience and the effectiveness of recommendation results, and thus fail to better adapt to changes in user personalized needs.
[0032] Method Embodiment
[0033] Reference Figure 1 , which shows a flowchart of a privacy protection recommendation method based on matrix decomposition provided by an embodiment of the present invention. Figure 2 , which shows a flow chart of a privacy protection recommendation scheme based on matrix decomposition provided by an embodiment of the present invention.
[0034] like Figure 2 , describes the interaction between users and recommendation servers and triple servers. Recommendation server B is represented as the first recommendation server, and recommendation server C is represented as the second recommendation server. Starting from the initialization of the user's rating matrix, after the parameter generation, inner product and error calculation, gradient update and optimization process of the recommendation server, the privacy-preserving personalized recommendation results are finally output. The figure focuses on the characteristics of distributed computing and the secure triple generation mechanism, which ensures data privacy and recommendation accuracy during the calculation process.
[0035] Reference Figure 3 , shows a structural diagram of a privacy protection recommendation model based on matrix decomposition provided by an embodiment of the present invention.
[0036] like Figure 3 In this model, the shared value of the rating data uploaded by the user is passed to the recommendation servers B and C respectively. The recommendation servers B and C obtain the distributed inner product triples and multiplication triples through the triple server, and perform matrix decomposition and rating calculation. After the calculation is completed, the recommendation server returns the result to the user, and finally realizes the generation of personalized recommendations under the premise of privacy protection.
[0037] An embodiment of the present invention provides a privacy protection recommendation method based on matrix decomposition, the method comprising:
[0038] Specifically, the method includes steps S1 to S8.
[0039] S1, obtain the user's historical rating matrix, where each element in the historical rating matrix is used to describe the user's preference for different items.
[0040] The historical rating matrix is a record of users' ratings on different projects, expressed in the form of a matrix. The rows of the matrix correspond to users, the columns correspond to projects, and each element is the user's rating of a certain project.
[0041] It should be noted that by obtaining the user's historical rating matrix and providing basic data for subsequent personalized recommendations, it is possible to accurately reflect user preferences, thereby improving the accuracy of recommendations and user satisfaction.
[0042] S2, performing matrix decomposition on the historical rating matrix to obtain a shared rating matrix, wherein the shared rating matrix includes a first shared rating matrix and a second shared rating matrix.
[0043] It should be noted that through matrix decomposition, the original rating matrix is decomposed into a shared matrix, which reduces the data dimension, improves computing efficiency, disperses data storage, and enhances privacy protection and data security.
[0044] S3, sending the first shared rating matrix and the set of rated items to the first recommendation server, sending the second shared rating matrix and the set of rated items to the second recommendation server, generating public parameters, a decomposition matrix, and a decomposition matrix shared value, wherein the public parameters include a threshold value describing a decomposition matrix vector, and the decomposition matrix includes a user feature matrix and an item feature matrix.
[0045] Specifically, the first shared rating matrix and the second shared rating matrix are two shared matrices obtained by decomposing the historical rating matrix, which are stored in different recommendation servers for distributed computing and privacy protection. The rated item set is the set of items that have been rated by users, which serves as the initial condition for the recommendation calculation. The decomposition matrix shared value is the distributed shared value of the user feature matrix and the item feature matrix, which is used in the matrix decomposition process for privacy protection.
[0046] In a possible implementation, the public parameters also include dimensions, hyperparameters, and step size hyperparameters describing the decomposition matrix vector.
[0047] Among them, dimension refers to the vector dimension of the decomposed user feature matrix and project feature matrix, hyperparameter refers to the preset parameters that affect the model performance, which are used to prevent overfitting and control the update process of the decomposition matrix, and step size hyperparameter refers to the size of the update step in the optimization algorithm.
[0048] The decomposition matrix shared value includes the user feature shared value and the item feature shared value.
[0049] S4, using the triple server to generate inner product triples and multiplication triples.
[0050] Among them, the triple server is an independent server specifically responsible for generating and distributing inner product and multiplication triplets for secure calculation. The inner product triple is the pre-generated data used for vector inner product calculation and contains three encrypted values. The multiplication triple is the pre-generated data used for secure multiplication operation and also contains three encrypted values.
[0051] It should be noted that by generating inner products and multiplication triplets through the triple server, efficient and secure computing can be achieved in the distributed recommendation system to avoid direct exposure of user and item data.
[0052] In a possible implementation, the inner product triples include a first inner product triple and a second inner product triple, and the multiplication triples include a first multiplication triple and a second multiplication triple.
[0053] Reference Figure 4 , shows the calculation error circuit diagram of the recommendation server.
[0054] like Figure 4 ,The recommendation server receives the user feature matrix sharing value and the item feature matrix sharing value respectively, completes the calculation of the predicted score through the inner product calculation unit, and uses the subtraction unit to compare the actual score sharing value with the predicted score sharing value item by item to generate the error sharing value matrix.
[0055] S5, according to the shared rating matrix, the public parameters, the decomposition matrix, the decomposition matrix shared value and the inner product triplet, respectively use the first recommendation server and the second recommendation server to calculate the error between the real rating and the predicted rating, and generate an error sharing matrix, where the predicted rating is the vector inner product between the user feature matrix and the item feature matrix, and the real rating is the element of the historical rating matrix.
[0056] It should be noted that this process avoids the direct exchange of data while ensuring the accuracy of rating predictions, which helps to improve the privacy protection and performance of the recommendation system.
[0057] In a possible implementation manner, the error sharing matrix includes a first error sharing matrix and a second error sharing matrix, and S5 specifically includes:
[0058] S501, construct an inner product gate in the first recommendation server and the second recommendation server according to the user feature sharing value, the project feature sharing value, and the inner product triple, calculate the vector inner product between the user feature matrix and the project feature matrix, and obtain the predicted score:
[0059]
[0060] in, represents the prediction score matrix, represents the i-th user feature vector, represents the j-th item feature vector, T represents transpose, represents the first prediction score shared value, represents the first household’s feature sharing value, represents the first item feature sharing value, represents the second prediction score shared value, represents the first household’s feature sharing value, Represents the second item feature shared value.
[0061] S502, using a secure subtraction gate algorithm, respectively calculate the error between the real score and the predicted score on the first recommendation server and the second recommendation server to obtain a first error sharing value and a second error sharing value:
[0062]
[0063] Among them, ij Represents the error between the true rating and the predicted rating, R ij Indicates the real score, ij >1 indicates the first error sharing value, <ò ij >2 indicates the second error sharing value, <R ij >1 indicates the first true rating shared value, <R ij >2 indicates the second true rating shared value.
[0064] S503 , respectively composing the first error sharing value and the second error sharing value into a first error sharing matrix and a second error sharing matrix.
[0065] Reference Figure 5 , shows the circuit diagram of the recommendation server calculating the sum of squared errors.
[0066] like Figure 5 The multiplication unit is used to calculate the square of the error sharing value, and the addition unit is used to gradually accumulate all the error squares to finally obtain the error square sum sharing value.
[0067] S6, optimizing the obtained error sharing matrices according to the multiplication triplets respectively until the sum of square errors of each error sharing matrix is less than a threshold.
[0068] In a possible implementation manner, the S6 specifically includes:
[0069] S601, sending the first multiplication triplet to the first recommendation server, and sending the second multiplication triplet to the second recommendation server;
[0070] S602, constructing a multiplication gate on the first recommendation server and the second recommendation server using a secure multiplication gate algorithm to obtain a first square error sum shared value and a second square error sum shared value;
[0071] S603, using the secure multiplication gate algorithm to calculate the error square sum:
[0072]
[0073] in, represents the first error square sum shared value, represents the second error square sum shared value, represents the sum of squared errors, <∈ 2 ij >1 indicates the first square error shared value, <∈ 2 ij >2 indicates the second square error shared value, and L indicates the set of scored items;
[0074] S604: Optimize the error sharing matrix according to the sum of squared errors until the sum of squared errors is less than the threshold.
[0075] It should be noted that the use of multiplication triplets to optimize the error sharing matrix effectively reduces the sum of squared errors, ensures the accuracy of the recommendation results, and improves the optimization efficiency.
[0076] Reference Figure 6 , which shows the circuit diagram of partial derivative calculation of recommendation server.
[0077] like Figure 6 The multiplication unit represents the product calculation of the error term in the matrix and the item feature or user feature vector, which is used to construct the main part of the partial derivative. The addition unit is used to introduce the regularization term into the partial derivative calculation, which reflects the constraint on the smoothness of the matrix decomposition.
[0078] S7, based on the optimized error sharing matrix and the multiplication triplet, calculate the partial derivative of the loss function with respect to the decomposition matrix to obtain the gradient sharing matrix, wherein the gradient sharing matrix includes the user gradient sharing matrix and the item gradient sharing matrix, wherein the loss function is used to describe the loss value of the user feature matrix element and the loss value of the item feature matrix element.
[0079] Among them, the loss function is used to measure the gap between the model prediction value and the true value, the partial derivative represents the sensitivity of the loss function to the change of model parameters, and the gradient sharing matrix is to divide the gradient value into different shared parts in distributed computing, which are stored in multiple servers to protect privacy.
[0080] In a possible implementation, the gradient sharing matrix includes a user gradient sharing matrix and a project gradient sharing matrix.
[0081] The gradient sharing matrix includes a first gradient sharing matrix and a second gradient sharing matrix, and the project sharing matrix includes a first project sharing matrix and a second project sharing matrix.
[0082] In a possible implementation, the gradient sharing matrix is specifically:
[0083]
[0084] Among them, f(p i,k ,q j,k ) represents the loss function, p i,k represents the kth element of the i-th user feature vector, q j,k represents the kth element of the feature vector of the jth item, k = 0, 1, ..., d-1, d represents the total number of feature vectors, λ represents the regularization coefficient, L represents the set of scored items, Denotes the loss function for p i,k The partial derivative of Denotes the loss function for q j,k The partial derivative of <H n×d >1 indicates the first project gradient sharing matrix, <H n×d >2 indicates the second project gradient sharing matrix, Represents partial derivatives The shared value assigned to the first recommended server, Represents partial derivatives The shared value assigned to the second recommended server, Represents partial derivatives The shared value assigned to the first recommended server, Represents partial derivatives The shared value assigned to the second recommended server, <-2ò ij q j,k >1 means -2ò ij q j,k The shared value assigned to the first recommended server, <2λp i,k >1 means 2λp i,k The shared value assigned to the first recommended server, <-2ò ij q j,k >2 means The shared value assigned to the second recommender server, <2λp i,k >2 means 2λp i,k The shared value assigned to the second recommended server, <G m×d >1 indicates the first user gradient sharing matrix, <G m×d >2 indicates the second user gradient sharing matrix, <-2ò ij q i,k >1 means -2ò ij q i,k The shared value assigned to the first recommended server, <2λp j,k >1 means 2λp j,k The shared value assigned to the first recommended server, <-2ò ij q i,k >2 means The shared value assigned to the second recommender server, <2λp j,k>2 means 2λp j,k The share value assigned to the second recommended server.
[0085] Reference Figure 7 , showing the updated decomposition matrix circuit diagram.
[0086] like Figure 7 ,The subtraction unit in the circuit represents the update step of gradient descent, that is, the result of multiplying the gradient matrix by the step size is subtracted from the value of the current decomposition matrix to generate an updated decomposition matrix.
[0087] S8, updating the decomposition matrix according to the gradient sharing matrix to obtain a user decomposition sharing matrix, wherein each element in the user decomposition sharing matrix is used to describe the user's preference for different items.
[0088] It should be noted that by updating the decomposition matrix through the gradient sharing matrix, the matching degree between user features and item features is effectively optimized, the prediction accuracy of the recommendation system is improved, and the security of user's sensitive data is protected.
[0089] S9, utilizes the user decomposition sharing matrix to generate the user's privacy-preserving recommendation results.
[0090] In a possible implementation manner, S8 specifically includes:
[0091] S801, update the decomposition matrix according to the gradient sharing matrix:
[0092]
[0093] Among them, p′ i,k represents the kth element of the updated feature vector of the i-th user, q′ j,k represents the kth element of the updated feature vector of the jth item, η represents the public value, <p′ i,k >1 indicates element p′ i,k The shared value assigned to the first recommended server, <q′ j,k >1 indicates element q′ j,k The shared value assigned to the first recommended server, <p′ i,k >2 indicates element p′ i,k The shared value assigned to the second recommended server, <q′ j,k >2 indicates element q′ j,k The shared value assigned to the first recommended server, <2η(ò ij q j,k -λp i,k )>1 means 2η(ò ij q j,k -λp i,k ) the shared value assigned to the first recommendation server, express The shared value assigned to the first recommended server, <2η(ò i,j p i,k -λq j,k )>1 means 2η(ò i,j p i,k -λq j,k ) the shared value assigned to the first recommendation server, express The shared value assigned to the first recommended server, <2η(ò ij q j,k -λp i,k )>2 means 2η(ò ij q j,k -λp i,k ) the shared value assigned to the second recommendation server, express The shared value assigned to the second recommended server, <2η(ò i,j p i,k -λq j,k )>2 means 2η(ò i,j p i,k -λq j,k ) the shared value assigned to the second recommendation server, express The share value assigned to the second recommended server.
[0094] S802: Obtain a user decomposition matrix according to the updated decomposition matrix.
[0095] In actual operation, in order to reduce the amount of communication, a secure inner product algorithm is proposed to calculate the inner product. In this way, after calculating the inner product once, the server that generates the inner product triple only needs to transmit (2d+1) data to each recommendation server. The process is as follows:
[0096]
[0097] c=c1+c2
[0098]
[0099] Among them, x represents the vector to be calculated, y represents the vector related to x, a represents the pre-generated vector of the inner product triple, and b represents another pre-generated vector of the inner product triple. represents the first shared value generated by b on the first recommendation server, represents the second shared value generated by b on the second recommendation server, c represents the scalar result in the inner product triple, <c>1 indicates the first shared value generated by c on the first recommendation server, <c>2 represents the second shared value generated by c on the second recommendation server, e represents the public calculation result of the first recommendation server, and f represents the public calculation result of the second recommendation server.
[0100] The beneficial effects of the present invention are as follows:
[0101] In an embodiment of the present invention, by performing matrix decomposition on the user's historical rating matrix to generate a shared rating matrix, the sparsity problem of the user-item rating matrix is effectively alleviated, potential associations can be mined from sparse data, and the recommendation quality can be improved. By sending the shared rating matrix to different recommendation servers respectively, a decomposition matrix and a decomposition matrix shared value are generated, a distributed processing architecture is implemented, and large-scale data sets can be processed, reducing the computing pressure of a single server, ensuring the security of user data in the entire recommendation process, and avoiding data leakage and abuse. The inner product triples and multiplication triples are generated by the triple server, ensuring that data interaction and calculation in the recommendation process are completed under the premise of privacy protection. The error sharing matrix is calculated according to the shared rating matrix, and the error is optimized by the multiplication triples, which significantly improves the computing efficiency and ensures the stability and accuracy of the model. By calculating the gradient sharing matrix and updating the decomposition matrix, the system can more accurately characterize the user's preference for different items. The generation of the user decomposition sharing matrix enables the recommendation system to perform personalized recommendations more efficiently and accurately.
[0102] System Example
[0103] Reference Manual Attached Figure 8 , which shows a structural diagram of a privacy protection recommendation system based on matrix decomposition provided by an embodiment of the present invention.
[0104] The present invention proposes a privacy protection recommendation system 30 based on matrix decomposition, including: a memory 303 and a processor 301.
[0105] The memory 303 stores an application program, and the application program is suitable for being executed by the processor 301 to implement the petroleum equipment fault prediction method based on big data of the method embodiment.
[0106] The oil equipment fault prediction system 30 based on big data includes: a processor 301 and a memory 303. The processor 301 and the memory 303 are connected, for example, through a bus 302.
[0107] The structure of the privacy protection recommendation system 30 based on matrix decomposition does not constitute a limitation on the embodiment of the present invention.
[0108] Processor 301 may be a CPU, a general purpose processor, a DSP, an ASIC, an FPGA or other programmable logic device, a transistor logic device, a hardware component or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of the present invention. Processor 301 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0109] The bus 302 may include a path to transmit information between the above components. The bus 302 may be a PCI bus or an EISA bus, etc. The bus 302 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0110] The memory 303 can be a ROM or other type of static storage device that can store static information and instructions, a RAM or other type of dynamic storage device that can store information and instructions, or an EEPROM, a CD-ROM or other optical disk storage, an optical disk storage (including a compressed optical disk, a laser disk, an optical disk, a digital versatile disk, a Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to these.
[0111] Computer Readable Storage Medium Embodiments
[0112] The present invention proposes a computer-readable storage medium having a computer program stored thereon, which can be loaded and executed by a processor to provide a privacy-preserving recommendation method based on matrix decomposition according to the first aspect.
[0113] The applicant of the present invention has made a detailed explanation and description of the implementation examples of the present invention in conjunction with the drawings in the specification. However, those skilled in the art should understand that the above implementation examples are only preferred implementation schemes of the present invention, and the detailed description is only to help readers better understand the spirit of the present invention, but not to limit the scope of protection of the present invention. On the contrary, any improvements or modifications based on the inventive spirit of the present invention should fall within the scope of protection of the present invention.
[0114] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the embodiments of the present invention, rather than to limit them. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the above embodiments, or replace some of the technical features therein by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention. Any changes or replacements that can be easily thought of by those skilled in the art within the technical scope disclosed in the present invention should be covered within the protection scope of the present invention.< / c> < / c>
Claims
1. A privacy-preserving recommendation method based on matrix decomposition, characterized in that: include: S1, obtaining a historical rating matrix of a user, wherein each element in the historical rating matrix is used to describe the user's preference for different items; S2, performing matrix decomposition on the historical rating matrix to obtain a shared rating matrix, wherein the shared rating matrix includes a first shared rating matrix and a second shared rating matrix; S3, sending the first shared rating matrix and the rated item set to a first recommendation server, sending the second shared rating matrix and the rated item set to a second recommendation server, generating public parameters, a decomposition matrix, and a decomposition matrix shared value, wherein the public parameters include a threshold value describing a decomposition matrix vector, and the decomposition matrix includes a user feature matrix and an item feature matrix; S4, using the triple server to generate inner product triples and multiplication triples; S5, according to the shared rating matrix, the public parameter, the decomposition matrix, the decomposition matrix shared value and the inner product triplet, respectively using the first recommendation server and the second recommendation server to calculate the error between the real rating and the predicted rating, and generate an error sharing matrix, wherein the predicted rating is the vector inner product between the user feature matrix and the item feature matrix, and the real rating is the element of the historical rating matrix; S6, optimizing the obtained error sharing matrices according to the multiplication triplets respectively until the sum of square errors of each error sharing matrix is less than the threshold; S7, based on the optimized error sharing matrix and the multiplication triplet, calculate the partial derivative of the loss function with respect to the decomposition matrix to obtain a gradient sharing matrix, wherein the gradient sharing matrix includes a user gradient sharing matrix and a project gradient sharing matrix, wherein the loss function is used to describe the loss value of the user feature matrix element and the loss value of the project feature matrix element; S8, updating the decomposition matrix according to the gradient sharing matrix to obtain a user decomposition sharing matrix, wherein each element in the user decomposition sharing matrix is used to describe the user's preference for different items; S9: Generate a privacy-preserving recommendation result for the user by using the user decomposition sharing matrix.
2. The privacy protection recommendation method based on matrix decomposition according to claim 1, characterized in that: The public parameters also include the dimension, hyperparameter and step size hyperparameter describing the decomposition matrix vector; The decomposition matrix shared value includes a user feature shared value and an item feature shared value.
3. The privacy protection recommendation method based on matrix decomposition according to claim 1, characterized in that: The inner product triples include a first inner product triple and a second inner product triple, and the multiplication triples include a first multiplication triple and a second multiplication triple.
4. The privacy protection recommendation method based on matrix decomposition according to claim 1, characterized in that: The error sharing matrix includes a first error sharing matrix and a second error sharing matrix; The S5 specifically includes: S501: construct an inner product gate in the first recommendation server and the second recommendation server according to the user feature sharing value, the item feature sharing value, and the inner product triple, calculate the vector inner product between the user feature matrix and the item feature matrix, and obtain a predicted score: in, represents the prediction score, represents the i-th user feature vector, represents the j-th item feature vector, T represents the transpose, represents the first prediction score shared value, represents the first household’s feature sharing value, represents the first item feature sharing value, represents the second prediction score shared value, represents the first household’s feature sharing value, represents the second project feature sharing value; S502: Using a secure subtraction gate algorithm, respectively calculate the error between the actual score and the predicted score on the first recommendation server and the second recommendation server to obtain the first error sharing value and the second error sharing value: in, Represents the error between the true rating and the predicted rating, R ij Indicates the true rating, represents the first error sharing value, represents the second error sharing value, <R ij >1 indicates the first true rating shared value, <R ij >2 indicates the second true score sharing value; S503: Combining the first error sharing value and the second error sharing value into a first error sharing matrix and a second error sharing matrix respectively.
5. The privacy protection recommendation method based on matrix decomposition according to claim 3, characterized in that: The S6 specifically includes: S601, sending the first multiplication triplet to the first recommendation server, and sending the second multiplication triplet to the second recommendation server; S602, constructing a multiplication gate on the first recommendation server and the second recommendation server using a secure multiplication gate algorithm to obtain a first square error sum shared value and a second square error sum shared value; S603, using the secure multiplication gate algorithm to calculate the error square sum: in, represents the first error square sum shared value, represents the second error sum of squares shared value, represents the sum of squared errors, <∈ 2 ij > 1 Represents the first square error shared value, <∈ 2 ij > 2 represents the second square error shared value, L represents the set of scored items; S604: Optimize the error sharing matrix according to the sum of squared errors until the sum of squared errors is less than the threshold.
6. The privacy protection recommendation method based on matrix decomposition according to claim 1, characterized in that: The gradient sharing matrix includes a user gradient sharing matrix and a project gradient sharing matrix; The gradient sharing matrix includes a first gradient sharing matrix and a second gradient sharing matrix; The project sharing matrix includes a first project sharing matrix and a second project sharing matrix.
7. The privacy protection recommendation method based on matrix decomposition according to claim 6, characterized in that: The gradient sharing matrix is specifically: Among them, f(p i,k ,q j,k ) represents the loss function, p i,k represents the kth element of the i-th user feature vector, q j,k represents the kth element of the feature vector of the jth item, k = 0, 1, ..., d-1, d represents the total number of feature vectors, λ represents the regularization coefficient, L represents the set of scored items, Denotes the loss function for p i,k The partial derivative of Denotes the loss function for q j,k The partial derivative of <H n×d >1 indicates the first project gradient sharing matrix, <H n×d >2 indicates the second project gradient sharing matrix, Represents partial derivatives The shared value assigned to the first recommended server, Represents partial derivatives The shared value assigned to the second recommended server, Represents partial derivatives The shared value assigned to the first recommended server, Represents partial derivatives The shared value assigned to the second recommended server, express The shared value assigned to the first recommended server, <2λp i,k >1 means 2λp i,k The shared value assigned to the first recommended server, express The shared value assigned to the second recommender server, <2λp i,k >2 means 2λp i,k The shared value assigned to the second recommended server, <G m×d >1 indicates the first user gradient sharing matrix, <G m×d >2 represents the second user gradient sharing matrix, express The shared value assigned to the first recommended server, <2λp j,k >1 means 2λp j,k The shared value assigned to the first recommended server, express The shared value assigned to the second recommender server, <2λp j,k >2 means 2λp j,k The share value assigned to the second recommended server.
8. The privacy protection recommendation method based on matrix decomposition according to claim 1, characterized in that: The S8 specifically includes: S801, updating the decomposition matrix according to the gradient sharing matrix: Among them, p′ i,k represents the kth element of the updated feature vector of the i-th user, q j ' ,k represents the kth element of the updated feature vector of the jth item, η represents the public value, <p′ i,k >1 indicates element p′ i,k The shared value assigned to the first recommended server, <q′ j,k >1 indicates element q′ j,k The shared value assigned to the first recommended server, <p′ i,k >2 indicates element p′ i,k The shared value assigned to the second recommended server, <q′ j,k >2 indicates element q′ j,k The shared value assigned to the first recommended server, express The shared value assigned to the first recommended server, express The shared value assigned to the first recommended server, express The shared value assigned to the first recommended server, express The shared value assigned to the first recommended server, express The shared value assigned to the second recommended server, express The shared value assigned to the second recommended server, express The shared value assigned to the second recommended server, express a shared value assigned to the second recommended server; S802: Obtain the user decomposition matrix according to the updated decomposition matrix.
9. A privacy-preserving recommendation system based on matrix decomposition, characterized in that: include: Memory and processor; An application is stored in the memory, and the application is suitable for being executed by the processor to implement the privacy protection recommendation method based on matrix decomposition as described in any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the privacy protection recommendation method based on matrix decomposition as described in any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Matrix decomposition recommending method based on difference privacy protection
CN108280217A
User-centered recommendation method and system based on local differential privacy
CN116383488A
Localized differential privacy matrix decomposition recommendation method based on target disturbance
CN117195287A
Distributed differential privacy matrix decomposition recommendation method based on secret sharing
CN118332596A
Recommender Systems and Methods
US20120030159A1