A cross-domain recommendation method, device, electronic device and storage medium

By aligning the large language model with the pre-trained recommendation model and performing cross-domain latent space representation fusion, the gap in cross-domain knowledge integration of existing recommendation systems is solved and better recommendation results are achieved.

CN118070139BActive Publication Date: 2024-08-27UNIV OF SCI & TECH OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410494093.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-24
Publication Date
2024-08-27
Estimated Expiration
2044-04-24

AI Technical Summary

Technical Problem

There is a significant gap in existing recommendation systems in utilizing cross-domain knowledge, and it is difficult to fully integrate large language models for cross-domain recommendations, resulting in poor recommendation results.

Method used

By obtaining the large language model and multiple pre-trained recommendation models, user interaction records are obtained, respectively input into the recommendation model in the corresponding field, latent space representation mapping processing is performed, and the mapping model is aligned with the large language model to achieve multi-domain integration. , collaborate with cross-domain information to make recommendations.

Benefits of technology

The cross-domain recommendation performance of the recommendation system is improved, allowing the large language model to understand user interests in different fields, thereby providing more accurate and comprehensive person recommendation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118070139B
    Figure CN118070139B
Patent Text Reader

Abstract

The present application provides a cross-domain recommendation method, which obtains a large language model and multiple pre-trained recommendation models, wherein the multiple recommendation models correspond to different domains; obtains user interaction records corresponding to multiple domains; inputs the user interaction records into the recommendation models of the corresponding domains to obtain the latent space representation of the interaction records; maps the latent space representation of the interaction records through a mapping model, wherein the input dimension of the mapping model is the same as the dimension of the latent space representation of the interaction records, and the output dimension of the mapping model is the same as the input dimension of the large language model; performs multi-domain fusion on the results after the mapping process to obtain the multi-domain latent space representation; inputs the multi-domain latent space representation into the large language model to obtain the user's target recommendation result. The above method enables the recommendation model to be aligned with the large language model, and the large language model can understand the multiple recommendation models that have been trained in different domains, so that the determined user's target recommendation result is more accurate and comprehensive.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of natural language processing technology, and in particular to a cross-domain recommendation method, device, electronic device and storage medium. Background Art

[0002] It is very important for recommender systems to use external knowledge to analyze users' historical behaviors (such as user-item interactions) and predict the next item that users may be interested in. In recommender systems, we can roughly divide external world knowledge into two categories: in-domain knowledge and cross-domain knowledge. With in-domain knowledge, recommender systems focus on combining information from a specific domain (such as a movie's introduction) with users' interactive behaviors (such as viewing history). Although this approach can capture behavioral patterns unique to each domain, it ignores the potential connections between different domains. In contrast, with cross-domain knowledge, recommender systems utilize complementary information between different domains, such as the adaptation relationship between a movie and its related novels. Due to the diversity of user interests and behaviors, behavioral patterns derived from one domain can also provide useful information for recommendations in another domain, such as a preference for a movie may mean a preference for its background music. However, cross-domain knowledge relies heavily on the existence of shared users, items, or other content as a bridge between domains, and this assumption rarely holds in the real world.

[0003] In general, there is a significant gap in the current recommender systems in fully leveraging cross-domain world knowledge. In recent years, the rise of Large Language Models (LLMs) has provided more opportunities to better integrate world knowledge into recommender systems. Some preliminary studies on how to leverage large language models for recommendation have been started. The basic idea of ​​these studies is to first convert user interactions into natural language, and then leverage advanced hinting techniques (such as contextual learning and guided conditioning) in large language models for recommendation. Recent studies have proposed methods to combine large language models with behavioral patterns learned by pre-trained recommendation models, demonstrating better recommendation performance. However, a closer look at these studies leads us to conclude that they mainly focus on specific domains and hardly involve cross-domain knowledge. Therefore, how to fully leverage large language models to integrate cross-domain world knowledge for recommendation remains an unsolved challenge.

[0004] There is currently no effective solution to the problem of poor recommendation effects in related technologies. Summary of the invention

[0005] In this embodiment, a cross-domain recommendation method, device, electronic device and storage medium are provided to solve the problem of poor recommendation effect existing in the related art.

[0006] In a first aspect, the present invention provides a cross-domain recommendation method, comprising:

