Model training method and related device thereof
Patent Information
- Application Number
- CN202311215067.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-19
- Publication Date
- 2026-09-04
- Estimated Expiration
- 2043-09-19
AI Technical Summary
[0004]上述增量训练方式中,在利用交互信息对前一阶段的模型进行多个轮次训练时,在任意一个轮次的训练中,仅考虑各个场景自身的特殊之处所产生的影响,以及各个场景之间的共同之处所产生的影响,所考虑的因素较为片面,导致最终训练得到的当前阶段的模型的性能较为一般,无法准确地为用户完成个性化推荐
[0035] A ninth aspect of this application provides a computer storage medium storing a computer program that, when executed by a computer, causes the computer to perform the method described in the first aspect, any possible implementation of the first aspect, or the method described in the second aspect.
Smart Images

Figure CN117349514B_ABST
Abstract
Description
Technical Field
[0001] This application relates to artificial intelligence (AI) technology, and more particularly to a model training method and related equipment. Background Technology
[0002] Personalized recommendation systems typically involve inputting user-related information into a neural network model to generate corresponding recommendations, which are then provided to the user for viewing and use. To meet users' personalized needs across multiple scenarios, recommendation systems can model multiple scenarios within the neural network model, enabling the model to provide personalized recommendations in various contexts.
[0003] To enhance the personalized recommendation capabilities of neural network models, various training methods, such as batch training and incremental training, can be employed to obtain higher-performing models. For incremental training, given a previous model, after acquiring interaction information between the user (at the current time) and multiple scenarios, this interaction information can be used to train the previous model for multiple rounds, resulting in the current model. The performance of the current model obtained in this way is superior to that of the previous model.
[0004] In the above incremental training method, when using interactive information to train the model of the previous stage for multiple rounds, in any training round, only the influence of the special features of each scene and the influence of the common features between each scene are considered. The factors considered are relatively one-sided, resulting in the performance of the model of the current stage that is finally trained being relatively average, and unable to accurately complete personalized recommendations for users. Summary of the Invention
[0005] This application provides a model training method and related equipment, which can train a model with excellent performance at the current stage and accurately provide personalized recommendations to users.
[0006] The first aspect of this application provides a model training method. The method is used to train a personalized recommendation model from a previous stage to a personalized recommendation model in the current stage. The training process includes multiple rounds of training. The following description focuses on one round of training and refers to this round of training as the current round of training. The model obtained from the previous two rounds of training is referred to as the first model, the model obtained from the previous round of training is referred to as the second model, and the model obtained from the current round of training is referred to as the third model.
[0007] When training for the current round is required, the user's interaction information with multiple scenarios at the current time can be obtained first. This interaction information is then input into a first model to process the information, obtaining first shared features and first specific features for multiple scenarios. Simultaneously, this interaction information can also be input into a second model to process the information, obtaining second shared features, second specific features, and recommendation results for the user regarding multiple scenarios. Then, the second model can be trained using these features, resulting in a third model. This completes the training for the current round.
[0008] Subsequently, the model obtained from the current training round (the third model) can be used as the target for the next training round, and training can continue until it is determined that the training conditions of a subsequent round are met. The model obtained from that round can then be used as the personalized recommendation model for the current stage. In this way, the personalized recommendation model from the previous stage is successfully trained into the personalized recommendation model for the current stage.
[0009] As can be seen from the above method: the first model is the model obtained from the first two training rounds, the second model is the model obtained from the previous training round, and the third model is the model obtained from the current training round. Furthermore, the first shared features of multiple scenes can be used to indicate the commonalities among the multiple scenes extracted by the first model, the first specific features of multiple scenes can be used to indicate the unique characteristics of each scene extracted by the first model, the second shared features of multiple scenes can be used to indicate the commonalities among the multiple scenes extracted by the second model, and the second specific features of multiple scenes can be used to indicate the unique characteristics of each scene extracted by the second model. Therefore, the base... In the process of training the third model using these features—that is, in completing the training of the current round—not only are the commonalities among multiple scenarios in a given round (i.e., in the previous two rounds or the previous round) and the unique characteristics of multiple scenarios within a given round considered, but also the commonalities among multiple scenarios across different rounds (i.e., in the previous two rounds and the previous round) and the unique characteristics of multiple scenarios across different rounds are considered. Therefore, the factors considered in the current round of training are relatively comprehensive, resulting in a model with superior performance. Based on this, in the multiple rounds of training from the previous stage's personalized recommendation model to the current stage's personalized recommendation model, each round of training considers relatively comprehensive factors. Therefore, the final model trained for the current stage possesses excellent performance and can accurately provide personalized recommendations to users.
[0010] In one possible implementation, training a second model to obtain a third model based on a first shared feature, a first specific feature, a second shared feature, a second specific feature, and recommendation results includes: performing a first calculation on the first shared feature, the first specific feature, the second shared feature, and the second specific feature to obtain a first loss; performing a second calculation on the recommendation results and real recommendation results available to users for multiple scenarios to obtain a second loss; and training the second model based on the first loss and the second loss to obtain the third model. In the aforementioned implementation, after obtaining the first shared feature, the first specific feature, the second shared feature, the second specific feature, and the recommendation results available to users for multiple scenarios, a pre-defined first loss function can be used to calculate the first shared feature, the first specific feature, the second shared feature, and the second specific feature to obtain the first loss. A pre-defined second loss function can also be used to calculate the recommendation results and real recommendation results for multiple scenarios to obtain the second loss. After obtaining the first loss and the second loss, the first loss and the second loss can be calculated to obtain the target loss. Therefore, the parameters of the second model can be updated using the target loss, thereby accurately obtaining the third model.
[0011] In one possible implementation, the first loss is used to indicate the differences between second shared features, the differences between second specific features, the differences between first shared features and second shared features, and the differences between first specific features and second specific features. In the aforementioned implementation, the first loss calculated using the first loss function can be used to indicate the differences between second shared features of different scenarios across multiple scenarios, the differences between second specific features of different scenarios across multiple scenarios, the differences between first shared features and second shared features of the same scenario across multiple scenarios, and the differences between first specific features and second specific features of different scenarios across multiple scenarios. Therefore, when using the first loss for model training, the model can continuously reduce the differences between second shared features of different scenarios, increase the differences between second specific features of different scenarios, reduce the differences between first shared features and second shared features of the same scenario, and increase the differences between first specific features and second specific features of different scenarios across multiple scenarios. In other words, the model can, as far as possible, keep the commonalities between different scenarios in the same round similar, keep the specificities of different scenarios within the same round different, keep the commonalities between a particular scenario and other scenarios in different rounds similar, and keep the specificities of different scenarios within different rounds different. In this way, during multiple training rounds at a certain stage, the model can learn information transfer not only in the scene dimension, but also in the time dimension, and even in the cross-dimensional dimension of scene + time, enabling the personalized recommendation model trained at the current stage to have better recommendation capabilities.
[0012] In one possible implementation, the first calculation includes at least one of the following: distance function-based operations, addition, exponential operations, logarithmic operations, and subtraction operations. In the aforementioned implementation, the calculation of the first loss function may include one or more of the following: distance function-based operations, addition, exponential operations, logarithmic operations, and subtraction operations, thereby accurately obtaining the aforementioned first loss.
[0013] In one possible implementation, the second loss is used to indicate the difference between the recommended results and the actual recommended results. In the aforementioned implementation, the second loss calculated through the second loss function can be used to indicate the difference between the predicted recommended results for multiple scenarios and the actual recommended results for multiple scenarios. Therefore, when using the second loss for model training, the model can learn the actual recommendation information for multiple scenarios. The personalized recommendation model trained in this way can make more realistic predictions in applications, thereby providing users with more accurate personalized recommendations.
[0014] In one possible implementation, the second calculation includes any one of the following: calculation based on the cross-entropy loss function, calculation based on the mean absolute error function, and calculation based on the mean squared error function. In the aforementioned implementation, the calculation of the second loss function may include one or more of the following: calculation based on the cross-entropy loss function, calculation based on the mean absolute error function, calculation based on the mean squared error function, etc., thereby accurately obtaining the aforementioned second loss.
[0015] In one possible implementation, processing the interaction information through a first model to obtain first shared features and first specific features of multiple scenarios includes: extracting first features from the interaction information using the first model to obtain the first shared features of multiple scenarios; and extracting second features from the first shared features using the first model to obtain the first specific features of multiple scenarios. In the aforementioned implementation, the first model may include a shared layer and multiple specific layers corresponding one-to-one with the multiple scenarios. After inputting the user's interaction information with multiple scenarios at the current time into the first model, the shared layer of the first model may first extract first features from the interaction information to obtain the first shared features of multiple scenarios, and then send the first shared features of multiple scenarios to the multiple specific layers of the first model respectively. For any one of the multiple specific layers of the first model, that specific layer may extract second features from the first shared features of multiple scenarios to obtain the first specific features of the scenario corresponding to that specific layer. For the other proprietary layers among the multiple proprietary layers of the first model, the other proprietary layers can also perform the same operations as the proprietary layer, so the first proprietary features of multiple scenarios can be obtained in the end.
[0016] In one possible implementation, processing the second interaction information through a second model to obtain second shared features for multiple scenarios, second specific features for multiple scenarios, and recommendation results for multiple scenarios that can be provided to the user includes: extracting first features from the interaction information using the second model to obtain second shared features for multiple scenarios; extracting second features from the second shared features using the second model to obtain second specific features for multiple scenarios; and classifying the second specific features using the second model to obtain recommendation results for multiple scenarios that can be provided to the user. In the aforementioned implementation, the second model may include a shared layer and multiple specific layers corresponding one-to-one with multiple scenarios. After inputting the user's interaction information with multiple scenarios at the current time into the second model, the shared layer of the second model may first extract first features from the interaction information to obtain second shared features for multiple scenarios, and then send the second shared features for multiple scenarios to the multiple specific layers of the second model. For any one of the multiple specific layers of the second model, that specific layer may extract second features from the second shared features for multiple scenarios to obtain second specific features for the scenario corresponding to that specific layer. For the other specialized layers in the second model, excluding the first specialized layer, the other specialized layers can perform the same operations as the first specialized layer. Therefore, multiple second-specific features for various scenarios can be obtained. Furthermore, these multiple specialized layers can send the second-specific features of multiple scenarios to the classification layer of the second model. The classification layer of the second model can classify the second-specific features of multiple scenarios, thereby obtaining recommendation results about multiple scenarios that can be provided to the user.
[0017] In one possible implementation, interaction information is used to indicate items that the user has interacted with in multiple scenarios, and recommendation results are used to indicate items that can be recommended to the user in multiple scenarios. In the aforementioned implementation, the interaction information between the user and multiple scenarios may include information about the user, the user's actions on items in multiple scenarios, and information about items that the user has interacted with in multiple scenarios. Therefore, this interaction information can be used to indicate items that the user has interacted with in multiple scenarios. Correspondingly, the recommendation results for multiple scenarios can include items that the user is particularly interested in within those scenarios. These items can be recommended to the user for viewing and use. Therefore, the recommendation results for multiple scenarios can be used to indicate items that can be recommended to the user in multiple scenarios.
[0018] The second aspect of this application provides a personalized recommendation method, which is implemented through a personalized recommendation model. The personalized recommendation model is derived from a third model obtained by the method described in the first aspect or any possible implementation of the first aspect. The method includes: acquiring interaction information between a user and a target scene, wherein the interaction information corresponds to a target time; and processing the interaction information to obtain recommendation results about the target scene that can be provided to the user.
[0019] A third aspect of this application provides a model training apparatus, comprising: an acquisition module for acquiring interaction information between a user and multiple scenarios; a first processing module for processing the interaction information using a first model to obtain first shared features and first specific features of multiple scenarios; a second processing module for processing the interaction information using a second model to obtain second shared features, second specific features of multiple scenarios, and recommendation results about multiple scenarios that can be provided to the user, wherein the second model is obtained by training the first model based on the interaction information; and a training module for training the second model based on the first shared features, the first specific features, the second shared features, the second specific features, and the recommendation results to obtain a third model.
[0020] In one possible implementation, the training module is used to: perform a first calculation on the first shared feature, the first proprietary feature, the second shared feature, and the second proprietary feature to obtain a first loss; perform a second calculation on the recommendation results and the real recommendation results that can be provided to the user for multiple scenarios to obtain a second loss; and train a second model based on the first loss and the second loss to obtain a third model.
[0021] In one possible implementation, the first loss is used to indicate the differences between first shared features, the differences between first proprietary features, the differences between first shared features and second shared features, and the differences between first proprietary features and second proprietary features.
[0022] In one possible implementation, the first computation includes at least one of the following: distance function-based operations, addition operations, exponential operations, logarithmic operations, and subtraction operations.
[0023] In one possible implementation, the second loss is used to indicate the difference between the recommended result and the true recommended result.
[0024] In one possible implementation, the second computation includes any one of the following: computation based on the cross-entropy loss function, computation based on the mean absolute error function, or computation based on the mean squared error function.
[0025] In one possible implementation, the first processing module is configured to: extract first features from the interaction information using a first model to obtain first shared features for multiple scenarios; and extract second features from the first shared features using the first model to obtain first proprietary features for multiple scenarios.
[0026] In one possible implementation, the second processing module is used to: extract a first feature from the interaction information using a second model to obtain a second shared feature for multiple scenarios; extract a second feature from the second shared feature using the second model to obtain a second specific feature for multiple scenarios; and classify the second specific feature using the second model to obtain recommendation results for multiple scenarios that can be provided to the user.
[0027] In one possible implementation, interaction information is used to indicate items that the user has interacted with in multiple scenarios, and recommendation results are used to indicate items that can be recommended to the user in multiple scenarios.
[0028] A fourth aspect of this application provides a personalized recommendation device, which includes a personalized recommendation model derived from a third model obtained by a model training device as described in the third aspect or any possible implementation of the third aspect. The personalized recommendation device includes: an acquisition module for acquiring interaction information between a user and a target scene, wherein the interaction information corresponds to a target time; and a processing module for processing the interaction information to obtain recommendation results about the target scene that can be provided to the user.
[0029] A fifth aspect of this application provides a model training apparatus, which includes a memory and a processor; the memory stores code, and the processor is configured to execute the code. When the code is executed, the model training apparatus performs the method described in the first aspect or any possible implementation thereof.
[0030] A sixth aspect of this application provides a personalized recommendation apparatus, which includes a memory and a processor; the memory stores code, and the processor is configured to execute the code, wherein when the code is executed, personalized recommendations are performed as described in the second aspect.
[0031] A seventh aspect of this application provides a circuit system including a processing circuit configured to perform the method described in the first aspect, any possible implementation of the first aspect, or the second aspect.
[0032] An eighth aspect of this application provides a chip system including a processor for calling a computer program or computer instructions stored in a memory to cause the processor to perform the method described in the first aspect, any possible implementation of the first aspect, or the second aspect.
[0033] In one possible implementation, the processor is coupled to the memory via an interface.
[0034] In one possible implementation, the chip system also includes a memory that stores computer programs or computer instructions.
[0035] A ninth aspect of this application provides a computer storage medium storing a computer program that, when executed by a computer, causes the computer to perform the method described in the first aspect, any possible implementation of the first aspect, or the method described in the second aspect.
[0036] A tenth aspect of this application provides a computer program product storing instructions that, when executed by a computer, cause the computer to perform the method described in the first aspect, any possible implementation of the first aspect, or the method described in the second aspect.
[0037] In this embodiment, the process of training the personalized recommendation model from the previous stage to the current stage includes multiple training rounds. During the current round of training, interaction information between the user (at the current time) and multiple scenarios can be obtained first. Then, this interaction information can be input into a first model to process it, thereby obtaining first shared features and first specific features of multiple scenarios. Next, this interaction information can be input into a second model to process it, thereby obtaining second shared features, second specific features, and recommendation results for the user regarding the multiple scenarios. Finally, based on the first shared features, first specific features, second shared features, second specific features, and recommendation results, the second model is trained to obtain a third model. This completes the training for the current round. In the aforementioned process, the first model is the model obtained from the first two training rounds, the second model is the model obtained from the previous training round, and the third model is the model obtained from the current training round. It is worth noting that the first shared features of multiple scenes are used to indicate the commonalities among the multiple scenes extracted by the first model, the first specific features of multiple scenes are used to indicate the unique characteristics of each scene extracted by the first model, the second shared features of multiple scenes are used to indicate the commonalities among the multiple scenes extracted by the second model, and the second specific features of multiple scenes are used to indicate the unique characteristics of each scene extracted by the second model. Therefore, based on... In the process of training the third model using these features—that is, in the process of completing the current training round—not only are the commonalities among multiple scenarios in a certain round (i.e., in the previous two rounds or the previous round) and the unique characteristics of multiple scenarios in a certain round considered, but also the commonalities among multiple scenarios in different rounds (i.e., in the previous two rounds and the previous round) and the unique characteristics of multiple scenarios in different rounds are considered. It is evident that the factors considered in the current training round are relatively comprehensive, thus the model obtained from the current training round can possess superior performance. Based on this, in the multiple training rounds included in training the personalized recommendation model from the previous stage to the current stage, the training in any round can consider relatively comprehensive factors. Therefore, the final model obtained from the current training round can possess excellent performance and accurately provide personalized recommendations for users. Attached Figure Description
[0038] Figure 1 A structural diagram illustrating the main framework of artificial intelligence; Figure 2aA schematic diagram of the structure of a personalized recommendation system provided in the embodiments of this application; Figure 2b Another structural diagram of the personalized recommendation system provided in the embodiments of this application; Figure 2c A schematic diagram of the related devices for personalized recommendations provided in the embodiments of this application; Figure 3 A schematic diagram of the system 100 architecture provided in the embodiments of this application; Figure 4 A schematic diagram of the structure of the personalized recommendation model provided in the embodiments of this application; Figure 5 A schematic flowchart of the model training method provided in the embodiments of this application; Figure 6 A schematic diagram of incremental training provided in an embodiment of this application; Figure 7 A schematic diagram of a training round provided in an embodiment of this application; Figure 8 A schematic diagram of the computational target provided in the embodiments of this application; Figure 9 A schematic diagram of the comparison results provided for an embodiment of this application; Figure 10 Another schematic diagram illustrating the comparison results provided in the embodiments of this application; Figure 11 Another schematic diagram illustrating the comparison results provided in the embodiments of this application; Figure 12 A flowchart illustrating the personalized recommendation method provided in this application embodiment; Figure 13 A schematic diagram of the structure of the model training apparatus provided in the embodiments of this application; Figure 14 A schematic diagram of the personalized recommendation device provided in the embodiments of this application; Figure 15 A schematic diagram of the structure of the execution device provided in the embodiments of this application; Figure 16 A schematic diagram of the structure of the training device provided in the embodiments of this application; Figure 17 This is a schematic diagram of the structure of a chip provided in an embodiment of this application. Detailed Implementation
[0039] This application provides a model training method and related equipment, which can train a model with excellent performance at the current stage and accurately provide personalized recommendations to users.
[0040] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of elements is not necessarily limited to those elements, but may include other elements not explicitly listed or inherent to those processes, methods, products, or apparatuses.
[0041] Personalized recommendation systems typically involve inputting user-related information into a neural network model to generate corresponding recommendations, which are then provided to the user for viewing and use. To meet users' personalized needs across multiple scenarios, recommendation systems can model multiple scenarios within the neural network model, enabling the model to provide personalized recommendations in various contexts.
[0042] To enhance the personalized recommendation capabilities of neural network models, various training methods, such as batch training and incremental training, can be employed to obtain higher-performing models. For incremental training, assuming the personalized recommendation model has already undergone multiple training iterations using user interaction information from previous interactions with various scenarios, a previous-stage model can be successfully obtained. To further optimize performance, this previous-stage model can be trained again. In other words, after acquiring user interaction information from the current time and multiple scenarios, this information can be used to train the previous-stage model for multiple iterations, resulting in the current-stage model. The performance of the current-stage model obtained in this way is superior to that of the previous-stage model.
[0043] In the above incremental training method, when using interactive information to train the model of the previous stage for multiple rounds, in any training round, only the influence of the special features of each scene and the influence of the common features between each scene are considered. The factors considered are relatively one-sided, resulting in the performance of the model of the current stage that is finally trained being relatively average, and unable to accurately complete personalized recommendations for users.
[0044] To address the aforementioned issues, this application provides a model training method and a personalized recommendation method, which can be implemented in conjunction with artificial intelligence (AI) technology. AI technology is a discipline that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence. AI technology achieves optimal results by perceiving the environment, acquiring knowledge, and using that knowledge. In other words, artificial intelligence is a branch of computer science that attempts to understand the essence of intelligence and produce a new type of intelligent machine that can react in a way similar to human intelligence. Using artificial intelligence for data processing is a common application of AI.
[0045] First, the overall workflow of the artificial intelligence system is described; please refer to [link / reference]. Figure 1 , Figure 1 This is a structural diagram illustrating the main framework of artificial intelligence. The framework is explained below from two dimensions: the "Intelligent Information Chain" (horizontal axis) and the "IT Value Chain" (vertical axis). The "Intelligent Information Chain" reflects a series of processes from data acquisition to processing. For example, it could be the general process of intelligent information perception, intelligent information representation and formation, intelligent reasoning, intelligent decision-making, and intelligent execution and output. In this process, data undergoes a condensation process of "data—information—knowledge—wisdom." The "IT Value Chain" reflects the value that artificial intelligence brings to the information technology industry, from the underlying infrastructure of human intelligence and information (provided and processed by technology) to the industrial ecosystem of the system.
[0046] (1) Infrastructure
[0047] Infrastructure provides computing power to support artificial intelligence systems, enabling communication with the external world and providing support through a basic platform. This communication occurs through sensors; computing power is provided by intelligent chips (hardware acceleration chips such as CPUs, NPUs, GPUs, ASICs, and FPGAs); and the basic platform includes distributed computing frameworks and related platform guarantees and support, which may include cloud storage and computing, interconnected networks, etc. For example, sensors communicate with the outside world to acquire data, and this data is provided to intelligent chips in the distributed computing system provided by the basic platform for computation.
[0048] (2) Data
[0049] The data at the next layer of infrastructure is used to represent the data sources in the field of artificial intelligence. The data involves graphics, images, voice, text, and IoT data from traditional devices, including business data from existing systems and sensor data such as force, displacement, liquid level, temperature, and humidity.
[0050] (3) Data processing
[0051] Data processing typically includes methods such as data training, machine learning, deep learning, search, reasoning, and decision-making.
[0052] Among them, machine learning and deep learning can perform intelligent information modeling, extraction, preprocessing, and training of data by symbolizing and formalizing it.
[0053] Reasoning refers to the process in which, in a computer or intelligent system, the machine thinks and solves problems by simulating human intelligent reasoning, based on reasoning control strategies and using formalized information. Typical functions include search and matching.
[0054] Decision-making refers to the process of making decisions based on intelligent information after reasoning, and it typically provides functions such as classification, sorting, and prediction.
[0055] (4) General ability
[0056] After the data processing mentioned above, the results of the data processing can be used to form some general capabilities, such as algorithms or a general system, for example, translation, text analysis, computer vision processing, speech recognition, image recognition, etc.
[0057] (5) Smart products and industry applications
[0058] Intelligent products and industry applications refer to products and applications of artificial intelligence systems in various fields. They are the encapsulation of overall artificial intelligence solutions, productizing intelligent information decision-making and realizing practical applications. Their application areas mainly include: intelligent terminals, intelligent transportation, intelligent healthcare, autonomous driving, smart cities, etc.
[0059] The following sections will introduce several application scenarios for this application.
[0060] Figure 2a This is a schematic diagram of a personalized recommendation system provided in an embodiment of this application. The personalized recommendation system includes user devices and data processing devices. The user devices include smart terminals such as mobile phones, personal computers, or information processing centers. The user device is the initiator of personalized recommendations; as the initiator of personalized recommendation requests, the request is typically initiated by the user through the user device.
[0061] The aforementioned data processing equipment can be devices or servers with data processing capabilities, such as cloud servers, network servers, application servers, and management servers. The data processing equipment receives personalized recommendation requests from smart terminals through an interactive interface, and then performs personalized recommendations through machine learning, deep learning, search, reasoning, and decision-making methods using a storage device and a data processing processor. The storage device in the data processing equipment can be a general term, including local storage and a database storing historical data. The database can be located on the data processing equipment or on other network servers.
[0062] exist Figure 2a In the personalized recommendation system shown, a user device can acquire the target scene input / selected by the user, and then send a request to a data processing device. This causes the data processing device to execute a personalized recommendation application based on the target scene obtained by the user device, thereby obtaining recommendation results about the target scene that can be provided to the user. For example, the user device can acquire the target scene selected by the user, and thus send a personalized recommendation request for the target scene to the data processing device. Based on this request, the data processing device can collect interaction information between the user and the target scene, and perform a series of processing steps on this interaction information to obtain recommendation results about the target scene (e.g., a recommendation list presented in the target scene, which contains one or more items that the user is interested in), and then provide these recommendation results to the user for viewing and use.
[0063] exist Figure 2a In this context, the data processing device can execute the personalized recommendation method of the embodiments of this application.
[0064] Figure 2b This is another schematic diagram of the personalized recommendation system provided in the embodiments of this application. Figure 2b In this context, the user equipment (UE) directly functions as a data processing device. This UE can directly acquire input from the user and process it directly through its own hardware. The specific process is similar to... Figure 2a Similar to the description above, it will not be repeated here.
[0065] exist Figure 2b In the personalized recommendation system shown, the user device can obtain the target scene selected by the user. Therefore, the user device can collect the interaction information between the user and the target scene, and perform a series of processing on the interaction information to obtain the recommendation results about the target scene (for example, a recommendation list presented in the target scene, which contains one or more items that the user is interested in), and provide the recommendation results to the user for viewing and use.
[0066] exist Figure 2b In this context, the user equipment itself can execute the personalized recommendation method of the embodiments of this application.
[0067] Figure 2c A schematic diagram of the related devices for personalized recommendations provided in the embodiments of this application.
[0068] The above Figure 2a and Figure 2b The user equipment in the context can specifically be Figure 2c Local device 301 or local device 302 in the system. Figure 2a The data processing equipment in the middle can specifically be Figure 2c The execution device 210 in the process includes a data storage system 250 that can store the data to be processed by the execution device 210. The data storage system 250 can be integrated into the execution device 210 or set up in the cloud or on other network servers.
[0069] Figure 2a and Figure 2b The processor in the system can perform data training / machine learning / deep learning through neural network models or other models (e.g., support vector machine-based models), and use the data to finally train or learn the model to execute personalized recommendation applications for the target scenario, thereby obtaining the corresponding recommendation results.
[0070] Figure 3 A schematic diagram of the system 100 architecture provided in this application embodiment, in Figure 3 In this embodiment, the execution device 110 is configured with an input / output (I / O) interface 112 for data interaction with external devices. Users can input data to the I / O interface 112 through the client device 140. The input data may include various scheduled tasks, callable resources, and other parameters.
[0071] During the preprocessing of input data by the execution device 110, or during the calculation module 111 of the execution device 110 performing calculations and other related processing (such as implementing the personalized recommendation model function in this application), the execution device 110 may call data, code, etc. in the data storage system 150 for corresponding processing, or store the data, instructions, etc. obtained from the corresponding processing into the data storage system 150.
[0072] Finally, I / O interface 112 returns the processing result to client device 140, thereby providing it to the user.
[0073] It is worth noting that the training device 120 can be used to implement the model training method provided in the embodiments of this application. Specifically, the training device 120 can generate corresponding target models / rules based on different training data for different objectives or tasks. These corresponding target models / rules can be used to achieve the above objectives or complete the above tasks, thereby providing the user with the required results. The training data can be stored in the database 130 and comes from the training samples collected by the data acquisition device 160.
[0074] exist Figure 3 In the scenario shown, the user can manually provide input data, which can be done through the interface provided by I / O interface 112. Alternatively, the client device 140 can automatically send input data to I / O interface 112. If user authorization is required for the client device 140 to automatically send input data, the user can set the corresponding permissions in the client device 140. The user can view the output results of the execution device 110 on the client device 140, which can be presented in various forms such as display, sound, or animation. The client device 140 can also act as a data acquisition terminal, collecting the input data and output results of the input I / O interface 112 as new sample data and storing them in the database 130. Alternatively, data can be collected directly from the I / O interface 112 without going through the client device 140, using the input data and output results of the input I / O interface 112 as new sample data and storing them in the database 130.
[0075] It is worth noting that, Figure 3 This is merely a schematic diagram of a system architecture provided in an embodiment of this application. The positional relationships between the devices, components, modules, etc., shown in the diagram do not constitute any limitation. For example, in Figure 3 In this context, the data storage system 150 is an external memory relative to the execution device 110. However, in other cases, the data storage system 150 can also be placed within the execution device 110. For example... Figure 3 As shown, a neural network can be trained using training device 120.
[0076] This application also provides a chip including a neural network processor (NPU). This chip can be configured as follows: Figure 3 The execution device 110 shown is used to perform the calculations of the calculation module 111. This chip can also be located in, for example... Figure 3 The training device 120 shown is used to complete the training work of the training device 120 and output the target model / rules.
[0077] The Neural Processing Unit (NPU) is a coprocessor mounted on the main central processing unit (CPU) (host CPU), where tasks are assigned by the CPU. The core of the NPU is the computation circuitry, which is controlled by a controller to retrieve data from memory (weight memory or input memory) and perform calculations.
[0078] In some implementations, the arithmetic circuitry includes multiple process engines (PEs). In some implementations, the arithmetic circuitry is a two-dimensional pulsating array. The arithmetic circuitry can also be a one-dimensional pulsating array or other electronic circuitry capable of performing mathematical operations such as multiplication and addition. In some implementations, the arithmetic circuitry is a general-purpose matrix processor.
[0079] For example, suppose we have an input matrix A, a weight matrix B, and an output matrix C. The arithmetic circuit retrieves the corresponding data of matrix B from the weight memory and caches it in each PE (Process Equipment) of the arithmetic circuit. The arithmetic circuit retrieves the data of matrix A from the input memory and performs matrix operations with matrix B. The partial or final result of the obtained matrix is stored in the accumulator.
[0080] Vector computation units can further process the output of computational circuits, such as vector multiplication, vector addition, exponentiation, logarithmic operations, size comparisons, etc. For example, vector computation units can be used in non-convolutional / non-FC layers of neural networks for computation, such as pooling, batch normalization, and local response normalization.
[0081] In some implementations, the vector computation unit can store the processed output vector into a unified buffer. For example, the vector computation unit can apply a nonlinear function to the output of the arithmetic circuit, such as a vector of accumulated values, to generate activation values. In some implementations, the vector computation unit generates normalized values, merged values, or both. In some implementations, the processed output vector can be used as activation input to the arithmetic circuit, for example, for use in subsequent layers of a neural network.
[0082] The unified memory is used to store input data and output data.
[0083] The weight data is directly transferred from the external memory to the input memory and / or unified memory, stored in the weight memory, and stored in the unified memory to the external memory through the direct memory access controller (DMAC).
[0084] The bus interface unit (BIU) is used to enable interaction between the main CPU, DMAC, and instruction fetch memory via a bus.
[0085] The instruction fetch buffer, connected to the controller, is used to store the instructions used by the controller. The controller is used to invoke instructions cached in the memory to control the operation of the computing accelerator.
[0086] Generally, the unified memory, input memory, weight memory, and instruction fetch memory are all on-chip memories, while external memory is memory outside the NPU. This external memory can be double data rate synchronous dynamic random access memory (DDRSDRAM), high bandwidth memory (HBM), or other readable and writable memories.
[0087] Since the embodiments of this application involve a large number of neural network applications, for ease of understanding, the relevant terms and concepts such as neural networks involved in the embodiments of this application will be introduced below.
[0088] (1) Neural Network
[0089] A neural network can be composed of neural units, which can be operational units that take xs and an intercept of 1 as inputs, and whose output can be: (1) Where s = 1, 2, ..., n, where n is a natural number greater than 1, Ws is the weight of xs, and b is the bias of the neural unit. f is the activation function of the neural unit, used to introduce nonlinear characteristics into the neural network to convert the input signal in the neural unit into the output signal. The output signal of this activation function can be used as the input of the next convolutional layer. The activation function can be the sigmoid function. A neural network is a network formed by connecting many of the above-mentioned individual neural units together, that is, the output of one neural unit can be the input of another neural unit. The input of each neural unit can be connected to the local receptive field of the previous layer to extract the features of the local receptive field, which can be a region composed of several neural units.
[0090] The function of each layer in a neural network can be expressed using mathematical expressions. To describe it: From a physical perspective, the work of each layer in a neural network can be understood as transforming the input space (the set of input vectors) to the output space (i.e., from the row space to the column space of a matrix) through five operations on the input space. These five operations include: 1. Dimensionality increase / decrease; 2. Magnification / scaling; 3. Rotation; 4. Translation; 5. "Bending". Operations 1, 2, and 3 are... Completed, operation 4 is performed by Completed, operation 5 is then performed by To achieve this. The term "space" is used here because the object being classified is not a single thing, but a category of things; space refers to the collection of all individuals within this category. This is a weight vector, where each value represents the weight of a neuron in that layer of the neural network. The weights of each layer determine the spatial transformation from the input space to the output space described above. It controls how the space is transformed. The goal of training a neural network is to ultimately obtain the weight matrix of all layers of the trained neural network (composed of vectors from many layers). (The resulting weight matrix). Therefore, the training process of a neural network is essentially about learning how to transform the control space, more specifically, learning the weight matrix.
[0091] Because we want the output of the neural network to be as close as possible to the actual predicted value, we can compare the current network's prediction with the desired target value, and then update the weight vector of each layer of the neural network based on the difference between the two (of course, there is usually an initialization process before the first update, that is, pre-configuring the parameters of each layer in the neural network). For example, if the network's prediction is too high, the weight vector is adjusted to make it predict lower, and this adjustment is continued until the neural network can predict the actual target value. Therefore, it is necessary to predefine "how to compare the difference between the predicted value and the target value," which is the loss function or objective function. These are important equations used to measure the difference between the predicted value and the target value. Taking the loss function as an example, the higher the output value (loss) of the loss function, the greater the difference, so training the neural network becomes the process of minimizing this loss as much as possible.
[0092] (2) Backpropagation algorithm
[0093] Neural networks can employ backpropagation (BP) to correct the parameters of the initial neural network model during training, thereby reducing the reconstruction error loss. Specifically, forward propagation of the input signal to the output generates error loss; this error loss information is then propagated back to update the parameters of the initial neural network model, leading to convergence of the error loss. The backpropagation algorithm is an error-loss-driven backpropagation process aimed at obtaining the optimal parameters of the neural network model, such as the weight matrix.
[0094] (3) Incremental training
[0095] For existing neural network models, newly generated training data can be used to fine-tune the existing model, resulting in an updated neural network model. For example, in a recommender system, based on the personalized recommendation model from the previous stage, interaction information between the user and multiple scenarios at the current time can be collected, and this interaction information can be used to train the personalized recommendation model from the previous stage, thus obtaining the personalized recommendation model for the current stage. In this way, the personalized recommendation model for the current stage can provide users with better personalized recommendation services.
[0096] The method provided in this application is described below from the perspectives of neural network training and neural network application.
[0097] The model training method provided in this application involves the processing of data sequences and can be applied to data training, machine learning, deep learning, and other methods. It performs symbolic and formal intelligent information modeling, extraction, preprocessing, and training on training data (e.g., user interaction information between multiple scenarios in the model training method provided in this application), ultimately obtaining a trained neural network (such as the personalized recommendation model at the current stage, which comes from the third model in the model training method provided in this application). Furthermore, the personalized recommendation method provided in this application can utilize the trained neural network to input input data (e.g., user interaction information between the user and the target scenario in the personalized recommendation method provided in this application) into the trained neural network to obtain output data (e.g., the recommendation results for the target scenario provided in this application). It should be noted that the model training method and the personalized recommendation method provided in this application are inventions based on the same concept and can be understood as two parts of a system or two stages of an overall process: such as the model training stage and the model application stage.
[0098] The model training method provided in the embodiments of this application will be described below. The model training method provided in the embodiments of this application is used to train a personalized recommendation model from a previous stage into a personalized recommendation model for the current stage, wherein the personalized recommendation model is as follows: Figure 4 As shown ( Figure 4 This is a schematic diagram of the structure of a personalized recommendation model provided in an embodiment of this application. The personalized recommendation model includes a shared layer, multiple specialized layers, and a classification layer. The input of the shared layer serves as the input of the entire model, and the output of the shared layer is connected to the inputs of each specialized layer. The outputs of each specialized layer are connected to the input of the classification layer, and the output of the classification layer serves as the output of the entire model. To understand the training process for this model, the following describes the process. Figure 5 A schematic flowchart of the model training method provided in the embodiments of this application is shown below. Figure 5 As shown, the method includes: 501. Obtain interaction information between the user and multiple scenarios.
[0099] In this embodiment, when it is necessary to train the personalized recommendation model from the previous stage to the personalized recommendation model of the current stage, the user's interaction information between the user and multiple scenarios at the current time can be obtained first. It should be noted that the user's interaction information between the user and multiple scenarios at the current time can be used to train the personalized recommendation model from the previous stage for multiple rounds to obtain the personalized recommendation model of the current stage. It can be understood that the personalized recommendation model from the previous stage is usually obtained by using the user's interaction information between the user and multiple scenarios at a previous time to train the personalized recommendation model from an even earlier stage for multiple rounds.
[0100] For example, such as Figure 6 As shown ( Figure 6(A schematic diagram of incremental training provided in an embodiment of this application) Suppose that the user's interaction information between K scenarios on day 1 (K is a positive integer greater than or equal to 2) has been used to train the original neural network model for multiple rounds to obtain a first-stage personalized recommendation model. The user's interaction information between K scenarios on day 2 has been used to train the first-stage personalized recommendation model for multiple rounds to obtain a second-stage personalized recommendation model, and so on. The user's interaction information between K scenarios on day 11 (i.e., the previous time) has been used to train the tenth-stage personalized recommendation model for multiple rounds to obtain the eleventh-stage personalized recommendation model (i.e., the previous stage's personalized recommendation model). Assuming the current time is day 12, in order to train the twelfth-stage personalized recommendation model (i.e., the current stage's personalized recommendation model), the user's interaction information between K scenarios on day 12 can be obtained first. This interaction information can be used to train the eleventh-stage personalized recommendation model for multiple rounds to obtain the twelfth-stage personalized recommendation model.
[0101] Specifically, the multiple scenarios in which users interact can include the interface of an app store, the interface of a shopping app, and the details page of a product, etc., without any restrictions.
[0102] More specifically, the user's interaction information between multiple scenarios at the current time can include the following: (1) the user's actions on items in multiple scenarios at the current time (e.g., clicking, browsing, adding to cart, favorites, etc.). (2) the user's personal information input into multiple scenarios at the current time (e.g., the user's name, gender, age, occupation, etc.). (3) the personal information of items in multiple scenarios that the user interacts with at the current time (e.g., the item's name, category, function, price, etc.). Therefore, this interaction information can be used to indicate the items the user has interacted with in multiple scenarios at the current time.
[0103] It should be understood that the concept of time involved in this embodiment usually refers to a time period, which can be a day, an hour, a moment, etc. The above example is only used to illustrate the concept of time with the current time as the 12th day and the previous time as the 11th day, and does not impose any limitation on the length of the concept of time. That is to say, the length of the concept of time can be set according to actual needs, and there is no limitation here.
[0104] It should also be understood that, in this embodiment, the internal structure of the personalized recommendation model at each stage (including the personalized recommendation model at the current stage and the personalized recommendation model at the previous stage) is as follows: Figure 4As shown, and in any stage, the internal structure of the model in each training round is also as follows. Figure 4 As shown, further details will not be elaborated upon.
[0105] 502. The interaction information is processed through the first model to obtain the first shared features of multiple scenarios and the first proprietary features of multiple scenarios.
[0106] 503. The interaction information is processed by the second model to obtain the second shared features of multiple scenarios, the second specific features of multiple scenarios, and the recommendation results about multiple scenarios that can be provided to the user. The second model is obtained by training the first model based on the interaction information.
[0107] It's important to note that training the personalized recommendation model from the previous stage to the current stage involves multiple training rounds. In adjacent training rounds, the result (model) from the earlier round serves as the target for the later rounds. In other words, the first round of training targets the personalized recommendation model from the previous stage, and the last round yields the personalized recommendation model for the current stage. Since the training data used in each round consists of user interaction information across multiple scenarios at the current time, and the training process for each round is similar, the following description uses one particular round as an illustration, referring to it as the current round. The model obtained from the first two rounds is called the first model, the model obtained from the previous round is called the second model, and the model obtained from the current round is called the third model. Thus, the second model is obtained by training the first model using the user's interaction information across multiple scenarios at the current time.
[0108] In the current training round, the user's interaction information with multiple scenarios at the current time can be input into the first model. The first model processes this interaction information to obtain first shared features and first specific features for multiple scenarios. Specifically, for any given scenario, the first shared features indicate the commonalities between that scenario and the other scenarios extracted by the first model (or, in other words, the first model summarizes the commonalities between the user's interaction information (at the current time) and that of the scenario, as well as the user's interaction information (at the current time) with the other scenarios). The first specific features indicate the unique characteristics of that scenario extracted by the first model (or, in other words, the first model filters out the unique characteristics of the user's interaction information (at the current time) with that scenario, after comprehensively analyzing the user's interaction information (at the current time) and that of the user's interaction information (at the current time) with the other scenarios).
[0109] Simultaneously, this interaction information can be input into a second model, which processes it to obtain second shared features across multiple scenarios, second specific features across multiple scenarios, and recommendation results for the user regarding multiple scenarios. Specifically, for any given scenario, the second shared features indicate the commonalities between that scenario and the other scenarios extracted by the second model (this can also be understood as: the second model comprehensively analyzes the user's interaction information (at the current time) with that scenario and the user's interaction information (at the current time) with the other scenarios, and summarizes the commonalities among these interactions). The second specific features indicate the unique characteristics of that scenario extracted by the second model (this can also be understood as: the second model comprehensively analyzes the user's interaction information (at the current time) with that scenario and the user's interaction information (at the current time) with the other scenarios, and filters out the unique characteristics of the user's interaction information with that scenario).
[0110] Specifically, the recommendation results provided to users for multiple scenarios can include items that users are more interested in in multiple scenarios. These items can be recommended to users for viewing and use. Therefore, these recommendation results are used to indicate items that can be recommended to users in multiple scenarios. For example, the recommendation results can include an application recommendation list in the interface of an app store (usually containing multiple applications recommended to users), a product recommendation list in the interface of a shopping app (usually containing multiple products recommended to users), and a related product recommendation list on the details page of a product (usually containing multiple related products recommended to users), etc. There are no restrictions here.
[0111] More specifically, the first shared features of multiple scenarios and the first proprietary features of multiple scenarios can be obtained in the following ways: For the first model, it may include a shared layer and multiple dedicated layers corresponding to multiple scenarios. After inputting the user's interaction information between the user and multiple scenarios at the current time into the first model, the shared layer of the first model may first perform a first feature extraction on the interaction information (e.g., various feature extraction operations such as convolution, fully connected layers, and fusion) to obtain the first shared features of multiple scenarios, and then send the first shared features of multiple scenarios to the multiple dedicated layers of the first model. For any one of the multiple dedicated layers of the first model, the dedicated layer may perform a second feature extraction on the first shared features of multiple scenarios (e.g., various feature extraction operations such as convolution, fully connected layers, and fusion) to obtain the first dedicated features of the scenario corresponding to that dedicated layer. For the other dedicated layers of the first model, the other dedicated layers may also perform the same operations as the dedicated layer, so that the first dedicated features of multiple scenarios can be obtained in the end.
[0112] As in the example above, such as Figure 7 As shown ( Figure 7 This is a schematic diagram of a certain round of training provided in an embodiment of this application. Figure 7 Is Figure 6 Based on the above, let's assume that training the personalized recommendation model from stage 11 to stage 12 involves N rounds of training (N is a positive integer greater than or equal to 2). Then, in the i-th round of training (i=1,...,N), we can obtain the model obtained from the (i-1)-th round of training. and the model obtained from the (i-2)th training round. .
[0113] Therefore, the user's interaction information between the 12th day and K scenarios can be... Enter to , The shared layer can be used for Feature extraction is performed to obtain shared features from K scenes. , For the shared features of the first scene, For the shared features of the second scene, ..., This represents the shared features of the Kth scene. The K proprietary layers can be used for Feature extraction is performed to obtain K scene-specific features. , This is a feature specific to the first scenario. For the specific features of the second scene, ..., These are the proprietary features of the Kth scene.
[0114] More specifically, the second shared features of multiple scenarios, the second proprietary features of multiple scenarios, and the recommendation results about multiple scenarios that can be provided to users can be obtained in the following ways: The second model may include a shared layer and multiple dedicated layers corresponding to multiple scenarios. After inputting the user's interaction information with multiple scenarios at the current time into the second model, the shared layer of the second model can first perform a first feature extraction on the interaction information (e.g., various feature extraction operations such as convolution, fully connected layers, and fusion) to obtain second shared features for multiple scenarios, and then send the second shared features of multiple scenarios to the multiple dedicated layers of the second model. For any one of the multiple dedicated layers of the second model, the dedicated layer can perform a second feature extraction on the second shared features of multiple scenarios (e.g., various feature extraction operations such as convolution, fully connected layers, and fusion) to obtain the second dedicated features of the scenario corresponding to that dedicated layer. For the other dedicated layers of the multiple dedicated layers of the second model, the other dedicated layers can also perform the same operations as the dedicated layer, so that the second dedicated features of multiple scenarios can be obtained in the end, and the multiple dedicated layers can also send the second dedicated features of multiple scenarios to the classification layer of the second model. The classification layer of the second model can classify the second specific features of multiple scenarios, thereby obtaining (predictive) recommendation results for multiple scenarios that can be provided to users.
[0115] Continuing with the example above, the user's interaction information with K scenarios on day 12 can be used. Enter to , The shared layer can be used for Feature extraction is performed to obtain shared features from K scenes. , For the shared features of the first scene, For the shared features of the second scene, ..., This represents the shared features of the Kth scene. The K proprietary layers can be used for Feature extraction is performed to obtain K scene-specific features. , This is a feature specific to the first scenario. For the specific features of the second scene, ..., These are the proprietary features of the Kth scene. The classification layer can be used for The data is categorized to obtain recommendation results for K scenarios. , For the recommendation results regarding the first scenario, For the recommendation results regarding the second scenario, This is the recommendation result for the Kth scenario.
[0116] It should be understood that in this embodiment, if the current training round is the first training round, then the model obtained from the previous training round (the second model) and the model obtained from the previous two training rounds (the first model) can both be the personalized recommendation model of the previous stage.
[0117] It should also be understood that in this embodiment, the first model is only used as an illustrative example, representing the model obtained from the first two training rounds. In practical applications, the second model can also be the model obtained from the first three training rounds, or even the model obtained from the first four training rounds, etc., and there are no restrictions here. It should be noted that, however, the second model is usually the model obtained from the previous training round, and the second model cannot be changed.
[0118] 504. Based on the first shared feature, the first proprietary feature, the second shared feature, the second proprietary feature, and the recommendation results, the second model is trained to obtain the third model.
[0119] After obtaining the first shared features, first specific features, second shared features, and second specific features of multiple scenarios, along with recommendation results for users regarding these scenarios, the second model can be trained using these same features to obtain the third model. This completes the training for the current round. The model obtained in this round (the third model) can then be used as the target for the next round of training, continuing until a subsequent round satisfies the model training conditions. The model obtained in that round can then be used as the personalized recommendation model for the current stage. In this way, the personalized recommendation model from the previous stage is successfully trained into the personalized recommendation model for the current stage.
[0120] Specifically, the second model can be trained in the following way to obtain the third model: (1) After obtaining the first shared features of multiple scenarios, the first proprietary features of multiple scenarios, the second shared features of multiple scenarios, the second proprietary features of multiple scenarios, and the recommendation results about multiple scenarios that can be provided to users, the first loss can be obtained by calculating the first shared features of multiple scenarios, the first proprietary features of multiple scenarios, the second shared features of multiple scenarios, and the second proprietary features of multiple scenarios through a preset first loss function.
[0121] It is worth noting that, such as Figure 8 As shown ( Figure 8 (A schematic diagram of the computational objectives provided in the embodiments of this application) When constructing the first loss function, the first loss function can be made to satisfy the following computational objectives: (1) Reduce the difference between the second shared features of different scenarios in multiple scenarios and increase the difference between the second specific features of different scenarios in multiple scenarios. This can not only improve the model's generalization ability to the commonalities between different scenarios, but also improve the model's ability to distinguish the special features of each scenario. (2) Reduce the difference between the first shared features and the second shared features of the same scenario in multiple scenarios, so that the model can remember and maintain the commonalities between a certain scenario and other scenarios as the rounds change (i.e., the change of time), that is, the robustness of the model to the commonalities, which is conducive to avoiding catastrophic forgetting. (3) Increase the difference between the first specific features and the second specific features of different scenarios in multiple scenarios, thereby improving the model's sensitivity in the cross dimension of scenario + time.
[0122] Based on this, the first loss calculated by the first loss function can be used to indicate the differences between the second shared features of different scenarios in multiple scenarios, the differences between the second proprietary features of different scenarios in multiple scenarios, the differences between the first shared features and the second shared features of the same scenario in multiple scenarios, and the differences between the first proprietary features and the second proprietary features of different scenarios in multiple scenarios.
[0123] Furthermore, the computation performed by the first loss function (i.e., the aforementioned first computation) may include at least one of the following: distance function-based operations (e.g., Euclidean distance function-based operations, etc.), addition operations, exponential operations, logarithmic operations, and subtraction operations, etc.
[0124] As in the example above, after obtaining , , , as well as Then, a pre-defined loss function can be used to... , , as well as Calculations are performed to obtain the loss. : (2) In the above formula, This is the Euclidean distance function, used to calculate the Euclidean distance between two quantities, that is, the difference between the two quantities. Let a be the a-th scene out of K scenes (a=1,...,K). Let b be the b-th scenario out of K scenarios (b=1,...,K, b≠a). It is a set of K scenarios.
[0125] (2) After obtaining the first shared features, the first specific features, the second shared features, the second specific features, and the recommendation results for multiple scenarios that can be provided to the user, the true recommendation results for multiple scenarios can also be obtained (these true recommendation results are known and come from the user's interaction information with multiple scenarios at the current time). The second loss is obtained by calculating the recommendation results and the true recommendation results for multiple scenarios using a preset second loss function. The second loss can be used to indicate the difference between the recommendation results and the true recommendation results for multiple scenarios. The calculation performed by the second loss function (i.e., the aforementioned second calculation) can be any of the following: calculation based on the cross-entropy loss function, calculation based on the mean absolute error function, calculation based on the mean squared error function, etc.
[0126] As in the example above, after obtaining , , , as well as Afterwards, you can obtain the actual recommendation results for K scenarios. And through another preset loss function as well as Calculations are performed to obtain the loss. .
[0127] (3) After obtaining the first and second losses, the first and second losses can be calculated (e.g., superimposed) to obtain the target loss. Then, the parameters of the second model can be updated using the target loss to obtain the third model. At this point, the training of the current round is completed. Therefore, the third model obtained from the training of the current round can be used as the target for the training of the next round, and the next round of training can be carried out until it is determined that the training of a subsequent round meets the model training conditions (e.g., the target loss converges). The model obtained from the training of that round can be used as the personalized recommendation model for the current stage. In this way, the personalized recommendation model of the previous stage is successfully trained to the personalized recommendation model of the current stage.
[0128] As in the example above, after obtaining as well as Then, the following formula can be used to... as well as Calculations are performed to obtain the loss. : (3) In the above formula, and All are preset parameters. After obtaining... Afterwards, it can be used right The parameters are updated to obtain the model obtained from the training in the i-th round. Therefore, it is possible to As the target of training in the (i+1)th round, and perform training in the (i+1)th round, until the training in a subsequent round satisfies If convergence is achieved, training can be stopped, and the model obtained from this round of training can be used as the personalized recommendation model for the 12th stage.
[0129] Furthermore, the personalized recommendation model trained in the embodiments of this application can be compared multiple times with personalized recommendation models trained in related technologies. These multiple comparisons are described below: (1) The results of the first comparison are as follows Figure 9 As shown ( Figure 9 (A schematic diagram of the comparison results provided in the embodiments of this application), based on Figure 9 As shown in the table, on the first dataset, the six stages (i.e., ...) trained by the embodiments of this application Figure 9 Personalized recommendation models using Incre-1, Incre-2, Incre-3, Incre-4, Incre-5, and Incre-6 (i.e., Figure 9 The performance of Increment-single, IncMSR (PLE), and IncMSR (STAR) in the training process is due to the six stages (i.e., ...) obtained from related techniques. Figure 9 Personalized recommendation models in batches 1, 2, 3, 4, 5, and 6 (i.e., ...) Figure 9 The performance of Batch-single, Batch-multi (PLE), and Batch-multi (STAR) in the dataset.
[0130] (2) The result of the second comparison is as follows Figure 10 As shown ( Figure 10 (Another schematic diagram of the comparison results provided in the embodiments of this application), based on Figure 10 As shown in the table, on the second dataset, the five stages trained in this application embodiment (i.e. Figure 10 Personalized recommendation models (i.e., Incre-1, Incre-2, Incre-3, Incre-4, and Incre-5) Figure 10The performance of Increment-single, IncMSR (SharedBottom), IncMSR (PLE), and IncMSR (STAR) is due to the five stages (i.e., ...) obtained through training with related techniques. Figure 10 Personalized recommendation models in batches 1, 2, 3, 4, and 5 (i.e., ...) Figure 10 The performance of Batch-single, Batch-multi (SharedBottom), Batch-multi (PLE), and Batch-multi (STAR) in the dataset.
[0131] Furthermore, the three constraints (1), (2), and (3) in the aforementioned computational objectives can be recombined, that is, any one or more of them can be selected to form new computational objectives, thereby training different personalized recommendation models, and combining these models (i.e. Figure 11 The IncMSR-S, IncMSR-T, IncMSR-ST, and IncMSR models are compared with the baseline model (IncMSR-CE). The comparison results are as follows: Figure 11 As shown ( Figure 11 (Another schematic diagram of the comparison results provided in the embodiments of this application), based on Figure 10 As shown in the table, the model trained based on the above three constraints can achieve better performance.
[0132] In this embodiment, the process of training the personalized recommendation model from the previous stage to the current stage includes multiple training rounds. During the current round of training, interaction information between the user (at the current time) and multiple scenarios can be obtained first. Then, this interaction information can be input into a first model to process it, thereby obtaining first shared features and first specific features of multiple scenarios. Next, this interaction information can be input into a second model to process it, thereby obtaining second shared features, second specific features, and recommendation results for the user regarding the multiple scenarios. Finally, based on the first shared features, first specific features, second shared features, second specific features, and recommendation results, the second model is trained to obtain a third model. This completes the training for the current round. In the aforementioned process, the first model is the model obtained from the first two training rounds, the second model is the model obtained from the previous training round, and the third model is the model obtained from the current training round. It is worth noting that the first shared features of multiple scenes are used to indicate the commonalities among the multiple scenes extracted by the first model, the first specific features of multiple scenes are used to indicate the unique characteristics of each scene extracted by the first model, the second shared features of multiple scenes are used to indicate the commonalities among the multiple scenes extracted by the second model, and the second specific features of multiple scenes are used to indicate the unique characteristics of each scene extracted by the second model. Therefore, based on... In the process of training the third model using these features—that is, in the process of completing the current training round—not only are the commonalities among multiple scenarios in a certain round (i.e., in the previous two rounds or the previous round) and the unique characteristics of multiple scenarios in a certain round considered, but also the commonalities among multiple scenarios in different rounds (i.e., in the previous two rounds and the previous round) and the unique characteristics of multiple scenarios in different rounds are considered. It is evident that the factors considered in the current training round are relatively comprehensive, thus the model obtained from the current training round can possess superior performance. Based on this, in the multiple training rounds included in training the personalized recommendation model from the previous stage to the current stage, the training in any round can consider relatively comprehensive factors. Therefore, the final model obtained from the current training round can possess excellent performance and accurately provide personalized recommendations for users.
[0133] The above is a detailed description of the model training method provided in the embodiments of this application. The personalized recommendation method provided in the embodiments of this application will be introduced below. Figure 12A flowchart illustrating the personalized recommendation method provided in this application embodiment is shown below. Figure 12 As shown, the method includes: 1201. Obtain the interaction information between the user and the target scene, and the interaction information corresponds to the target time.
[0134] In this embodiment, when a user has a personalized recommendation need, the user's interaction information between the target time and the target scenario can be obtained first.
[0135] 1202. Process the interactive information to obtain recommendation results about the target scenario that can be provided to the user.
[0136] Once the user's interaction information between the target time and the target scenario is obtained, this interaction information can be input into... Figure 5 The personalized recommendation model obtained in the current stage of the embodiment shown enables the personalized recommendation model to process the interaction information, thereby obtaining a recommendation result about the target scene, and providing the recommendation result to the user for viewing and use, thereby meeting the user's personalized recommendation needs.
[0137] The above is a detailed description of the personalized recommendation method provided in the embodiments of this application. The following will introduce the model training device and the personalized recommendation device provided in the embodiments of this application. Figure 13 A schematic diagram of the model training apparatus provided in the embodiments of this application is shown below. Figure 13 As shown, the device includes: The acquisition module 1301 is used to acquire interaction information between the user and multiple scenes; The first processing module 1302 is used to process the interaction information through the first model to obtain the first shared features of multiple scenarios and the first proprietary features of multiple scenarios. The second processing module 1303 is used to process the interaction information through the second model to obtain the second shared features of multiple scenarios, the second specific features of multiple scenarios, and the recommendation results about multiple scenarios that can be provided to the user. The second model is obtained by training the first model based on the interaction information. Training module 1304 is used to train the second model based on the first shared features, the first proprietary features, the second shared features, the second proprietary features, and the recommendation results to obtain the third model.
[0138] In one possible implementation, the training module is used to: perform a first calculation on the first shared feature, the first proprietary feature, the second shared feature, and the second proprietary feature to obtain a first loss; perform a second calculation on the recommendation results and the real recommendation results that can be provided to the user for multiple scenarios to obtain a second loss; and train a second model based on the first loss and the second loss to obtain a third model.
[0139] In one possible implementation, the first loss is used to indicate the differences between the second shared features, the differences between the second proprietary features, the differences between the first shared features and the second shared features, and the differences between the first proprietary features and the second proprietary features.
[0140] In one possible implementation, the first computation includes at least one of the following: distance function-based operations, addition operations, exponential operations, logarithmic operations, and subtraction operations.
[0141] In one possible implementation, the second loss is used to indicate the difference between the recommended result and the true recommended result.
[0142] In one possible implementation, the second computation includes any one of the following: computation based on the cross-entropy loss function, computation based on the mean absolute error function, or computation based on the mean squared error function.
[0143] In one possible implementation, the first processing module is configured to: extract first features from the interaction information using a first model to obtain first shared features for multiple scenarios; and extract second features from the first shared features using the first model to obtain first proprietary features for multiple scenarios.
[0144] In one possible implementation, the second processing module is used to: extract a first feature from the interaction information using a second model to obtain a second shared feature for multiple scenarios; extract a second feature from the second shared feature using the second model to obtain a second specific feature for multiple scenarios; and classify the second specific feature using the second model to obtain recommendation results for multiple scenarios that can be provided to the user.
[0145] In one possible implementation, interaction information is used to indicate items that the user has interacted with in multiple scenarios, and recommendation results are used to indicate items that can be recommended to the user in multiple scenarios. Figure 14 A schematic diagram of the personalized recommendation device provided in the embodiments of this application is shown below. Figure 14 As shown, the personalized recommendation device includes a personalized recommendation model, which is derived from a third model trained by the aforementioned model training device. The personalized recommendation device includes: The acquisition module 1401 is used to acquire the interaction information between the user and the target scene, and the interaction information corresponds to the target time. The processing module 1402 is used to process the interactive information to obtain recommendation results about the target scene that can be provided to the user.
[0146] It should be noted that the information interaction and execution process between the modules / units of the above-mentioned device are based on the same concept as the method embodiment of this application, and the resulting technical effects are the same as those of the method embodiment of this application. For details, please refer to the description in the method embodiment shown above in the embodiment of this application, and it will not be repeated here.
[0147] This application also relates to an execution device. Figure 15 This is a schematic diagram of the execution device provided in an embodiment of this application. Figure 15 As shown, the execution device 1500 can specifically be a mobile phone, tablet, laptop, smart wearable device, server, etc., and is not limited here. Among them, the execution device 1500 can be deployed with... Figure 14 The personalized recommendation device described in the corresponding embodiment is used to implement Figure 12 The corresponding embodiment includes a personalized recommendation function. Specifically, the execution device 1500 includes: a receiver 1501, a transmitter 1502, a processor 1503, and a memory 1504 (wherein the execution device 1500 may have one or more processors 1503). Figure 15 (Taking a processor as an example), processor 1503 may include application processor 15031 and communication processor 15032. In some embodiments of this application, receiver 1501, transmitter 1502, processor 1503 and memory 1504 may be connected via a bus or other means.
[0148] Memory 1504 may include read-only memory and random access memory, and provides instructions and data to processor 1503. A portion of memory 1504 may also include non-volatile random access memory (NVRAM). Memory 1504 stores processor and operation instructions, executable modules, or data structures, or subsets thereof, or extended sets thereof, wherein the operation instructions may include various operation instructions for implementing various operations.
[0149] Processor 1503 controls the operation of the execution device. In specific applications, the various components of the execution device are coupled together through a bus system, which may include not only the data bus, but also power buses, control buses, and status signal buses. However, for clarity, all buses in the diagram are referred to as the bus system.
[0150] The methods disclosed in the embodiments of this application can be applied to or implemented by the processor 1503. The processor 1503 can be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 1503 or by instructions in software form. The processor 1503 can be a general-purpose processor, a digital signal processor (DSP), a microprocessor, or a microcontroller, and may further include an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The processor 1503 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly manifested as being executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 1504. Processor 1503 reads the information in memory 1504 and, in conjunction with its hardware, completes the steps of the above method.
[0151] Receiver 1501 can be used to receive input digital or character information, and to generate signal inputs related to the settings and function control of the execution device. Transmitter 1502 can be used to output digital or character information through the first interface; transmitter 1502 can also be used to send instructions to the disk group through the first interface to modify the data in the disk group; transmitter 1502 may also include a display device such as a display screen.
[0152] In one embodiment of this application, the processor 1503 is used to... Figure 12 The personalized recommendation model in the corresponding embodiment provides users with recommendation results about the target scenario.
[0153] This application also relates to a training device. Figure 16 This is a schematic diagram of the structure of a training device provided in an embodiment of this application. Figure 16As shown, the training device 1600 is implemented by one or more servers. The training device 1600 can vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 1612 (e.g., one or more processors) and memory 1632, and one or more storage media 1630 (e.g., one or more mass storage devices) for storing application programs 1642 or data 1644. The memory 1632 and storage media 1630 can be temporary or persistent storage. The program stored in the storage media 1630 may include one or more modules (not shown in the figure), each module may include a series of instruction operations on the training device. Furthermore, the CPU 1612 may be configured to communicate with the storage media 1630 and execute the series of instruction operations in the storage media 1630 on the training device 1600.
[0154] The training device 1600 may also include one or more power supplies 1626, one or more wired or wireless network interfaces 1650, one or more input / output interfaces 1658; or, one or more operating systems 1641, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.
[0155] Specifically, the training equipment can perform Figure 5 The model training method in the corresponding embodiment is used to obtain a personalized recommendation model.
[0156] This application also relates to a computer storage medium storing a program for signal processing, which, when run on a computer, causes the computer to perform steps as performed by the aforementioned execution device, or causes the computer to perform steps as performed by the aforementioned training device.
[0157] This application also relates to a computer program product that stores instructions that, when executed by a computer, cause the computer to perform steps as performed by the aforementioned execution device, or to perform steps as performed by the aforementioned training device.
[0158] The execution device, training device, or terminal device provided in this application embodiment can specifically be a chip. The chip includes a processing unit and a communication unit. The processing unit can be, for example, a processor, and the communication unit can be, for example, an input / output interface, pins, or circuits. The processing unit can execute computer execution instructions stored in the storage unit to cause the chip within the execution device to execute the data processing method described in the above embodiments, or to cause the chip within the training device to execute the data processing method described in the above embodiments. Optionally, the storage unit can be a storage unit within the chip, such as a register or cache. Alternatively, the storage unit can be a storage unit located outside the chip within the wireless access device, such as a read-only memory (ROM) or other types of static storage devices capable of storing static information and instructions, such as random access memory (RAM).
[0159] For details, please refer to Figure 17 , Figure 17 This is a schematic diagram of the structure of a chip provided in an embodiment of this application. The chip can be represented as a neural network processor (NPU) 1700. The NPU 1700 is mounted as a coprocessor on the host CPU, and tasks are assigned by the host CPU. The core part of the NPU is the arithmetic circuit 1703, which is controlled by the controller 1704 to retrieve matrix data from the memory and perform multiplication operations.
[0160] In some implementations, the arithmetic circuit 1703 internally includes multiple processing engines (PEs). In some implementations, the arithmetic circuit 1703 is a two-dimensional pulsating array. The arithmetic circuit 1703 can also be a one-dimensional pulsating array or other electronic circuitry capable of performing mathematical operations such as multiplication and addition. In some implementations, the arithmetic circuit 1703 is a general-purpose matrix processor.
[0161] For example, suppose we have an input matrix A, a weight matrix B, and an output matrix C. The arithmetic circuit retrieves the corresponding data of matrix B from the weight memory 1702 and caches it in each PE of the arithmetic circuit. The arithmetic circuit retrieves the data of matrix A from the input memory 1701 and performs matrix operations with matrix B. The partial result or the final result of the obtained matrix is stored in the accumulator 1708.
[0162] Unified memory 1706 is used to store input and output data. Weight data is directly transferred to weight memory 1702 via Direct Memory Access Controller (DMAC) 1705. Input data is also transferred to unified memory 1706 via DMAC.
[0163] BIU stands for Bus Interface Unit, which is used for interaction between the AXI bus and the DMAC and the Instruction Fetch Buffer (IFB) 1709.
[0164] The Bus Interface Unit (BIU) 1713 is used by the instruction fetch memory 1709 to fetch instructions from external memory, and also by the memory access controller 1705 to fetch the original data of the input matrix A or the weight matrix B from external memory.
[0165] The DMAC is mainly used to move input data from external memory DDR to unified memory 1706, or to weight data to weight memory 1702, or to input data to input memory 1701.
[0166] The vector computation unit 1707 includes multiple processing units that further process the output of the computation circuit 1703 when necessary, such as vector multiplication, vector addition, exponential operations, logarithmic operations, size comparisons, etc. It is mainly used for computation in non-convolutional / fully connected layers of neural networks, such as Batch Normalization, pixel-level summation, and upsampling of the predicted label plane.
[0167] In some implementations, the vector computation unit 1707 can store the processed output vector in the unified memory 1706. For example, the vector computation unit 1707 can apply a linear function, or a nonlinear function, to the output of the computation circuit 1703, such as linearly interpolating the predicted label plane extracted from the convolutional layer, or, for example, accumulating a vector of values to generate activation values. In some implementations, the vector computation unit 1707 generates normalized values, pixel-level summed values, or both. In some implementations, the processed output vector can be used as activation input to the computation circuit 1703, for example, for use in subsequent layers of the neural network.
[0168] The instruction fetch buffer 1709 connected to the controller 1704 is used to store the instructions used by the controller 1704; The unified memory 1706, input memory 1701, weighted memory 1702, and instruction fetch memory 1709 are all on-chip memories. External memory is proprietary to this NPU hardware architecture.
[0169] The processor mentioned above can be a general-purpose central processing unit, a microprocessor, an ASIC, or one or more integrated circuits used to control the execution of the above program.
[0170] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the device embodiment drawings provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.
[0171] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0172] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.
[0173] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)). If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A model training method, characterized in that, The method includes multiple rounds of training, and the method includes: Acquire user interaction information with multiple scenarios; The interaction information is processed by the first model to obtain the first shared features of the multiple scenarios and the first specific features of the multiple scenarios. The first model is the model obtained from the first two rounds of training. The interaction information is processed by the second model to obtain the second shared features of the multiple scenarios, the second specific features of the multiple scenarios, and the recommendation results about the multiple scenarios that can be provided to the user. The second model is obtained by training the first model based on the interaction information. The second model is the model obtained from the previous round of training. Based on the first shared feature, the first proprietary feature, the second shared feature, the second proprietary feature, and the recommendation result, the second model is trained to obtain a third model, which is the model obtained from the training in the current round.
2. The method according to claim 1, characterized in that, The process of training the second model based on the first shared feature, the first proprietary feature, the second shared feature, the second proprietary feature, and the recommendation result to obtain the third model includes: A first calculation is performed on the first shared feature, the first proprietary feature, the second shared feature, and the second proprietary feature to obtain a first loss; A second calculation is performed on the recommendation results and the actual recommendation results that can be provided to the user regarding the multiple scenarios to obtain a second loss; Based on the first loss and the second loss, the second model is trained to obtain the third model.
3. The method according to claim 2, characterized in that, The first loss is used to indicate the differences between the second shared features, the differences between the second proprietary features, the differences between the first shared features and the second shared features, and the differences between the first proprietary features and the second proprietary features.
4. The method according to claim 3, characterized in that, The first calculation includes at least one of the following: distance function-based operations, addition operations, exponential operations, logarithmic operations, and subtraction operations.
5. The method according to claim 2, characterized in that, The second loss is used to indicate the difference between the recommended result and the actual recommended result.
6. The method according to claim 5, characterized in that, The second calculation includes any one of the following: calculation based on the cross-entropy loss function, calculation based on the mean absolute error function, and calculation based on the mean squared error function.
7. The method according to claim 1, characterized in that, The step of processing the interaction information through the first model to obtain the first shared features of the multiple scenarios and the first specific features of the multiple scenarios includes: The interaction information is subjected to first feature extraction using the first model to obtain the first shared features of the multiple scenarios; The first shared feature is extracted using the first model to obtain the first specific feature of the multiple scenarios.
8. The method according to claim 1, characterized in that, The step of processing the interaction information through the second model to obtain the second shared features of the multiple scenarios, the second specific features of the multiple scenarios, and recommendation results about the multiple scenarios that can be provided to the user includes: The second model is used to extract the first feature from the interaction information to obtain the second shared feature of the multiple scenarios; The second shared feature is extracted using the second model to obtain the second specific feature of the multiple scenarios; The second proprietary feature is classified using a second model to obtain recommendation results for the multiple scenarios that can be provided to the user.
9. The method according to any one of claims 1 to 8, characterized in that, The interaction information is used to indicate the items that the user has interacted with in the multiple scenarios, and the recommendation result is used to indicate the items that can be recommended to the user in the multiple scenarios.
10. A personalized recommendation method, characterized in that, The method is implemented through a personalized recommendation model, which is derived from a third model obtained by the method described in any one of claims 1 to 9, and the method includes: Acquire user interaction information with the target scene, wherein the interaction information corresponds to the target time; The interactive information is processed to obtain recommendation results about the target scene that can be provided to the user.
11. A model training device, characterized in that, The device enables multiple rounds of training, and the device includes: The acquisition module is used to acquire interaction information between the user and multiple scenarios; The first processing module is used to process the interaction information through the first model to obtain the first shared features of the multiple scenarios and the first specific features of the multiple scenarios. The first model is the model obtained from the first two rounds of training. The second processing module is used to process the interaction information through the second model to obtain the second shared features of the multiple scenarios, the second specific features of the multiple scenarios, and the recommendation results about the multiple scenarios that can be provided to the user. The second model is obtained by training the first model based on the interaction information. The second model is the model obtained from the previous round of training. The training module is used to train the second model based on the first shared feature, the first proprietary feature, the second shared feature, the second proprietary feature, and the recommendation result to obtain a third model, wherein the third model is the model obtained from the training in the current round.
12. The apparatus according to claim 11, characterized in that, The training module is used for: A first calculation is performed on the first shared feature, the first proprietary feature, the second shared feature, and the second proprietary feature to obtain a first loss; A second calculation is performed on the recommendation results and the actual recommendation results that can be provided to the user regarding the multiple scenarios to obtain a second loss; Based on the first loss and the second loss, the second model is trained to obtain the third model.
13. The apparatus according to claim 12, characterized in that, The first loss is used to indicate the differences between the second shared features, the differences between the second proprietary features, the differences between the first shared features and the second shared features, and the differences between the first proprietary features and the second proprietary features.
14. The apparatus according to claim 13, characterized in that, The first calculation includes at least one of the following: distance function-based operations, addition operations, exponential operations, logarithmic operations, and subtraction operations.
15. The apparatus according to claim 12, characterized in that, The second loss is used to indicate the difference between the recommended result and the actual recommended result.
16. The apparatus according to claim 15, characterized in that, The second calculation includes any one of the following: calculation based on the cross-entropy loss function, calculation based on the mean absolute error function, and calculation based on the mean squared error function.
17. The apparatus according to claim 11, characterized in that, The first processing module is used for: The interaction information is subjected to first feature extraction using the first model to obtain the first shared features of the multiple scenarios; The first shared feature is extracted using the first model to obtain the first specific feature of the multiple scenarios.
18. The apparatus according to claim 11, characterized in that, The second processing module is used for: The second model is used to extract the first feature from the interaction information to obtain the second shared feature of the multiple scenarios; The second shared feature is extracted using the second model to obtain the second specific feature of the multiple scenarios; The second proprietary feature is classified using a second model to obtain recommendation results for the multiple scenarios that can be provided to the user.
19. The apparatus according to any one of claims 11 to 18, characterized in that, The interaction information is used to indicate the items that the user has interacted with in the multiple scenarios, and the recommendation result is used to indicate the items that can be recommended to the user in the multiple scenarios.
20. A personalized recommendation device, characterized in that, The personalized recommendation device includes a personalized recommendation model, which is derived from a third model obtained by the model training method as described in any one of claims 1 to 9. The personalized recommendation device includes: The acquisition module is used to acquire interaction information between the user and the target scene, and the interaction information corresponds to the target time. The processing module is used to process the interactive information to obtain recommendation results about the target scene that can be provided to the user.
21. A model training device, characterized in that, The device includes a memory and a processor; the memory stores code, and the processor is configured to execute the code, wherein when the code is executed, the model training device performs the method as described in any one of claims 1 to 9.
22. A personalized recommendation device, characterized in that, The device includes a memory and a processor; the memory stores code, and the processor is configured to execute the code, wherein when the code is executed, the personalized recommendation device performs the method as described in claim 10.
23. A computer storage medium, characterized in that, The computer storage medium stores one or more instructions that, when executed by one or more computers, cause the one or more computers to perform the method of any one of claims 1 to 10.
24. A computer program product, characterized in that, The computer program product stores instructions that, when executed by a computer, cause the computer to perform the method described in any one of claims 1 to 10.
Citation Information
Patent Citations
Deep learning model training method, image processing method, device and equipment
CN114627343A
Personalized federal learning method and device based on block chain
CN116432777A