Multi-domain recommendation method and system based on federal learning

Through the multi -domain recommendation method based on federal learning in the online shopping recommendation system, the use of door control networks and dynamic routing algorithms to form a global vector of user, and set a personalized network in each field. The problem of leaks achieve higher recommendation accuracy and privacy protection.

CN119378600APending Publication Date: 2025-01-28HUIZHOU POWER SUPPLY BUREAU OF GUANGDONG POWER GRID CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411512831.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-28
Publication Date
2025-01-28

Smart Images

  • Figure CN119378600A_ABST
    Figure CN119378600A_ABST
Patent Text Reader

Abstract

The invention provides a multi-domain recommendation method and system based on federated learning. The method comprises the steps of obtaining a user vector and an article vector of each space in an overall data space through a matrix decomposition method; the user domain space transmits the user vector and a domain vector of a domain corresponding to the user vector to a gating network, and the output of the gating network is combined with the user vector to obtain a user domain vector; the user public space summarizes the user domain vectors and forms global vectors of the users; sending the global vector of the user to a user domain space, forming an interest vector of the user through a plurality of linear layers, and uploading the interest vector to the domain space; and the domain space performs back propagation based on the interest vector of the user and the article vector, updates model parameters, outputs the interest vector of the user after model convergence, and performs recommendation for the user. On the premise of ensuring the security of the historical data and the privacy data of the consumer, the accuracy of recommending commodities to the consumer is improved, and the user experience of the consumer is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of cross-domain recommendation, and specifically relates to a multi-domain recommendation method and system based on federated learning. Background Art

[0002] Most of the current cross-domain recommendation research focuses on single-target cross-domain recommendation or dual-target cross-domain recommendation scenarios, which only involve data from two domains. Multi-domain recommendation is a more general and challenging problem that can improve the recommendation performance of multiple domains at the same time. Since dual-domain cross-domain recommendation solves the cross-domain recommendation problem of two domains by modeling paired domain-domain relations, simply extending them to multi-target multi-domain recommendation scenarios with multiple domains requires processing several pairs of relations, which will require a lot of computation when the number of domains is large.

[0003] In multi-domain recommendation, it is necessary to build a more comprehensive and high-quality global user profile. There are two types of user vectors that help improve the recommendation effect of cross-domain transfer, including user global vectors, which represent the overall domain-invariant characteristics of users, and target domain-specific user vectors, which represent user behaviors in each target domain. On the one hand, whether it is possible to generate a global user representation based only on user vectors obtained from each domain, so that such user global vectors are sufficiently representative and can be directly used to improve the recommendations in the target domain. On the other hand, what is missing in previous work on multi-target multi-domain recommendation is the formation of target domain-specific user vectors to assist in the recommendations in the target domain. However, directly transferring user global vectors may lead to a decrease in the performance of the target domain due to negative transfer. Therefore, whether it is possible to use user global vectors to form target domain-specific user vectors to help improve the recommendation performance of the target domain while avoiding negative transfer has become a key factor in solving this problem.

[0004] Like the cross-domain recommendation problem, multi-domain recommendation is also mainly studied in the context of a centralized framework. In the scenario of multi-domain recommendation, the data privacy problem becomes more serious due to the increase in the number of domains. In multi-domain recommendation, user data in multiple domains is often involved. If the privacy data of users in different domains is directly collected together, it is easy to cause serious data leakage, and even these data can be used to locate people in real life. In order to ensure better data isolation, when using user data from different domains to form a user global vector, it should be ensured that highly abstract user information vectors from different domains are used as much as possible to synthesize, without accessing the original user behavior data in each domain. At present, online shopping has become the mainstream of life consumption. Online shopping can promote user consumption behavior and platform revenue, and also shorten the distance between users and merchants. It improves the convenience of consumers to a certain extent and reduces the time of users shopping. On this basis, the recommendation system can recommend products that users may like, thereby improving the user's shopping experience. However, the current online shopping recommendation system is not accurate enough in recommending products to users, and the user's historical and privacy data may be leaked due to the aggregation of data from different fields, which greatly affects the user's security and user experience. Summary of the invention

