Cross-domain recommendation method based on stream matching
By constructing a training dataset and a continuous velocity field, and employing flow matching technology, the problems of distribution offset and computational latency in cross-domain recommendation are solved, achieving efficient cross-domain recommendation and improving the accuracy and real-time response capability of the recommendation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- JIANGSU YEYOO E-CLOUD SOFTWARE CO LTD
- Filing Date
- 2026-04-02
- Publication Date
- 2026-05-01
AI Technical Summary
In existing cross-domain recommendation methods, discriminative regression methods have difficulty capturing the complex distribution shifts between different domains, resulting in distribution shifts that cannot be effectively resolved in the target domain, and distribution shifts that cannot be effectively resolved in the target domain, leading to distribution alignment problems after the transfer of embeddings. Diffusion models rely on multi-step iterative inference, resulting in high computational latency and low transfer efficiency.
By constructing a training dataset, deterministic conditional probability paths, and a flow-matching cross-domain recommendation method, and by using a continuous velocity field model, the above problems are addressed. The training dataset includes the embedding representations of overlapping users in the source and target domains, a continuous velocity field is determined, a deterministic linear conditional probability path is constructed using flow matching, a parameterized velocity field model is built, an alignment and adaptation model is constructed, and a decoupling optimization strategy is used to train and generate a cross-domain recommendation model.
It achieves efficient cross-domain recommendation, maintains the semantic structure of source domain preferences, improves recommendation accuracy, significantly enhances recommendation performance for cold-start users, reduces computational latency, and strengthens the real-time response capability of the recommendation system.
Smart Images