[0007] Obtain a large language model and multiple pre-trained recommendation models, where the multiple recommendation models correspond to different fields respectively;

[0008] Obtain user interaction records corresponding to multiple fields;

[0009] Inputting the user's interaction records into the recommendation model of the corresponding field respectively to obtain the latent space representation of the interaction records;

[0010] Mapping the latent space representation of the interaction record by using a mapping model, wherein an input dimension of the mapping model is the same as a dimension of the latent space representation of the interaction record, and an output dimension of the mapping model is the same as an input dimension of the large language model;

[0011] Perform multi-domain fusion on the results of the mapping process to obtain a multi-domain latent space representation;

[0012] Inputting the multi-domain latent space representation into the large language model to obtain the target recommendation result of the user. In some embodiments, the result after the mapping process is subjected to multi-domain fusion to obtain the multi-domain latent space representation, including:

[0013] The mapping results are fused in multiple fields through a hybrid expert model to obtain a multi-field latent space representation.

[0014] In some of the embodiments, the mapping results are fused in multiple fields through a hybrid expert model to obtain a multi-field latent space representation, including:

[0015] Inputting the mapping results into multiple expert models respectively to obtain output results corresponding to the multiple expert models;

[0016] A multi-domain latent space representation is obtained according to the results of the mapping processing and the output results corresponding to the multiple expert models.

[0017] In some embodiments, the mapping model is optimized by a target loss function, and the target loss function is obtained by the following formula:

[0018]

[0019] in, is an input prompt instruction for the large language model, The first target prompt instruction of the large language model tokens.

[0020] In some embodiments, before inputting the multi-domain latent space representation into the large language model to obtain the target recommendation result for the user, the method includes:

[0021] The instruction fine-tuning is performed on the large language model, and the target loss function of the instruction fine-tuning is obtained by the following formula:

[0022]

[0023] in, are the parameters of the large language model itself, Additional parameters introduced for fine-tuning of directives.

[0024] In some embodiments, a multi-domain latent space representation is obtained according to the result of the mapping process and the output results corresponding to the multiple expert models, including:

[0025] Inputting the result of the mapping process into a dynamic routing model to obtain a weight corresponding to each of the expert models;

[0026] A multi-domain latent space representation is obtained according to the output results corresponding to the multiple expert models and the weights corresponding to the expert models.

[0027] In some of the embodiments, a multi-domain latent space representation is obtained according to the output results corresponding to the multiple expert models and the weights corresponding to the expert models, including:

[0028] The output results corresponding to the multiple expert models and the weights corresponding to the expert models are weighted to obtain a multi-domain latent space representation.

[0029] In a second aspect, the present invention provides a cross-domain recommendation device, which is characterized by comprising:

[0030] A first acquisition module is used to acquire a large language model and a plurality of pre-trained recommendation models, wherein the plurality of recommendation models correspond to different fields respectively;

[0031] The second acquisition module is used to acquire user interaction records corresponding to multiple fields;

[0032] A latent space representation module, used to input the user's interaction records into the recommendation model of the corresponding field respectively, to obtain the latent space representation of the interaction records;

[0033] A mapping module, configured to map the latent space representation of the interaction record through a mapping model, wherein the input dimension of the mapping model is the same as the dimension of the latent space representation of the interaction record, and the output dimension of the mapping model is the same as the input dimension of the large language model;

[0034] A fusion module, used for fusing the results of the mapping process in multiple fields to obtain a multi-field latent space representation;

[0035] The recommendation module is used to input the multi-domain latent space representation into the large language model to obtain the target recommendation result of the user.

[0036] In a third aspect, the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the cross-domain recommendation method described in the first aspect when executing the computer program.

[0037] In a fourth aspect, the present invention provides a storage medium having a computer program stored thereon, which, when executed by a processor, implements the cross-domain recommendation method described in the first aspect.