[0005] The purpose of the present invention is to provide a multi-domain recommendation method and system based on federated learning to solve the problem that the current online shopping recommendation system is not accurate enough when recommending products to users, and the user's historical and privacy data may also be leaked due to the aggregation of data from different fields, which greatly affects the user's security and user experience.

[0006] In order to achieve the above object, the present invention adopts the following technical scheme: The present invention provides a multi-domain recommendation method based on federated learning, comprising the following steps: S1. Obtain the user vector and item vector of each space in the overall data space by matrix decomposition method; wherein: the overall data space is divided into user domain space, user public space and domain space; S2, the user domain space concatenates the user vector and the domain vector of the domain corresponding to the user vector and transmits it to the gating network. The output of the gating network is combined with the user vector to obtain the user domain vector; the user public space summarizes the user domain vector and uses a dynamic routing algorithm to form the user's global vector; S3, sending the user's global vector to the user domain space, forming the user's interest vector through several linear layers, and uploading the user's interest vector to the domain space; S4, the domain space calculates the loss value based on the user's interest vector and item vector, summarizes the loss value through the federated learning framework and sends it to the user domain space, and performs back propagation to update the model parameters in S2 and S3 operations. After the model converges, the interest vectors of users in various fields are output, and recommendations are made to users.

[0007] In some embodiments, in S1, both the user domain space and the user public space exist locally in the user. The user domain space is used to store the user's data in the domain; the user public space operates on the data transmitted in the user domain space, or transmits the data to the user domain space, for calculating and storing the user's global vector; the domain space is a server existing in the domain, for storing the information in the domain.

[0008] In some implementations, in S1, in the overall data space, one user has only one user public space, and user public spaces of different users are mutually exclusive.

[0009] In some implementations, in S1, in the overall data space, different domain spaces cannot transmit information to each other, but domain spaces in the same domain can transmit information to each other with the local user domain space.

[0010] In some embodiments, in S2, the gated network structure consists of two linear layers, as shown in the following formulas (1) and (2): (1); (2); in: The vector formed by concatenating the user vector and its corresponding domain vector is used as the input of the gating network; , , These are the parameters of the linear layer of the gating network; The output of the gating network is combined with the user vector according to the following formulas (3) and (4) to obtain the user domain vector: (3); (4); in: is the user vector, is the field vector, Output result for the gating network, is the user domain vector.

[0011] Further, in S2, a dynamic routing algorithm is formed by the iteration of the capsule network, which is used to learn the routing pairs between the low-order capsules and the high-order capsules to obtain the specific representation of the high-order capsules, thereby forming a global vector of the user.

[0012] Furthermore, in S2, the number of routing pairs is calculated by the following formula (5): (5); in: is the number of routing pairs, For high-level capsules, is the transformation matrix to be learned, It is a low-level capsule; After obtaining the routing pair number, the coupling coefficient between the low-order capsule and the high-order capsule is calculated, which is calculated by the following formula (6): (6); in, is the coupling coefficient; The candidate vector of the high-order capsule is calculated using the coupling coefficient and the low-order capsule: (7); The candidate vector is passed through the compression function to obtain a high-order capsule: (8); Among them, among them: is the candidate vector, is the user's global vector; When the routing of this layer is completed, the high-order capsule is input into the routing network of the next layer, and the iteration continues until the entire routing process is repeated multiple times to reach convergence to form the global vector of the user.

[0013] In some implementations, in S3, after obtaining the user global vector, the user public space sends the global vector to the user domain space, which combines it with the domain vector and then forms the user's final interest vector through three linear layers.

[0014] In some implementations, in S4, the domain space calculates the loss value using the user interest vector and the item vector according to the following formula (11): (11); in: For users With items Probability of interaction; For collection of items; is the training data consisting of user-item interactions; is the user's final interest vector, is the item vector, and L is the cross entropy loss.