Figure CN121958664A_ABST
Abstract
Description
A cross-domain recommendation method based on stream matching Technical Field
[0001] This application relates to the field of sequence recommendation technology, and in particular to a cross-domain recommendation method based on flow matching. Background Technology
[0002] Recommender systems predict users' potential preferences by analyzing their historical interactions, and are one of the core technologies for alleviating information overload on the internet. However, in practical applications, newly registered users or inactive users with sparse interaction data (i.e., cold-start users) often struggle to receive accurate personalized recommendations, which severely limits the service effectiveness of recommendation systems.
[0003] To alleviate the problem of data sparsity in the target domain, cross-domain recommendation technology has emerged. Its core idea is to use user interaction data in an information-rich source domain (such as book purchase records) to help infer their interests and preferences in a data-scarce target domain (such as movie and TV viewing preferences).
[0004] Currently, the mainstream technical approaches to cross-domain recommendation fall into two categories: one is to use discriminative regression models, such as multilayer perceptrons, to learn rigid point-to-point mapping relationships; the other is to introduce generative methods based on diffusion probability models, starting from random noise and synthesizing target domain embeddings through multi-step iterative denoising.
[0005] However, discriminative regression methods struggle to capture complex distribution shifts between different domains, resulting in misalignment between the transferred embeddings and the true distribution in the target domain space. Diffusion models, on the other hand, rely on multi-step iterative inference, leading to high computational latency. Furthermore, their "noise-to-data" generation paradigm requires destroying source domain information before reconstruction, thus their transfer efficiency needs improvement. Summary of the Invention
[0006] To address the shortcomings of existing technologies, this application aims to provide a cross-domain recommendation method based on stream matching that is efficient, preserves the semantic structure of preferences in the source domain, and improves the accuracy of cross-domain recommendations.
[0007] To achieve the above objectives, this application provides a cross-domain recommendation method based on flow matching, comprising: constructing a training dataset, the training dataset including a first embedding representation of overlapping users in a source domain and a second embedding representation in a target domain, wherein the overlapping users are users who have interaction data in both the source and target domains; determining a continuous velocity field for learning the preference distribution from the source domain to the preference distribution in the target domain; constructing a deterministic linear conditional probability path connecting the first embedding representation and the second embedding representation using flow matching; parameterizing the continuous velocity field as a velocity field model based on the continuous velocity field and the linear conditional probability path to fit the optimal velocity field induced by the linear conditional probability path; constructing an alignment adaptation model to be trained, the alignment adaptation model being used to map the embedding representation output by the velocity field model to an improved user embedding representation in the target domain; and training the velocity field model and the alignment adaptation model using a decoupling optimization strategy to generate a cross-domain recommendation model.
[0008] Furthermore, the specific steps for constructing the velocity field model to be trained are as follows: ; ; ;in, Represents source distribution With target distribution The squared 2-Wasserstein distance between them Indicates time Time and location The intermediate probability density at that point Indicates time Time and location The velocity field function at that location, Represents the state variables in the embedding space. Represents continuous time variables during transmission. This represents the intermediate density satisfying the continuity equation constraints. With velocity field Take the minimum value from the middle. Indicates the sample at time The intermediate state at a given moment. This represents the user embedding representation of the source domain. This represents the user embedding representation of the target domain. Indicates the state The optimal velocity field at that location, This represents the square Euclidean norm.
[0009] Furthermore, the specific steps for constructing a deterministic linear conditional probability path connecting the first embedded representation and the second embedded representation using flow matching are as follows: ;in, Indicates embedding in a given source domain Embedded with target domain Linear conditional path under given conditions Indicates the first Embedded representation of overlapping users in the source domain Indicates the first Embedded representation of overlapping users in the target domain This represents the path interpolation time and the intermediate state on the path.
[0010] Furthermore, the specific steps for parameterizing the continuous velocity into a velocity field model based on the continuous velocity field and the linear conditional probability path to fit the optimal velocity field induced by the linear conditional probability path are as follows: ; ;in, Indicates by parameters Controlled velocity field model, This represents an intermediate state on the path. Represents a continuous-time variable. Indicates the first Embedded representation of overlapping users in the source domain Indicates time The temporal embedding obtained by vector encoding This represents a vector concatenation operation. This represents a multilayer perceptron neural network. Indicates the predicted instantaneous velocity; This represents the training loss for stream matching. This represents the expectation operation. Indicates time From the interval Uniform sampling on top This represents the sampling of user embedding representations of the source domain and the target domain from an overlapping user embedding pair distribution. This represents an intermediate state on a linear conditional path. Indicates the speed of model prediction. Indicates actual speed. This represents the square Euclidean norm.
[0011] Furthermore, the specific steps for constructing the alignment adaptation model to be trained are as follows: ; ;in, This represents the user embedding representation of the target domain output by the alignment and adaptation model. The parameter is Alignment adaptation model, This represents the user-embedded representation generated by the velocity field model. Indicates user Items in the target domain Predicted score Indicates items in the target domain Embedded representation.
[0012] Furthermore, the optimization objectives in the optimization strategy include alignment adaptation loss and recommendation task loss, with the specific formulas as follows: ; ; ;in, For the total optimization loss, For alignment loss, The recommended loss; among which, This represents the set of users whose interactive behaviors overlap in both the source and target domains. Indicates the first Overlapping users This represents the target domain user embedding representation generated through the flow matching model and the alignment adaptation model. Indicates the first Embedded representation of overlapping users in the target domain Represents the square Euclidean norm; This represents the set of user-item interactions within the target domain. Indicates items in the target domain Embedded representation.
[0013] Furthermore, the method also includes: during the inference phase, employing the Euler method to complete the transmission using a predetermined number of steps, as shown in the following formula: ;in, Final state The input alignment and adaptation model is used for the final recommendation prediction.
[0014] Furthermore, the specific steps for training the velocity field model and the alignment adaptation model to generate a cross-domain recommendation model using the decoupling optimization strategy include: in the first stage, optimizing only the parameters of the velocity field model to minimize the flow matching loss; in the second stage, after fixing the parameters of the velocity field model, optimizing only the parameters of the alignment adaptation model to adapt to the recommendation task.
[0015] To achieve the above objectives, the electronic device provided in this application includes: a processor; a memory storing one or more computer program instructions that run on the processor; wherein, when the processor runs the computer program instructions, it executes the cross-domain recommendation method based on flow matching as described above.
[0016] To achieve the above objectives, the present application provides a computer-readable storage medium storing computer instructions that, when executed by a processor, perform the steps of the cross-domain recommendation method based on flow matching as described above.
[0017] This application presents a cross-domain recommendation method based on flow matching. By constructing a deterministic linear conditional probability path connecting the source domain embedding and the target domain embedding, and reconstructing the cross-domain recommendation problem into a geodesic flow learning problem under the optimal transmission framework, it achieves minimal distortion transmission of the source domain preference distribution to the target domain distribution. This avoids the loss of semantic information caused by the random curved path in the traditional diffusion model, effectively preserves the semantic structure of the source domain preferences, and achieves accurate distribution alignment, thereby improving the accuracy of the recommendation results.
[0018] This application presents a cross-domain recommendation method based on flow matching. By learning a continuous velocity field through flow matching technology, the preference transfer process is modeled as a deterministic evolution described by ordinary differential equations. This allows the generation of the target domain embedding to be completed in very few steps using a numerical solver during the inference stage. This fundamentally overcomes the high computational latency problem caused by the need for tens or even hundreds of iterations of denoising in traditional diffusion models, and significantly improves the real-time response capability of cross-domain recommendation in online service scenarios.
[0019] This application presents a cross-domain recommendation method based on flow matching. By using a decoupling optimization strategy to train the velocity field model and the adapter model in stages, it achieves collaborative optimization of the global transmission geometry and local task deviations, demonstrating its effectiveness in improving recommendation performance while maintaining the transmission structure.
[0020] This application presents a cross-domain recommendation method based on flow matching. By providing a deterministic generation path from source domain embedding to target domain embedding for cold-start users, it effectively compensates for scarce target domain data. Since the velocity field model learns the optimal transmission rules between the source and target domains on overlapping users, these rules can be directly generalized to cold-start users with only source domain interaction data. High-quality embedding representations in the target domain are quickly generated by solving ordinary differential equations. This enables the system to maintain stable recommendation performance even in scenarios with extremely sparse target domain data, significantly enhancing the adaptability of the recommendation system to cold-start scenarios.
[0021] Other features and advantages of this application will be set forth in the following description and will be apparent in part from the description or may be learned by practicing the application. Attached Figure Description
[0022] The accompanying drawings are provided to further understand this application and form part of the specification. They are used together with the embodiments of this application to explain this application and do not constitute a limitation thereof. In the drawings: Figure 1 is a flowchart of the cross-domain recommendation method based on flow matching of this application; Figure 2 is a structural diagram of the cross-domain recommendation model of Embodiment 1 of this application; Figure 3 is a schematic diagram of the contents of the test dataset of Embodiment 1 of this application; Figure 4 is a schematic diagram of the recommendation performance of each recommendation model; Figure 5 is a schematic diagram of the alignment of the distribution of each recommendation model in the latent space; Figure 6 is a schematic diagram of principal component analysis of the cross-domain preference transmission velocity field. Detailed Implementation
[0023] Embodiments of this application will now be described in more detail with reference to the accompanying drawings. While some embodiments of this application are shown in the drawings, it should be understood that this application can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this application. It should be understood that the drawings and embodiments of this application are for illustrative purposes only and are not intended to limit the scope of protection of this application.
[0024] It should be understood that the steps described in the method embodiments of this application may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this application is not limited in this respect.
[0025] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.
[0026] It should be noted that the terms "one" and "multiple" used in this application are illustrative rather than restrictive, and those skilled in the art should understand that, unless explicitly stated otherwise in the context, they should be understood as "one or more". "Multiple" should be understood as two or more.
[0027] Terminology Explanation: Cross-Domain Recommendation (CDR): This refers to the technique of using user interaction data in the source domain to assist in inferring preferences and recommending items in the target domain. The source domain is typically a domain rich in interaction data, while the target domain is a domain with sparse interaction data.
[0028] Cold-start users: These are users whose interaction history exists only in the source domain, but has little or no interaction data in the target domain. This invention aims to generate high-quality target domain embedding representations for these users.
[0029] Embedding: refers to the representation of users or items mapped to a low-dimensional continuous vector space, usually obtained through pre-training of latent factor models such as matrix factorization.
[0030] Flow Matching: A simulation-free framework for training continuous normalized flows, which learns a deterministic transformation from a source distribution to a target distribution by regressing the velocity field induced by a predefined conditional probability path.
[0031] Ordinary Differential Equations (ODEs) are equations used to describe deterministic evolution processes. In this invention, the learned velocity field is used to generate the target domain embedding during the inference phase.
[0032] In the technical solution of this application, for a cross-domain recommendation scenario, the information-rich source domain data is used to assist the data-scarce target domain in preference inference. The entire technical solution is divided into three core layers: basic cross-domain scenario setting, traditional embedding-based mapping paradigm, and the stream matching generation mechanism on which the core of this invention depends.
[0033] Regarding the basic cross-domain scenario settings: For a cross-domain recommendation (CDR) scenario, it includes a source domain. and a target domain Each domain ( ) contains a user set A collection of items and an interaction matrix The elements in the matrix Indicates user For items The preferences. The overlapping user set consists of users who appear in both domains simultaneously, i.e. This invention focuses on cold-start users, namely those users who have interaction history only in the source domain but no interaction data in the target domain.
[0034] Embedded representation: Users and items are represented as The latent embedding vector of dimension, let and These represent the user and item embeddings in the source and target domains, respectively. These embeddings are typically pre-trained using standard latent factorization models such as matrix factorization. The core objective of CDR is to leverage source domain information to construct high-quality target domain user representations for cold-start users.
[0035] Regarding Cross-Domain Mapping (CDR): Cross-Domain Mapping is the mainstream strategy for Cross-Domain Mapping (CDR). Its core idea is to learn a mapping function. This is used to transform the user embedding from the source latent space to the target latent space.
[0036] Mapping functions and optimizations: for a overlapping user The mapping function predicts its post-transfer embedding. : This mapping function is typically optimized by minimizing the distance between the overlapping user migration embedding and the true target embedding. For users starting from scratch, what they learn... Directly generating target domain embeddings for recommendation. Traditional implementations typically employ multilayer perceptrons (MLPs), which result in deterministic point alignment and often neglect modeling of the global preference distribution.
[0037] Regarding the flow matching mechanism: Flow matching is a simulation-free framework for training continuous normalizing flows. Unlike diffusion models that simulate random noise processes, flow matching learns a time-varying vector field. The sample is derived from the source distribution using ordinary differential equations (ODEs). Transmitted to target distribution : ;in Indicates the sample at time The state.
[0038] Conditional probability path: Flow Matching does not directly simulate complex marginal distributions, but instead constructs paired samples. conditional probability paths between This path specifies the connection source sample. and its corresponding target samples The explicit trajectory is obtained, and a true conditional velocity is induced. .
[0039] Training objective: Flow Matching - Train a neural vector field To regress the path-induced velocity, we minimize the following objective function: In this invention, the probability path The choice of [the path] determines the geometry of the learned stream, based on which the optimal transmission path specifically for cross-domain recommendation is derived.
[0040] The embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0041] Example 1 One embodiment of this application provides a cross-domain recommendation method based on flow matching. The cross-domain recommendation method based on flow matching of this application will be described in detail below with reference to Figures 1-6.
[0042] Step S101: Construct a training dataset, which includes a first embedding representation of overlapping users in the source domain and a second embedding representation in the target domain. The overlapping users are users who have interaction data in both the source and target domains. For a cross-domain recommendation (CDR) scenario, it includes a source domain. and a target domain Each domain ( ) contains a user set A collection of items and an interaction matrix The elements in the matrix Indicates user For items The preferences. The overlapping user set consists of users who appear in both domains simultaneously, i.e. This invention focuses on cold-start users, namely those users who have interaction history only in the source domain but no interaction data in the target domain.
[0043] Embedded representation: Users and items are represented as The latent embedding vector of dimension, let and These represent the user and item embeddings in the source and target domains, respectively. These embeddings are typically pre-trained using standard latent factorization models such as matrix factorization. The core objective of CDR is to leverage source domain information to construct high-quality target domain user representations for cold-start users.
[0044] Understandably, this involves filtering out overlapping sets of users who interact in both the source and target domains. And learn the corresponding source domain user embedding representation based on its source domain behavior data and target domain behavior data respectively. Embedded representation with target domain user Based on the embedded samples in this overlapping user set, we can construct the empirical distributions of the source domain embedding and the target domain embedding, respectively: the source distribution... Indicates all overlapping user source domain embeddings Probability distribution in the embedding space; target distribution Indicates all overlapping user target domain embeddings The probability distribution in the embedding space.
[0045] Therefore, source distribution and target distribution The overall distribution structure of user preferences in the source and target domains was characterized, and used as the starting and target distributions for learning the cross-domain continuous velocity field.
[0046] Step 102: Determine the continuous velocity field used to learn the preference distribution from the source domain to the preference distribution of the target domain; In the technical solution of this application, through the dynamic representation of optimal transmission and geodesic flow, in order to explicitly model the continuous transformation process, the dynamic representation of optimal transmission is adopted, and the source distribution... and target distribution The squared 2-Wasserstein distance between them is expressed as the minimum kinetic energy required to transfer mass per unit time interval: ; ; and thus the optimal velocity field is obtained: ;in, Represents source distribution With target distribution The squared 2-Wasserstein distance between them Indicates time Time and location The intermediate probability density at that point Indicates time Time and location The velocity field function at that location, Represents the state variables in the embedding space. Represents continuous time variables during transmission. This represents the intermediate density satisfying the continuity equation constraints. With velocity field Take the minimum value from the middle. Indicates the sample at time The intermediate state at a given moment. This represents the user embedding representation of the source domain. This represents the user embedding representation of the target domain. Indicates the state The optimal velocity field at that location, This represents the square Euclidean norm.
[0047] Constrained by the continuity equation, the optimal solution corresponds to displacement interpolation, forming a constant velocity geodesic in 2-Wasserstein space. For the embedding pairs of overlapping users... The energy-efficient transmission path can be obtained by linear interpolation. .
[0048] Step S103: Construct a deterministic linear conditional probability path connecting the first embedded representation and the second embedded representation using flow matching; In this application's technical solution, random noise is not introduced, but a deterministic conditional flow matching objective is used to determine the linear conditional probability path based on the optimal geodesic: ;in, Indicates embedding in a given source domain Embedded with target domain Linear conditional path under given conditions Indicates the first Embedded representation of overlapping users in the source domain Indicates the first Embedded representation of overlapping users in the target domain This represents a continuous-time variable, indicating an intermediate state along the path.
[0049] Step S104: Based on the continuous velocity field and the linear conditional probability path, parameterize the continuous velocity into a velocity field model to fit the optimal velocity field induced by the linear conditional probability path; to approximate the optimal velocity, we use a neural network. Parameterized velocity field. Given the state sampled from the path. ,time and source domain conditions The network predicts instantaneous velocity, and optimizes it by minimizing the mean square error between the predicted velocity and the path-induced true velocity (i.e., the displacement vector). ; ;in, Indicates by parameters Controlled velocity field model, This represents an intermediate state on the path. Represents a continuous-time variable. Indicates the first Embedded representation of overlapping users in the source domain Indicates time The temporal embedding obtained by vector encoding This represents a vector concatenation operation. This represents a multilayer perceptron neural network. Indicates the predicted instantaneous velocity; This represents the training loss for stream matching. This represents the expectation operation. Indicates time From the interval Uniform sampling on top This represents the sampling of user embedding representations of the source domain and the target domain from an overlapping user embedding pair distribution. This represents an intermediate state on a linear conditional path. Indicates the speed of model prediction. Indicates actual speed. This represents the square Euclidean norm.
[0050] Step S105: Construct an alignment adaptation model to be trained, which is used to map the embedding representation output by the velocity field model to an improved user embedding representation of the target domain; although the learned velocity field model captures the global OT geometry, directly optimizing the recommendation target on the stream-generated embedding may distort the transmission structure. Therefore, this invention introduces an alignment adaptation model (ALM) as a geometry buffer and task adaptation component.
[0051] The alignment adaptation model embeds the stream after transmission. The mapping is an improved target representation to absorb domain-specific and task-specific biases: The final recommendation score is calculated based on the dot product of the improved embedding and the target item embedding. ;in, This represents the user embedding representation of the target domain output by the alignment and adaptation model. The parameter is Alignment adaptation model, This represents the user-embedded representation generated by the velocity field model. Indicates user Items in the target domain Predicted score Indicates items in the target domain Embedded representation.
[0052] Step S106: A decoupling optimization strategy is used to train the velocity field model and the alignment adaptation model to generate a cross-domain recommendation model; wherein the first stage only optimizes the parameters of the velocity field model to minimize the flow matching loss, and the second stage, after fixing the parameters of the velocity field model, only optimizes the parameters of the alignment adaptation model to adapt to the recommendation task; in this embodiment, in order to prevent task-specific gradient backpropagation from destroying the constant velocity geodesic property, the present invention adopts a two-stage decoupling optimization: wherein, in the first stage, only the velocity field model parameters are optimized. Minimize flow matching loss First, learn the transmission geometry; second, generate a fixed velocity field model. It also cuts off gradients, optimizing only the parameters of the aligned and adapted model. The optimization objective includes alignment loss and recommendation task loss: ; ; ;in, For the total optimization loss, For alignment loss, The recommended loss; among which, This represents the set of users whose interactive behaviors overlap in both the source and target domains. Indicates the first Overlapping users This represents the target domain user embedding representation generated through the flow matching model and the alignment adaptation model. Indicates the first Embedded representation of overlapping users in the target domain Represents the square Euclidean norm; This represents the set of user-item interactions within the target domain. Indicates items in the target domain Embedded representation.
[0053] As shown in Figure 2, the structure of the entire cross-domain recommendation model is shown in Figure 2.
[0054] In this application embodiment, during the inference phase, for a given cold-start user's source embedding The learned ordinary differential equation (ODE) is solved numerically from arrive Target embeddings are generated. Then, the Euler method is used, utilizing very few steps. (For example High-quality transmission can be achieved in this way: ;in, Final state Input the ALM alignment module (i.e., alignment adaptation model) for final recommendation prediction.
[0055] Referring to Figure 3, which is a schematic diagram of the test dataset of Embodiment 1 of this application, the dataset includes experiments conducted on three large subsets of the Amazon review dataset: Movies_and_TV (Video), CDs_and_Vinyl (Music), and Books (Book). A "5-core" subset of data with at least 5 interactions between all users and items was selected, and three cross-domain recommendation tasks were constructed: Video Music, Book Video and Book Music. To simulate a real cold start scenario, the experiment set different proportions of users during the cold start. . The higher the value, the more stringent the cold start settings.
[0056] Referring to Figure 4, which illustrates the recommendation performance of each recommendation model, Figure 4 compares the cross-domain recommendation model (FlowCDR) trained in this invention with three representative baseline methods. The mean absolute error (MAE) and root mean square error (RMSE), widely used in cross-domain recommendation, are employed as evaluation metrics; lower values indicate better performance. As shown in the table below, the method proposed in this invention significantly outperforms existing baseline models in all metrics (MAE, RMSE) across all three datasets.
[0057] Furthermore, to visually demonstrate the advantages of this application from a geometric perspective, the following visualization analysis was conducted: As shown in Figure 5, Figure 5 is a schematic diagram of the alignment of the distribution of each recommendation model in the latent space. The distribution of user embeddings generated by the source domain, target domain, and model is visualized using t-SNE technology. As shown in Figure 5, the cross-domain recommendation model (FlowCDR) of this application has the highest overlap between the generated user embeddings and the actual target domain embedding distribution, proving that it can effectively preserve semantic structure and achieve accurate distribution alignment during transmission.
[0058] As shown in Figure 6, which is a schematic diagram of principal component analysis of the cross-domain preference transmission velocity field, the cross-domain preference transmission velocity field learned by the cross-domain recommendation model of this application is visualized by principal component analysis (PCA) projection. It is found that it successfully approximates the theoretically optimal transmission geodesic, which explains why it can achieve high-performance preference transfer with extremely high efficiency.
[0059] Example 2 In this example, an electronic device is also provided, including a processor and a memory. The memory is used to store non-transitory computer-readable instructions. The processor is used to execute the non-transitory computer-readable instructions, which, when executed by the processor, can perform one or more steps of the flow-matching-based cross-domain recommendation method described above. The memory and the processor can be interconnected via a bus system and / or other forms of connection mechanisms.
[0060] For example, the processor can be a central processing unit (CPU), a digital signal processor (DSP), or other processing units with data processing and / or program execution capabilities, such as a field-programmable gate array (FPGA); for example, the central processing unit (CPU) can be an x86 or ARM architecture.
[0061] For example, the memory may include any combination of one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, erasable programmable read-only memory (EPROM), portable compact disc read-only memory (CD-ROM), USB storage, flash memory, etc. One or more computer program modules may be stored on the computer-readable storage medium, and the processor may run one or more computer program modules to implement various functions of the electronic device. Various application programs and various data, as well as various data used and / or generated by the application programs, may also be stored in the computer-readable storage medium.
[0062] It should be noted that the specific functions and technical effects of the electronic devices in the embodiments of this application can be referred to the description of the cross-domain recommendation method based on flow matching above, and will not be repeated here.
[0063] Example 3 In this example, a computer-readable storage medium is also provided for storing non-transitory computer-readable instructions. For example, when the non-transitory computer-readable instructions are executed by a computer, one or more steps in the cross-domain recommendation method based on stream matching described above can be performed.
[0064] For example, this storage medium can be used in the aforementioned electronic device. For example, the storage medium can be the memory in the electronic device of Embodiment 2. For example, relevant descriptions of the storage medium can be found in the corresponding description of the memory in the electronic device of Embodiment 2, and will not be repeated here.
[0065] It should be noted that the storage medium (computer-readable medium) mentioned above in this application may be a computer-readable signal medium or a non-transitory computer-readable storage medium, or any combination of the two. A non-transitory computer-readable storage medium may be, for example,, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a non-transitory computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.
[0066] In this application, a non-transitory computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can also be any computer-readable medium other than a non-transitory computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0067] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0068] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof. These programming languages include, but are not limited to, object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server.
[0069] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0070] The units described in the embodiments of this application can be implemented in software or hardware. The names of the units are not, in some cases, limiting the scope of the unit itself.
[0071] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), etc.
[0072] The above description is merely a partial embodiment of this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of disclosure in this application is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this application.
[0073] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in sequential order. Multitasking and parallel processing may be advantageous in certain environments. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this application. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
[0074] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.
Claims
1. A cross-domain recommendation method based on stream matching, comprising: Construct a training dataset, which includes a first embedding representation of overlapping users in the source domain and a second embedding representation in the target domain, wherein the overlapping users are users who have interactive data in both the source domain and the target domain; A continuous velocity field is determined for learning the preference distribution from the source domain to the preference distribution of the target domain; a deterministic linear conditional probability path is constructed connecting the first embedding representation and the second embedding representation using flow matching; Based on a continuous velocity field and a linear conditional probability path, the continuous velocity is parameterized into a velocity field model to fit the optimal velocity field induced by the linear conditional probability path; an alignment adaptation model to be trained is constructed, which is used to map the embedding representation output by the velocity field model to an improved user embedding representation of the target domain; a decoupling optimization strategy is used to train the velocity field model and the alignment adaptation model to generate a cross-domain recommendation model.
2. The cross-domain recommendation method based on flow matching according to claim 1, characterized in that, The specific steps for constructing the velocity field model to be trained are as follows: ; ; ;in, Represents source distribution With target distribution The squared 2-Wasserstein distance between them Indicates time Time and location The intermediate probability density at that point Indicates time Time and location The velocity field function at that location, Represents the state variables in the embedding space. Represents continuous time variables during transmission. This represents the intermediate density satisfying the continuity equation constraints. With velocity field Take the minimum value from the middle. Indicates the sample at time The intermediate state at any given moment. This represents the user embedding representation of the source domain. This represents the user embedding representation of the target domain. Indicates the state The optimal velocity field at that location, This represents the square Euclidean norm.
3. The cross-domain recommendation method based on flow matching according to claim 2, characterized in that, The specific steps for constructing a deterministic linear conditional probability path connecting the first embedded representation and the second embedded representation using flow matching are as follows: ;in, Indicates embedding in a given source domain Embedded with target domain Linear conditional path under given conditions Indicates the first Embedded representation of overlapping users in the source domain Indicates the first Embedded representation of overlapping users in the target domain This represents a continuous-time variable, indicating an intermediate state along the path.
4. The cross-domain recommendation method based on flow matching according to claim 2, characterized in that, The specific steps for parameterizing the continuous velocity into a velocity field model based on the continuous velocity field and the linear conditional probability path to fit the optimal velocity field induced by the linear conditional probability path are as follows: ; ;in, Indicates by parameters Controlled velocity field model, This represents an intermediate state on the path. Represents a continuous-time variable. Indicates the first Embedded representation of overlapping users in the source domain Indicates time The temporal embedding obtained by vector encoding This represents a vector concatenation operation. This represents a multilayer perceptron neural network. Indicates the predicted instantaneous velocity; This represents the training loss for stream matching. This represents the expectation operation. Indicates time From the interval Uniform sampling on top This represents the sampling of user embedding representations of the source domain and the target domain from an overlapping user embedding pair distribution. This represents an intermediate state on a linear conditional path. Indicates the speed of model prediction. Indicates actual speed. This represents the square Euclidean norm.
5. The cross-domain recommendation method based on flow matching according to claim 4, characterized in that, The specific steps for constructing the alignment and adaptation model to be trained are as follows: ; ;in, This represents the user embedding representation of the target domain output by the alignment and adaptation model. The parameter is Alignment adaptation model, This represents the user-embedded representation generated by the velocity field model. Indicates user Items in the target domain Predicted score Indicates items in the target domain Embedded representation.
6. The cross-domain recommendation method based on flow matching according to claim 5, characterized in that, The optimization objectives in the optimization strategy include alignment adaptation loss and recommendation task loss, with the specific formulas as follows: ; ; ;in, For the total optimization loss, For alignment loss, The recommended loss; among which, This represents the set of users whose interactive behaviors overlap in both the source and target domains. Indicates the first Overlapping users This represents the target domain user embedding representation generated through the flow matching model and the alignment adaptation model. Indicates the first Embedded representation of overlapping users in the target domain Represents the square Euclidean norm; This represents the set of user-item interactions within the target domain. Indicates items in the target domain Embedded representation.
7. The cross-domain recommendation method based on flow matching according to claim 6, characterized in that, The method further includes: during the inference phase, employing the Euler method to complete the transmission using a predetermined number of steps, as detailed in the following formula: ;in, Final state The input alignment and adaptation model is used for the final recommendation prediction.
8. The cross-domain recommendation method based on flow matching according to claim 1, characterized in that, The specific steps for training the velocity field model and the alignment adaptation model to generate a cross-domain recommendation model using a decoupling optimization strategy include: a first stage, optimizing only the parameters of the velocity field model to minimize the flow matching loss; and a second stage, after fixing the parameters of the velocity field model, optimizing only the parameters of the alignment adaptation model to adapt to the recommendation task.
9. An electronic device, characterized in that, include: processor; A memory having stored thereon one or more computer program instructions that run on the processor; wherein, when the processor executes the computer program instructions, it performs the cross-domain recommendation method based on flow matching as described in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that, It stores computer instructions that, when executed by a processor, perform the steps of the cross-domain recommendation method based on stream matching as described in any one of claims 1 to 8.