[0038] Compared with the related art, the present invention provides a cross-domain recommendation method, which obtains a large language model and multiple pre-trained recommendation models, wherein the multiple recommendation models correspond to different domains respectively; obtains user interaction records corresponding to multiple domains; inputs the user interaction records into the recommendation models of the corresponding domains respectively to obtain the latent space representation of the interaction records; maps the latent space representation of the interaction records through a mapping model, wherein the input dimension of the mapping model is the same as the dimension of the latent space representation of the interaction records, and the output dimension of the mapping model is the same as the input dimension of the large language model; performs multi-domain fusion on the results after the mapping process to obtain multi-domain latent space representation; inputs the multi-domain latent space representation into the large language model to obtain the target recommendation result of the user. The cross-domain recommendation method proposed by the present method utilizes the large language model's ability to grasp world knowledge, aligns the models corresponding to different domains with the large language model, and thus coordinates cross-domain information for recommendation.

[0039] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0041] Figure 1 It is a block diagram of the terminal hardware structure for executing the cross-domain recommendation method provided in the present invention;

[0042] Figure 2 is a flow chart of the cross-domain recommendation method of the present invention;

[0043] Figure 3 It is a structural block diagram of the cross-domain recommendation device of the present invention. DETAILED DESCRIPTION

[0044] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments.

[0045] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the general meaning understood by people with general skills in the technical field to which this application belongs. The words "one", "a", "the", "these" and the like in this application do not indicate a quantitative limitation, and they may be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusions; for example, a process, method and system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" may mean: A exists alone, A and B exist at the same time, and B exists alone. Generally, the character " / " indicates that the objects associated with each other are in an "or" relationship. The terms "first", "second", "third", etc. in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.

[0046] The method embodiments provided in the present invention may be executed in a terminal, a computer or a similar computing device. For example, when running on a terminal, Figure 1 is a block diagram of the terminal hardware structure for executing the cross-domain recommendation method provided in the present invention. Figure 1 As shown, the terminal may include one or more ( Figure 1 Only one is shown in the figure) processor 120 and memory 140 for storing data, wherein processor 120 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA. The above terminal may also include a transmission device 160 and an input and output device 180 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above terminal. Figure 1More or fewer components as shown, or with Figure 1 Different configurations shown.

[0047] The memory 140 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the cross-domain recommendation method in the present invention. The processor 120 executes various functional applications and data processing by running the computer program stored in the memory 140, that is, to implement the above method. The memory 140 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 140 may further include a memory remotely arranged relative to the processor 120, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0048] The transmission device 160 is used to receive or send data via a network. The above network includes a wireless network provided by a communication provider of the terminal. In one example, the transmission device 160 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 160 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.

[0049] The present invention provides a cross-domain recommendation method. Figure 2 is a flow chart of the cross-domain recommendation method of the present invention, such as Figure 2 As shown, the process includes the following steps:

[0050] Obtain a large language model and multiple pre-trained recommendation models, each of which corresponds to a different field.

[0051] Obtain user interaction records corresponding to multiple fields;

[0052] Input the user's interaction records into the recommendation model of the corresponding field to obtain the latent space representation of the interaction records;

[0053] The latent space representation of the interaction record is mapped through a mapping model, the input dimension of the mapping model is the same as the dimension of the latent space representation of the interaction record, and the output dimension of the mapping model is the same as the input dimension of the large language model;

[0054] The results of the mapping process are fused in multiple fields to obtain a multi-field latent space representation;

[0055] The multi-domain latent space representation is input into the large language model to obtain the user's target recommendation result.

[0056] Specifically, each field is recorded as , multiple different fields are recorded as , for the field , user interaction records , the pre-trained recommendation model in each field is denoted as , the latent space representation of the user's interaction record obtained through the corresponding pre-training model is:

[0057]

[0058] The mapping models corresponding to different fields are recorded as , the latent space representation of the interaction record is mapped through the mapping model, and the result after mapping is expressed as:

[0059]

[0060] The input dimension of the mapping model is the same as the dimension of the latent space representation of the interaction record, and the output dimension of the mapping model is the same as the input dimension of the large language model. The result after mapping is input into the large language model to obtain the user's target recommendation result. Through the above method, the recommendation model can be aligned with the large language model. The large language model can understand multiple recommendation models that have been trained in different fields, and the target recommendation results determined for the user are more accurate and comprehensive.

[0061] In order to train the corresponding mapping model, the following prompt instructions can be set for the large language model:

[0062]

[0063] The underlined part needs to be replaced according to different data.

[0064] Each mapping model is optimized by the target loss function, which is obtained by the following formula:

[0065]

[0066] in, For input prompt instructions to large language models, The first instruction for the target prompt of the large language model tokens.