[0015] The present invention also provides a multi-domain recommendation system based on federated learning, the system comprising a data decomposition module, a global vector processing module and a user recommendation module; wherein: The data decomposition module is used to obtain the user vector and item vector of each space in the overall data space by using the matrix decomposition method; The global vector processing module is used to combine the user vector, domain vector and domain vector to obtain the user domain vector, summarize the user domain vector and combine it with the dynamic routing layer to form the user's global vector; The user recommendation module is used to form the user's interest vector by passing the global vector through several linear layers; the loss is calculated based on the interest vector and the item vector, and the loss value is aggregated and sent to the user domain space through the federated learning framework for user recommendation.

[0016] Compared with the prior art, the multi-domain recommendation method and system based on federated learning of the present invention have the following beneficial technical effects.

[0017] The present invention discloses a multi-domain recommendation method based on federated learning, comprising the following steps: S1, obtaining user vectors and item vectors of each space in the overall data space by matrix decomposition method; wherein: the overall data space is divided into user domain space, user public space and domain space; S2, the user domain space splices the user vector and the domain vector of the domain corresponding to the user vector and transmits them to the gated network, and the output of the gated network is combined with the user vector to obtain the user domain vector; the user public space summarizes the user domain vector and adopts a dynamic routing algorithm to form the user's global vector; S3, the user's global vector is sent to the user domain space, and the user's interest vector is formed through several layers of linear layers, and the user's interest vector is uploaded to the domain space; S4, the domain space calculates the loss value based on the user's interest vector and the item vector, summarizes the loss value and sends it to the user domain space through the federated learning framework, and performs back propagation, updates the model parameters in S2 and S3 operations, and outputs the interest vectors of users in each domain after the model converges, and then recommends for users. Based on the above, the present invention generates user vectors and item vectors in each domain by using traditional matrix decomposition. Secondly, we use the gated network to perform domain personalization operations on the user vectors of multiple participating domains, and use the dynamic routing algorithm to combine the domain personalized user vectors of multiple participating domains to iteratively form the user's global vector. Finally, we build a personalized upper-layer network in each domain, so that it can use the user's global vector to form a user vector specific to the target domain, while minimizing the impact of negative migration. This allows users to improve the accuracy and security of recommending stores or products to consumers while ensuring the security of their historical data and privacy data when shopping online, thereby improving the consumer's user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The drawings in the specification are used to provide further understanding of the present invention and constitute a part of the present invention. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0019] Figure 1 A schematic diagram of the overall process framework of a multi-domain recommendation method based on federated learning and a method in the system of the present invention; Figure 2 The present invention is a multi-domain recommendation method based on federated learning and a flowchart of the federated learning scenario model training in the system. DETAILED DESCRIPTION

[0020] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0021] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0022] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0023] In the description of the embodiments of the present invention, it should be noted that if the terms "upper", "lower", "horizontal", "inner", etc. indicate an orientation or positional relationship based on the orientation or positional relationship shown in the drawings, or the orientation or positional relationship in which the product of the invention is usually placed when in use, it 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 on the present invention. In addition, the terms "first", "second", etc. are only used to distinguish the description, and cannot be understood as indicating or implying relative importance.

[0024] In addition, if the term "horizontal" appears, it does not mean that the component must be absolutely horizontal, but can be slightly tilted. For example, "horizontal" only means that its direction is more horizontal than "vertical", which does not mean that the structure must be completely horizontal, but can be slightly tilted.

[0025] In the description of the embodiments of the present invention, it is also necessary to explain that, unless otherwise clearly specified and limited, the terms "set", "install", "connect", and "connect" 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 the internal connection of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0026] How to improve the accuracy and effectiveness of recommendations for consumers in multiple fields in online shopping while protecting user data privacy, thereby improving user experience.

