Model updating method and recommendation method
By fine-tuning and updating the recommended model in the benchmark and auxiliary fields, the catastrophic forgetting problems existing in the processing of data in multi-domain are solved, and the effect of reducing computing and storage costs is achieved, while improving the recommendation capabilities of the model.
Patent Information
- Application Number
- CN202411471051.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-21
- Publication Date
- 2025-02-25
AI Technical Summary
The existing recommended models have catastrophic forgetting problems when processing multi-domain data, resulting in the loss of pre-training knowledge of the model, high computing and storage costs, and difficult to compatible with recommendation tasks in more fields.
By responding to model update requests, the sample data set and the initial recommendation model are determined, and the data set is divided according to the division rules of the benchmark and auxiliary fields. The initial recommendation model is fine-tuned separately to obtain adaptive parameters, and finally the model is updated based on these parameters to generate the target recommendation model.
It reduces computing costs and storage costs, and at the same time improves the recommendation capabilities of the model, solves the problem of catastrophic forgetting, makes the model compatible with recommendation tasks in more fields, and effectively triggers users in the service stage.
Smart Images

Figure CN119514722A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this specification relate to the field of machine learning technology, and in particular to a model updating method and a recommendation method. Background Art
[0002] With the development of computer and Internet technology, in order to provide users with better services, recommendation systems are usually configured in the services used by users. The recommendation system can recommend information of interest to users when they use the services, thereby improving the user's service experience. In the recommendation system, in order to improve the efficiency and accuracy of recommendation, a neural network model is usually used to complete the prediction of recommended information. In the prior art, in order to achieve a unified model to handle recommendation tasks in all fields, a general model is usually pre-trained in all fields, and then fine-tuned in the target field to obtain a recommendation model for prediction in the target field. Although it can meet the use requirements of some scenarios, since this type of model adopts the pre-training-fine-tuning paradigm, its computational cost and storage cost are high, and catastrophic forgetting may occur, causing the model to lose pre-trained knowledge. Therefore, an effective solution is urgently needed to solve the above problems. Summary of the invention
[0003] In view of this, the embodiments of this specification provide a model updating method. One or more embodiments of this specification also relate to a recommendation method, a model updating device, a recommendation device, a computing device, a computer-readable storage medium and a computer program product to solve the technical defects existing in the prior art.
[0004] According to a first aspect of an embodiment of this specification, a model updating method is provided, including: In response to the model update request, determining a sample data set and an initial recommendation model; Dividing the sample data set according to the benchmark domain division rule and the auxiliary domain division rule respectively to obtain a benchmark domain data set and an auxiliary domain data set; Fine-tune the initial recommendation model according to the benchmark domain dataset and the auxiliary domain dataset, respectively, and determine the benchmark domain adaptation parameters and the auxiliary domain adaptation parameters according to the model fine-tuning results; The initial recommendation model is updated based on the reference domain adaptation parameter and the auxiliary domain adaptation parameter to obtain a target recommendation model corresponding to the model update request.
[0005] According to a second aspect of the embodiments of this specification, a recommendation method is provided, including: Acquire historical behavior data of a target user associated with a target application as reference domain behavior data, and acquire historical behavior data of the target user associated with an auxiliary application as auxiliary domain behavior data; Inputting the reference domain behavior data and the auxiliary domain behavior data into a target recommendation model for processing, and obtaining target recommendation information output by the target recommendation model, wherein the target recommendation model is obtained by the above method; A target object is determined based on the target recommendation information, and the target object is recommended to the target user through the target application.
[0006] According to a third aspect of an embodiment of this specification, another model updating method is provided, which is applied to a cloud-side device, including: A model update request submitted by a receiving end-side device is received, and a sample data set and an initial recommendation model are determined according to the model update request; Dividing the sample data set according to the benchmark domain division rule and the auxiliary domain division rule respectively to obtain a benchmark domain data set and an auxiliary domain data set; Fine-tune the initial recommendation model according to the benchmark domain dataset and the auxiliary domain dataset, respectively, and determine the benchmark domain adaptation parameters and the auxiliary domain adaptation parameters according to the model fine-tuning results; The initial recommendation model is updated based on the reference domain adaptation parameter and the auxiliary domain adaptation parameter to obtain a target recommendation model corresponding to the model update request; The model parameters corresponding to the target recommendation model are sent to the terminal side device.
[0007] According to a fourth aspect of the embodiments of this specification, a model updating device is provided, including: A determination module, configured to determine a sample data set and an initial recommendation model in response to a model update request; A division module is configured to divide the sample data set according to the reference domain division rule and the auxiliary domain division rule to obtain a reference domain data set and an auxiliary domain data set; A fine-tuning module is configured to fine-tune the initial recommendation model according to the benchmark domain dataset and the auxiliary domain dataset, and determine the benchmark domain adaptation parameters and the auxiliary domain adaptation parameters according to the model fine-tuning results; The updating module is configured to update the initial recommendation model based on the reference domain adaptation parameter and the auxiliary domain adaptation parameter to obtain a target recommendation model corresponding to the model update request.
[0008] According to a fifth aspect of the embodiments of this specification, a recommendation device is provided, including: An acquisition module configured to acquire historical behavior data of a target user associated with a target application as reference domain behavior data, and to acquire historical behavior data of the target user associated with an auxiliary application as auxiliary domain behavior data; A processing module, configured to input the reference domain behavior data and the auxiliary domain behavior data into a target recommendation model for processing, and obtain target recommendation information output by the target recommendation model, wherein the target recommendation model is obtained by the above method; The recommendation module is configured to determine a target object based on the target recommendation information, and recommend the target object to the target user through the target application.
[0009] According to a sixth aspect of the embodiments of this specification, another model updating device is provided, which is applied to a cloud-side device, including: A request receiving module is configured to receive a model update request submitted by a terminal device, and determine a sample data set and an initial recommendation model according to the model update request; A data set division module is configured to divide the sample data set according to the reference domain division rule and the auxiliary domain division rule to obtain a reference domain data set and an auxiliary domain data set; A fine-tuning model module is configured to fine-tune the initial recommendation model according to the benchmark domain dataset and the auxiliary domain dataset, and determine the benchmark domain adaptation parameters and the auxiliary domain adaptation parameters according to the model fine-tuning results; An updating model module is configured to update the initial recommendation model based on the reference domain adaptation parameter and the auxiliary domain adaptation parameter to obtain a target recommendation model corresponding to the model update request; The parameter sending module is configured to send the model parameters corresponding to the target recommendation model to the terminal side device.
[0010] According to a seventh aspect of an embodiment of this specification, there is provided a computing device, including: Memory and processor; The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions. When the computer executable instructions are executed by the processor, the steps of the above-mentioned model updating method or recommendation method are implemented.
[0011] According to an eighth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores computer-executable instructions, and when the instructions are executed by a processor, the steps of the above-mentioned model updating method or recommendation method are implemented.
[0012] According to a ninth aspect of the embodiments of this specification, a computer program product is provided, including a computer program or instructions, which implement the steps of the above-mentioned model updating method or recommendation method when executed by a processor.
[0013] The model updating method provided in this embodiment can determine a sample data set and an initial recommendation model in response to a model update request in order to train a recommendation model compatible with more fields and solve the catastrophic forgetting problem of the traditional recommendation model. On this basis, in order to achieve the model covering more fields, the sample data set can be divided according to the benchmark field division rule and the auxiliary field division rule, so as to generate different sample data sets according to different field division rules, namely, the benchmark field data set and the auxiliary field data set. Thereafter, in order to reduce the computational cost and improve the model recommendation capability at the same time, the initial recommendation model can be fine-tuned according to the benchmark field data set and the auxiliary field data set, so as to achieve the model being adapted to the benchmark field and the auxiliary field by fine-tuning, without the need to update the parameters of the entire model, so as to determine the benchmark field adaptation parameters and the auxiliary field adaptation parameters adapted to different fields according to the model fine-tuning results. Finally, the initial recommendation model can be updated based on the benchmark field adaptation parameters and the auxiliary field adaptation parameters, so as to generate a target recommendation model corresponding to the model update request according to the update results, so as to achieve that data from different fields can be simultaneously input into the target recommendation model for processing in the application stage, so as to achieve a better recommendation effect by combining multi-dimensional data, so as to effectively trigger users in the service stage. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 is a schematic diagram of a model updating method provided by an embodiment of this specification; Figure 2 is a flow chart of a model updating method provided by an embodiment of this specification; Figure 3 is a structural diagram of a recommended model in a model updating method provided in one embodiment of this specification; Figure 4 is a flowchart of a recommended method provided by an embodiment of this specification; Figure 5 is a flow chart of another model updating method provided by an embodiment of this specification; Figure 6 is a processing flow chart of a recommended method provided by an embodiment of this specification; Figure 7 is a structural schematic diagram of a model updating device provided by an embodiment of this specification; Figure 8 It is a structural schematic diagram of a recommended device provided by an embodiment of this specification; Fig. 9 is a structural schematic diagram of another model updating device provided by an embodiment of this specification; Fig.10It is a structural block diagram of a computing device provided by an embodiment of this specification. DETAILED DESCRIPTION
[0015] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.
[0016] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0017] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0018] In addition, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0019] In one or more embodiments of this specification, a large model refers to a deep learning model with large-scale model parameters, which usually contains hundreds of millions, tens of billions, hundreds of billions, trillions, or even more than 10 trillion model parameters. A large model can also be called a foundation model / foundation model. The large model is pre-trained with large-scale unlabeled corpus to produce a pre-trained model with more than 100 million parameters. This model can adapt to a wide range of downstream tasks, and the model has good generalization ability, such as a large-scale language model (LLM), a multi-modal pre-training model, etc.
[0020] When the big model is used in practice, only a small number of samples are needed to fine-tune the pre-trained model and it can be applied to different tasks. The big model can be widely used in natural language processing (NLP), computer vision and other fields. Specifically, it can be applied to computer vision tasks such as visual question answering (VQA), image caption (IC), image generation, as well as natural language processing tasks such as text-based sentiment classification, text summary generation, and machine translation. The main application scenarios of the big model include digital assistants, intelligent robots, search, online education, office software, e-commerce, intelligent design, etc.
[0021] First, the terms involved in one or more embodiments of this specification are explained.
[0022] Pre-Train & Fine-Tune: Pre-Train & Fine-Tune is a machine learning method that first pre-trains the model on large-scale data to learn common features, and then fine-tunes the model on task-specific data to optimize its performance. Cross-domain recommendation based on the pre-training-fine-tuning paradigm refers to a recommendation system that is first pre-trained on data from all domains and then fine-tuned on data from the target domain.
[0023] Low-Rank Adaptation (LoRA): A parameter-efficient fine-tuning technique that performs task-specific adjustments by introducing a low-rank matrix complement to the weight matrix of the pre-trained model. This method reduces the amount of parameters that need to be adjusted by optimizing the adaptive parameters in a low-rank space, improving the efficiency and flexibility of the fine-tuning process.
[0024] In this specification, a model updating method is provided. One or more embodiments of this specification simultaneously relate to a recommendation method, a model updating device, a recommendation device, a computing device, a computer-readable storage medium, and a computer program product, which are described in detail one by one in the following embodiments.
[0025] In practical applications, recommendation models trained using the pre-training-fine-tuning paradigm and those trained using parameter-efficient fine-tuning methods can achieve the purpose of recommendation effects, but the above methods often fail to effectively handle the unique requirements of recommendation tasks. Since recommendation models rely heavily on the embedding of user and object IDs, it is extremely difficult to train general large-scale recommendation models. Although prompt words and adapters can adjust model inputs or add a small amount of domain-specific parameters, they may not be effective enough when the pre-trained model is insufficient. Therefore, an effective solution is urgently needed to solve the above problems.
[0026] See also Figure 1 As shown in the schematic diagram, the model updating method provided in this embodiment can determine the sample data set and the initial recommendation model in response to the model update request in order to train a recommendation model compatible with more fields and solve the catastrophic forgetting problem of the traditional recommendation model; on this basis, in order to enable the model to cover more fields, the sample data set can be divided according to the benchmark field division rule and the auxiliary field division rule, so as to generate different sample data sets according to different field division rules, namely, the benchmark field data set and the auxiliary field data set; thereafter, in order to reduce the computing cost and improve the model recommendation ability at the same time, the initial recommendation model can be fine-tuned according to the benchmark field data set and the auxiliary field data set, so as to achieve the model to be adapted to the benchmark field and the auxiliary field by fine-tuning, without the need to update the parameters of the model as a whole, so as to determine the benchmark field adaptation parameters and the auxiliary field adaptation parameters adapted to different fields according to the model fine-tuning results; finally, the initial recommendation model can be updated based on the benchmark field adaptation parameters and the auxiliary field adaptation parameters, so as to generate the target recommendation model corresponding to the model update request according to the update results, so as to achieve that in the application stage, data from different fields can be simultaneously input into the target recommendation model for processing, so as to achieve better recommendation effect by combining multi-dimensional data, so as to effectively trigger users in the service stage.
[0027] See also Figure 2 , Figure 2 A flow chart of a model updating method provided according to an embodiment of the present specification is shown, which specifically includes the following steps.
[0028] Step S202: In response to the model update request, determine a sample data set and an initial recommendation model.
[0029] The model updating method provided in this embodiment can be applied to update the recommendation model in any scenario. The updated recommendation model can be a product recommendation model applied in a shopping scenario, a video recommendation model applied in a video playback scenario, or an article recommendation model in an article reading scenario, etc. This embodiment does not make any limitation here. It should be noted that in order to enable the updated recommendation model to cover a wider range of fields, the server that provides the sample data set can be a server with multiple project services. For example, the project services of the server cover shopping services, video playback services, intelligent driving services, cloud computing services, etc., which can be used to complete the model update in the recommendation model update stage by combining the multi-field data involved in multiple service scenarios, so that the model has stronger prediction capabilities.
[0030] This embodiment takes the application of the model updating method in a shopping scenario as an example, and describes the updating of a recommendation model with the ability to recommend products. The descriptions of other scenarios can refer to the same or corresponding descriptions in this embodiment, and this embodiment will not be elaborated in detail here.
[0031] Specifically, the model update request refers to a request triggered when the initial recommendation model is updated. The request can be submitted by the service provider according to the recommendation requirements, and is used to update the initial recommendation model to the target recommendation model, so that the target recommendation model can complete the recommendation in more fields, and the input data can cover different types of fields to improve the prediction ability in complex tasks. Correspondingly, the initial recommendation model specifically refers to a general recommendation model obtained after pre-training with the sample data contained in the sample data set. Among them, the initial recommendation model can be used as follows: Figure 3 The model structure shown in (a) includes an input layer, an embedding layer, a feature interaction layer, and an output layer. Correspondingly, the sample data set specifically refers to the data set provided by the service provider, and the sample data contained therein can be the historical data collected by the service provider for the project service, such as the shopping data involved in the shopping scenario, the video playback data involved in the video playback scenario, and the cloud resource rental data involved in the cloud computing scenario.
[0032] Based on this, in order to train a recommendation model compatible with more fields and solve the catastrophic forgetting problem of the traditional recommendation model, the sample data set and the initial recommendation model can be determined in response to the model update request; on this basis, in order to enable the model to cover more fields, the sample data set can be divided according to the benchmark field division rule and the auxiliary field division rule, respectively, to generate different sample data sets according to different field division rules, namely, the benchmark field data set and the auxiliary field data set; thereafter, in order to reduce the computational cost and improve the model recommendation ability at the same time, the initial recommendation model can be fine-tuned according to the benchmark field data set and the auxiliary field data set, respectively, so that the model can be adapted to the benchmark field and the auxiliary field by fine-tuning, without updating the parameters of the model as a whole, so that the benchmark field adaptation parameters and the auxiliary field adaptation parameters adapted to different fields can be determined according to the model fine-tuning results; finally, the initial recommendation model can be updated based on the benchmark field adaptation parameters and the auxiliary field adaptation parameters, so that the target recommendation model corresponding to the model update request can be generated according to the update results, so that in the application stage, data from different fields can be simultaneously input into the target recommendation model for processing, so that multi-dimensional data can be combined to achieve better recommendation effects, so as to effectively trigger users in the service stage.
[0033] Further, after receiving the model update request, the sample data set and the recommendation model to be trained will be determined according to the model update request. In order to make the recommendation model to be recommended have a general recommendation capability, the sample data set can be used to pre-train the recommendation model to be trained. In this embodiment, the specific implementation method is as follows: In response to a model update request, a sample data set and a recommendation model to be trained are determined; target sample data are selected from the sample data set, and the recommendation model to be trained is pre-trained using the target sample data; it is detected whether the trained recommendation model to be trained meets the pre-training stop condition; if not, candidate sample data are selected from the sample data set, the candidate sample data are used as the target sample data, and the step of pre-training the recommendation model to be trained using the target sample data is performed; if so, the recommendation model to be trained that meets the pre-training stop condition is used as the initial recommendation model.
[0034] Specifically, the target sample data specifically refers to sample data randomly selected from the sample data set, which is used to train the recommendation model to be trained. Correspondingly, the pre-training stop condition specifically refers to the condition for detecting whether the currently trained recommendation model to be trained can stop training, which can be an iteration number condition, a loss value comparison condition, or a model verification condition, etc.
[0035] Based on this, after determining the sample data set and the recommendation model to be trained in response to the model update request, in order to enable the model to capture the common preference patterns shared across domains so as to have a common recommendation capability, the target sample data can be selected in the sample data set, and the recommendation model to be trained can be pre-trained using the target sample data; during the pre-training process, the target sample data can be input into the recommendation model to be trained for processing, and after obtaining the predicted recommendation information, the loss value can be calculated based on the predicted recommendation information and the target sample prediction information corresponding to the target sample data, and the recommendation model to be trained can be optimized based on the loss value calculation result, so as to achieve a round of model training. Among them, cross-domain refers to the operation of establishing an association relationship between two or more different domains, which is used to combine the characteristics of different domains for use in processing operations. In this embodiment, the recommendation model to be trained is trained using sample data containing multiple domains, so that the model can capture the preference patterns of different domains, thereby achieving the purpose of learning recommendation capabilities across different domains.
[0036] After each round of training is completed, it is necessary to detect whether the recommended model to be trained meets the pre-training stop condition; if not, it means that the current model still needs to continue training, so candidate sample data can be selected from the sample data set, and the candidate sample data can be used as the target sample data, and the step of pre-training the recommended model to be trained using the target sample data is performed. Until a certain training cycle, if the trained model meets the pre-training stop condition, the recommended model to be trained that meets the pre-training stop condition can be used as the initial recommended model, so that the model can be fine-tuned later to be applicable to more fields. In actual applications, the setting of the pre-training stop condition can be selected according to actual needs, and different pre-training stop conditions can be selected for different scenarios. This embodiment does not make any limitation here.
[0037] In summary, by using the entire sample data set to pre-train the recommendation model to be trained, the recommendation model can capture the common recommendation capabilities shared across domains, making it easier to fine-tune it later according to needs, so that the fine-tuned model has stronger recommendation capabilities.
[0038] Furthermore, in order to reduce the number of model update parameters in the subsequent model fine-tuning stage to reduce the computational cost and storage cost, the parameters of the embedding layer and output layer of the recommendation model can be frozen to ensure that only the feature interaction layer is fine-tuned in the fine-tuning stage. In this embodiment, the specific implementation method is as follows: Determine an embedding layer, a feature interaction layer, and an output layer in a recommendation model to be trained that meets a pre-training stop condition; perform parameter fixing processing on the embedding layer and the output layer, and generate an initial recommendation model according to the parameter fixing processing result.
[0039] Specifically, the embedding layer refers to the model layer in the recommendation model used to construct the embedding vector of the input features. Correspondingly, the feature interaction layer refers to the model layer in the recommendation model used to process the embedding vector and predict the recommendation information. Correspondingly, the output layer refers to the model layer in the recommendation model used to convert the prediction results into a set format; it should be noted that the recommendation model to be trained also has an input layer, which is used to convert the input context information into a vector expression that conforms to the model processing format for the convenience of model prediction.
[0040] Based on this, considering that the recommendation model to be trained has a relatively complex model structure and contains a large number of model parameters, if fine-tuning is performed directly after pre-training, it will not only take up more computing resources and storage resources, but also cause the fine-tuned model to lose the recommendation knowledge learned in the pre-training stage, thereby making the model's generalization ability lower. Therefore, in order to reduce costs and improve the model's prediction ability, the model can be parameter-frozen. Specifically, the embedding layer, feature interaction layer, and output layer in the recommendation model to be trained that meet the pre-training stop conditions can be determined; at this time, only the embedding layer and the output layer can be parameter-fixed, while the feature interaction layer is not parameter-fixed, so that the initial recommendation model can be generated according to the parameter-fixing processing results, and only the feature interaction layer of the model is fine-tuned in the subsequent model fine-tuning stage to achieve the desired effect.
[0041] For example, since the service platform provides users with multiple services (shopping, video playback, cloud computing rental, smart driving, navigation, etc.), it needs to train a recommendation model with strong versatility so that the model can have more accurate recommendation capabilities in any scenario. For example, it is necessary to train a model to recommend clothes to men. On this basis, we can first determine the sample data set provided by the service platform, as well as Figure 3 The recommendation model shown in (a) in the figure. At this point, the sample data set can be used to pre-train the recommendation model so that the model can capture the recommendation knowledge shared across domains. Based on the pre-training results, an initial recommendation model with universal recommendation capabilities can be obtained. The model can recommend clothes, videos, cloud computing networking modes, navigation routes, etc. based on the input. On this basis, although the model has the ability to recommend in multiple scenarios, its professionalism is worse. In order to update it to the recommendation model of the expected demand, the embedding layer and output layer of the initial recommendation model can be frozen, so that only the feature interaction layer can be fine-tuned later, so that the model has a more accurate prediction ability to recommend clothes to men.
[0042] In summary, by fixing the parameters of the recommendation model, it is possible to freeze the parameters that do not affect the model prediction results before fine-tuning the model, and then only fine-tune the model parameters of the feature interaction layer to reduce the number of model parameter adjustments, thereby reducing training costs and effectively improving the model prediction ability.
[0043] Step S204: divide the sample data set according to the reference domain division rule and the auxiliary domain division rule to obtain a reference domain data set and an auxiliary domain data set.
[0044] Specifically, after obtaining the sample data set and the initial recommendation model as mentioned above, further, considering that if only the sample data in a fixed field is used to fine-tune the recommendation model, although the model can have a strong predictive ability in the fixed field, due to the more dispersed distribution of user preferences in actual scenarios, only using data from a single field cannot better mine this preference distribution. For example, the preference presented by users on shopping software is maturity (mostly shirts and suits are purchased clothes), and the preference presented by users on video playback software is animation (mostly video viewing records are animation). If clothes are recommended to users only through historical records on shopping software, only shirts, suits and other clothing may be recommended. However, in actual situations, users may also collect co-branded clothing related to animation. If both suits and co-branded clothing related to animation can be recommended, the user shopping experience can be effectively improved.
[0045] Therefore, in order to enable the model to have the cross-domain prediction ability and enable the model to learn multi-domain knowledge and complete the recommendation knowledge fusion, the sample data set can be divided according to the benchmark domain division rules and the auxiliary domain division rules before fine-tuning the model, so that the sample data set can be divided into benchmark domain data sets and auxiliary domain data sets corresponding to different domains according to different domain division rules, and the division rules of the two domain data sets are different. On this basis, the model can be fine-tuned in combination with the two domain data sets, so that the model can be adapted to different domains, thereby learning the recommendation knowledge in different domains. Finally, the relevant domain adaptation parameters are fused, so that the model can have cross-domain recommendation capabilities. For example, combining the user's shopping history data and video browsing history data, accurately analyzing that the user likes suits and anime, and then recommending clothing, both suits and anime joint clothing can be recommended. In other words, by dividing the sample data set separately according to two completely unrelated domain division rules, the data sets obtained after division can have different sample distribution characteristics. Then, the model is fine-tuned using two data sets with different sample distribution characteristics, so that the model can learn two different recommendation knowledge, and then a target recommendation model with composite recommendation capabilities can be fused.
[0046] Among them, the benchmark domain division rule specifically refers to the natural domain division standard corresponding to the natural domain. Correspondingly, the auxiliary domain division rule specifically refers to the division standard corresponding to the auxiliary domain, and the auxiliary domain division rule is different from the benchmark domain division rule, and the two are orthogonal. The auxiliary domain division rule can be used to supplement the benchmark domain division rule, so that the model can learn the internal connection between the different distributions of the same samples under the two division rules, and then achieve the purpose of performing composite recommendation tasks. For example, according to the benchmark domain division rule corresponding to the natural domain, the sample data set can be divided into clothing, food, electronic products and other fields, and according to the auxiliary domain division rule corresponding to the auxiliary domain, the sample data set can be divided according to gender, such as male, female and other fields, so that the benchmark domain data set and the auxiliary domain data set obtained after the division have different sample distributions, so that different sample distribution data sets can be used to learn recommendation knowledge in different fields in the subsequent model fine-tuning stage. Correspondingly, the benchmark domain data set specifically refers to the corresponding benchmark domain data set obtained after the sample data set is divided according to the benchmark domain division rule. Correspondingly, the auxiliary domain data set specifically refers to the corresponding auxiliary domain data set obtained after the sample data set is divided according to the auxiliary domain division rule. For example, the sample data set contains 5 sample data. By dividing the data set according to the natural domain: clothing domain and food domain, it can be determined that the data set corresponding to the clothing domain contains 3 sample data, and the data set corresponding to the food domain contains 2 sample data; by dividing the data set according to the auxiliary domain: male domain and female domain, it can be determined that the data set corresponding to the male domain contains 1 sample data, and the data set corresponding to the female domain contains 4 sample data. Based on this, the recommendation model can be fine-tuned to enable the model to perform compound recommendation tasks, such as recommending clothing to women and food to men.
[0047] Furthermore, in order to enable the model to have strong prediction capabilities for different fields during the model fine-tuning stage, auxiliary field division rules with orthogonal relationships can be selected to divide the sample data set, so that the model can learn knowledge in two fields with a large span. In this embodiment, the specific implementation method is as follows: Determine a benchmark domain division rule corresponding to a benchmark domain, select an auxiliary domain that has an orthogonal relationship with the benchmark domain; use the domain division rule corresponding to the auxiliary domain as the auxiliary domain division rule, and perform the steps of dividing the sample data set according to the benchmark domain division rule and the auxiliary domain division rule respectively to obtain a benchmark domain data set and an auxiliary domain data set.
[0048] Based on this, when dividing the sample data set by field, the benchmark field division rules corresponding to the benchmark field can be determined first. On this basis, in order to enable the model to have better recommendation capabilities, an auxiliary field that has an orthogonal relationship with the benchmark field can be selected; at this time, the field division rules corresponding to the auxiliary field can be used as auxiliary field division rules, and step S206 can be executed.
[0049] Continuing with the above example, before fine-tuning the feature interaction layer in the initial recommendation model, you can first divide the sample data set into different fields. Specifically, the sample data set can be divided according to the natural field division standard, such as dividing the sample data set into the clothing field, food field, and electronic product field. In addition, according to the model training requirements of the service platform, you can choose to divide the sample data set according to the gender field division standard, such as dividing the sample data set into the male field and the female field. After that, the feature interaction layer of the initial recommendation model can be fine-tuned in combination with the sample data sets corresponding to each of the above fields, so as to train a recommendation model that meets the training requirements and deploy it in the service scenario.
[0050] In summary, by selecting the baseline domain division rules and auxiliary domain division rules with orthogonal relationships to divide the sample data sets into different domains, it is possible to achieve that the sample data sets have different distribution characteristics in different domains. Training the recommendation model based on this can make the recommendation model have stronger predictive capabilities.
[0051] Step S206 , fine-tuning the initial recommendation model according to the benchmark domain dataset and the auxiliary domain dataset, and determining benchmark domain adaptation parameters and auxiliary domain adaptation parameters according to the model fine-tuning results.
[0052] Specifically, after dividing the sample data set according to the benchmark domain division rules and the auxiliary domain division rules, the benchmark domain data set corresponding to the natural domain and the auxiliary domain data set corresponding to the auxiliary domain can be obtained. On this basis, in order to enable the initial recommendation model to be domain-adapted in various fields, the initial recommendation model can be fine-tuned according to the benchmark domain data set and the auxiliary domain data set, that is, the benchmark domain adaptation parameters and the auxiliary domain adaptation parameters corresponding to the natural domain and the auxiliary domain are obtained by a two-way fine-tuning method, so that the target recommendation model that meets the model update request can be updated in combination with the adaptation parameters of the two fields, so as to be deployed in the application scenario.
[0053] Among them, the benchmark domain adaptation parameters specifically refer to the model parameters obtained after the initial recommendation model is adapted to the natural domain division of the benchmark domain dataset using the low-rank adaptation (LoRA) technology, which is used to characterize the model parameters fitted by the initial recommendation model after natural domain adaptation. Correspondingly, the auxiliary domain adaptation parameters specifically refer to the model parameters obtained after the initial recommendation model is adapted to the auxiliary domain division of the auxiliary domain dataset using the low-rank adaptation (LoRA) technology, which is used to characterize the model parameters fitted by the initial recommendation model after auxiliary domain adaptation.
[0054] In practical applications, considering that low-rank adaptation (LoRA) technology usually uses the product of two low-rank matrices (a downsampling matrix and an upsampling matrix) to fit the update amount of the parameter matrix of the pre-trained model during fine-tuning, it can be understood as fitting a large number of parameters with a small number of parameters. In order to make the fitted update amount more accurate, on this basis, the update amount can be multiplied by a scaling vector and an offset vector can be added to correct the update amount through the scaling vector and the offset vector, so as to obtain domain adaptation parameters that accurately correspond to the natural domain and the auxiliary domain.
[0055] Furthermore, when fine-tuning the initial recommendation model according to the data sets of the two fields, in order to reduce the computational cost and storage cost, fine-tuning can be completed only for the feature interaction layer. In this embodiment, the specific implementation method is as follows: The feature interaction layer in the initial recommendation model is fine-tuned according to the benchmark domain dataset, and the benchmark domain adaptation parameters are determined according to the fine-tuning results; the feature interaction layer in the initial recommendation model is fine-tuned according to the auxiliary domain dataset, and the auxiliary domain adaptation parameters are determined according to the fine-tuning results.
[0056] Based on this, in the model fine-tuning stage, the feature interaction layer in the initial recommendation model is actually fine-tuned according to the benchmark domain dataset. Through this fine-tuning process, the initial recommendation model can adapt to the natural domain (benchmark domain) and learn relevant domain knowledge. At this time, the benchmark domain adaptation parameters can be determined according to the fine-tuning results; similarly, it is also necessary to fine-tune the feature interaction layer in the initial recommendation model according to the auxiliary domain dataset. Through fine-tuning, the initial recommendation model can adapt to the auxiliary domain and learn relevant domain knowledge. Then, the auxiliary domain adaptation parameters can be determined according to the fine-tuning results, so that the model update operation can be completed in the future by combining the domain adaptation parameters of the two domains.
[0057] Continuing with the above example, under the natural domain division standard, the sample data set is divided into clothing, food, and electronic products fields, and under the auxiliary domain division standard, the sample data set is divided into male and female fields. Further, at this time, low-rank adaptation technology can be used to fine-tune the feature interaction layer in the initial recommendation model using the sample data corresponding to the clothing field in the natural domain, and the LoRA parameters corresponding to the clothing field can be obtained; low-rank adaptation technology is used to fine-tune the feature interaction layer in the initial recommendation model using the sample data corresponding to the food field in the natural domain, and the LoRA parameters corresponding to the food field can be obtained; low-rank adaptation technology is used to fine-tune the feature interaction layer in the initial recommendation model using the sample data corresponding to the electronic products field in the natural domain, and the LoRA parameters corresponding to the electronic products field can be obtained. Similarly, for the auxiliary field, we can use low-rank adaptation technology and use the sample data corresponding to the male field in the auxiliary field to fine-tune the feature interaction layer in the initial recommendation model. At this time, we can obtain the LoRA parameters corresponding to the male field. We can use low-rank adaptation technology and use the sample data corresponding to the female field in the auxiliary field to fine-tune the feature interaction layer in the initial recommendation model. At this time, we can obtain the LoRA parameters corresponding to the female field. Subsequently, we can combine the above LoRA parameters to train a recommendation model that meets the model usage requirements.
[0058] In summary, by fixing the embedding layer and output layer in the initial recommendation model and only fine-tuning the feature interaction layer in the model, the computational cost can be reduced while improving the model training effect, thereby obtaining a recommendation model with more accurate recommendation capabilities.
[0059] Step S208: updating the initial recommendation model based on the reference domain adaptation parameter and the auxiliary domain adaptation parameter to obtain a target recommendation model corresponding to the model update request.
[0060] Specifically, after obtaining the benchmark domain adaptation parameters and the auxiliary domain adaptation parameters as described above, it indicates that the initial recommendation model has completed domain adaptation in the natural domain and the auxiliary domain using low-rank adaptation technology. After that, in order to enable the model to be updated to a target recommendation model that meets the model update requirements, the initial recommendation model can be updated in combination with the benchmark domain adaptation parameters and the auxiliary domain adaptation parameters, so as to achieve the fusion of two domain adaptation parameters with an orthogonal relationship, and then obtain the target recommendation model corresponding to the model update request. Subsequently, it can be deployed in actual application scenarios to complete the recommendation task processing of related project services. Among them, the target recommendation model specifically refers to the recommendation model updated by integrating the natural domain adaptation results and the auxiliary domain adaptation results, and can complete the recommendation task for the user in combination with data from different fields in the prediction stage. For example, combining the user's shopping data and reading book data, literary style clothing is recommended to the user, thereby realizing cross-domain data fusion and completing the execution of the recommendation task.
[0061] Further, considering that the baseline domain adaptation parameter may include at least one baseline domain adaptation sub-parameter, and the auxiliary domain adaptation parameter may include at least one auxiliary domain adaptation sub-parameter, on this basis, in order to enable the model to be updated to a target recommendation model that meets the model update requirements, the target domain adaptation sub-parameter can be screened in the two domain adaptation parameters according to the model update request, and the model update is completed on this basis, so that the model better matches the model update requirements. In this embodiment, the specific implementation method is as follows: According to the model update request, a target baseline domain adaptation sub-parameter is selected from at least one baseline domain adaptation sub-parameter included in the baseline domain adaptation parameter, and a target auxiliary domain adaptation sub-parameter is selected from at least one auxiliary domain adaptation sub-parameter included in the auxiliary domain adaptation parameter; the initial recommendation model is updated based on the target baseline domain adaptation sub-parameter and the target auxiliary domain adaptation sub-parameter to obtain a target recommendation model corresponding to the model update request.
[0062] Specifically, the target reference domain adaptation sub-parameter specifically refers to an adaptation parameter corresponding to the domain involved in the composite recommendation task that meets the model update requirement, selected from at least one reference domain adaptation sub-parameter included in the reference domain adaptation parameter. Correspondingly, the target auxiliary domain adaptation sub-parameter specifically refers to another adaptation parameter corresponding to the domain involved in the composite recommendation task that meets the model update requirement, selected from at least one auxiliary domain adaptation sub-parameter included in the auxiliary domain adaptation parameter.
[0063] Based on this, when the baseline domain adaptation parameter includes at least one baseline domain adaptation sub-parameter, and the auxiliary domain adaptation parameter includes at least one auxiliary domain adaptation sub-parameter, in order to be able to update the recommendation model that meets the model update request, at this time, according to the model update request, the parameters corresponding to the fields involved in the composite recommendation task can be selected from the two domain adaptation parameters for model update use. Specifically, the target baseline domain adaptation sub-parameter can be selected from at least one baseline domain adaptation sub-parameter included in the baseline domain adaptation parameter, and the target auxiliary domain adaptation sub-parameter can be selected from at least one auxiliary domain adaptation sub-parameter included in the auxiliary domain adaptation parameter. On this basis, the initial recommendation model can be updated in combination with the target baseline domain adaptation sub-parameter and the target auxiliary domain adaptation sub-parameter, so as to generate the target recommendation model corresponding to the model update request according to the update result.
[0064] In summary, by selecting the adaptation sub-parameters corresponding to the corresponding model update request to update the recommendation model, the updated model can meet the composite recommendation tasks corresponding to the current needs, and can then be quickly deployed for use in service scenarios.
[0065] Furthermore, when the initial recommendation model is updated based on the above-determined parameters, in order to enable the model to have the ability to perform composite recommendation tasks, the adaptation parameters of different fields can be integrated, and the model update can be completed based on this. In this embodiment, the specific implementation method is as follows: Constructing fusion parameters according to the baseline domain adaptation parameters and the auxiliary domain adaptation parameters; using the fusion parameters to update the initial recommendation model to obtain a target recommendation model corresponding to the model update request; wherein the target recommendation model is used to perform a baseline domain recommendation task, an auxiliary domain recommendation task or a composite recommendation task.
[0066] Specifically, the fusion parameters refer to the model parameters obtained by fusing the baseline domain adaptation parameters and the auxiliary domain adaptation parameters. Correspondingly, the baseline domain recommendation task refers to the task of using the target recommendation model to recommend recommendation needs involved in the natural domain, such as predicting the products that the user may be interested in based on the user's historical shopping data; the auxiliary domain recommendation task refers to the task of using the target recommendation model to recommend recommendation needs involved in the auxiliary domain, such as predicting products that men are interested in for users based on their historical shopping data; the compound recommendation task refers to the task of combining data from the natural domain and the auxiliary domain to make recommendations, such as predicting clothing that men are interested in for users based on their historical shopping data and historical video playback data.
[0067] Based on this, when updating the recommendation model, the fusion parameters can be constructed according to the baseline domain adaptation parameters and the auxiliary domain adaptation parameters; on this basis, the fusion parameters are used to update the initial recommendation model, and the target recommendation model corresponding to the model update request can be obtained according to the update result; and the target recommendation model can be used to perform the baseline domain recommendation task, the auxiliary domain recommendation task or the composite recommendation task. In practical applications, in order to realize the execution of the composite recommendation task by the target recommendation model, a LoRA fusion module can be trained for the target recommendation task, such as Figure 3 As shown in (b), the parameters for multiple domain adaptation can be aggregated through the attention mechanism, and in order to improve the efficiency of model parameter update, the query vector and key vector can be downsampled, and the value vector can be transformed identically. Then, through pre-training, fine-tuning, and training of fusion modules, a recommendation model that uses corresponding data from any domain for joint prediction can be obtained. In addition, the model can also use data from a single domain to perform recommendation tasks, thereby meeting flexible project service scenarios.
[0068] Continuing with the above example, after obtaining the LoRA parameters corresponding to the clothing, food, and electronic product fields under the natural domain, and the LoRA parameters corresponding to the male and female fields under the auxiliary domain, it is determined that the service platform needs to deploy a model for recommending clothes to men based on the model update requirements. At this time, the LoRA parameters in the clothing field and the LoRA parameters in the male field can be selected for fusion, and the initial recommendation model can be updated based on this, so as to achieve the target recommendation model for recommending clothes to men based on the update results. After deploying it to the service scenario, it can collect the user's historical shopping data and historical video playback data to complete the recommendation of men's clothing products, such as recommending a blue shirt of brand A.
[0069] In summary, by fusing the adaptation parameters of different fields, we can solve the problem that only using natural field division will divide samples with different distributions into the same field, destroying the nature of the assumption of independent and synchronous distribution of data, thereby effectively improving the prediction accuracy of the model.
[0070] In addition, in order to make the target recommendation model usable directly after being deployed, the model can be verified before being deployed. In this embodiment, the specific implementation is as follows: Extract verification sample data from the sample data set, and input the verification sample data into the target recommendation model for processing to obtain predicted recommendation information; compare the verification recommendation information corresponding to the verification sample data with the predicted recommendation information, and generate a model verification report of the target recommendation model based on the comparison result.
[0071] Based on this, in order to accurately analyze the recommendation ability of the target recommendation model, the verification sample data in the sample data set can be used to verify it. Specifically, the verification sample data can be extracted from the sample data set, and then the verification sample data can be input into the target recommendation model for processing to obtain the predicted recommendation information; on this basis, the verification recommendation information corresponding to the verification sample data can be compared with the predicted recommendation information, and a model verification report of the target recommendation model can be generated according to the comparison results, so as to reflect the recommendation ability of the target recommendation model through the verification report. If the model meets expectations, it can be deployed in the service scenario for use; if it does not meet expectations, a new sample can be selected to continue training the model.
[0072] The model updating method provided in this embodiment can determine a sample data set and an initial recommendation model in response to a model update request in order to train a recommendation model compatible with more fields and solve the catastrophic forgetting problem of the traditional recommendation model. On this basis, in order to enable the model to cover more fields, the sample data set can be divided according to the benchmark field division rule and the auxiliary field division rule, so as to generate different sample data sets according to different field division rules, namely, the benchmark field data set and the auxiliary field data set. Thereafter, in order to reduce the computational cost and improve the model recommendation capability at the same time, the initial recommendation model can be fine-tuned according to the benchmark field data set and the auxiliary field data set, so as to achieve domain adaptation of the model in the benchmark field and the auxiliary field by fine-tuning, without updating the parameters of the entire model, so as to determine the benchmark field adaptation parameters and the auxiliary field adaptation parameters adapted to different fields according to the model fine-tuning results. Finally, the initial recommendation model can be updated based on the benchmark field adaptation parameters and the auxiliary field adaptation parameters, so as to generate a target recommendation model corresponding to the model update request according to the update results, so as to achieve that data from different fields can be simultaneously input into the target recommendation model for processing in the application stage, so as to achieve better recommendation effect by combining multi-dimensional data, so as to effectively trigger users in the service stage.
[0073] See also Figure 4 , Figure 4 A flowchart of a recommendation method provided according to an embodiment of the present specification is shown, which specifically includes the following steps.
[0074] Step S402 : acquiring historical behavior data of a target user associated with a target application as reference domain behavior data, and acquiring historical behavior data of the target user associated with an auxiliary application as auxiliary domain behavior data.
[0075] Step S404: input the reference domain behavior data and the auxiliary domain behavior data into a target recommendation model for processing to obtain target recommendation information output by the target recommendation model, wherein the target recommendation model is obtained by the above method.
[0076] Step S406: determine a target object based on the target recommendation information, and recommend the target object to the target user through the target application.
[0077] The recommendation method provided in this embodiment can be applied to any scenario, such as a shopping scenario, a video playing scenario, an e-book reading scenario, etc. This embodiment is not limited in any way.
[0078] Specifically, the target application specifically refers to the application currently used by the user, which can be a shopping application, a video playback application, an e-book reading application, etc. Correspondingly, the auxiliary application specifically refers to other applications different from the target application, and the auxiliary application and the target application can belong to the same service provider or different service providers; for example, if the target application is a shopping application, the auxiliary application can be a video playback application. Correspondingly, the benchmark domain behavior data specifically refers to the behavior data determined based on the historical behavior data of the user using the target application, such as the historical click behavior of the associated target application, etc., which matches the benchmark domain division rules, and the benchmark domain behavior data can reflect the user's browsing content preferences in the target application. Correspondingly, the auxiliary domain behavior data specifically refers to the behavior data determined based on the historical behavior data of the user using other applications (auxiliary applications) other than the target application, which matches the auxiliary domain division rules. For example, if the target application is a shopping application, the benchmark domain behavior data is the shopping history behavior data, and the auxiliary domain behavior data can be the browsing history behavior data of the user browsing the video playback software. That is, the benchmark domain behavior data and the auxiliary domain behavior data are behavior data in two different fields. By using the behavioral data in the baseline domain and the behavioral data in the auxiliary domain, it is possible to use the behavioral data in two different domains to input the model for prediction when making recommendations to users, thereby realizing the cross-domain data combination to accurately predict the target recommendation information of high-reach users in the current scenario. Accordingly, the target recommendation information specifically refers to the information describing the recommended object obtained after the recommendation prediction is made for the target user. Accordingly, the target object is the product, video, e-book, etc. selected according to the target recommendation information.
[0079] Based on this, in order to improve the recommendation effect when users use the target application, the historical behavior data of the target user associated with the target application can be obtained as the baseline domain behavior data, and the historical behavior data of the target user associated with the auxiliary application can be obtained as the auxiliary domain behavior data, so as to obtain data from different fields to reflect the user's recommendation preferences. On this basis, the baseline domain behavior data and the auxiliary domain behavior data can be input into the target recommendation model for processing to obtain the target recommendation information, wherein the target recommendation model is obtained by the above method. After that, the target object can be determined based on the target recommendation information, and the target object can be recommended to the target user through the target application.
[0080] For example, when a user uses a shopping app, the user's historical shopping data can be collected, and the user's historical video playback data when using a video playback app can be obtained. Then, the historical shopping data and historical video playback data can be input into the target recommendation model for processing to obtain the target recommendation information {the user likes anime A and likes light-colored T-shirts}. Then, based on the recommendation information, a white T-shirt product co-branded with anime A can be selected and recommended to the user.
[0081] In summary, by combining cross-domain historical behavior data to select recommended objects for users, the probability of triggering users can be effectively increased, thereby improving the user experience of using the target application.
[0082] See also Figure 5 , Figure 5 A flowchart of another model updating method provided according to an embodiment of the present specification is shown, which is applied to a cloud-side device and specifically includes the following steps.
[0083] Step S502: receiving a model update request submitted by a terminal device, and determining a sample data set and an initial recommendation model according to the model update request.
[0084] Step S504: divide the sample data set according to the reference domain division rule and the auxiliary domain division rule to obtain a reference domain data set and an auxiliary domain data set.
[0085] Step S506 , fine-tuning the initial recommendation model according to the benchmark domain dataset and the auxiliary domain dataset respectively, and determining benchmark domain adaptation parameters and auxiliary domain adaptation parameters according to the model fine-tuning results.
[0086] Step S508: updating the initial recommendation model based on the reference domain adaptation parameter and the auxiliary domain adaptation parameter to obtain a target recommendation model corresponding to the model update request.
[0087] Step S510: sending the model parameters corresponding to the target recommendation model to the terminal side device.
[0088] Another model updating method provided in this embodiment is applied to a cloud-side device, wherein the cloud-side device is used to provide a model updating service, and after receiving a model update request submitted by a terminal-side device, can update the recommendation model according to the model update request to obtain a target recommendation model corresponding to the terminal-side device update requirement, and then feed back the model parameters corresponding to the target recommendation model to the terminal-side device, so that after the terminal-side device deploys the target recommendation model according to the model parameters, the recommendation service can be run.
[0089] It should be noted that after receiving the model update request submitted by the end-side device, if the update request clearly specifies the recommendation capabilities of the model, the training can be completed directly using the sample data set and initial recommendation model provided by the cloud-side device; in addition, the end-side device can also provide a sample data set and an initial recommendation model to complete the model update using the computing services provided by the cloud-side device.
[0090] For the contents not described in detail in the other model updating method provided in this embodiment, please refer to the same or corresponding description in the above embodiments, and this embodiment will not be described in detail here.
[0091] The following combination Figure 6 , taking the application of the recommendation method provided in this specification in the video recommendation scenario as an example, the recommendation method is further described. Figure 6 A processing flow chart of a recommended method provided by an embodiment of this specification is shown, which specifically includes the following steps.
[0092] Step S602: In response to the model update request, determine a sample data set and a recommendation model to be trained.
[0093] Step S604 , selecting target sample data from the sample data set to pre-train the recommendation model to be trained, until an initial recommendation model that meets the pre-training stop condition is obtained.
[0094] Step S606, freezing parameters of the embedding layer and the output layer in the initial recommendation model, determining a benchmark domain division rule corresponding to the benchmark domain, and selecting an auxiliary domain that has an orthogonal relationship with the benchmark domain.
[0095] Step S608: Use the domain division rule corresponding to the auxiliary domain as the auxiliary domain division rule, and divide the sample data set according to the reference domain division rule and the auxiliary domain division rule to obtain a reference domain data set and an auxiliary domain data set.
[0096] Step S610, fine-tuning the feature interaction layer in the initial recommendation model according to the benchmark domain data set, and determining the benchmark domain adaptation parameters according to the fine-tuning result.
[0097] Step S612: fine-tune the feature interaction layer in the initial recommendation model according to the auxiliary domain data set, and determine the auxiliary domain adaptation parameters according to the fine-tuning result.
[0098] Step S614: Select a target reference domain adaptation sub-parameter from the reference adaptation parameters, and select a target auxiliary domain adaptation sub-parameter from the auxiliary domain adaptation parameters.
[0099] Step S616: Update the initial recommendation model based on the target reference domain adaptation sub-parameter and the target auxiliary domain adaptation sub-parameter to obtain the target recommendation model corresponding to the model update request.
[0100] Step S618, when it is detected that the target user browses the video playback application, obtain the historical browsing data of the target user associated with the video playback application, and obtain the historical shopping data corresponding to the target user.
[0101] Step S620: input the historical browsing data and the historical shopping data into a target recommendation model for processing to obtain target recommendation information.
[0102] Step S622: determine a target recommended video based on the target recommendation information, and recommend the target recommended video to the target user through a video playback application.
[0103] In summary, in order to train a recommendation model compatible with more fields and solve the catastrophic forgetting problem of the traditional recommendation model, the sample data set and the initial recommendation model can be determined in response to the model update request; on this basis, in order to enable the model to cover more fields, the sample data set can be divided according to the benchmark field division rule and the auxiliary field division rule, so as to generate different sample data sets according to different field division rules, namely, the benchmark field data set and the auxiliary field data set; thereafter, in order to reduce the computational cost and improve the model recommendation ability at the same time, the initial recommendation model can be fine-tuned according to the benchmark field data set and the auxiliary field data set, so as to achieve the model to adapt to the benchmark field and the auxiliary field by fine-tuning, without updating the parameters of the model as a whole, so as to determine the benchmark field adaptation parameters and the auxiliary field adaptation parameters adapted to different fields according to the model fine-tuning results; finally, the initial recommendation model can be updated based on the benchmark field adaptation parameters and the auxiliary field adaptation parameters, so as to generate the target recommendation model corresponding to the model update request according to the update results, so as to achieve that in the application stage, data from different fields can be simultaneously input into the target recommendation model for processing, so as to achieve better recommendation effect by combining multi-dimensional data, so as to effectively trigger users in the service stage.
[0104] Corresponding to the above method embodiment, this specification also provides a model updating device embodiment, Figure 7FIG. 1 shows a schematic diagram of a model updating device provided by an embodiment of the present specification. Figure 7 As shown, the device comprises: A determination module 702 is configured to determine a sample data set and an initial recommendation model in response to a model update request; A division module 704 is configured to divide the sample data set according to the reference domain division rule and the auxiliary domain division rule to obtain a reference domain data set and an auxiliary domain data set; A fine-tuning module 706 is configured to fine-tune the initial recommendation model according to the benchmark domain dataset and the auxiliary domain dataset, and determine the benchmark domain adaptation parameters and the auxiliary domain adaptation parameters according to the model fine-tuning results; The updating module 708 is configured to update the initial recommendation model based on the reference domain adaptation parameter and the auxiliary domain adaptation parameter to obtain a target recommendation model corresponding to the model update request.
[0105] In an optional embodiment, the determination module 702 is further configured to: determine a sample data set and a recommendation model to be trained in response to a model update request; select target sample data from the sample data set, and pre-train the recommendation model to be trained using the target sample data; detect whether the trained recommendation model to be trained meets the pre-training stop condition; if not, select candidate sample data from the sample data set, use the candidate sample data as the target sample data, and execute the step of pre-training the recommendation model to be trained using the target sample data; if so, use the recommendation model to be trained that meets the pre-training stop condition as the initial recommendation model.
[0106] In an optional embodiment, the determination module 702 is further configured to: determine the embedding layer, feature interaction layer and output layer in the recommendation model to be trained that meets the pre-training stop condition; perform parameter fixing processing on the embedding layer and the output layer, and generate an initial recommendation model based on the parameter fixing processing results.
[0107] In an optional embodiment, the device also includes: a selection rule module, configured to determine a benchmark domain division rule corresponding to the benchmark domain, select an auxiliary domain that has an orthogonal relationship with the benchmark domain; use the domain division rule corresponding to the auxiliary domain as the auxiliary domain division rule, and execute the steps of dividing the sample data set according to the benchmark domain division rule and the auxiliary domain division rule respectively to obtain a benchmark domain data set and an auxiliary domain data set.
[0108] In an optional embodiment, the fine-tuning module 706 is further configured to: fine-tune the feature interaction layer in the initial recommendation model according to the benchmark domain data set, and determine the benchmark domain adaptation parameters based on the fine-tuning results; fine-tune the feature interaction layer in the initial recommendation model according to the auxiliary domain data set, and determine the auxiliary domain adaptation parameters based on the fine-tuning results.
[0109] In an optional embodiment, the update module 708 is further configured to: construct fusion parameters based on the baseline domain adaptation parameters and the auxiliary domain adaptation parameters; use the fusion parameters to update the initial recommendation model to obtain the target recommendation model corresponding to the model update request; wherein the target recommendation model is used to perform a baseline domain recommendation task, an auxiliary domain recommendation task or a compound recommendation task.
[0110] In an optional embodiment, when the reference domain adaptation parameter includes at least one reference domain adaptation sub-parameter, and the auxiliary domain adaptation parameter includes at least one auxiliary domain adaptation sub-parameter, the updating module 708 is further configured to: According to the model update request, a target baseline domain adaptation sub-parameter is selected from at least one baseline domain adaptation sub-parameter included in the baseline domain adaptation parameter, and a target auxiliary domain adaptation sub-parameter is selected from at least one auxiliary domain adaptation sub-parameter included in the auxiliary domain adaptation parameter; the initial recommendation model is updated based on the target baseline domain adaptation sub-parameter and the target auxiliary domain adaptation sub-parameter to obtain a target recommendation model corresponding to the model update request.
[0111] In an optional embodiment, the device also includes: a verification module, configured to extract verification sample data from the sample data set, and input the verification sample data into the target recommendation model for processing to obtain predicted recommendation information; compare the verification recommendation information corresponding to the verification sample data with the predicted recommendation information, and generate a model verification report of the target recommendation model based on the comparison result.
[0112] The model updating device provided in this embodiment can determine the sample data set and the initial recommendation model in response to the model update request in order to train a recommendation model compatible with more fields and solve the catastrophic forgetting problem of the traditional recommendation model; on this basis, in order to achieve the model covering more fields, the sample data set can be divided according to the benchmark field division rule and the auxiliary field division rule respectively, so as to generate different sample data sets according to different field division rules, namely, the benchmark field data set and the auxiliary field data set; thereafter, in order to reduce the computing cost and improve the model recommendation ability at the same time, the initial recommendation model can be fine-tuned according to the benchmark field data set and the auxiliary field data set respectively, so as to achieve the model to be adapted to the benchmark field and the auxiliary field by fine-tuning, without the need to update the parameters of the model as a whole, so as to determine the benchmark field adaptation parameters and the auxiliary field adaptation parameters adapted to different fields according to the model fine-tuning results; finally, the initial recommendation model can be updated based on the benchmark field adaptation parameters and the auxiliary field adaptation parameters, so as to generate the target recommendation model corresponding to the model update request according to the update results, so as to achieve that in the application stage, data from different fields can be simultaneously input into the target recommendation model for processing, so as to achieve better recommendation effect by combining multi-dimensional data, so as to effectively trigger users in the service stage.
[0113] The above is a schematic scheme of a model updating device of this embodiment. It should be noted that the technical scheme of the model updating device and the technical scheme of the above model updating method belong to the same concept, and the details not described in detail in the technical scheme of the model updating device can be referred to the description of the technical scheme of the above model updating method.
[0114] Corresponding to the above method embodiments, this specification also provides a recommended device embodiment. Figure 8 FIG. 1 is a schematic diagram showing a structure of a recommended device provided by an embodiment of this specification. Figure 8 As shown, the device comprises: The acquisition module 802 is configured to acquire historical behavior data of a target user associated with a target application as reference domain behavior data, and acquire historical behavior data of the target user associated with an auxiliary application as auxiliary domain behavior data; The processing module 804 is configured to input the reference domain behavior data and the auxiliary domain behavior data into a target recommendation model for processing, and obtain target recommendation information output by the target recommendation model, wherein the target recommendation model is obtained by the above method; The recommendation module 806 is configured to determine a target object based on the target recommendation information, and recommend the target object to the target user through the target application.
[0115] The above is a schematic scheme of a recommendation device of this embodiment. It should be noted that the technical scheme of the recommendation device and the technical scheme of the recommendation method described above are of the same concept, and the details not described in detail in the technical scheme of the recommendation device can be referred to the description of the technical scheme of the recommendation method described above.
[0116] Corresponding to the above method embodiment, this specification also provides another model updating device embodiment, Fig. 9 FIG. 2 shows a schematic diagram of the structure of another model updating device provided by an embodiment of the present specification. Fig. 9 As shown, the device is applied to a cloud-side device, including: The request receiving module 902 is configured to receive a model update request submitted by a terminal device, and determine a sample data set and an initial recommendation model according to the model update request; The data set division module 904 is configured to divide the sample data set according to the reference domain division rule and the auxiliary domain division rule to obtain the reference domain data set and the auxiliary domain data set; A fine-tuning model module 906 is configured to fine-tune the initial recommendation model according to the benchmark domain dataset and the auxiliary domain dataset, and determine the benchmark domain adaptation parameters and the auxiliary domain adaptation parameters according to the model fine-tuning results; The model update module 908 is configured to update the initial recommendation model based on the reference domain adaptation parameter and the auxiliary domain adaptation parameter to obtain a target recommendation model corresponding to the model update request; The parameter sending module 910 is configured to send the model parameters corresponding to the target recommendation model to the terminal side device.
[0117] The above is a schematic scheme of another model updating device of this embodiment. It should be noted that the technical scheme of the model updating device and the technical scheme of the above model updating method belong to the same concept, and the details not described in detail in the technical scheme of the model updating device can be referred to the description of the technical scheme of the above model updating method.
[0118] Fig.10 The block diagram of a computing device 1000 according to an embodiment of the present specification is shown. The components of the computing device 1000 include but are not limited to a memory 1010 and a processor 1020. The processor 1020 is connected to the memory 1010 via a bus 1030, and the database 1050 is used to store data.
[0119] The computing device 1000 also includes an access device 1040, which enables the computing device 1000 to communicate via one or more networks 1060. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 1040 may include one or more of any type of network interface (e.g., a network interface card (NIC)) whether wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a Worldwide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, and a Near Field Communication (NFC). In one embodiment of the present specification, the above components of the computing device 1000 and Fig.10 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Fig.10 The computing device structure block diagram shown is for illustrative purposes only and is not intended to limit the scope of this specification. Those skilled in the art may add or replace other components as needed. The computing device 1000 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.) or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 1000 may also be a mobile or stationary server.
[0120] The processor 1020 is used to execute the following computer executable instructions, which, when executed by the processor, implement the steps of the above-mentioned model updating method or recommendation method.
[0121] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above-mentioned model updating method or recommendation method belong to the same concept, and the details not described in detail in the technical scheme of the computing device can be referred to the description of the technical scheme of the above-mentioned model updating method or recommendation method.
[0122] An embodiment of this specification also provides a computer-readable storage medium, which stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the steps of the above-mentioned model updating method or recommendation method are implemented. The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the above-mentioned model updating method or recommendation method belong to the same concept, and the details not described in detail in the technical scheme of the storage medium can be found in the description of the technical scheme of the above-mentioned model updating method or recommendation method.
[0123] An embodiment of this specification also provides a computer program, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the above-mentioned model updating method or recommendation method. The above is a schematic scheme of a computer program of this embodiment. It should be noted that the technical scheme of the computer program and the technical scheme of the above-mentioned model updating method or recommendation method belong to the same concept, and the details of the technical scheme of the computer program that are not described in detail can be found in the description of the technical scheme of the above-mentioned model updating method or recommendation method.
[0124] An embodiment of this specification also provides a computer program product, including a computer program or instructions, which implement the steps of the above-mentioned model updating method or recommendation method when executed by a processor. The above is a schematic scheme of a computer program product of this embodiment. It should be noted that the technical scheme of the computer program product and the technical scheme of the above-mentioned model updating method or recommendation method belong to the same concept. For details not described in detail in the technical scheme of the computer program product, please refer to the description of the technical scheme of the above-mentioned model updating method or recommendation method.
[0125] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0126] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0127] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.
[0128] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0129] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to only the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that technicians in the relevant technical field can well understand and use this specification. This specification is only limited by the claims and their full scope and equivalents.
Claims
1. A model updating method, comprising: In response to the model update request, determining a sample data set and an initial recommendation model; Dividing the sample data set according to the benchmark domain division rule and the auxiliary domain division rule respectively to obtain a benchmark domain data set and an auxiliary domain data set; Fine-tune the initial recommendation model according to the benchmark domain dataset and the auxiliary domain dataset, respectively, and determine the benchmark domain adaptation parameters and the auxiliary domain adaptation parameters according to the model fine-tuning results; The initial recommendation model is updated based on the reference domain adaptation parameter and the auxiliary domain adaptation parameter to obtain a target recommendation model corresponding to the model update request.
2. The model updating method according to claim 1, wherein in response to the model updating request, determining the sample data set and the initial recommendation model comprises: In response to the model update request, determining a sample data set and a recommendation model to be trained; Selecting target sample data from the sample data set, and using the target sample data to pre-train the recommendation model to be trained; Check whether the trained recommendation model meets the pre-training stop condition; If not, selecting candidate sample data from the sample data set, using the candidate sample data as the target sample data, and performing a step of pre-training the recommendation model to be trained using the target sample data; If so, the recommendation model to be trained that meets the pre-training stop condition is used as the initial recommendation model.
3. The model updating method according to claim 2, wherein the step of using the recommendation model to be trained that meets the pre-training stop condition as the initial recommendation model comprises: Determine the embedding layer, feature interaction layer, and output layer in the recommendation model to be trained that meet the pre-training stop condition; Parameter fixing processing is performed on the embedding layer and the output layer, and an initial recommendation model is generated according to the parameter fixing processing result.
4. The model updating method according to claim 1, wherein before the steps of dividing the sample data set according to the reference domain division rule and the auxiliary domain division rule, respectively, and obtaining the reference domain data set and the auxiliary domain data set are performed, the method further comprises: Determine a reference domain division rule corresponding to the reference domain, and select an auxiliary domain having an orthogonal relationship with the reference domain; The domain division rule corresponding to the auxiliary domain is used as the auxiliary domain division rule, and the sample data set is divided according to the reference domain division rule and the auxiliary domain division rule respectively to obtain the reference domain data set and the auxiliary domain data set.
5. The model updating method according to claim 3, wherein the initial recommendation model is fine-tuned according to the benchmark domain dataset and the auxiliary domain dataset, and the benchmark domain adaptation parameter and the auxiliary domain adaptation parameter are determined according to the model fine-tuning results, comprising: Fine-tune the feature interaction layer in the initial recommendation model according to the benchmark domain data set, and determine the benchmark domain adaptation parameters according to the fine-tuning results; The feature interaction layer in the initial recommendation model is fine-tuned according to the auxiliary domain data set, and the auxiliary domain adaptation parameters are determined according to the fine-tuning results.
6. The model updating method according to claim 1, wherein the updating of the initial recommendation model based on the reference domain adaptation parameter and the auxiliary domain adaptation parameter to obtain the target recommendation model corresponding to the model update request comprises: Constructing fusion parameters according to the reference domain adaptation parameters and the auxiliary domain adaptation parameters; The initial recommendation model is updated using the fusion parameter to obtain a target recommendation model corresponding to the model update request; The target recommendation model is used to perform a baseline domain recommendation task, an auxiliary domain recommendation task or a composite recommendation task.
7. The model updating method according to any one of claims 1 to 5, wherein when the baseline domain adaptation parameter includes at least one baseline domain adaptation sub-parameter, and the auxiliary domain adaptation parameter includes at least one auxiliary domain adaptation sub-parameter, updating the initial recommendation model based on the baseline domain adaptation parameter and the auxiliary domain adaptation parameter to obtain the target recommendation model corresponding to the model update request comprises: Selecting a target baseline domain adaptation sub-parameter from at least one baseline domain adaptation sub-parameter included in the baseline domain adaptation parameter according to the model update request, and selecting a target auxiliary domain adaptation sub-parameter from at least one auxiliary domain adaptation sub-parameter included in the auxiliary domain adaptation parameter; The initial recommendation model is updated based on the target reference domain adaptation sub-parameter and the target auxiliary domain adaptation sub-parameter to obtain a target recommendation model corresponding to the model update request.
8. The model updating method according to any one of claims 1 to 5, wherein after the step of updating the initial recommendation model based on the reference domain adaptation parameter and the auxiliary domain adaptation parameter and obtaining the target recommendation model corresponding to the model update request is executed, the method further comprises: Extracting verification sample data from the sample data set, and inputting the verification sample data into the target recommendation model for processing to obtain predicted recommendation information; The verification recommendation information corresponding to the verification sample data is compared with the predicted recommendation information, and a model verification report of the target recommendation model is generated according to the comparison result.
9. A recommendation method comprising: Acquire historical behavior data of a target user associated with a target application as reference domain behavior data, and acquire historical behavior data of the target user associated with an auxiliary application as auxiliary domain behavior data; Inputting the reference domain behavior data and the auxiliary domain behavior data into a target recommendation model for processing, and obtaining target recommendation information output by the target recommendation model, wherein the target recommendation model is obtained by any one of the methods of claims 1 to 8; A target object is determined based on the target recommendation information, and the target object is recommended to the target user through the target application.
10. A model updating method, applied to a cloud-side device, comprising: A model update request submitted by a receiving end-side device is received, and a sample data set and an initial recommendation model are determined according to the model update request; Dividing the sample data set according to the benchmark domain division rule and the auxiliary domain division rule respectively to obtain a benchmark domain data set and an auxiliary domain data set; Fine-tune the initial recommendation model according to the benchmark domain dataset and the auxiliary domain dataset, respectively, and determine the benchmark domain adaptation parameters and the auxiliary domain adaptation parameters according to the model fine-tuning results; The initial recommendation model is updated based on the reference domain adaptation parameter and the auxiliary domain adaptation parameter to obtain a target recommendation model corresponding to the model update request; The model parameters corresponding to the target recommendation model are sent to the terminal side device.
11. A computing device comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the method according to any one of claims 1 to 10 are implemented.
12. A computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, implement the steps of the method according to any one of claims 1 to 10.
13. A computer program product, comprising a computer program or instructions, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 10.