Dynamic commodity recommendation method and system based on model reuse
By introducing a lightweight adapter into the product recommendation system for rapid fine-tuning and merging with historical adapters, a unified recommendation model is generated. This solves the problem of difficulty in capturing and integrating user interests in existing technologies, and achieves efficient, low-cost, and real-time response to user interests.
Patent Information
- Application Number
- CN202511950404.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-23
- Publication Date
- 2026-03-17
AI Technical Summary
Existing product recommendation systems struggle to efficiently capture users' dynamic interests, especially when user interests change frequently. They cannot effectively integrate users' multi-dimensional preferences, and their computational costs are high, making it difficult to achieve real-time responses.
By introducing lightweight adapters for rapid fine-tuning, short-term user interests are captured. By reusing and integrating historical adapters, multi-dimensional user interests are comprehensively represented. A unified recommendation model is generated using a basic recommendation model and a task-specific adapter library, enabling accurate responses to dynamic changes in user interests.
A dynamic product recommendation system based on user interests was implemented. A new, unified recommendation model was generated using a basic recommendation model and a task-specific adapter library, which solved the technical problems existing in the prior art and achieved efficient, low-cost, and real-time response to user interests.
Smart Images

Figure CN121685069A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence and e-commerce technology, specifically a method and system for dynamic interest-based product recommendation based on model reuse technology, achieved through adapter fine-tuning and fusion. Background Technology
[0002] With the booming development of e-commerce platforms, product recommendation systems have become a core component for enhancing user experience and platform commercial value. Their core task is to accurately filter potentially interesting content from a massive amount of products for users. However, user interests are not static but dynamically evolve with time, context, and external events—a phenomenon known as "interest drift." For example, users may show strong interest in outdoor sports products on weekends, while focusing more on office supplies on weekdays. Furthermore, e-commerce platforms frequently update their product databases, with a large number of new products being added. How to enable recommendation systems to quickly understand and promote these "cold start" products lacking historical interaction data is also a major challenge.
[0003] Existing recommender system solutions primarily rely on periodically retraining the model using full datasets or employing online learning techniques for model updates. However, full dataset retraining is computationally expensive and latency-prone, making it difficult to respond to user interests in real time. While online learning can incorporate new data more quickly, it carries the risk of "catastrophic forgetting," meaning that as the model learns new knowledge, it rapidly forgets previously learned knowledge, leading to a decline in its ability to capture long-term user preferences. Furthermore, both full dataset training and online learning typically maintain only a single, uniform model, making it difficult to gracefully balance users' rapidly changing short-term interests with stable, enduring long-term interests.
[0004] Model reuse technology offers a new approach to addressing these issues. It aims to leverage existing pre-trained models and quickly adapt them to new tasks or data with minimal adjustments. However, existing model reuse methods are largely limited to simple model fine-tuning, failing to systematically address how to efficiently integrate the multi-dimensional interests exhibited by users at different times and in different scenarios, and consolidate them into a unified and lightweight model. Therefore, there is an urgent need in this field for a dynamic product recommendation method that can capture users' dynamic interests at low cost and high efficiency, and effectively integrate their multi-dimensional preferences, to solve the problems raised in the background. Summary of the Invention
[0005] The summary section of this application is intended to provide a brief overview of the concepts, which will be described in detail in the detailed description section below. This summary section is not intended to identify key or essential features of the claimed technical solutions, nor is it intended to limit the scope of the claimed technical solutions.
[0006] To address the problems and shortcomings of existing technologies, this invention aims to provide a dynamic product recommendation method and system based on model reuse. This invention introduces a lightweight adapter for rapid fine-tuning to capture short-term interests, and reuses and merges historical adapters to comprehensively represent users' multi-dimensional interests. This achieves accurate and real-time response to dynamic changes in user interests while maintaining model stability and efficiency, thus solving the problems mentioned in the background.
[0007] To achieve the above objectives, the present invention provides the following technical solution: As a first aspect of this application, the present invention discloses a dynamic product recommendation method based on model reuse, comprising the following steps: Step 1: Obtain the user's behavior sequence data within the preset event window and extract the feature code of the user's recent product preferences; Step 2: Based on the basic recommendation model, inject the task-specific adapter library, train the basic recommendation model using the feature encoding of the user's recent product preferences, and generate a new adapter which is then stored in the task-specific adapter library; Step 3: Then, using the interest tag vector and real-time search query terms of each adapter in the task-specific adapter library, select the adapter with the highest similarity as a historical adapter and store it in the task-specific adapter library. Step 4: Merge the historical adapter and the new adapter to obtain the recommendation adapter, and load it into the basic recommendation model to obtain the unified recommendation model; Step 5: Use a unified recommendation model to predict and rank the products of user interest to generate a recommendation list.
[0008] Preferably, in step 1, a dynamic event window is set for each user, and the user's product interaction behavior within a preset time window is collected. Multiple text fragments are generated based on the product interaction behavior, and these text fragments are combined in timestamp order to form a complete user behavior sequence text. Then, the user behavior sequence text is input into a pre-trained language model to extract the feature encoding of the user's recent product preferences.
[0009] Preferably, step 2 further includes the following steps: Step 2.1: Provide users with a basic recommendation model for pre-training; Step 2.2: Inject a lightweight task-specific adapter library into a specific network layer of the basic recommendation model; Step 2.3: Concatenate the collected behavioral sequence data and the feature codes of users' recent product preferences to form positive and negative samples; Step 2.4: Input the positive and negative samples into the basic recommendation model to output the preference score of the predicted product; Step 2.5: Use binary cross-entropy loss as the loss function to optimize the model until convergence of the generated new adapter. ; Step 2.6, the new adapter Store it in the task-specific adapter library and set its corresponding tag as the feature code of the user's recent product preferences.
[0010] Preferably, step 3 further includes the following steps: Step 3.1: Obtain the feature encoding of the user's recent product preferences as a query vector. ; Step 3.2, utilize each adapter in the task-specific adapter library. The cosine similarity is calculated between the attached interest tag vector and the query vector; Step 3.3: Select from the task-specific adapter library The adapter with the highest cosine similarity is used as the historical adapter.
[0011] Preferably, step 4 further includes the following steps: Step 4.1, for each adapter in the task-specific adapter library... Set the coefficients and perform coefficient normalization; Step 4.2: Use the normalized coefficients to perform a weighted average to fuse the historical adapter and the new adapter. Parameters to obtain recommended adapter ; Step 4.3, put the recommended adapter The unified recommendation model is obtained by loading it into the initial basic recommendation model.
[0012] Preferably, the lightweight task-specific adapter library injected in step 2.2 is a small feedforward neural network with a bottleneck structure, and the number of parameters is only 0.7% of the basic recommendation model, thereby ensuring the efficiency of fine-tuning.
[0013] Preferably, in step 2.3, when training the basic recommendation model using the collected user recent interest feature data and corresponding product feature data, only the parameters of the adapters in the task-specific adapter library are updated during the training process. All parameters of the basic recommendation model are frozen and do not participate in gradient updates, so that the basic recommendation model can quickly adapt to the user's current dynamic interests.
[0014] As a second aspect of this application, the present invention also discloses a dynamic product recommendation system based on model reuse, comprising: The data collection module is used to acquire user behavior sequence data within a preset event window and extract feature codes of the user's recent product preferences; The model adaptation module is used to inject a task-specific adapter library into the basic recommendation model, train the basic recommendation model using the feature encoding of the user's recent product preferences, and generate a new adapter to be stored in the task-specific adapter library. The model reuse module is used to select the adapter with the highest similarity as a historical adapter and store it in the task-specific adapter library by using the interest tag vector of each adapter in the task-specific adapter library and the real-time search query terms. The historical adapter is then merged with the new adapter to obtain the recommended adapter, and the recommended adapter is loaded into the basic recommendation model to obtain the unified recommendation model. The dynamic recommendation module is used to predict and rank products of user interest using a unified recommendation model to generate a recommendation list.
[0015] As a third aspect of this application, the present invention also discloses an electronic device comprising: At least one processor, and a memory communicatively connected to said at least one processor; The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the steps described above in the dynamic product recommendation method based on model reuse.
[0016] As a fourth aspect of this application, the present invention also discloses a computer storage medium having a computer program stored thereon, characterized in that the computer program, when executed by a processor, implements the steps of the above-described dynamic product recommendation method based on model reuse.
[0017] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention provides a dynamic product recommendation method and system based on model reuse. First, it acquires user behavior sequence data within a preset event window and extracts feature codes representing the user's recent product preferences. A task-specific adapter library is injected into the basic recommendation model, and the feature codes representing the user's recent product preferences are used to train the basic recommendation model, generating new adapters which are then stored in the task-specific adapter library. Next, using the interest tag vectors of each adapter in the task-specific adapter library and real-time search query terms, the adapter with the highest similarity is selected as a historical adapter and stored in the task-specific adapter library. The historical adapters and new adapters are merged to obtain recommendation adapters, which are then loaded into the basic recommendation model to obtain a unified recommendation model. The unified recommendation model is used to predict and rank the products of the user's interests to generate a recommendation list. Compared with existing technologies, this invention uses a lightweight adapter library to quickly fine-tune recent data, enabling it to keenly capture and respond to short-term changes in user interests, resulting in more timely and accurate recommendation results. Furthermore, by fusing historical and current adapters, it creatively integrates the user's multi-time-period and multi-dimensional interests into a single model, achieving unified modeling of the user's complex interest structure. Meanwhile, the method of this invention is efficient and low-cost. The entire process is based on adapter fine-tuning and fusion parameters with a small number of parameters and fast training speed. The computational and storage overhead is far lower than full model fine-tuning or maintaining multiple independent models, making it very suitable for the deployment of large-scale online recommendation systems. Attached Figure Description
[0018] The accompanying drawings, which form part of this application, are used to provide a further understanding of the application and to make other features, objects, and advantages of the application more apparent. The illustrative embodiments and descriptions of this application are used to explain the application and do not constitute an undue limitation of the application.
[0019] In the attached diagram: Figure 1 This is a block diagram showing the main steps of the dynamic product recommendation method based on model reuse in an embodiment of the present invention. Figure 2 This is a flowchart illustrating the steps for extracting user's recent product preference feature codes within the model reuse-based dynamic product recommendation method in this embodiment of the invention. Figure 3 This is a connection diagram of the steps for generating a new adapter in the dynamic product recommendation method based on model reuse in an embodiment of the present invention; Figure 4 This is a flowchart showing the steps involved in obtaining a unified recommendation model within the dynamic product recommendation method based on model reuse in this embodiment of the invention. Figure 5 This is a flowchart illustrating the steps involved in generating a recommendation list within the model reuse-based dynamic product recommendation method in this embodiment of the invention. Detailed Implementation
[0020] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure 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 disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0021] It should also be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings. Unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other.
[0022] Example This invention discloses a dynamic product recommendation method based on model reuse. The invention is further illustrated below with specific embodiments. It should be understood that these embodiments are for illustrative purposes only and not for limiting the scope of the invention. After reading this invention, any modifications of the invention in various equivalent forms by those skilled in the art fall within the scope defined by the appended claims.
[0023] This embodiment uses an e-commerce platform as an application scenario to explain in detail the implementation process of this method. This e-commerce platform has a large number of users and products, and aims to build a system that can respond to changes in user interests in real time and provide personalized recommendations.
[0024] First, a pre-trained base recommendation model needs to be built. This model uses a deep neural network structure called BST (Behavior Sequence Transformer) and has been pre-trained to possess powerful feature interaction and user interest mining capabilities. This pre-trained base recommendation model will serve as the foundation for all subsequent personalized recommendations, and its parameters will be frozen in the subsequent process. Simultaneously, the system needs to maintain an adapter library to store task-specific adapters trained for different users at different time periods; this is the task-specific adapter library. Each adapter entry includes adapter parameters, associated username ID, training timestamp, amount of data used, and key interest tags (such as "sports and outdoor," "digital 3C," etc.). (Refer to...) Figure 1 As shown, the present invention mainly includes the following steps: Step 1: Obtain the user's behavior sequence data within the preset event window and extract the feature code of the user's recent product preferences; Step 2: Based on the basic recommendation model, inject the task-specific adapter library, train the basic recommendation model using the feature encoding of the user's recent product preferences, generate new adapters and store them in the task-specific adapter library; Step 3: Then, using the interest tag vector of each adapter in the task-specific adapter library and the real-time search query terms, select the adapter with the highest similarity as the historical adapter and store it in the task-specific adapter library. Step 4: Merge the historical adapter and the new adapter to obtain the recommendation adapter, and load it into the basic recommendation model to obtain the unified recommendation model; Step 5: Use a unified recommendation model to predict and rank the products of user interest to generate a recommendation list.
[0025] Specifically, such as Figure 2 As shown, step 1 involves acquiring user behavior sequence data within a preset event window and extracting feature codes representing the user's recent product preferences. Specifically, the system sets a dynamic event window for each user, such as the past 6 hours or the current session period. Within the set window, user behavior sequence data is collected within a preset time window and sorted by timestamp. This behavior sequence data includes behavior types and associated text information, where behavior types include, but are not limited to, product clicks, browsing duration, search queries, adding to cart, favorites, and purchase history. For example, for product interaction behavior, the text information is the product title, and we generate the text fragment "[CLS] Click Wireless Bluetooth Noise Cancelling Headphones Electronic Digital [SEP]". For search behavior, the text information is the search query, and we generate the text fragment "[CLS] Search for Recommended Sports Running Headphones [SEP]". The collected behavior text fragments are combined in chronological order to form a complete user behavior sequence text. The complete behavioral sequence text is then input into a pre-trained language model, BERT. The hidden state vector corresponding to the [CLS] label is extracted as the feature encoding of the user's recent product preferences, and the hidden state vector corresponding to the preferred product name is extracted as the product's feature encoding. Therefore, this step outputs a set of feature vectors representing the user's recent preferences and corresponding products, preparing for subsequent model adaptation.
[0026] like Figure 3 As shown, in step 2, a task-specific adapter is injected based on the basic recommendation model. The basic recommendation model is trained using feature encodings of the user's recent product preferences, generating a new adapter which is then stored in the task-specific adapter library. The process also includes the following steps: Step 2.1: Provide users with a basic recommendation model for pre-training; Step 2.2: Inject a lightweight task-specific adapter library into a specific network layer of the basic recommendation model; Step 2.3: Concatenate the collected behavioral sequence data and the feature codes of users' recent product preferences to form positive and negative samples; Step 2.4: Input the positive and negative samples into the basic recommendation model to output the predicted product preference score; Step 2.5: Use binary cross-entropy loss as the loss function to optimize the model until convergence of the generated new adapter. ; Step 2.6, insert the new adapter Store it in the task-specific adapter library and set its corresponding label as the feature encoding of the user's recent product preferences.
[0027] First, a pre-trained model is provided to the user, using the basic recommendation model. All parameters of the pre-trained model, representing general patterns and long-term interest paradigms learned from all user data, are frozen to ensure model stability. A lightweight task-specific adapter library is injected after the feedforward network in the Transformer block of the basic recommendation model. This task-specific adapter library is a small feedforward neural network with a bottleneck structure, containing only 0.7% of the parameters of the basic recommendation model, thus ensuring efficient fine-tuning. Next, the basic recommendation model is trained using the user's recent interest feature data and corresponding product feature data collected in step 1. Crucially, during training, only the adapter parameters of the newly injected task-specific adapter library are updated for training and fine-tuning, avoiding the huge computational overhead of full-parameter fine-tuning. All parameters of the basic recommendation model are frozen and do not participate in gradient updates, allowing the basic recommendation model to quickly adapt to the user's current dynamic interests.
[0028] Specifically, each training batch consists of positive and negative samples, each sample being a tuple containing (user feature, product feature, and label). Positive samples represent samples clicked or purchased by the user, labeled 1. Negative samples represent products randomly sampled from all products, labeled 0. For each (user feature, product feature) pair in the batch, we concatenate them and input them into the base recommendation model, outputting a scalar between 0 and 1. scalar The representative model predicts the user's preference score for the product. We then use the binary cross-entropy loss as the loss function for optimization, expressed as: in, N It refers to the batch size. It is a commodity The true label, It is the model on the sample The predicted score. We perform multiple rounds of training until the model converges, aiming to make the model output recommendations that better reflect the user's recent behavior. After training, a new adapter is generated. It is then stored in the task-specific adapter library, and its corresponding label is set to the feature code of the user's recent product preferences obtained in step 1.
[0029] like Figure 4 As shown, step 3 involves using the interest tag vector of each adapter in the task-specific adapter library and the real-time search query terms to select the adapter with the highest similarity as a historical adapter and store it in the task-specific adapter library. This further includes the following steps: Step 3.1: Obtain the feature encoding of the user's recent product preferences as the query vector. ; Step 3.2, utilize each adapter in the task-specific adapter library The cosine similarity is calculated between the attached interest tag vector and the query vector; Step 3.3, Select from the task-specific adapter library The adapter with the highest cosine similarity is used as the historical adapter.
[0030] Furthermore, the feature encoding of the user's recent product preferences is obtained as the query vector. Each stored adapter in the task-specific adapter library Each one comes with its corresponding dominant interest label vector from the training time. ,For example The tag vector might be close to the word vector for "office supplies". Calculate the query vector. With each interest tag vector The cosine similarity is expressed as Based on the calculated similarity scores, the Top-K most relevant adapters are selected as historical adapters. For example, it is possible to retrieve (1) : Represents the user's interest in "office supplies" during weekday lunch breaks. (2) : Represents the user's "sports and fitness" interest last weekend. (3) Just finished training This represents the user's immediate interest in browsing "New Headphones".
[0031] Step 4 involves merging the historical adapter and the new adapter to obtain the recommendation adapter, which is then loaded into the base recommendation model to obtain the unified recommendation model. This step further includes the following steps: Step 4.1, for each adapter in the current task-specific adapter library Set the coefficients and perform coefficient normalization; Step 4.2: Use the normalized coefficients to perform a weighted average to fuse the historical adapter and the new adapter. Parameters to obtain recommended adapter .
[0032] Step 4.3, recommend the adapter The unified recommendation model is obtained by loading it into the initial base recommendation model.
[0033] A weighted average method is used as the fusion strategy to combine the retrieved historical adapters with the newly trained adapters. Perform parameter fusion. Specifically, for each adapter in the current task-specific adapter library... Setting coefficients The current task-specific adapter library already includes both historical and new adapters. .in, It is the attenuation rate hyperparameter. This is the time difference between the training time and the current time. Then, the coefficients are normalized. The normalized coefficients are used to weight and average the results. Normalization ensures that the outputs of different adapters are on the same scale. The weight coefficients are set based on time decay. The normalized coefficients are multiplied by their corresponding weights, and then a weighted sum is performed to form a new, unified fused adapter. , represented as Fusion adapter The parameter space integrates users' multi-dimensional interests, ranging from near to far. Finally, the merged adapter... Loaded into the initial base recommendation model, at this point the base recommendation model and Together, they form a unified recommendation model tailored to the user and capable of comprehensively understanding their multi-dimensional interests.
[0034] like Figure 5 As shown, step 5 involves using a unified recommendation model to predict and rank products of user interest, generating a recommendation list. When a user initiates a real-time access request (such as refreshing a page), different user feature encodings are used for different user behaviors. If the user is searching, the search keywords are input into the pre-trained language model BERT to extract the latent vector corresponding to [CLS] as the user feature. If the user is refreshing a page, the feature encoding of the user's recent product preferences obtained in step 1 is used as the user feature. For the corresponding candidate products, we also input the latent vector corresponding to [CLS] from the pre-trained language model BERT as their corresponding product feature. Then, we concatenate the user features and candidate product features together and input them into the unified recommendation model. For each product... The model outputs a scalar between 0 and 1. This represents the user's preference score for the product. Each candidate product is ranked based on its score, generating and returning a Top-N recommendation list. This is because the unified recommendation model integrates the user's long-term preferences (guaranteed by the frozen base recommendation model) and dynamic, multi-dimensional short-term interests (provided by the recommendation adapter). (This ensures stability), thus the generated recommendation list can achieve both stability and accurate real-time personalization.
[0035] To implement the above embodiments, this application also proposes a dynamic product recommendation system based on model reuse, including a data collection module, a model adaptation module, a model reuse module, and a dynamic recommendation module. The data collection module acquires user behavior sequence data within a preset event window and extracts feature codes representing the user's recent product preferences. The model adaptation module injects a task-specific adapter library into a basic recommendation model, trains the basic recommendation model using the feature codes representing the user's recent product preferences, and generates new adapters which are then stored in the task-specific adapter library. The model reuse module uses the interest tag vectors and real-time search query terms of each adapter in the task-specific adapter library to select the adapter with the highest similarity as a historical adapter, stores it in the task-specific adapter library, merges the historical adapter with the new adapter to obtain a recommendation adapter, and loads the recommendation adapter into the basic recommendation model to obtain a unified recommendation model. The dynamic recommendation module uses the unified recommendation model to predict and rank the user's interested products to generate a recommendation list.
[0036] To implement the above embodiments, this application also discloses an electronic device. The electronic device may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) that can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) or a program loaded from a storage device into a random access memory (RAM). Various programs and data required for the operation of the electronic device are also stored in the RAM. The processing unit, ROM, and RAM are interconnected via a bus. An input / output (I / O) interface is also connected to the bus. Typically, the following devices can be connected to the I / O interface: input devices including, for example, a touchscreen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices including, for example, magnetic tape, hard disk, etc.; and communication devices. The communication device allows the electronic device to communicate wirelessly or wiredly with other devices to exchange data. Although electronic devices with various devices are shown, it should be understood that it is not required to implement or possess all of the shown devices. More or fewer devices may be implemented or possessed alternatively.
[0037] In particular, according to some embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, some embodiments of this disclosure include a computer program product comprising a computer program carried on a computer storage medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processing device, it performs the functions defined above in the methods of some embodiments of this disclosure.
[0038] It should be noted that the computer storage medium in some embodiments of this disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A 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 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.
[0039] In some embodiments of this disclosure, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device. In some embodiments of this disclosure, 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 storage medium other than a 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 storage medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0040] In other implementations, clients and servers may communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol), and may interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any currently known or future-developed networks.
[0041] The aforementioned computer storage medium may be included within the aforementioned electronic device, or it may exist independently and not assembled into the electronic device. The aforementioned computer storage medium carries one or more programs that, when executed by the electronic device, enable the electronic device to implement a dynamic product recommendation method based on model reuse.
[0042] Computer program code for performing operations of some embodiments of this disclosure can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming 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. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0043] 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 the present disclosure. 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. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may 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. Units described in some embodiments of the present disclosure may be implemented in software or hardware. The described units may also be located in a processor, and the names of these units do not necessarily constitute a limitation on the unit itself.
[0044] 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), and so on.
[0045] All technologies not described in detail in this invention are existing technologies. The above descriptions are merely some preferred embodiments of this disclosure and explanations of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the embodiments of this disclosure 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 equivalent features without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions disclosed in the embodiments of this disclosure.
Claims
1. A dynamic commodity recommendation method based on model reuse, characterized in that, The method comprises the following steps: Step 1, obtaining the behavior sequence data of the user within a preset event window, and extracting the feature code of the user's recent commodity preference; Step 2, injecting a task-specific adapter library based on a basic recommendation model, training the basic recommendation model using the feature code of the user's recent commodity preference, and generating a new adapter and storing it in the task-specific adapter library; Step 3, using the interest label vector of each adapter in the task-specific adapter library and the real-time search query word to select the adapter with the highest similarity as the historical adapter and store it in the task-specific adapter library; Step 4, fusing the historical adapter and the new adapter to obtain a recommended adapter, and loading it into the basic recommendation model to obtain a unified recommendation model; Step 5, using the unified recommendation model to predict and sort the user's interest commodities to generate a recommendation list.
2. The dynamic commodity recommendation method based on model reuse according to claim 1, wherein: In the step 1, a dynamic event window is set for each user, the user's commodity interaction behavior within a preset time window is collected, a plurality of text segments are generated based on the commodity interaction behavior, the text segments are combined in chronological order to form a complete user behavior sequence text, and the user behavior sequence text is input into a pre-trained language model to obtain the feature code of the user's recent commodity preference.
3. The dynamic commodity recommendation method based on model reuse according to claim 2, characterized in that, The step 2 further comprises the following steps: Step 2.1, providing a basic recommendation model for pre-training for the user; Step 2.2, injecting a lightweight task-specific adapter library in a specific network layer of the basic recommendation model; Step 2.3, splicing the collected behavior sequence data and the feature code of the user's recent commodity preference into positive and negative samples; Step 2.4, inputting the positive and negative samples into the basic recommendation model to output the preference score of the predicted commodity; Step 2.5, the model is optimized with binary cross-entropy loss as the loss function until convergence to generate a new adapter ; Step 2.
6. Store the new adapter in the task-specific adapter library and set its corresponding label to the feature encoding of the user's recent product preferences. Step 2.
6. Store the new adapter in the task-specific adapter library and set its corresponding label to the feature encoding of the user's recent product preferences.
4. The dynamic commodity recommendation method based on model reuse according to claim 3, characterized in that, The step 3 further comprises the following steps: Step 3.1, obtaining the feature encoding of the user's recent commodity preference as a query vector ; Step 3.2, utilizing each adapter in the task-specific adapter library The accompanying interest tag vector and the query vector calculate the cosine similarity; Step 3.
3. Selecting from the task-specific adapter library the adapter with the highest cosine similarity as the history adapter. the highest cosine similarity as the history adapter.
5. The dynamic commodity recommendation method based on model reuse according to claim 4, characterized in that, The step 4 further comprises the following steps: Step 4.1, for each adapter in the currently described task-specific adapter library Set the coefficients and perform coefficient normalization; Step 4.2, weighted average fusion of the historical and new adapters using the normalized coefficients parameters to obtain the recommended adapter ; Step 4.3, the recommendation adapter loads the initial base recommendation model into a unified recommendation model.
6. The dynamic commodity recommendation method based on model reuse according to claim 3, characterized in that: The lightweight task-specific adapter library injected in the step 2.2 is a small feedforward neural network with a bottleneck structure, and the parameter quantity is only 0.7% of the basic recommendation model, thereby ensuring the efficiency of fine-tuning.
7. The dynamic commodity recommendation method based on model reuse according to claim 3, characterized in that: In the step 2.3, when the user's recent interest feature data and the corresponding commodity feature data are used to train the basic recommendation model, only the parameters of the adapters in the task-specific adapter library are updated in the training process, and all parameters of the basic recommendation model are frozen and do not participate in gradient update, so that the basic recommendation model can quickly adapt to the current dynamic interest of the user. 8.A dynamic commodity recommendation system based on model reuse, characterized in that, It comprises: A data collection module for obtaining the behavior sequence data of the user within a preset event window, and extracting the feature code of the user's recent commodity preference; A model adaptation module for injecting a task-specific adapter library based on a basic recommendation model, training the basic recommendation model using the feature code of the user's recent commodity preference, and generating a new adapter and storing it in the task-specific adapter library; The model reuse module is configured to select an adapter with the highest similarity as a historical adapter from the task-specific adapter library by using the interest label vector of each adapter in the task-specific adapter library and the real-time search query word, fuse the historical adapter and a new adapter to obtain a recommended adapter, and load the recommended adapter into the basic recommendation model to obtain a unified recommendation model. The dynamic recommendation module is configured to predict and sort user interest goods by using the unified recommendation model to generate a recommendation list.
9. An electronic device, comprising: The method comprises the following steps: at least one processor, and a memory connected to the at least one processor in communication; instructions stored on the memory and executable by the at least one processor, wherein the instructions are executed by the at least one processor to enable the at least one processor to perform the steps of the method of any one of claims 1 to 7.
10. A computer storage medium having stored thereon a computer program, characterized in that: The computer program, when executed by a processor, implements the steps of any one of claims 1 to 7.