[0027] like Figure 1 As shown, the present invention provides a multi-domain recommendation method based on federated learning, comprising the following steps: S1. Obtain the user vector and item vector of each space in the overall data space by matrix decomposition method; wherein: the overall data space is divided into user domain space, user public space and domain space; S2, the user domain space concatenates the user vector and the domain vector of the domain corresponding to the user vector and transmits it to the gating network. The output of the gating network is combined with the user vector to obtain the user domain vector; the user public space summarizes the user domain vector and uses a dynamic routing algorithm to form the user's global vector; S3, sending the user's global vector to the user domain space, forming the user's interest vector through several linear layers, and uploading the user's interest vector to the domain space; S4, the domain space calculates the loss value based on the user's interest vector and item vector, summarizes the loss value through the federated learning framework and sends it to the user domain space, and performs back propagation to update the model parameters in S2 and S3 operations. After the model converges, the interest vectors of users in various fields are output, and recommendations are made to users.

[0028] The present invention discloses a multi-domain recommendation method based on federated learning. By distinguishing between user domain space and user public space, it can capture consumers' interest preferences in different fields in a more detailed manner, thereby providing consumers with more personalized and accurate recommendations and improving the effectiveness of online shopping. The present invention utilizes a federated learning framework, and each domain space can be updated independently while maintaining privacy and avoiding data leakage risks. The present invention combines user domain vectors and global vectors to achieve effective fusion of cross-domain information while protecting user privacy. Combined with the application of a dynamic routing algorithm, it helps to capture more complex user interest features, and overall improves the cross-domain recommendation capability of the online shopping recommendation system.

[0029] Compared with the single-domain recommendation method, the multi-domain recommendation method of the present invention can more accurately predict the content that meets the user's interests; and compared with the simple cross-domain recommendation algorithm, it not only protects the privacy of consumers, but also can make more full use of the consumers' own data to achieve more personalized and accurate recommendations.

[0030] In addition, in order to alleviate the negative migration problem caused by using data from multiple domains, the present invention introduces a gating network and a dynamic routing algorithm, which can personalize the user vectors of each participating domain and use these vectors to iteratively form a user global vector.

[0031] Furthermore, in order to prevent the problem of data leakage in different fields, the present invention builds a personalized upper-layer network for each domain under the federated learning framework, so that it can use the user global vector to form a high-quality user vector specific to the target field while ensuring data isolation.

[0032] The following is a detailed description of a multi-domain recommendation method and system based on federated learning according to the present invention through specific embodiments.

[0033] The overall data space of the present invention can be specifically divided into the following user domain space, user public space and domain space; specifically: (1) User domain space: exists in the user's local area and is used to store the user's data in the domain, such as user vectors , where i represents the user number and j represents the domain number. Different user domain spaces of the same user are mutually exclusive and cannot transmit information to each other.

[0034] (2) User public space: exists locally in the user, can operate on the data transmitted in the user domain space, transmit the data to the user domain space, and is used to calculate and store the user global vector There is only one user public space for one user, and the user public spaces of different users are mutually exclusive.

[0035] (3) Domain space: exists on servers within a domain and generally stores information within the domain, such as item vectors , field vector Different domain spaces cannot transmit information to each other, but domain spaces in the same domain can transmit information to the local user domain space.

[0036] The present invention uses matrix decomposition method to obtain user vectors and item vectors for each domain. In multi-domain recommendation, there are usually n domains. , where the i-th domain is recorded as Each domain consists of a set of users , a group of items , and a user-item rating matrix ,in Indicates user For items 's rating.

[0037] Specifically, in the domain In , user groups are represented as , the item group is represented by , the score matrix is ​​expressed as . There is no overlap of items between domains . The matrix decomposition method is used to obtain the user vector and item vector of each field. More specifically, the present invention uses Special domain Medium User and items A vector of k Represents the dimension of the vector.

[0038] Different domain spaces of the present invention can be updated independently without interfering with each other, which enables the recommendation system to flexibly respond to the addition of new domains or the adjustment of old domains, thereby enhancing the scalability of the system. The user domain space of the present invention concatenates the user vector and the domain vector of the domain corresponding to the user vector, and transmits it to the gating network. The output of the gating network is combined with the user vector to obtain the user domain vector. Then, the user public space summarizes all the user domain vectors of the user, and combines with the dynamic routing layer to form the user's global vector; The present invention sends the global vector to the user domain space, forms the user's final interest vector through several linear layers, and uploads it to the domain space.