[0067] After optimizing the mapping model corresponding to each field through the above objective loss function, we then fine-tune the large language model through instructions so that the large language model can understand the recommendation tasks in various fields. The instruction settings are as follows:

[0068]

[0069] In some of the embodiments, the result of the mapping process is Perform multi-domain fusion to obtain multi-domain latent space representation, including:

[0070] The results of mapping processing are fused in multiple fields through a hybrid expert model to obtain a multi-field latent space representation.

[0071] In some of the embodiments, the mapping results are fused in multiple fields through a hybrid expert model to obtain a multi-field latent space representation, including:

[0072] Inputting the results after mapping processing into multiple expert models respectively to obtain output results corresponding to the multiple expert models;

[0073] According to the results of the mapping process and the corresponding output results of multiple expert models, a multi-domain latent space representation is obtained.

[0074] In some of the embodiments, a multi-domain latent space representation is obtained according to the result of the mapping process and the output results corresponding to the multiple expert models, including:

[0075] Input the mapping results into the dynamic routing model to obtain the weight corresponding to each expert model;

[0076] According to the output results corresponding to multiple expert models and the weights corresponding to the expert models, a multi-domain latent space representation is obtained.

[0077] In some of the embodiments, a multi-domain latent space representation is obtained according to the output results corresponding to the multiple expert models and the weights corresponding to the expert models, including:

[0078] The output results corresponding to the multiple expert models and the weights corresponding to the expert models are weighted to obtain a multi-domain latent space representation.

[0079] Specifically, the hybrid expert model includes Expert Model , the result after mapping Input to each expert model , the output results corresponding to multiple expert models are expressed as:

[0080]

[0081] Using dynamic routing model Get each expert model The weight vector is expressed as:

[0082]

[0083] Through multiple expert models The weighted linear combination of obtains a unified latent space representation in multiple fields. The unified latent space representation in multiple fields is expressed as:

[0084]

[0085] Design the following instructions for the large language model to optimize the expert model Parameters:

[0086]

[0087] Before inputting the multi-domain latent space representation into the large language model and obtaining the user's target recommendation result, it includes: fine-tuning the instruction of the large language model. The target loss function of instruction fine-tuning is obtained by the following formula:

[0088]

[0089] in, are the parameters of the large language model itself, Additional parameters introduced for fine-tuning of directives.

[0090] The above loss function enables the large language model to learn recommendation tasks in various fields.

[0091] This method establishes a cross-domain recommendation framework. Although traditional recommendation methods have shown certain performance in both academia and industry, their performance is limited because they can only learn in a specific domain and cannot utilize cross-domain external world knowledge. This method proposes a cross-domain recommendation method based on a large language model. By utilizing the large language model's ability to grasp world knowledge, the domain models are aligned with the large language model, thereby coordinating cross-domain information for recommendation.

[0092] To verify the above advantages, we use the representative recommendation models GRU4Rec, Caser, SAS Rec, LLaMA2, ChatRec, MoRec, TallRec, and LLaRA as the basic models, and conduct experiments on four public datasets in different fields: MovieLens, LastFM, GoodReads, and Steam. The experimental results are shown in Table 1:

[0093] Table 1: Performance comparison of different methods on four datasets

[0094]

[0095] From Table 1, we can find that on the data sets of four different fields, the present invention (Ours) outperforms the traditional basic recommendation model and the recommendation model based on the large language model in terms of performance, indicating that the present invention can better utilize the large language model to integrate cross-domain external knowledge for recommendation and achieve better results, proving the advantages of the present invention in the field of recommendation systems.

[0096] The present invention can be applied to the recommendation models of various Internet platforms. It can use the excellent world knowledge integration ability of the large model to coordinate information in other recommendation fields to provide users with recommendation results, thereby providing users with a recommendation list that is more in line with their interests.

[0097] It should be noted that the steps shown in the above process or the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0098] The present invention also provides a cross-domain recommendation device, which is used to implement the above-mentioned embodiments and preferred implementation modes, and will not be repeated hereafter. The terms "module", "unit", "subunit", etc. used below may be a combination of software and / or hardware that implements predetermined functions. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0099] Figure 3 is a structural block diagram of the cross-domain recommendation device of the present invention, such as Figure 3 As shown, the device comprises:

