A privacy protection recommendation method and system based on matrix decomposition
By using matrix decomposition of the user's historical rating matrix and triplet server generation, the problems of sparsity and high computational complexity of the user-item rating matrix are solved, achieving distributed processing and privacy protection, and improving the accuracy and efficiency of the recommendation system.
Patent Information
- Application Number
- CN202411787452.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2044-12-06
AI Technical Summary
Existing privacy-preserving recommendation methods suffer from sparse user-item rating matrices, making it difficult for models to capture users' true preferences and resulting in inaccurate recommendation results. Furthermore, matrix factorization has high computational complexity and low efficiency, and the lack of secure computing techniques during data sharing leads to security risks in collaborative computing in distributed environments.
By performing matrix decomposition on the user's historical rating matrix, a shared rating matrix is generated and sent to different recommendation servers. The triplet server generates inner product and multiplicative triplets, calculates and optimizes the error sharing matrix, and updates the decomposed matrix through the gradient sharing matrix, thus achieving distributed processing and privacy protection.
It effectively alleviates the sparsity of the user-item rating matrix, improves recommendation quality and computational efficiency, ensures data security and privacy protection in the recommendation process, and enhances the accuracy and stability of the recommendation system.
Smart Images

Figure CN119622105B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of privacy protection recommendation, and particularly relates to a privacy protection recommendation method and system based on matrix decomposition. BACKGROUND
[0002] The privacy protection recommendation method based on matrix decomposition is a recommendation system method combining matrix decomposition technology and privacy protection mechanism. Matrix decomposition is a commonly used technology in recommendation systems, which decomposes the user-item rating matrix into user feature matrix and item feature matrix to find the implicit user preferences and item characteristics.
[0003] In today's digital age, personalized recommendation systems have become an integral part of industries such as e-commerce, social media, online advertising, and telecommunications services. The privacy protection recommendation method based on matrix decomposition can improve system security and user trust through secure computing technology, effectively protect user privacy, meet user data security requirements and relevant legal and regulatory requirements while ensuring recommendation accuracy.
[0004] However, the user-item rating matrix of existing privacy protection recommendation methods is highly sparse, making it difficult for the model to capture the user's true preferences and resulting in inaccurate recommendations. On large-scale datasets, matrix decomposition has high computational complexity and low computational efficiency. In data sharing, security computing technology is not introduced, making it difficult to meet the protection needs of user data privacy, resulting in security risks in collaborative computing in distributed environments. SUMMARY
[0005] In view of the existing technical problems of the existing privacy protection recommendation method, such as the highly sparse user-item rating matrix, the difficulty for the model to capture the user's true preferences, the inaccurate recommendation results, the high computational complexity of matrix decomposition on large-scale datasets, the low computational efficiency, the lack of introduction of security computing technology in data sharing, and the difficulty in meeting the protection needs of user data privacy, leading to security risks in collaborative computing in distributed environments, the present application provides a privacy protection recommendation method and system based on matrix decomposition.
[0006] In a first aspect of the present application, a privacy protection recommendation method based on matrix decomposition is provided, which comprises:
[0007] S1, obtaining a user's historical rating matrix, wherein 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 score matrix and the scored item set to the first recommendation server, sending the second shared score matrix and the scored item set to the second recommendation server, generating a public parameter, a decomposition matrix and a decomposition matrix shared value, wherein the public parameter comprises a threshold value describing the decomposition matrix vector, and the decomposition matrix comprises a user feature matrix and an item feature matrix;
[0010] S4, generating an inner product triple and a multiplication triple by using the triple server;
[0011] S5, according to the shared score matrix, the public parameter, the decomposition matrix, the decomposition matrix shared value and the inner product triple, calculating the error between the real score and the predicted score by using the first recommendation server and the second recommendation server respectively, and generating an error shared matrix, wherein the predicted score is the vector inner product between the user feature matrix and the item feature matrix, and the real score is the element of the historical score matrix;
[0012] S6, optimizing the obtained error shared matrix according to the multiplication triple respectively until the error square sum of each error shared matrix is less than a threshold value;
[0013] S7, based on the optimized error shared matrix and the multiplication triple, calculating the partial derivative of the loss function to the decomposition matrix to obtain a gradient shared matrix, wherein the gradient shared matrix comprises a user gradient shared matrix and an item gradient shared matrix, and wherein the loss function is used to describe the user feature matrix element loss value and the item feature matrix element loss value;
[0014] S8, updating the decomposition matrix according to the gradient shared matrix to obtain a user decomposition shared matrix, wherein each element in the user decomposition shared matrix is used to describe the preference degree of the user to different items;
[0015] S9, generating a privacy protection recommendation result of the user by using the user decomposition shared matrix.
[0016] The present application has the following advantages:
[0017] In this embodiment of the 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. This allows for the mining of potential correlations from sparse data, improving recommendation quality. By sending the shared rating matrix to different recommendation servers to generate decomposition matrices and shared values, a distributed processing architecture is implemented. This architecture can handle large-scale datasets, reducing the computational pressure on a single server and ensuring the security of user data throughout the recommendation process, preventing data leakage and misuse. Using a triplet server to generate inner product triplets and multiplicative triplets ensures that data interaction and computation during the recommendation process are completed under privacy protection. An error sharing matrix is calculated based on the shared rating matrix, and error optimization is performed using multiplicative triplets, significantly improving computational efficiency and ensuring the model's stability and accuracy. Through the calculation of the gradient sharing matrix and the updating of the decomposition matrix, the system can more accurately characterize users' preferences for different items. The generation of the user decomposition sharing matrix enables the recommendation system to perform personalized recommendations more efficiently and accurately. Attached Figure Description
[0018] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Throughout the drawings, the same reference numerals denote the same parts. It is obvious that the drawings described below are merely some embodiments of the present invention, and those skilled in the art can obtain other drawings based on these drawings.
[0019] Figure 1 This is a flowchart illustrating a privacy-preserving recommendation method based on matrix factorization provided in an embodiment of the present invention;
[0020] Figure 2 This is a flowchart illustrating a privacy-preserving recommendation scheme based on matrix factorization provided in an embodiment of the present invention.
[0021] Figure 3 This is a schematic diagram of the structure of a privacy-preserving recommendation model based on matrix factorization provided in an embodiment of the present invention;
[0022] Figure 4 This is a circuit diagram for calculating error in a recommendation server provided in an embodiment of the present invention;
[0023] Figure 5 This is a circuit diagram for calculating the sum of squared errors in a recommendation server, provided in an embodiment of the present invention.
[0024] Figure 6 This is a circuit diagram for calculating partial derivatives in a recommendation server provided in an embodiment of the present invention;
[0025] Figure 7 This is an updated decomposition matrix circuit diagram provided in an embodiment of the present invention;
[0026] Figure 8 Fig. 1 is a structural schematic diagram of a privacy protection recommendation system based on matrix decomposition according to an embodiment of the present application. DETAILED DESCRIPTION
[0027] In order to make the personnel in the art better understand the technical solutions in the embodiments of the present application, the technical solutions of the present application will be described clearly and completely below in conjunction with the drawings. Obviously, the described embodiments are some of the embodiments of the present application, rather than all the embodiments of the present application. It should be understood that these descriptions are only exemplary, and are not used to limit the scope of the present application. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor should belong to the scope of protection of the present application.
[0028] In addition, in the following description, the description of well-known structures and techniques is omitted to avoid unnecessary confusion of the concepts disclosed in the present application.
[0029] In the description of the present application, it should be noted that, unless otherwise explicitly specified and limited, the orientation or positional relationship indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer" and the like is based on the orientation or positional relationship shown in the drawings, and is only for the convenience of describing the present application and simplifying the description, and therefore cannot be understood as indicating or implying that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as limiting the present application. In addition, the terms "first", "second", "third" are only for description purposes, and cannot be understood as indicating or implying relative importance. The terms "mounting", "connecting", "connection" should be understood broadly, for example, it can be fixed connection, or detachable connection, or integrally connected; it can be mechanical connection, or electrical connection; it can be directly connected, or indirectly connected through an intermediate medium, or the communication between two elements inside. For those of ordinary skill in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.
[0030] The exemplary embodiments will be described in detail hereinbelow with reference to the drawings. The following description refers to the accompanying drawings which show by way of example the exemplary embodiments of the present application. In the following description, same numbers in different drawings refer to same or similar elements unless otherwise described. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of methods and systems consistent with some aspects of the present application as detailed in the appended claims.
[0031] The application provides a privacy protection recommendation method and system based on matrix decomposition, to solve the problems of cold start, data sparsity and single recommendation of traditional recommendation methods, so as to reduce the user experience and the effectiveness of the recommendation result, and to better adapt to the personalized demand changes of users.
[0032] Method embodiment
[0033] Reference Figure 1 , a flowchart of a privacy protection recommendation method based on matrix decomposition provided by the embodiment of the application is shown. Figure 2 , a flowchart of a privacy protection recommendation method based on matrix decomposition provided by the embodiment of the application is shown.
[0034] As Figure 2 , the interaction between the user and the recommendation server and the triple server is described, the recommendation server B represents the first recommendation server, the recommendation server C represents the second recommendation server, from the user's rating matrix initialization, through the parameter generation of the recommendation server, the inner product and error calculation, the gradient update and the optimization process, finally the personalized recommendation result of the privacy protection is output, the figure mainly embodies the characteristics of distributed calculation and the safe triple generation mechanism, which guarantees the data privacy and the recommendation accuracy in the calculation process.
[0035] Reference Figure 3 , a structure diagram of a privacy protection recommendation model based on matrix decomposition provided by the embodiment of the application is shown.
[0036] As Figure 3 , in the model, the user uploads the shared value of the rating data, which is transmitted to the recommendation server B and C respectively, the recommendation server B and C obtain the distributed inner product triple and multiplication triple through the triple server, and perform matrix decomposition and rating calculation, after the calculation, the recommendation server returns the result to the user, finally the personalized recommendation is generated under the premise of privacy protection.
[0037] The privacy protection recommendation method based on matrix decomposition provided by the embodiment of the application, the method comprises:
[0038] Specifically, the method comprises steps S1 to S8.
[0039] S1, obtaining the historical rating matrix of the user, wherein each element in the historical rating matrix is used to describe the preference degree of the user to different items.
[0040] Wherein, the historical rating matrix is the record of the user's rating to different items, which is represented in the form of a matrix, the row of the matrix corresponds to the user, the column corresponds to the item, and each element is the rating of the user to a certain item.
[0041] It should be noted that by obtaining the historical rating matrix of the user, the basis data is provided for subsequent personalized recommendation, which can accurately reflect the user preference, thereby improving the accuracy of recommendation and user satisfaction.
[0042] S2, matrix decomposition is performed 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 by matrix decomposition, the original rating matrix is decomposed into a shared matrix, the data dimension is reduced, the calculation efficiency is improved, the data storage is dispersed, and the privacy protection and data security are enhanced.
[0044] S3, the first shared rating matrix and the scored item set are sent to the first recommendation server, the second shared rating matrix and the scored item set are sent to the second recommendation server, the public parameter, the decomposition matrix and the decomposition matrix shared value are generated, wherein the public parameter includes a threshold value describing the 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, and are stored in different recommendation servers for distributed calculation and privacy protection. The scored item set is a set of items that the user has scored, which is used as the initial condition for 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 parameter further includes a dimension, a hyperparameter and a step hyperparameter describing the decomposition matrix vector.
[0047] Wherein, the dimension refers to the vector dimension of the decomposed user feature matrix and item feature matrix, the hyperparameter refers to a preset parameter affecting the model performance, which is used to prevent overfitting and control the update process of the decomposition matrix, and the step hyperparameter refers to the step size of the update in the optimization algorithm.
[0048] The decomposition matrix shared value includes a user feature shared value and an item feature shared value.
[0049] S4, the inner product triple and the multiplication triple are generated by using the triple server.
[0050] Wherein, the triple server is an independent server specially responsible for generating and distributing inner product and multiplication triples for secure calculation, the inner product triple is used for pre-generated data for vector inner product calculation, and contains three encrypted values, and the multiplication triple is used for pre-generated data for secure multiplication operation, and also contains three encrypted values.
[0051] It should be noted that the inner product and multiplication triplets generated by the triplet server can realize efficient secure calculation in a distributed recommendation system, and avoid direct exposure of user and item data.
[0052] In a possible implementation, the inner product triplets include first inner product triplets and second inner product triplets, and the multiplication triplets include first multiplication triplets and second multiplication triplets.
[0053] Referring to Figure 4 , a calculation error circuit diagram of the recommendation server is shown.
[0054] As Figure 4 The recommendation server receives user feature matrix shared values and item feature matrix shared values respectively, completes the calculation of the predicted score through the inner product calculation unit, and compares the actual score shared values with the predicted score shared values item by item through the subtraction unit to generate an error shared value matrix.
[0055] S5, according to the shared score 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 score and the predicted score, generate the error shared matrix, wherein the predicted score is the vector inner product between the user feature matrix and the item feature matrix, and the real score is the element of the historical score matrix.
[0056] It should be noted that this process avoids direct exchange of data while ensuring the accuracy of score prediction, which helps to improve the privacy protection and performance of the recommendation system.
[0057] In a possible implementation, the error shared matrix includes first error shared matrix and second error shared matrix, and S5 specifically includes:
[0058] S501, according to the user feature shared value, the item feature shared value, the inner product triplet, constructing the inner product gate in the first recommendation server and the second recommendation server, calculating the vector inner product between the user feature matrix and the item feature matrix, and obtaining the predicted score:
[0059]
[0060] wherein, represents the predicted score matrix, represents the i-th user feature vector, represents the j-th item feature vector, T represents the transpose, represents the first predicted score shared value, represents the first user feature shared value, represents the first item feature shared value, represents the second predicted score shared value, denotes a first item feature share value, denotes a second item feature share value.
[0061] S502, using a secure subtraction gate algorithm, respectively calculating the error between the real score and the predicted score in the first recommendation server and the second recommendation server, to obtain a first error share value and a second error share value:
[0062]
[0063] wherein, ò ij denotes the error between the real score and the predicted score, R ij denotes the real score, <ò ij denotes the first error share value, <ò ij denotes the second error share value, <R ij denotes the first real score share value, <R ij denotes the second real score share value.
[0064] S503, respectively, the first error share value and the second error share value into the first error share matrix and the second error share matrix.
[0065] Referring to Figure 5 , a circuit diagram for calculating the error sum of squares by the recommendation server is shown.
[0066] As Figure 5 , the multiplication unit is used to calculate the square of the error share value, and the addition unit is used to step by step accumulate all the error squares, and finally obtain the error sum of squares share value.
[0067] S6, according to the multiplication triplets, respectively, the obtained error share matrix is optimized until the error sum of squares of each error share matrix is less than the threshold value.
[0068] In one possible implementation, the S6 specifically includes:
[0069] S601, the first multiplication triplet is sent to the first recommendation server, and the second multiplication triplet is sent to the second recommendation server;
[0070] S602, using a secure multiplication gate algorithm to construct a multiplication gate in the first recommendation server and the second recommendation server, to obtain a first error sum of squares share value and a second error sum of squares share value;
[0071] S603, using a secure multiplication gate algorithm to calculate the error sum of squares:
[0072]
[0073] wherein, denotes a first error square sum shared value, denotes a second error square sum shared value, denotes an error square sum, 2 ij >1 denotes a first error square shared value, 2 ij >2 denotes a second error square shared value, L denotes a set of scored items;
[0074] S604, optimizing the error shared matrix according to the error square sum until the error square sum is less than the threshold value.
[0075] It should be noted that the error shared matrix is optimized by using the multiplication triplets, which effectively reduces the error square sum, ensures the accuracy of the recommendation result, and improves the optimization efficiency.
[0076] Referring to Figure 6 , a recommended server partial derivative circuit diagram is shown.
[0077] As Figure 6 , the multiplication unit represents the product calculation of the error item in the matrix and the item feature or user feature vector, which is used to construct the main part of the partial derivative, and the addition unit is used to introduce the regularization term into the partial derivative calculation, which embodies the constraint on the smoothness of matrix decomposition.
[0078] S7, based on the optimized error shared matrix and the multiplication triplets, calculating the partial derivative of the loss function to the decomposition matrix to obtain a gradient shared matrix, wherein the gradient shared matrix includes a user gradient shared matrix and an item gradient shared matrix, wherein the loss function is used to describe the element loss value of the user feature matrix and the element loss value of the item feature matrix.
[0079] Wherein, 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 the model parameter, and the gradient shared matrix is a distributed calculation that divides the gradient value into different shared parts and stores them in multiple servers to protect privacy.
[0080] In one possible implementation, the gradient shared matrix includes a user gradient shared matrix and an item gradient shared matrix.
[0081] Wherein, the gradient shared matrix includes a first gradient shared matrix and a second gradient shared matrix. The item shared matrix includes a first item shared matrix and a second item shared matrix.
[0082] In one possible implementation, the gradient shared matrix is specifically:
[0083]
[0084] Where, f(p) i,k ,q j,k ) represents the loss function, p i,k Let q represent the k-th element of the i-th user feature vector. j,k Let represent the k-th element of the feature vector of the j-th item, where k = 0, 1, ..., d-1, d represents the total number of feature vectors, λ represents the regularization coefficient, and L represents the set of scored items. The loss function represents the sum of the p values. i,k The partial derivatives, The loss function is expressed as q j,k The partial derivatives, <H n×d >1 indicates that the gradient sharing matrix of the first item is 1. <H n×d >2 indicates that the gradient sharing matrix of the second item is 2. Represents partial derivatives The shared value assigned to the first recommendation server. Represents partial derivatives The shared value assigned to the second recommendation server. Represents partial derivatives The shared value assigned to the first recommendation server. Represents partial derivatives The shared value assigned to the second recommendation server, <-2ò ij q j,k >1 represents -2ò ij q j,k The shared value assigned to the first recommendation server is <2λp i,k >1 indicates 2λp i,k The shared value assigned to the first recommendation server, <-2ò ij q j,k >2 indicates The shared value assigned to the second recommendation server is <2λp i,k >2 represents 2λp i,k The shared value assigned to the second recommendation server. <G m×d >1 indicates that the gradient sharing matrix is for the first user. <G m×d >2 represents the gradient sharing matrix of the second user, <-2ò ij q i,k >1 represents -2ò ij q i,k The shared value assigned to the first recommendation server is <2λp j,k >1 indicates 2λp j,k The shared value assigned to the first recommendation server, <-2ò ij q i,k >2 indicates The shared value assigned to the second recommendation server is <2λp j,k2 represents 2λp j,k The shared value assigned to the second recommendation server.
[0085] With reference to Figure 7 The updating decomposition matrix circuit diagram is shown.
[0086] As Figure 7 The subtraction unit in the circuit represents the updating step of gradient descent, that is, subtracting the result of the gradient matrix multiplied by the step size from the value of the current decomposition matrix to generate the updated decomposition matrix.
[0087] S8, updating the decomposition matrix according to the gradient shared matrix to obtain a user decomposition shared matrix, wherein each element in the user decomposition shared matrix is used to describe the preference degree of the user to different items.
[0088] It should be noted that the updating of the decomposition matrix by the gradient shared matrix effectively optimizes the matching degree of the user features and the item features, improves the prediction accuracy of the recommendation system, and protects the security of the sensitive data of the user.
[0089] S9, generating a privacy protection recommendation result of the user by using the user decomposition shared matrix.
[0090] In one possible implementation, S8 is specifically:
[0091] S801, updating the decomposition matrix according to the gradient shared matrix:
[0092]
[0093] wherein p′ i,k represents the kth element of the ith user feature vector after updating, q′ j,k represents the kth element of the jth item feature vector after updating, η represents a public value, <p′ i,k >1 represents the element p′ i,k The shared value assigned to the first recommendation server, <q′ j,k >1 represents the element q′ j,k The shared value assigned to the first recommendation server, <p′ i,k >2 represents the element p′ i,k The shared value assigned to the second recommendation server, <q′ j,k >2 represents the element q′ j,k The shared value assigned to the first recommendation server, <2η(ò ij q j,k -λp i,k )>1 represents 2η(ò ij q j,k -λp i,k The shared value assigned to the first recommendation server, denotes a shared value assigned to the first recommendation server, i,j p i,k -λq j,k ) denotes 2η(ò i,j p i,k -λq j,k ) a shared value assigned to the first recommendation server, denotes a shared value assigned to the first recommendation server, ij q j,k -λp i,k ) denotes 2η(ò ij q j,k -λp i,k ) a shared value assigned to the second recommendation server, denotes a shared value assigned to the second recommendation server, i,j p i,k -λq j,k ) denotes 2η(ò i,j p i,k -λq j,k ) a shared value assigned to the second recommendation server, denotes a shared value assigned to the second recommendation server.
[0094] S802, obtaining the user decomposition matrix according to the updated decomposition matrix.
[0095] In actual operation, in order to reduce the communication amount, a secure inner product algorithm is proposed to calculate the inner product, so that the server generating the inner product triple only needs to transmit (2d+1) data to each recommendation server when calculating the inner product once. The process is as follows:
[0096]
[0097] c=c1+c2
[0098]
[0099] wherein x denotes a vector to be calculated, y denotes a vector related to x, a denotes a pre-generated vector of the inner product triple, b denotes another pre-generated vector of the inner product triple, denotes a first shared value of b generated by the first recommendation server, denotes a second shared value of b generated by the second recommendation server, and c denotes a scalar result in the inner product triple, <c>1 indicates that c is in the first shared value generated at the first recommendation server, <c>2 represents a second shared value generated by a second recommendation server, e represents a public calculation result of a first recommendation server, and f represents a public calculation result of the second recommendation server.
[0100] The present application has the following advantages:
[0101] In the embodiments of the present application, the user historical rating matrix is decomposed by matrix to generate a shared rating matrix, effectively alleviating the sparsity problem of the user-item rating matrix, and enabling potential correlations to be mined from sparse data to improve recommendation quality. The shared rating matrix is sent to different recommendation servers to generate decomposition matrices and decomposition matrix shared values, realizing a distributed processing architecture, enabling large-scale data sets to be processed, reducing the computing pressure of a single server, ensuring the security of user data in the entire recommendation process, avoiding data leakage and misuse, generating inner product triplets and multiplication triplets using a triplet server, ensuring that data interaction and calculation in the recommendation process are completed under the premise of privacy protection, calculating an error shared matrix according to the shared rating matrix, and optimizing the error through the multiplication triplets, significantly improving the calculation efficiency and ensuring the stability and accuracy of the model. Through the calculation of the gradient shared matrix and the update of the decomposition matrix, the system can more accurately depict the preferences of users for different items, and the generation of the user decomposition shared matrix enables the recommendation system to more efficiently and accurately perform personalized recommendation.
[0102] System embodiment
[0103] Reference the attached Figure 8 Fig. 1 shows a structure schematic diagram of a privacy protection recommendation system based on matrix decomposition provided by an embodiment of the present application.
[0104] The present application provides a privacy protection recommendation system 30 based on matrix decomposition, comprising a memory 303 and a processor 301.
[0105] The memory 303 stores an application program, which is adapted to be executed by the processor 301 to realize the big data-based oil equipment fault prediction method of the method embodiment.
[0106] The big data-based oil equipment fault prediction system 30 comprises 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 embodiments of the present application.
[0108] Processor 301 may be a CPU, a general-purpose processor, a DSP, an ASIC, an FPGA, or other programmable logic device, transistor logic device, hardware component, or any combination thereof. It may implement or execute the various exemplary logic blocks, modules, and circuits described in connection with this disclosure. Processor 301 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
[0109] Bus 302 may include a pathway for transmitting information between the aforementioned components. Bus 302 may be a PCI bus or an EISA bus, etc. Bus 302 may be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the figure, but this does not mean that there is only one bus or one type of bus.
[0110] The memory 303 may be a ROM or other type of static storage device capable of storing static information and instructions, RAM or other type of dynamic storage device capable of storing information and instructions, or it may be an EEPROM, CD-ROM or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto.
[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 for a privacy-preserving recommendation method based on matrix factorization, as described in the first aspect.
[0113] The applicant of this invention has provided a detailed description of the embodiments of the invention in conjunction with the accompanying drawings. However, those skilled in the art should understand that the above embodiments are merely preferred embodiments of the invention. The detailed description is only intended to help readers better understand the spirit of the invention and is not intended to limit the scope of protection of the invention. On the contrary, any improvements or modifications made based on the inventive spirit of the invention should fall within the scope of protection of the invention.
[0114] It should be pointed out finally that the above embodiments are only used to illustrate the technical solutions of the embodiments of the present application, but not to limit them. Although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those skilled in the art that the technical solutions recorded in the foregoing embodiments can be modified, or some technical features can be replaced equivalently; 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 application. Any changes or replacements that can be easily thought of by those skilled in the art within the technical scope disclosed by the present application should be covered within the protection scope of the present application.< / c> < / c>
Claims
1. A privacy-preserving recommendation method based on matrix factorization, characterized in that the method... include: S1, obtain the user's historical rating matrix, wherein each element in the historical rating matrix is used to describe the user's preference for different items; S2, perform 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, send the first shared rating matrix and the set of rated items to the first recommendation server, send the second shared rating matrix and the set of rated items to the second recommendation server, and generate public parameters, decomposition matrix and decomposition matrix shared values, wherein the public parameters include a threshold describing the decomposition matrix vector, and the decomposition matrix includes a user feature matrix and an item feature matrix; S4, using the triplet server to generate inner product triplets and multiplication triplets; S5, based on the shared rating matrix, the public parameters, the decomposition matrix, the shared value of the decomposition matrix, and the inner product triplet, the error between the actual rating and the predicted rating is calculated using the first recommendation server and the second recommendation server respectively, and an error sharing matrix is generated, wherein the predicted rating is the vector inner product between the user feature matrix and the item feature matrix, and the actual rating is an element of the historical rating matrix; S6, optimize the obtained error sharing matrix according to the multiplication triples until the sum of squared errors of each error sharing matrix is less than the threshold; S7. Based on the optimized error sharing matrix and the multiplication triple, calculate the partial derivative of the loss function with respect to the decomposed matrix to obtain the gradient sharing matrix. The gradient sharing matrix includes the user gradient sharing matrix and the item gradient sharing matrix. The loss function is used to describe the loss values of the user feature matrix elements and the loss values of the item feature matrix elements. S8. Update the decomposition matrix according to the gradient sharing matrix to obtain the 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, use the user decomposition sharing matrix to generate the user's privacy protection recommendation result.
2. The privacy-preserving recommendation method based on matrix factorization according to claim 1, characterized in that, The disclosed parameters also include the dimension, hyperparameters, and step size hyperparameters that describe the decomposed matrix vectors; The shared values of the decomposition matrix include shared values of user features and shared values of project features.
3. The privacy-preserving recommendation method based on matrix factorization according to claim 1, characterized in that, The inner product triplet includes a first inner product triplet and a second inner product triplet, and the multiplication triplet includes a first multiplication triplet and a second multiplication triplet.
4. The privacy-preserving recommendation method based on matrix factorization according to claim 1, characterized in that, The error sharing matrix includes a first error sharing matrix and a second error sharing matrix; S5 specifically includes: S501, based on the user feature shared value, the item feature shared value, and the inner product triplet, construct an inner product gate in the first recommendation server and the second recommendation server, calculate the vector inner product between the user feature matrix and the item feature matrix, and obtain the predicted score: in, Indicates the predicted score. This represents the feature vector of the i-th user. Let T represent the feature vector of the j-th item, and let T denote the transpose. This represents the shared value of the first predicted score. This represents the shared characteristic value of the first household. This represents the shared value of the first item's features. This represents the shared value of the second predicted score. This represents the shared characteristic value of the first household. Indicates the shared value of the second item's features; S502, using the safe subtraction gate algorithm, calculate the error between the actual score and the predicted score on the first recommendation server and the second recommendation server respectively, to obtain the first error sharing value and the second error sharing value: Where, ∈ ij R represents the error between the actual rating and the predicted rating. ij Represents the true rating, <∈ ij >1 represents the first shared error 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 score shared value; S503, the first error sharing value and the second error sharing value are respectively used to form a first error sharing matrix and a second error sharing matrix.
5. The privacy-preserving recommendation method based on matrix factorization according to claim 3, characterized in that, S6 specifically includes: S601, send the first multiplication triplet to the first recommendation server, and send the second multiplication triplet to the second recommendation server; S602, construct multiplication gates in the first recommendation server and the second recommendation server using the secure multiplication gate algorithm to obtain the first error sum of squares shared value and the second error sum of squares shared value; S603 uses the safe multiplication gate algorithm to calculate the sum of squared errors: in, This represents the first sum of squared errors shared value. This represents the shared value of the second sum of squared errors. Represents the sum of squared errors. This represents the first error squared shared value. This represents the second squared error shared value, and L represents the set of scored items; S604, optimize the error sharing matrix based on the sum of squared errors until the sum of squared errors is less than the threshold.
6. The privacy-preserving recommendation method based on matrix factorization according to claim 1, characterized in that, The gradient sharing matrix includes the user gradient sharing matrix and the project gradient sharing matrix; The gradient sharing matrix includes a first gradient sharing matrix and a second gradient sharing matrix; The project gradient sharing matrix includes a first project sharing matrix and a second project sharing matrix.
7. The privacy-preserving recommendation method based on matrix factorization according to claim 6, characterized in that, The gradient sharing matrix is specifically: Where, f(p) i,k ,q j,k ) represents the loss function, p i,k Let q represent the k-th element of the i-th user feature vector. j,k Let represent the k-th element of the feature vector of the j-th item, where k = 0, 1, ..., d-1, d represents the total number of feature vectors, λ represents the regularization coefficient, and L represents the set of scored items. The loss function represents the sum of the p values. i,k The partial derivatives, The loss function is expressed as q j,k The partial derivatives, <H n×d >1 indicates that the gradient sharing matrix of the first item is 1. <H n×d >2 indicates that the gradient sharing matrix of the second item is 2. Represents partial derivatives The shared value assigned to the first recommendation server. Represents partial derivatives The shared value assigned to the second recommendation server. Represents partial derivatives The shared value assigned to the first recommendation server. Represents partial derivatives Shared values assigned to the second recommendation server, <-2∈ ij q j,k >1 means -2 ij q j,k The shared value assigned to the first recommendation server is <2λp i,k >1 indicates 2λp i,k Shared values assigned to the first recommendation server, <-2∈ ij q j,k >2 means -2∈ ij q j,k The shared value assigned to the second recommendation server is <2λp i,k >2 represents 2λp i,k The shared value assigned to the second recommendation server. <G m×d >1 indicates that the gradient sharing matrix is for the first user. <G m×d >2 represents 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 recommendation server is <2λp j,k >1 indicates 2λp j,k Shared values assigned to the first recommendation server, <-2∈ ij q i,k >2 means -2 ij q i,k The shared value assigned to the second recommendation server is <2λp j,k >2 represents 2λp j,k The shared value assigned to the second recommendation server, ∈ ij This represents the error between the actual rating and the predicted rating.
8. The privacy-preserving recommendation method based on matrix factorization according to claim 7, characterized in that, S8 specifically includes: S801, Update the decomposition matrix according to the gradient sharing matrix: Where, p′ i,k Let q′ represent the k-th element of the updated i-th user feature vector. j,k Let η represent the updated k-th element of the feature vector of the j-th item, and let η represent the public value. <p′ i,k >1 indicates element p′ i,k The shared value assigned to the first recommendation server. <q′ j,k >1 indicates element q′ j,k The shared value assigned to the first recommendation server. <p′ i,k >2 indicates element p′ i,k The shared value assigned to the second recommendation server. <q′ j,k >2 represents element q′ j,k The shared value assigned to the second recommendation 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 recommendation 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 recommendation 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 recommendation 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 shared value assigned to the second recommendation server, where λ represents the regularization coefficient; S802, Based on the updated decomposition matrix, the user decomposition matrix is obtained.
9. A privacy-preserving recommendation system based on matrix factorization, characterized in that, include: Memory and processor; The memory stores an application program adapted to be executed by the processor to implement the privacy-preserving recommendation method based on matrix factorization 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 executed by the processor, the program implements the privacy-preserving recommendation method based on matrix factorization as described in any one of claims 1 to 8.
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