[0039] The domain space uses the user interest vector and the item vector to calculate the loss. Under the federated learning framework, the loss values ​​are summarized and sent to the user domain space, and backpropagation is performed to update the model parameters.

[0040] like Figure 2 As shown, the multi-domain recommendation method based on federated learning of the present invention is specifically implemented as follows for the global vector of the user: The present invention forms a global vector of a user, specifically comprising: based on the obtained user vector of each domain, the user domain space converts the user vector and field vector The gating network structure is generally composed of two linear layers: (1); (2); in: The vector formed by concatenating the user vector and its corresponding domain vector is used as the input of the gating network; , , These are the parameters of the linear layer of the gating network; Then the output of the gating network is combined with the user vector Combine to get the user domain vector : (3); (4); Where: i is the user number, j is the field number, is the user vector, is the field vector, Output result for the gating network, is the user domain vector.

[0041] Here the user vector and field vector To splice, one is to make the domain vectors of all domains The semantics of the feature space should be kept consistent, and the second is to make the user domain vector It can contain the domain personalized information of its own domain. After that, the user public space aggregates all the user domain vectors of the user and combines them with the dynamic routing algorithm to form the user's global vector .

[0042] The dynamic routing algorithm used in the present invention is mainly composed of capsule networks. Capsule networks are a special type of neuron that uses vectors instead of scalars used in ordinary neural networks. The dynamic routing algorithm is formed by the iteration of capsule networks and can be used to learn the routing pairs between low-order capsules and high-order capsules. , to obtain a specific representation of the high-order capsule. Here we assume that the capsule network has two layers, namely low-order capsule and high-level capsules ,in, m,n Represent the number of low-order capsules and high-order capsules respectively, Represents the vector length of low-order capsules and high-order capsules respectively. Routing logarithm Obtained through the following calculation: (5); in: is the number of routing pairs; represents a high-order capsule (j represents the number of high-order capsules, h represents the dimension of the high-order capsule vector); Represents the transformation matrix to be learned, which is used to map the output vector of the low-order capsule to the feature space of the high-order capsule; Represents a low-order capsule (i represents the number of low-order capsules, l represents the dimension of the low-order capsule vector): (6); in: is the coupling coefficient, which is used to express the contribution of the low-order capsule (i) to the high-order capsule (j); Then, using the coupling coefficient And all low-order capsules are calculated to obtain the candidate vector of high-order capsule j: (7); Finally, the candidate vector Get high-order capsules by compressing the function: (8); in: is a candidate vector, which represents the prediction of the low-order capsule to the high-order capsule and serves as the input of the high-order capsule; is the user's global vector.

[0043] When the routing of this layer is completed, the high-order capsule Enter the next layer of routing network and continue to iterate until the entire routing process is repeated multiple times to reach convergence to form the user's global vector .

[0044] Further, after obtaining the user global vector After that, the user common space will be the global vector It is sent to the user domain space, which combines it with the domain vector To combine: (9); Then After three linear layers, the user's final interest vector is formed: (10); in: is the final user interest vector; , , are the parameters of the corresponding linear layer.

[0045] And the final user interest vector Upload to the domain space. The domain space uses the user interest vector With item vector Calculate the loss value: (11); in: Indicates user With items Probability of interaction; is a collection of items; It is the training data consisting of user-item interactions; The user's final interest vector is formed by concatenating the user's global vector and domain vector and then passing through three linear layers; is the item vector; L is the cross entropy loss.