[0100] A first acquisition module is used to acquire a large language model and multiple pre-trained recommendation models, where the multiple recommendation models correspond to different fields respectively;

[0101] The second acquisition module is used to acquire user interaction records corresponding to multiple fields;

[0102] The latent space representation module is used to input the user's interaction records into the recommendation model of the corresponding field to obtain the latent space representation of the interaction records;

[0103] A mapping module, used to map the latent space representation of the interaction record through a mapping model, wherein the input dimension of the mapping model is the same as the dimension of the latent space representation of the interaction record, and the output dimension of the mapping model is the same as the input dimension of the large language model;

[0104] The fusion module is used to fuse the results of the mapping process in multiple fields to obtain a multi-field latent space representation;

[0105] The recommendation module is used to input the multi-domain latent space representation into the large language model to obtain the target recommendation result of the user.

[0106] In the above device, the large language model's ability to grasp world knowledge is used to align the models corresponding to different fields with the large language model. The large language model can understand multiple recommendation models that have been trained in different fields, and the target recommendation results for determined users are more accurate and comprehensive.

[0107] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.

[0108] The present invention also provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0109] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0110] Optionally, in one embodiment, the processor may be configured to perform the following steps through a computer program:

[0111] Obtain a large language model and multiple pre-trained recommendation models, each of which corresponds to a different field.

[0112] Obtain user interaction records corresponding to multiple fields;

[0113] Input the user's interaction records into the recommendation model of the corresponding field to obtain the latent space representation of the interaction records;

[0114] The latent space representation of the interaction record is mapped through a mapping model, the input dimension of the mapping model is the same as the dimension of the latent space representation of the interaction record, and the output dimension of the mapping model is the same as the input dimension of the large language model;

[0115] The results of the mapping process are fused in multiple fields to obtain a multi-field latent space representation;

[0116] The multi-domain latent space representation is input into the large language model to obtain the user's target recommendation result.

[0117] It should be noted that the specific examples of the electronic device can refer to the examples described in the embodiments and optional implementations of the above method, and will not be repeated in this embodiment.

[0118] In addition, in combination with the cross-domain recommendation method provided in the present invention, a storage medium may be provided in the present invention to implement the cross-domain recommendation method. The storage medium stores a computer program, and when the computer program is executed by a processor, any cross-domain recommendation method in the above embodiments is implemented.

[0119] It should be understood that the specific embodiments described herein are only used to explain the application, rather than to limit it. Based on the embodiments provided in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the protection scope of this application.

[0120] Obviously, the drawings are only some examples or embodiments of the present application. For ordinary technicians in the field, the present application can also be applied to other similar situations based on these drawings without creative work. In addition, it is understandable that although the work done in this development process may be complicated and lengthy, for ordinary technicians in the field, certain changes in design, manufacturing or production based on the technical content disclosed in this application are only conventional technical means and should not be regarded as insufficient content disclosed in this application.

[0121] The term "embodiment" in this application refers to a specific feature, structure or characteristic described in conjunction with the embodiment that can be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily mean the same embodiment, nor does it mean that it is mutually exclusive with other embodiments and is independent or optional. It is clearly or implicitly understood by those of ordinary skill in the art that the embodiments described in this application can be combined with other embodiments without conflict.

Claims

1. A cross-domain recommendation method, characterized in that: include: Obtain a large language model and multiple pre-trained recommendation models, where the multiple recommendation models correspond to different fields respectively; Obtain user interaction records corresponding to multiple fields; Inputting the user's interaction records into the recommendation model of the corresponding field respectively to obtain the latent space representation of the interaction records; Mapping the latent space representation of the interaction record by using a mapping model, wherein an input dimension of the mapping model is the same as a dimension of the latent space representation of the interaction record, and an output dimension of the mapping model is the same as an input dimension of the large language model; Perform multi-domain fusion on the results of the mapping process to obtain a multi-domain latent space representation; The results of the mapping process are fused in multiple fields to obtain a multi-field latent space representation, including: Performing multi-domain fusion on the mapping results through a hybrid expert model to obtain a multi-domain latent space representation; Each field is recorded as , multiple different fields are recorded as , for the field , user interaction records , the pre-trained recommendation model in each field is denoted as , the latent space representation of the user's interaction record obtained through the corresponding pre-training model is: The mapping results are fused in multiple fields through a hybrid expert model to obtain a multi-field latent space representation, including: Inputting the mapping results into multiple expert models respectively to obtain output results corresponding to the multiple expert models; The mapping models corresponding to different fields are recorded as , the latent space representation of the interaction record is mapped through the mapping model, and the result after mapping is expressed as: Obtaining a multi-domain latent space representation according to the result of the mapping process and the output results corresponding to the multiple expert models; Each mapping model is optimized by the target loss function, which is obtained by the following formula: in, For input prompt instructions to large language models, The first instruction for the target prompt of the large language model Tokens; Inputting the multi-domain latent space representation into the large language model to obtain the target recommendation result of the user; The input dimension of the mapping model is the same as the dimension of the latent space representation of the interaction record, and the output dimension of the mapping model is the same as the input dimension of the large language model. The result after mapping processing is input into the large language model to obtain the user's target recommendation result.