[0046] The federated learning framework of the present invention specifically includes: first, at the server-user level, the user domain space will only pass through the last few linear layers to form a highly abstract user's final interest vector , upload it to the domain space, and receive the updated model parameters from the domain space. In this way, on the server side, the domain space cannot access the user's original vector information, and due to the large number of items, calculating the loss value on the user side will cause a waste of storage space. Therefore, the model in this chapter calculates the loss value in the domain space, and then updates the model parameters in the user domain space. This can not only save user-side storage space, but also ensure that the model is trained normally without leaking privacy. Secondly, at the domain-domain level, different user domain spaces of the same user cannot communicate with each other, and they can only use the user public space as a transmission medium. The user domain space will only pass the user domain vector to the user public space into the gated network. , the user public space will only transfer the necessary user global vectors to the user domain space In this way, the original information between different fields will not be circulated and leaked. Each field has its own set of model parameters, which will not cause model parameter leakage. Through the above-mentioned federated learning framework, during the model training process, by comprehensively considering the user's behavior in various fields and the importance of the field, effective modeling of the user's global information is achieved, while ensuring the privacy security of consumers as users.

[0047] The present invention uses a federated learning framework to avoid the risk of centralized leakage of user privacy data without the need for centralized storage of data. By adopting the method of storing both the user domain space and the user public space locally in the user, the privacy protection of user data is further enhanced. By sending the user global vector to the user domain space and combining the information in the domain for back propagation, the model parameters in the operation process can be updated more accurately, and the training efficiency can be improved. The aggregation and distribution of loss values ​​are performed through the federated learning framework, which reduces the complexity of data transmission, thereby protecting the privacy of consumers in online shopping.

[0048] The present invention also provides a multi-domain recommendation system based on federated learning, the system includes a data decomposition module, a global vector processing module and a user recommendation module; wherein: the data decomposition module is used to obtain the user vector and the item vector of each space in the overall data space by using a matrix decomposition method; the global vector processing module is used to combine the user vector and the domain vector of the domain corresponding to the user vector to obtain the user domain vector, summarize the user domain vector and combine it with the dynamic routing layer to form the user's global vector; the user recommendation module is used to pass the global vector through several layers of linear layers to form the user's interest vector; based on the interest vector and the item vector, the loss is calculated, and the loss value is summarized and sent to the user domain space through the federated learning framework to perform user recommendation. The present invention can make the multi-domain recommendation system easy to maintain and upgrade by adopting a modular design, improve the flexibility and maintainability of the system, and the system can reduce the information overload of consumers and improve user satisfaction and stickiness through accurate personalized recommendations. The cross-domain recommendation capability enables consumers to discover more potential points of interest and needs, and broadens the range of consumer shopping choices.

[0049] In summary, the present invention provides a multi-domain recommendation method and system based on federated learning, which uses a gated network and a domain vector of the domain corresponding to the user vector to perform domain personalization operations on the user vector. Again, a dynamic routing algorithm is used to calculate a set of vectors of different domains for each user, thereby generating a lossless global user representation. Subsequently, the user global vector and the domain vector are fused and transmitted to the upper network of each domain. Finally, in order to protect data privacy, the data space is divided into user domain space, domain space and user public space, and federated learning is combined to prevent data leakage. The present invention can solve the problem of sparse target domain data in online shopping, improve the performance of recommendations and enhance the user experience of consumers while protecting data privacy.

[0050] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Any ordinary technician in the industry can smoothly implement the present invention as shown in the specification and described above. However, any equivalent changes, modifications and evolutions made by technicians familiar with the profession without departing from the scope of the technical solution of the present invention using the technical content disclosed above are all equivalent embodiments of the present invention. At the same time, any equivalent changes, modifications and evolutions made to the above embodiments based on the essential technology of the present invention are still within the protection scope of the technical solution of the present invention.

Claims

1. A multi-domain recommendation method based on federated learning, characterized in that: The specific steps include: S1. Obtain the user vector and item vector of each space in the overall data space by matrix decomposition method; wherein: the overall data space is divided into user domain space, user public space and domain space; S2, the user domain space concatenates the user vector and the domain vector of the domain corresponding to the user vector and transmits it to the gating network. The output of the gating network is combined with the user vector to obtain the user domain vector; the user public space summarizes the user domain vector and uses a dynamic routing algorithm to form the user's global vector; S3, sending the user's global vector to the user domain space, forming the user's interest vector through several linear layers, and uploading the user's interest vector to the domain space; S4, the domain space calculates the loss value based on the user's interest vector and item vector, summarizes the loss value through the federated learning framework and sends it to the user domain space, and performs back propagation to update the model parameters in S2 and S3 operations. After the model converges, the interest vectors of users in various fields are output, and recommendations are made to users.

2. The multi-domain recommendation method based on federated learning according to claim 1, characterized in that: In S1, both the user domain space and the user public space exist locally in the user. The user domain space is used to store the user's data in the domain. The user public space operates on the data transmitted in the user domain space, or transmits the data to the user domain space, for calculating and storing the user global vector. The domain space is a server existing in the domain, for storing the information in the domain.

3. The multi-domain recommendation method based on federated learning according to claim 1, characterized in that: In S1, in the overall data space, one user has only one user public space, and user public spaces of different users are mutually exclusive.

4. The multi-domain recommendation method based on federated learning according to claim 1, characterized in that: In S1, in the overall data space, different domain spaces cannot transmit information to each other, but domain spaces in the same domain can transmit information to each other with the local user domain space.

5. The multi-domain recommendation method based on federated learning according to claim 1, characterized in that: In S2, the gated network structure consists of two linear layers, as shown in the following formulas (1) and (2): (1); (2); in: The vector formed by concatenating the user vector and its corresponding domain vector is used as the input of the gating network; , , These are the parameters of the linear layer of the gating network; The output of the gating network is combined with the user vector according to the following formulas (3) and (4) to obtain the user domain vector: (3); (4); in: is the user vector, is the field vector, Output result for the gating network, is the user domain vector.

6. The multi-domain recommendation method based on federated learning according to claim 5, characterized in that: In S2, the dynamic routing algorithm is formed by the iteration of the capsule network, and is used to learn the routing pairs between the low-order capsules and the high-order capsules to obtain the specific representation of the high-order capsules, thereby forming a global vector of the user.

7. The multi-domain recommendation method based on federated learning according to claim 6, characterized in that: In S2, the routing pair number is calculated by the following formula (5): (5); in: is the number of routing pairs, For high-level capsules, is the transformation matrix to be learned, It is a low-level capsule; After obtaining the routing pair number, the coupling coefficient between the low-order capsule and the high-order capsule is calculated, which is calculated by the following formula (6): (6); in, is the coupling coefficient; The candidate vector of the high-order capsule is calculated using the coupling coefficient and the low-order capsule: (7); The candidate vector is passed through the compression function to obtain a high-order capsule: (8); Among them, among them: is the candidate vector, is the user's global vector; When the routing of this layer is completed, the high-order capsule is input into the routing network of the next layer, and the iteration continues until the entire routing process is repeated multiple times to reach convergence to form the global vector of the user.

8. The multi-domain recommendation method based on federated learning according to claim 1, characterized in that: In S3, after obtaining the user global vector, the user public space sends the global vector to the user domain space, and the user domain space combines it with the domain vector, and then forms the user's final interest vector through three linear layers.

9. The multi-domain recommendation method based on federated learning according to claim 1, characterized in that: In S4, the domain space calculates the loss value using the user interest vector and the item vector according to the following formula (11): (11); in: For users With items Probability of interaction; For collection of items; is the training data consisting of user-item interactions; The user's final interest vector is formed by concatenating the user's global vector and domain vector and then passing through three linear layers; is the item vector; L is the cross entropy loss.

10. The system according to any one of claims 1 to 9, wherein: The system includes a data decomposition module, a global vector processing module and a user recommendation module; wherein: The data decomposition module is used to obtain the user vector and item vector of each space in the overall data space by using the matrix decomposition method; The global vector processing module is used to combine the user vector, domain vector and domain vector to obtain the user domain vector, summarize the user domain vector and combine it with the dynamic routing layer to form the user's global vector; The user recommendation module is used to form the user's interest vector by passing the global vector through several linear layers; the loss is calculated based on the interest vector and the item vector, and the loss value is aggregated and sent to the user domain space through the federated learning framework for user recommendation.