2. The cross-domain recommendation method according to claim 1, characterized in that: Before inputting the multi-domain latent space representation into the large language model to obtain the target recommendation result for the user, the method includes: The instruction fine-tuning is performed on the large language model, and the target loss function of the instruction fine-tuning is obtained by the following formula: in, are the parameters of the large language model itself, Additional parameters introduced for fine-tuning of directives.

3. The cross-domain recommendation method according to claim 1, characterized in that: According to the result after the mapping process and the output results corresponding to the multiple expert models, a multi-domain latent space representation is obtained, including: Inputting the result of the mapping process into a dynamic routing model to obtain a weight corresponding to each of the expert models; A multi-domain latent space representation is obtained according to the output results corresponding to the multiple expert models and the weights corresponding to the expert models.

4. The cross-domain recommendation method according to claim 3, characterized in that: According to the output results corresponding to the multiple expert models and the weights corresponding to the expert models, a multi-domain latent space representation is obtained, including: The output results corresponding to the multiple expert models and the weights corresponding to the expert models are weighted to obtain a multi-domain latent space representation.

5. A cross-domain recommendation device, characterized in that: include: A first acquisition module is used to acquire a large language model and a plurality of pre-trained recommendation models, wherein the plurality of recommendation models correspond to different fields respectively; The second acquisition module is used to acquire user interaction records corresponding to multiple fields; A latent space representation module, used to input the user's interaction records into the recommendation model of the corresponding field respectively, to obtain the latent space representation of the interaction records; A mapping module, configured to perform mapping processing on the latent space representation of the interaction record through a mapping model, wherein the input dimension of the mapping model is the same as the dimension of the latent space representation of the interaction record, and the output dimension of the mapping model is the same as the input dimension of the large language model; A fusion module, used for fusing the results of the mapping process in multiple fields to obtain a multi-field latent space representation; The results of the mapping process are fused in multiple fields to obtain a multi-field latent space representation, including: Performing multi-domain fusion on the mapping results through a hybrid expert model to obtain a multi-domain latent space representation; Each field is recorded as , multiple different fields are recorded as , for the field , user interaction records , the pre-trained recommendation model in each field is denoted as , the latent space representation of the user's interaction record obtained through the corresponding pre-training model is: The mapping results are fused in multiple fields through a hybrid expert model to obtain a multi-field latent space representation, including: Inputting the mapping results into multiple expert models respectively to obtain output results corresponding to the multiple expert models; The mapping models corresponding to different fields are recorded as , the latent space representation of the interaction record is mapped through the mapping model, and the result after mapping is expressed as: Obtaining a multi-domain latent space representation according to the result of the mapping process and the output results corresponding to the multiple expert models; Each mapping model is optimized by the target loss function, which is obtained by the following formula: in, For input prompt instructions to large language models, The first instruction for the target prompt of the large language model Tokens; A recommendation module, used for inputting multi-domain latent space representations into the large language model to obtain a target recommendation result for the user; The input dimension of the mapping model is the same as the dimension of the latent space representation of the interaction record, and the output dimension of the mapping model is the same as the input dimension of the large language model. The result after mapping processing is input into the large language model to obtain the user's target recommendation result.

6. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to execute the cross-domain recommendation method according to any one of claims 1 to 4.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the cross-domain recommendation method according to any one of claims 1 to 4 are implemented.