Method and apparatus for updating multi-scene model, electronic device, and storage medium
By acquiring sample data to update the feature vectors of multi-scenario models of e-commerce platforms and generating a hierarchical feature decoupling process, the problem of complex nonlinear differences between multiple scenarios of e-commerce platforms is solved, and the efficiency and effectiveness of model updates are improved.
Patent Information
- Application Number
- CN202610187335.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-09
- Publication Date
- 2026-06-23
AI Technical Summary
Existing technologies struggle to effectively capture the complex nonlinear differences between multiple heterogeneous scenarios on e-commerce platforms. The sharing mechanism is easily dominated by top-tier scenarios, with weak support for long-tail scenarios and poor model update performance.
By acquiring sample data, updating the feature vector corresponding to the scene identifier, inputting it into the shared network and the scene network, obtaining the shared features and scene features, and inputting it into the expert network to generate the first representation, and finally updating the expert network based on the predicted value, a hierarchical feature decoupling generation process is formed.
By reducing model coupling, the update efficiency and effectiveness of multi-scenario models are improved, interference between scenarios is avoided, and support for long-tail scenarios is enhanced.
Smart Images

Figure CN122262406A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to the fields of artificial intelligence technology such as large models, deep learning, and intelligent recommendation, specifically to methods, devices, electronic devices, and storage media for updating multi-scenario models. Background Technology
[0002] For e-commerce platforms, user behavior data is widely distributed across multiple heterogeneous scenarios (such as live streaming recommendations, immersive live streaming recommendations, and video e-commerce). For multi-objective, cross-scenario joint modeling in e-commerce, related technologies mainly utilize various learning paradigms to achieve knowledge transfer and sharing, addressing the challenges of data sparsity and scenario isolation. However, this approach struggles to capture the complex nonlinear differences between scenarios, the sharing mechanism is easily dominated by leading scenarios, and support for long-tail scenarios is weak, resulting in poor update performance. Therefore, proposing a multi-scenario model update method to improve model update efficiency is a pressing issue that needs to be addressed. Summary of the Invention
[0003] This disclosure provides a method, apparatus, electronic device, and storage medium for updating multi-scenario models. The specific solution is as follows:
[0004] According to one aspect of this disclosure, a method for updating a multi-scenario model is provided, comprising: Obtain sample data, wherein the sample data includes user behavior data and associated scene identifiers; Based on the user behavior data, the first feature vector corresponding to the scene identifier is updated to obtain the updated second feature vector. The second feature vector is input into the shared network in the model to be updated and the scene network corresponding to the scene identifier, respectively, to obtain the shared features and scene features. The shared features and scene features are input into the expert network in the model to be updated that corresponds to the scene identifier to obtain the first representation output by the expert network. The first representation is input into the prediction network of the model to be updated to obtain the predicted value output by the prediction network; The expert network is updated based on the predicted values to obtain the updated model.
[0005] According to another aspect of this disclosure, a multi-scene model updating apparatus is provided, comprising: The first acquisition module is used to acquire sample data, wherein the sample data includes user behavior data and associated scene identifiers; The first update module is used to update the first feature vector corresponding to the scene identifier based on the user behavior data to obtain the updated second feature vector. The first input module is used to input the second feature vector into the shared network in the model to be updated and the scene network corresponding to the scene identifier, respectively, to obtain the shared features and scene features; The second input module is used to input the shared features and scene features into the expert network in the model to be updated that corresponds to the scene identifier, and to obtain the first representation output by the expert network. The third input module is used to input the first representation into the prediction network of the model to be updated, and obtain the predicted value output by the prediction network. The second update module is used to update the expert network based on the predicted values to obtain the updated model.
[0006] According to another aspect of this disclosure, an electronic device is provided, comprising: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the method described in the above embodiments.
[0007] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are used to cause the computer to perform the method described in the above embodiments.
[0008] According to another aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of the method described in the above embodiments.
[0009] The multi-scene model update method, apparatus, electronic device, and storage medium disclosed herein have the following beneficial effects: First, sample data is acquired, and based on user behavior data, the first feature vector corresponding to the scene identifier is updated to obtain the updated second feature vector. Then, the second feature vector is input into the shared network and the scene network corresponding to the scene identifier in the model to be updated, respectively, to obtain shared features and scene features. The shared features and scene features are then input into the expert network corresponding to the scene identifier in the model to be updated to obtain the first representation output by the expert network. Subsequently, the first representation is input into the prediction network of the model to be updated to obtain the predicted value output by the prediction network. Finally, the expert network is updated based on the predicted value to obtain the updated model. Thus, the update efficiency and effect of multi-scene models are improved while reducing model coupling and avoiding interference between scenes.
[0010] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0011] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein: Figure 1 This is a flowchart illustrating a method for updating a multi-scene model according to an embodiment of the present disclosure. Figure 2 A flowchart illustrating a method for updating a multi-scene model according to another embodiment of this disclosure; Figure 3 A flowchart illustrating a method for updating a multi-scene model according to another embodiment of this disclosure; Figure 4 A flowchart illustrating a method for updating a multi-scene model according to another embodiment of this disclosure; Figure 5 This is a schematic diagram of the model architecture and process of the multi-scenario model update method proposed in this disclosure; Figure 6 This is a schematic diagram illustrating the architecture and representation generation process of the expert network in the multi-scenario model update method proposed in this disclosure; Figure 7 A schematic diagram of the structure of a multi-scene model updating device provided in an embodiment of this disclosure; Figure 8 This is a block diagram of an electronic device used to implement the multi-scenario model update method of the embodiments of this disclosure. Detailed Implementation
[0012] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0013] The embodiments disclosed herein relate to the fields of artificial intelligence technologies such as large models, deep learning, and intelligent recommendation.
[0014] Artificial Intelligence (AI) is a new technological science that studies, develops, and applies theories, methods, technologies, and application systems to simulate, extend, and expand human intelligence.
[0015] Large models, also known as Foundation Models, are models that extract knowledge from hundreds of millions of corpora or images, learn, and then produce large models with hundreds of millions of parameters.
[0016] Deep learning (DL) learns the inherent patterns and hierarchical representations of sample data. The information gained during this learning process greatly aids in interpreting data such as text, images, and sound. The ultimate goal of deep learning is to enable machines to possess analytical and learning capabilities similar to humans, allowing them to recognize data such as text, images, and sound.
[0017] Intelligent recommendation, as an important means of information filtering and personalized services, is based on integrating multi-dimensional information such as user behavior data, interests and preferences, and contextual environment, and using algorithmic models to automatically analyze and predict users' potential needs or interests, and then recommend content, products, services or social relationships that users may be interested in.
[0018] It should be noted that the acquisition, storage, use, and processing of data in this disclosed technical solution comply with the relevant provisions of national laws and regulations and do not violate public order and good morals.
[0019] The following description, with reference to the accompanying drawings, outlines a method, apparatus, electronic device, and storage medium for updating multi-scenario models according to embodiments of the present disclosure.
[0020] Figure 1 This is a flowchart illustrating a method for updating a multi-scenario model according to an embodiment of the present disclosure.
[0021] like Figure 1 As shown, the update method for this multi-scene model includes: Step 101: Obtain sample data, which includes user behavior data and associated scene identifiers.
[0022] It should be noted that the application scenarios of the multi-scenario model update method proposed in this disclosure can be determined according to actual needs. For example, it can be applied to application scenarios that include multiple heterogeneous but related scenarios, such as e-commerce, content recommendation, and advertising systems. These scenarios may include different product pages (homepage, search page, and product detail page, etc.), different user groups (new users and old users, highly active users and inactive users, etc.), and different business lines (live streaming, short videos, and shelf e-commerce, etc.). Specifically, taking an e-commerce platform as an example, it may include, but is not limited to, heterogeneous scenarios such as homepage recommendations, live streaming recommendations, immersive live streaming recommendations, and video e-commerce, which are not limited in this disclosure.
[0023] User behavior data may include user information, product information, interaction information, scenario information, and environmental information (device, time, network, etc.), etc. The specific details can be determined according to the actual scenario and needs, and this disclosure does not limit them.
[0024] The scene identifier can be used to represent a specific scene, and its specific form can be set according to actual needs. For example, the scene identifier can be a code, name, or label, etc., and this disclosure does not limit it.
[0025] It should be noted that the scenario corresponding to the scenario identifier can be determined based on the specific business platform. For example, if the business platform is an e-commerce platform and includes scenarios such as homepage recommendations, "You May Also Like," live streaming, and short videos, the scenario corresponding to the scenario identifier can be any of these scenarios, and this disclosure does not impose any restrictions on it.
[0026] It should be noted that the specific implementation method for obtaining sample data can be set according to actual needs. For example, when the model is updated offline, the sample data can be historical user behavior data from the business platform; when the model is updated online, the sample data can be real-time user behavior data collected from scenarios within the business platform, and so on. This disclosure does not limit this.
[0027] Step 102: Based on user behavior data, update the first feature vector corresponding to the scene identifier to obtain the updated second feature vector.
[0028] The first feature vector can be a feature vector used to represent user features, product features, interaction features, and environmental features in the scene corresponding to the scene identifier. The specific feature vector can be determined according to the actual situation, and this disclosure does not limit it.
[0029] The first feature vector can be an embedding vector, which is not limited in this disclosure.
[0030] It should be noted that the specific implementation method for updating the first feature vector based on user behavior data can be set according to actual needs, and this disclosure does not limit it.
[0031] For example, in some possible implementations, the first feature vector can be incrementally updated based on user behavior data. This allows the updated second feature vector to learn new knowledge while retaining historical knowledge, ensuring the real-time performance and accuracy of the feature vector corresponding to the scene identifier, while reducing resource consumption during the vector update process. This disclosure does not limit this approach.
[0032] Step 103: Input the second feature vector into the shared network and the scene network corresponding to the scene identifier in the model to be updated, respectively, to obtain the shared features and scene features.
[0033] The specific architecture and type of the model to be updated can be set according to actual needs. For example, the model to be updated can be a multi-scenario architecture model, that is, a model containing multiple scene expert networks, which can be used as a recommendation model, etc. This disclosure does not limit this.
[0034] Among them, the shared network can be a network shared by all scenarios of the business platform in the model to be updated. It can learn common user-product interaction patterns, etc. Its specific architecture can be set according to actual needs, and this disclosure does not limit it.
[0035] Among them, the scene network can be a shared network of scenes belonging to the same scene type in the model to be updated. It can learn the common user-product interaction model under the scene type, etc. Its specific architecture can be set according to actual needs, and this disclosure does not limit it.
[0036] For example, in some possible implementations, the architecture of the shared network and the scene network may be the same, and may include, but is not limited to, feature interaction architecture, self-attention architecture and neuron gating, which this disclosure does not limit.
[0037] It should be noted that the specific implementation methods of the feature interaction architecture and the self-attention architecture can be set according to actual needs, and this disclosure does not limit them.
[0038] For example, in some possible implementations, the feature interaction architecture can be a ranking fusion processor that can explore the benefits of cross-slot features across slots, where a slot is the product display position in the recommendation list. In other words, it can achieve behavioral analysis across multiple display positions, thereby achieving the global optimization of the list.
[0039] For example, in some possible implementations, a self-attention architecture could be a Transformer, which could be used to explore the benefit space of long user behavior sequences across multiple interaction types.
[0040] For example, in some possible implementations, neuron gating, also known as "NeuronGate," can perform hierarchical information augmentation, strengthen the role of information in important dimensions, and filter noisy data to improve data accuracy.
[0041] Shared features can be used to represent common features across all scenarios of the business platform.
[0042] Among them, scene features can be used to represent the general features of the scene corresponding to the scene identifier.
[0043] It should be noted that in some possible implementations, each scene can maintain an independent first feature vector in the embedding layer of the model to be updated, thereby mitigating the negative transfer problem between scenes from the feature vector level. This disclosure does not limit this.
[0044] Step 104: Input the shared features and scene features into the expert network corresponding to the scene identifier in the model to be updated, and obtain the first representation output by the expert network.
[0045] Among them, the expert network can be a network specific to a particular scenario. For example, taking an e-commerce platform as an example, it can have an expert network specific to the homepage recommendation scenario or an expert network specific to the live streaming recommendation scenario, and so on. It can be a lightweight network, and its specific architecture can be set according to actual needs. For example, it can include a single-layer MLP network, a feature interaction architecture, a self-attention architecture, and neuron gating, etc., which are not limited in this disclosure.
[0046] MLP is short for Multi-Layer Perceptron (MLP).
[0047] It should be noted that the specific implementation methods of the feature interaction architecture, self-attention architecture, and neuron gating included in the expert network can be referred to the relevant description in step 103, and will not be elaborated here.
[0048] The first element can be a feature representation used to characterize user and product interaction features and user preference features in the corresponding scenario.
[0049] In this disclosure, after obtaining the shared features of the shared network output in the model to be updated and the scene features of the scene network output corresponding to the scene identifier, the shared features and scene features are input into the expert network corresponding to the scene identifier in the model to be updated to obtain the first representation output by the expert network. Thus, based on the combination of the general features of all scenarios in the business platform and the general features of the scene corresponding to the scene identifier, scene-specific features can be determined. This realizes a hierarchical feature decoupling generation process, so that the generated first representation includes both global general features and scene general features, as well as scene-specific features, thereby improving the accuracy and generalization of the determined first representation.
[0050] Step 105: Input the first representation into the prediction network of the model to be updated to obtain the predicted value output by the prediction network.
[0051] The prediction network can be used to predict outputs, and its specific architecture can be set according to actual needs. This disclosure does not limit it.
[0052] The type of predicted value can be set according to actual needs. For example, the predicted value can be click-through rate, conversion rate, etc., and this disclosure does not limit this.
[0053] It should be noted that the specific implementation of the prediction network based on the first representation for predicting output can be set according to actual needs, and this disclosure does not limit it.
[0054] For example, in some possible implementations, the prediction network can predict the output using a non-linear activation function such as the sigmoid function, which is not limited in this disclosure.
[0055] The sigmoid function can map any real number input to the (0,1) interval, and the output value can represent probability or weight. It can be used for binary classification tasks such as predicting click rate. The specific task can be determined according to actual needs, and this disclosure does not limit it.
[0056] It should be noted that the type and number of predicted values output by the prediction network can be determined based on the task objectives of the actual scenario. For example, in the scenario of a homepage recommendation on an e-commerce platform, the predicted values can be click-through rate, conversion rate, and add-to-cart rate, etc. In this case, the prediction network can output multiple predicted values, each corresponding to a task objective. This disclosure does not impose any restrictions on this.
[0057] Step 106: Update the expert network based on the predicted values to obtain the updated model.
[0058] In this disclosure, after obtaining the predicted value output by the prediction network, the expert network corresponding to the scene identifier can be updated based on the predicted value to obtain the updated model. This can effectively avoid the head scene dominating the update during the multi-scene model update process, improve the support for data-sparse scenes such as long-tail scenes, and improve the model update effect.
[0059] It should be noted that the specific implementation method for updating the expert network based on the predicted values can be set according to actual needs, and this disclosure does not limit it.
[0060] For example, in some possible implementations, taking the predicted value as the click-through rate, the corresponding actual click result (click or no click) can be obtained from user behavior data first. Based on the predicted value and the actual click result, the expert network can be updated using gradient descent, etc. This disclosure does not limit this.
[0061] For example, taking the live streaming recommendation scenario in an e-commerce context, the sample data includes user behavior data for the live streaming recommendation scenario. This data can include user interaction with the recommended slots in the live streaming room and their interaction after entering the live streaming room. This user behavior data is used to update the feature vector of the live streaming recommendation scenario. The updated feature vector is then input into the shared network of the multi-scenario model and the scene network corresponding to the live streaming recommendation scenario. This allows the model to learn common interaction behavior patterns across all e-commerce platform scenarios, as well as common patterns specific to the live streaming recommendation scenario, such as those corresponding to short video recommendation scenarios and immersive live streaming recommendation scenarios. Next, the global and scene-specific features are input into the expert network to learn scene-specific features and obtain a first representation. Based on this first representation, predictions are made to obtain predicted values such as click-through rate, dwell time, completion rate, and product add-to-cart rate. The expert network is then updated based on these predicted values. This achieves network updates for the live streaming recommendation scenario in the multi-scenario model, effectively avoiding interference from other scenarios and significantly increasing the recommendation capabilities of the multi-scenario model in the live streaming recommendation scenario. This, in turn, improves the user experience in the live streaming recommendation scenario, helping to increase click-through rate, add-to-cart rate, and order rate, among other things.
[0062] In some possible implementations, when the sample data includes user behavior data of newly added scenarios in the business platform, the multi-scenario model architecture proposed in this disclosure is a hierarchical architecture, which includes a globally common shared network, a scenario network common to some scenarios, and an expert network specific to each scenario. The model coupling is low, so the expert network of the newly added scenario can be directly added to the model, and the network can be updated and trained using user behavior data. There is no need to retrain or fine-tune the entire model. It can be used plug and play, has extremely high dynamic scenario scalability, and improves the update efficiency of the multi-scenario model for newly added scenarios.
[0063] In this embodiment, sample data is first acquired, and based on user behavior data, the first feature vector corresponding to the scene identifier is updated to obtain the updated second feature vector. Then, the second feature vector is input into the shared network and the scene network corresponding to the scene identifier in the model to be updated, respectively, to obtain shared features and scene features. The shared features and scene features are then input into the expert network corresponding to the scene identifier in the model to be updated to obtain the first representation output by the expert network. The first representation is then input into the prediction network of the model to be updated to obtain the predicted value output by the prediction network. Finally, the expert network is updated based on the predicted value to obtain the updated model. Thus, by updating the feature vector of the associated scene based on user behavior data in the sample data, and inputting the updated feature vector into the shared network and the corresponding scene network of the model to obtain shared features and scene features, and then inputting them into the corresponding expert network, a hierarchical feature decoupling generation process is achieved. This reduces model coupling, learns scene-specific knowledge while retaining general knowledge, and improves the accuracy and reliability of the generated feature representation. Then, prediction output is performed based on this feature representation to update the expert network, thereby improving the update efficiency and effect of multi-scene models while reducing model coupling and avoiding interference between scenes.
[0064] Figure 2 This is a flowchart illustrating a method for updating a multi-scenario model according to another embodiment of the present disclosure.
[0065] like Figure 2 As shown, the update method for this multi-scene model includes: Step 201: Obtain sample data, which includes user behavior data and associated scene identifiers.
[0066] For example, in some possible implementations, if newly collected user behavior data from any scenario on the business platform meets the model update conditions, the newly collected user behavior data and the scenario identifier of that scenario can be associated to determine the sample data. This allows for adaptation to the timeliness issues of data streams in different scenarios of the business platform, enabling model updates for a single arbitrary scenario (either a top-performing scenario or a data-sparse scenario). This effectively avoids interference from top-performing scenarios to data-sparse scenarios, alleviates the negative migration problem between scenarios, and provides a data foundation for improving model update performance.
[0067] Among them, the newly added user behavior data can be real-time user behavior data collected during the online operation of a certain scenario of the business platform after the most recent update of its expert network.
[0068] The specific details of the model update conditions can be set according to actual needs. For example, the model update conditions can be the data collection duration (which can be set according to actual needs, such as 1 hour, 1 day, 1 month, etc., without limitation here). If a business platform collects new user behavior data for a target duration in a certain scenario, it can be determined that the new user behavior data collected in that scenario meets the model update conditions, triggering the model update process, etc. This disclosure does not limit this.
[0069] Step 202: Based on user behavior data, update the first feature vector corresponding to the scene identifier to obtain the updated second feature vector.
[0070] The specific implementation of steps 201 to 202 can be found in the detailed descriptions of other embodiments in this disclosure, and will not be repeated here.
[0071] Step 203: Determine the scene type to which the scene identifier belongs.
[0072] The scenario type can be determined based on the actual situation. For example, when the scenario identifier corresponds to the homepage recommendation scenario, the scenario type can be browsing; when the scenario identifier corresponds to the shopping cart scenario, the scenario type can be transaction; when the scenario identifier corresponds to the live stream recommendation scenario, the scenario type can be browsing, and so on. This disclosure does not impose any restrictions on this.
[0073] It should be noted that the specific implementation method for determining the scene type to which the scene identifier belongs can be set according to actual needs, and this disclosure does not limit it.
[0074] For example, in some possible implementations, all scenarios in the business platform can be clustered into multiple scenario families, i.e., scenario types, through scenario clustering. This disclosure does not limit this.
[0075] It should be noted that the specific implementation method of scene clustering can be set according to actual needs, and this disclosure does not limit it.
[0076] For example, in some possible implementations, the scene vector corresponding to the scene identifier can be determined first, and then clustering can be performed based on the scene vector using K-Means clustering method or hierarchical clustering method, etc., to determine the scene type to which the scene belongs. This disclosure does not limit this.
[0077] K-Means is short for K-Means Clustering.
[0078] For example, in some possible implementations, the scene type to which the scene identifier belongs can also be determined manually, but this disclosure does not limit this.
[0079] Step 204: Determine the scene network corresponding to the scene type in the model to be updated.
[0080] In this disclosure, after determining the scene type to which the scene identifier belongs, the scene network corresponding to the scene type in the model to be updated is determined, which provides a basis for realizing the hierarchical feature decoupling generation process of the model.
[0081] Step 205: Input the second feature vector into the shared network and the scene network in the model to be updated, respectively, to obtain the shared features and scene features.
[0082] In this disclosure, by inputting the second feature vector into a shared network common to all scenarios in the model to be updated, shared features are obtained, as well as scene features are obtained from a scene network common to the scene type to which the scene identifier belongs. This achieves decoupled feature generation. In the feature generation process, both global general knowledge and scene general knowledge can be learned, providing a data foundation for improving the generalization and scene adaptability of the subsequently generated feature representations.
[0083] The specific implementation of step 205 can be found in the detailed descriptions of other embodiments in this disclosure, and will not be repeated here.
[0084] Step 206: Determine the expert networks for each scene type in the model to be updated.
[0085] In this disclosure, after determining the scene type to which the scene identifier belongs, the expert networks under the scene type in the model to be updated are determined to provide a foundation for subsequent learning of scene-specific knowledge.
[0086] The specific architecture of each expert network under the scenario type can be referred to the relevant description in the above embodiments of this disclosure, and will not be repeated here.
[0087] For example, taking the scenario type as browsing, this scenario type can include expert networks for homepage recommendation scenarios, live streaming recommendation scenarios, short video recommendation scenarios, and expert networks for "you may like" or "are interested" scenarios, etc. This disclosure does not limit this.
[0088] Steps 204 and 205 can be executed in parallel with step 206, or they can be executed sequentially. In the case of sequential execution, steps 204 and 205 can be executed first, followed by step 206, or step 206 can be executed first, followed by steps 204 and 205. The specific configuration can be determined according to actual needs, and this disclosure does not impose any limitations on it.
[0089] Step 207: Input the shared features and scene features into each expert network to obtain the first representation output by the corresponding expert network.
[0090] In this disclosure, the specific implementation of inputting shared features and scene features into each expert network to obtain the first representation output by the corresponding expert network is similar to the relevant description in step 104, and will not be repeated here.
[0091] Therefore, by inputting shared features and scene features into each expert network under the scene type, the output representation of each expert network is obtained, thereby ensuring that the output representation of each expert network takes into account both common features and individual features, and effectively avoiding the one-sidedness of the output representation of the expert network.
[0092] Step 208: Input the first representation into the prediction network of the model to be updated to obtain the predicted value output by the prediction network.
[0093] In this disclosure, after obtaining the first representations output by each expert network, each first representation is input into the prediction network of the model to be updated to obtain the predicted value. This enables support for any number of cross-scene collaborative inferences in multi-scene models, improves the accuracy and reliability of the predicted value, and provides a foundation for subsequent collaborative training of the number of tasks in various scenarios.
[0094] For example, in some possible implementations, the first representations can be weighted and fused to obtain fused features. The prediction network can then output a predicted value based on the fused features. The weights of the weighted fusion can be determined according to actual needs, and this disclosure does not limit them.
[0095] Step 209: Update the expert network based on the predicted values to obtain the updated model.
[0096] In this disclosure, the specific implementation of updating each expert network based on the predicted value after obtaining the predicted value can be referred to the relevant description in the above embodiments of this disclosure, and will not be repeated here.
[0097] Therefore, by updating each expert network based on predicted values, efficient collaborative updates for any number of scenarios are achieved in multi-scenario models. While maintaining the model's expressive power, this improves the update performance and generalization of multi-scenario models, effectively avoiding performance conflicts between models in different scenarios of the same type. For example, in e-commerce scenarios, it ensures that the model's recommendation results remain consistent across homepage recommendation scenarios, live stream recommendation scenarios, and "You May Also Like" scenarios under different browsing types. For instance, it avoids recommending product A to users in the homepage recommendation scenario and product B in the "You May Also Like" scenario, thereby improving the user experience.
[0098] The specific implementation of steps 208 to 209 can be found in the detailed descriptions of other embodiments in this disclosure, and will not be repeated here.
[0099] In this embodiment, sample data is first acquired, and based on user behavior data, the first feature vector corresponding to the scene identifier is updated to obtain the updated second feature vector. Then, the scene type to which the scene to which the scene identifier belongs is determined. The scene network corresponding to the scene type in the model to be updated is determined, and the second feature vector is input into the shared network and scene network in the model to be updated, respectively, to obtain shared features and scene features. Then, each expert network under the scene type in the model to be updated is determined, and the shared features and scene features are input into each expert network to obtain the first representation output by the corresponding expert network. Finally, the first representation is input into the prediction network of the model to be updated to obtain the predicted value output by the prediction network, and the expert network is updated based on the predicted value to obtain the updated model. Thus, after updating the feature vector corresponding to the scene identifier, the scene network and each expert network in the model to be updated are determined by determining the scene type to which the scene identifier belongs, thereby providing a basis for realizing the hierarchical feature decoupling generation process. Feature generation is performed based on the hierarchical network, and then the predicted value is generated to update the model of each expert network, thereby realizing the collaborative update of any number of expert networks in multiple scene models, improving the update efficiency and generalization of multiple scene models.
[0100] Figure 3 This is a flowchart illustrating a method for updating a multi-scenario model according to another embodiment of the present disclosure.
[0101] like Figure 3 As shown, the update method for this multi-scene model includes: Step 301: Obtain sample data, which includes user behavior data and associated scene identifiers.
[0102] Step 302: Based on user behavior data, update the first feature vector corresponding to the scene identifier to obtain the updated second feature vector.
[0103] Step 303: Determine the scene type to which the scene identifier belongs.
[0104] Step 304: Determine the scene network corresponding to the scene type in the model to be updated.
[0105] Step 305: Input the second feature vector into the shared network and the scene network in the model to be updated, respectively, to obtain the shared features and scene features.
[0106] Step 306: Determine the expert networks for each scene type in the model to be updated.
[0107] Step 307: Input the shared features and scene features into each expert network to obtain the first representation output by the corresponding expert network.
[0108] The specific implementation of steps 301 to 307 can be found in the detailed descriptions of other embodiments in this disclosure, and will not be repeated here.
[0109] Step 308: Determine the scene feature vector mapped to the scene identifier.
[0110] The scene feature vector can be used to represent scene features. It can be a scene embedding vector, which can include features such as the interaction patterns and rules between users and products in the scene. The specific settings can be set according to actual needs, and this disclosure does not limit them.
[0111] It should be noted that the specific implementation of mapping scene identifiers to scene feature vectors can be set according to actual needs, and this disclosure does not limit it.
[0112] For example, in some possible implementations, where the scene feature vector is a scene embedding vector, the scene identifier can be mapped to the scene feature vector through the embedding layer in the model, which is not limited in this disclosure.
[0113] Step 309: Determine the weights of each expert network based on the scene feature vector and the first representation output by each expert network.
[0114] The weights corresponding to the expert network can be considered as routing weights, representing the relevance between the expert network and the scene corresponding to the scene identifier. In other words, higher weights indicate a higher relevance between the expert network and the scene, while lower weights indicate a lower relevance.
[0115] In this disclosure, after obtaining the first representation of each expert network output under the scene type, in order to reduce computational overhead, the first representation of at least one expert network output most relevant to the scene corresponding to the scene identifier can be retained, and the rest can be set to zero. At this time, the weights corresponding to each expert network can be determined first based on the scene feature vector and the first representation of each expert network output.
[0116] It should be noted that the specific implementation method for determining the weights of each expert network based on the scene feature vector and the first representation output by each expert network can be set according to actual needs, and this disclosure does not limit it.
[0117] For example, in some possible implementations, the weights of each expert network can be determined by a normalized exponential function such as the softmax function, as shown in the following formula (1), where formula (1) is only an example and is not a limitation: (1) in, This is the weight vector, which includes the weights corresponding to each expert network; For scene feature vectors; This is the first representation output by the expert network. This is the weight matrix; For bias terms; The number of expert networks for each scenario type.
[0118] Step 310: Sort all expert networks in descending order of weight, and retain the first representation of the output of the first k expert networks.
[0119] Where k is a positive integer, and its specific value can be set according to actual needs. For example, k can be 3, etc., and this disclosure does not limit it.
[0120] In this disclosure, after determining the weights corresponding to each expert network, all expert networks can be sorted in descending order of weights, retaining the first representations output by the top k expert networks and setting the rest to zero. This provides a data foundation for reducing computational overhead and improving computational efficiency by retaining the feature representations of the heterogeneous scenarios with the highest relevance through a dynamic routing mechanism.
[0121] For example, taking the live streaming recommendation scenario as an example, the scenarios most relevant to this scenario may be short video recommendation scenarios and immersive live streaming recommendation scenarios, etc., and this disclosure does not limit it to these.
[0122] Step 311: Input the first k first representations into the prediction network of the model to be updated to obtain the predicted values output by the prediction network.
[0123] In some possible implementations, when inputting the first k representations into the prediction network of the model to be updated to obtain the predicted value output by the prediction network, the first k representations can first be weighted and fused based on the weights corresponding to the first k expert networks to obtain the fused second representation. This second representation is then input into the prediction network of the model to be updated to obtain the predicted value output by the prediction network. This achieves model prediction based on heterogeneous scene fusion data, improving the reliability and accuracy of the predicted values.
[0124] For example, in some possible implementations, the specific implementation of weighted fusion of the first k representations based on the weights corresponding to the first k expert networks can be shown in the following formula (2), where formula (2) is only an example and is not restricted here: , (2) in, This is the second representation after weighted fusion; For the first The weights of an expert network; For the first The first representation output by the expert network; To preserve the number of expert networks in the output.
[0125] Then, the second representation is input into the prediction network to obtain the predicted value output by the prediction network. The specific implementation method can be shown in the following formula (3), where formula (3) is only an example and is not limited here: , (3) in, This is a predicted value; It is the sigmoid function; This is the transpose of the weight matrix; This is a bias term.
[0126] Therefore, by using a dynamic routing mechanism to retain only the output representation of the expert network for the most relevant scenarios and perform model predictions, noise interference and computational costs are effectively reduced, and the accuracy and efficiency of model predictions are improved.
[0127] Step 312: Based on the predicted values, update the first k expert networks to obtain the updated model.
[0128] In this disclosure, after obtaining the predicted values, the updated model is obtained by updating the top k expert networks based on the predicted values. This realizes the model update process based on dynamic routing mechanism and hierarchical feature decoupling architecture. While ensuring the expressive power of the model, it realizes the collaborative update of any number of heterogeneous but related scenarios, and improves the generalization of multi-scenario models.
[0129] In summary, the multi-scenario model update method proposed in this disclosure addresses practical issues such as differences in scenario distribution, cold start, and dynamic expansion by proposing a scenario-centric dynamic routing framework. Compared to multi-objective learning methods in related technologies (which are essentially task modeling, not scenario modeling), this disclosure explicitly introduces scenario identifiers and, through a dynamic routing mechanism, balances personalized expression and computational efficiency within a single model. It significantly outperforms related technologies that simply apply "scenario" as "task" in terms of modeling granularity, cold start performance, and system scalability, demonstrating stronger business adaptability and industrial application value.
[0130] In this embodiment, sample data is first acquired, and based on user behavior data, the first feature vector corresponding to the scene identifier is updated to obtain the updated second feature vector. Then, the scene type to which the scene identifier belongs is determined, and the scene network corresponding to the scene type in the model to be updated is determined. Next, the second feature vector is input into the shared network and scene network in the model to be updated to obtain the shared features and scene features, and each expert network under the scene type in the model to be updated is determined. Then, the shared features and scene features are input into each expert network to obtain the first representation output by the corresponding expert network, and the scene feature vector mapped to the scene identifier is determined. Next, based on the scene feature vector and the first representation output by each expert network, the weight corresponding to each expert network is determined, and all expert networks are sorted in descending order of weight. The first representation output by the first k expert networks is retained. Finally, the first k first representations are input into the prediction network of the model to be updated to obtain the predicted value output by the prediction network, and the first k expert networks are updated based on the predicted value to obtain the updated model. Therefore, after obtaining the outputs of multiple expert networks under the scene type, the outputs of the top k most relevant expert networks are retained through a dynamic routing mechanism. This reduces the computational overhead while retaining highly correlated heterogeneous scene data. Then, model prediction is performed based on the retained top k outputs, and the top k expert networks with retained outputs are updated based on the prediction results. This enables collaborative updates of highly correlated heterogeneous scenes in the business platform, improving the model update effect and generalization.
[0131] Figure 4 This is a flowchart illustrating a method for updating a multi-scenario model according to another embodiment of the present disclosure.
[0132] like Figure 4 As shown, the update method for this multi-scene model includes: Step 401: Obtain sample data, which includes user behavior data and associated scene identifiers.
[0133] Step 402: Based on user behavior data, update the first feature vector corresponding to the scene identifier to obtain the updated second feature vector.
[0134] Step 403: Input the second feature vector into the shared network and the scene network corresponding to the scene identifier in the model to be updated, respectively, to obtain the shared features and scene features.
[0135] Step 404: Input the shared features and scene features into the expert network corresponding to the scene identifier in the model to be updated, and obtain the first representation output by the expert network.
[0136] Step 405: Input the first representation into the prediction network of the model to be updated to obtain the predicted value output by the prediction network.
[0137] The specific implementation of steps 401 to 405 can be found in the detailed descriptions of other embodiments in this disclosure, and will not be repeated here.
[0138] Step 406: Determine the data distribution characteristics and importance of the scene corresponding to the scene identifier.
[0139] Among them, the data distribution characteristics can be used to determine whether the scenario is a head scenario (i.e., the main scenario) or a data sparse scenario. It can be dense or sparse, and the specific type can be determined according to the actual scenario. This disclosure does not limit it.
[0140] Among them, importance can be used to determine the degree of importance of a scenario within a business platform.
[0141] In this disclosure, after obtaining the first representation output by the expert network, before performing model prediction and updating based on the first representation, since the underlying shared network of the model is susceptible to interference from multi-objective gradient conflicts, in order to determine whether to update the underlying shared feature network of the model, avoid the update of sparse data scenarios or non-main scenarios from interfering with the main scenario or head scenario, and ensure the convergence stability of the main scenario, the data distribution characteristics and importance of the scenario corresponding to the scenario identifier can be determined first, and the current scenario can be determined as a sparse data scenario, a non-main scenario, or a main scenario, providing a basis for subsequent model updates.
[0142] It should be noted that the specific implementation method for determining the data distribution characteristics and importance of the scene corresponding to the scene identifier can be set according to actual needs, and this disclosure does not limit it.
[0143] For example, in some possible implementations, the data distribution characteristics can be determined by methods such as the proportion of non-zero values in the feature vector corresponding to the statistical scenario or by calculating the Gini coefficient. This disclosure does not limit this approach.
[0144] For example, in some possible implementations, the importance of a scenario can be determined from a business perspective, specifying core business metrics such as revenue or profit contribution, user activity, business priority, and frequency of occurrence, and determining the importance of the scenario by scoring. Alternatively, relevant models such as the RFM model can be used to determine the importance of a scenario, etc. This disclosure does not limit this.
[0145] RFM can also be referred to as "Recency, Frequency, Monetary" or "Recency, Frequency, Monetary", etc., and this disclosure does not limit it.
[0146] Step 407: When the data distribution characteristics are sparse and / or the importance is less than a preset threshold, the expert network is updated based on the predicted values to obtain the updated model.
[0147] The threshold can be a critical value used to determine the importance of a scenario in the business platform. It can be set according to actual needs, and this disclosure does not limit it.
[0148] In this disclosure, after determining the data distribution characteristics and importance of the scene corresponding to the scene identifier, if the data distribution characteristics are sparse, it can be determined that the user activity in this scene is low and the business frequency of using this scene is low. At this time, it can be determined that the scene is a long-tail scene or other data sparse scene. And / or if the importance of the scene is less than a preset threshold, it can be determined that the importance of the scene in the business platform is low. It may not be a top scene or main scene in the business platform. At this time, only the expert network can be updated based on the predicted value, without updating the underlying shared network of the model. This can effectively alleviate the negative transfer between scenes, avoid the gradient update of the data sparse scene from interfering with the main scene, and improve the effect and stability of multi-scene model updates.
[0149] Step 408: When the data distribution characteristics are dense and / or the importance is greater than or equal to the threshold, update the expert network and the underlying shared feature network of the model to be updated based on the predicted value to obtain the updated model.
[0150] The underlying shared feature network can also be called "underlying shared embedding network", "underlying shared embedding", etc., and this disclosure does not limit it.
[0151] In this disclosure, after determining the data distribution characteristics and importance of the scene corresponding to the scene identifier, if the data distribution characteristics are dense, it can be determined that the user activity in the scene is high and the frequency of using the business in the scene is high, thus determining that the scene is the main scene. And / or if the importance of the scene is greater than or equal to the threshold, it can be determined that the scene is of high importance in the business platform and is a top scene or main scene. At this time, the expert network and the underlying shared feature network of the model to be updated can be updated based on the predicted value to obtain the updated model, thereby realizing the collaborative update of the main scene expert network and the underlying shared feature network, ensuring the stability and accuracy of the multi-scene model in the main scene, and improving the effect of multi-scene model update.
[0152] Specifically, steps 407 and 408 describe the specific implementation methods under different conditions after determining the data distribution characteristics and importance of the scene. Step 407 is the specific implementation method when the data distribution characteristics are sparse and / or the importance is low, and step 408 is the specific implementation method when the data distribution characteristics are dense and / or the importance is high.
[0153] In other words, after determining the data distribution characteristics and importance of the scene, if the data distribution characteristics are sparse and / or the importance is low (less than the threshold), step 407 can be executed. In this case, Figure 4 The specific implementation of the multi-scene model update method shown can be steps 401 to 407.
[0154] If the data distribution characteristics are dense and / or the importance is high (greater than or equal to the threshold), step 408 can be performed. In this case, Figure 4 The specific implementation method of the multi-scene model update method shown can be steps 401 to 406 and step 408.
[0155] In summary, Figure 4 The specific implementation method of the multi-scene model update method shown can be steps 401 to 407, or it can be steps 401 to 406 and step 408. The specific implementation method can be determined according to the actual situation, and this disclosure does not limit it.
[0156] Therefore, by dynamically controlling whether to backpropagate the update gradient of the expert network to the underlying shared feature network of the model based on the data distribution characteristics and importance of the scene, the underlying shared feature network is updated. For sparse sample scenes, the strategy of independently updating the expert network and freezing the underlying shared feature network (without updating) is adopted to avoid its gradient from interfering with the main scene. This can fundamentally alleviate the negative transfer between scenes, improve the convergence stability of the main scene and the cold start efficiency of the model, and achieve the optimal balance between training efficiency, resource utilization and online performance while reducing the coupling of the model.
[0157] In this embodiment, sample data is first acquired, and based on user behavior data, the first feature vector corresponding to the scene identifier is updated to obtain the updated second feature vector. Then, the second feature vector is input into the shared network in the model to be updated and the scene network corresponding to the scene identifier, respectively, to obtain shared features and scene features. These shared features and scene features are then input into the expert network corresponding to the scene identifier in the model to be updated to obtain the first representation output by the expert network. Next, the data distribution characteristics and importance of the scene corresponding to the scene identifier are determined. If the data distribution characteristics are sparse and / or the importance is less than a preset threshold, the expert network is updated based on the predicted value to obtain the updated model. Alternatively, if the data distribution characteristics are dense and / or the importance is greater than or equal to the threshold, the expert network and the underlying shared feature network of the model to be updated are updated based on the predicted value to obtain the updated model. Therefore, by determining the data distribution characteristics and importance of the scene, and updating the scene expert network, it is determined whether to collaboratively update the underlying shared network of the model. This effectively avoids interference from non-main scene update gradients on the underlying shared network, alleviates negative transfer between scenes, ensures the stability of main scene convergence, and improves the model update effect.
[0158] The following is combined Figure 5 The model architecture and process of the multi-scenario model update method proposed in this disclosure are illustrated with examples. Figure 5 This is a schematic diagram illustrating the model architecture and process of the multi-scenario model update method proposed in this disclosure. Among them, Figure 5 The model architecture and model update process shown are for illustrative purposes only and are not intended to be restrictive.
[0159] like Figure 5 As shown, the architecture of the multi-scenario model proposed in this disclosure may include: a feature vector update module 501, a shared network 502, a scene network 503, an expert network 504, a dynamic route awareness module 505, and a prediction network 506.
[0160] Based on Figure 5When the model architecture shown implements the multi-scenario model update method proposed in this disclosure, it first acquires sample data and inputs the sample data into the feature vector update module 501 to update the feature vector corresponding to the associated scenario identifier based on the user behavior data in the sample data. Then, the updated feature vectors are input into the shared network 502 and the scenario network 503 corresponding to the scenario identifier to obtain shared features and scenario features. Next, the shared features and scenario features are input into each expert network corresponding to the scenario identifier to obtain the first representation output by each expert network. Then, each first representation is input into the dynamic route awareness module 505 to determine and fuse the first representations of the top k expert networks. The fused representations are input into the prediction network 506 to obtain the predicted values output by the prediction network. Finally, the top k expert networks are updated based on the predicted values.
[0161] Furthermore, when inputting the shared features and scene features into the expert networks corresponding to the scene identifier, the scene type to which the scene identifier belongs can be determined first, and then the expert networks #1 to #n under that scene type can be determined. After that, the shared features and scene features can be input into the expert networks.
[0162] It should be noted that, Figure 5 The specific implementation of each step in the update process shown can be found in the relevant content of the above embodiments of this disclosure, and will not be described in detail here.
[0163] Therefore, by using a hierarchical feature decoupling generation process and a dynamic route awareness mechanism to update the model, the update efficiency and effectiveness of multi-scenario models are improved while ensuring the model's expressive power.
[0164] For example, in some possible implementations, the specific architecture of the expert network and the specific implementation method for generating the first representation can be found in [reference needed]. Figure 6 The content shown is as follows. Figure 6 This diagram illustrates the architecture and representation generation process of the expert network in the multi-scenario model update method proposed in this disclosure. Figure 6 The network architecture and representation generation process shown are for illustrative purposes only and are not intended to be restrictive.
[0165] like Figure 6 As shown, the architecture of the expert network 600 may include: a feature interaction architecture 601, a self-attention architecture 602, a neuron gating system 603, a splicing layer 604, and a multilayer perceptron 605.
[0166] It should be noted that the specific implementation of the feature interaction architecture 601 and the self-attention architecture 602 can be set according to actual needs. For example, the feature interaction architecture 601 can be a hierarchical feature interaction architecture or a same sequence modeling architecture, etc., and the self-attention architecture can be a Transformer. This disclosure does not limit this.
[0167] The splicing layer can also be called "Concatenated Layer", etc., and this disclosure does not limit it.
[0168] It should be noted that the multilayer perceptron 605 can be configured as a single-layer MLP as needed, and this disclosure does not limit it in this way.
[0169] After obtaining the shared features and scene features, the shared features and scene features are first input into the feature interaction architecture 601 and the self-attention architecture 602 respectively to obtain the output features of the feature interaction architecture 601 and the output features of the self-attention architecture 602. These are then input into the neuron gating 603 and the splicing layer 604. The neuron gating 603 enhances the information of the output features of the architectures 601 and 602, filters out the information of important dimensions in the features and outputs them. The splicing layer 604 splices the output features of the feature interaction architecture 601 and the output features of the self-attention architecture 602. Then, the features output by the neuron gating 603 and the features output by the splicing layer 604 are fused and the fused features are input into the multilayer perceptron 605 to obtain the first representation output by the multilayer perceptron 605.
[0170] Therefore, through Figure 6 The expert network architecture and the process for generating the first representation shown in the diagram enable the generated first representation to include both general knowledge and scenario-specific knowledge, thereby improving the accuracy and reliability of the first representation.
[0171] To implement the above embodiments, this disclosure also proposes a multi-scenario model update device.
[0172] Figure 7 This is a schematic diagram of the structure of a multi-scene model updating device provided in an embodiment of the present disclosure.
[0173] like Figure 7 As shown, the multi-scene model update device 700 includes: a first acquisition module 701, a first update module 702, a first input module 703, a second input module 704, a third input module 705, and a second update module 706.
[0174] The first acquisition module 701 is used to acquire sample data, wherein the sample data includes user behavior data and associated scene identifiers; The first update module 702 is used to update the first feature vector corresponding to the scene identifier based on the user behavior data to obtain the updated second feature vector. The first input module 703 is used to input the second feature vector into the shared network in the model to be updated and the scene network corresponding to the scene identifier, respectively, to obtain the shared features and the scene features; The second input module 704 is used to input the shared features and scene features into the expert network in the model to be updated that corresponds to the scene identifier, and obtain the first representation output by the expert network. The third input module 705 is used to input the first representation into the prediction network of the model to be updated, and obtain the predicted value output by the prediction network. The second update module 706 is used to update the expert network based on the predicted values to obtain the updated model.
[0175] Optionally, the first acquisition module 701 described above is specifically used for: If the newly collected user behavior data in any scenario of the business platform meets the model update conditions, the newly collected user behavior data and the scenario identifier of the scenario are associated and determined as sample data.
[0176] Optionally, the first input module 703 described above is specifically used for: Determine the scene type to which the scene identifier belongs; Determine the scene network corresponding to the scene type in the model to be updated; The second feature vector is input into the shared network and the scene network in the model to be updated, respectively, to obtain the shared features and scene features.
[0177] Optionally, the second input module 704 described above is specifically used for: Identify the expert networks for each scenario type in the model to be updated; The shared features and scene features are input into each of the expert networks to obtain the first representation output by the corresponding expert network.
[0178] Optionally, the third input module 705 described above is specifically used for: Determine the scene feature vector mapped by the scene identifier; Based on the scene feature vector and the first representation output by each of the expert networks, the weights corresponding to each of the expert networks are determined. Sort all expert networks in descending order of weight, and retain the first representation of the output of the first k expert networks, where k is a positive integer; The first k first representations are input into the prediction network of the model to be updated to obtain the predicted values output by the prediction network.
[0179] Optionally, the third input module 705 described above is further used for: Based on the weights corresponding to the first k expert networks, the first k representations are weighted and fused to obtain the fused second representation; The second representation is input into the prediction network of the model to be updated to obtain the predicted value output by the prediction network.
[0180] Optionally, the second update module 706 mentioned above is specifically used for: Based on the predicted values, the first k expert networks are updated to obtain the updated model.
[0181] Optionally, the second update module 706 mentioned above is specifically used for: Determine the data distribution characteristics and importance of the scene corresponding to the scene identifier; When the data distribution characteristics are sparse and / or the importance is less than a preset threshold, the expert network is updated based on the predicted value to obtain the updated model; When the data distribution characteristics are dense and / or the importance is greater than or equal to the threshold, the expert network and the underlying shared feature network of the model to be updated are updated based on the predicted value to obtain the updated model.
[0182] It should be noted that the explanation of the above-mentioned multi-scene model update method embodiment also applies to the multi-scene model update device of this embodiment, so it will not be repeated here.
[0183] In this embodiment, sample data is first acquired, and based on user behavior data, the first feature vector corresponding to the scene identifier is updated to obtain the updated second feature vector. Then, the second feature vector is input into the shared network and the scene network corresponding to the scene identifier in the model to be updated, respectively, to obtain shared features and scene features. The shared features and scene features are then input into the expert network corresponding to the scene identifier in the model to be updated to obtain the first representation output by the expert network. The first representation is then input into the prediction network of the model to be updated to obtain the predicted value output by the prediction network. Finally, the expert network is updated based on the predicted value to obtain the updated model. Thus, by updating the feature vector of the associated scene based on user behavior data in the sample data, and inputting the updated feature vector into the shared network and the corresponding scene network of the model to obtain shared features and scene features, and then inputting them into the corresponding expert network, a hierarchical feature decoupling generation process is achieved. This reduces model coupling, learns scene-specific knowledge while retaining general knowledge, and improves the accuracy and reliability of the generated feature representation. Then, prediction output is performed based on this feature representation to update the expert network, thereby improving the update efficiency and effect of multi-scene models while reducing model coupling and avoiding interference between scenes.
[0184] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0185] Figure 8 A schematic block diagram of an example electronic device 800 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0186] like Figure 8As shown, device 800 includes a computing unit 801, which can perform various appropriate actions and processes based on a computer program stored in ROM (Read-Only Memory) 802 or a computer program loaded from storage unit 808 into RAM (Random Access Memory) 803. RAM 803 can also store various programs and data required for the operation of device 800. The computing unit 801, ROM 802, and RAM 803 are interconnected via bus 804. I / O (Input / Output) interface 805 is also connected to bus 804.
[0187] Multiple components in device 800 are connected to I / O interface 805, including: input unit 806, such as keyboard, mouse, etc.; output unit 807, such as various types of monitors, speakers, etc.; storage unit 808, such as disk, optical disk, etc.; and communication unit 809, such as network card, modem, wireless transceiver, etc. Communication unit 809 allows device 800 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0188] The computing unit 801 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, CPUs (Central Processing Units), GPUs (Graphics Processing Units), various special-purpose AI (Artificial Intelligence) computing chips, various computing units running machine learning model algorithms, DSPs (Digital Signal Processors), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs the various methods and processes described above, such as the method for updating a multi-scene model. For example, in some embodiments, the method for updating a multi-scene model can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 808. In some embodiments, part or all of the computer program can be loaded and / or installed on device 800 via ROM 802 and / or communication unit 809. When the computer program is loaded into RAM 803 and executed by the computing unit 801, one or more steps of the method for updating a multi-scene model described above can be performed. Alternatively, in other embodiments, computing unit 801 may be configured to perform a multi-scenario model update method by any other suitable means (e.g., by means of firmware).
[0189] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, FPGAs (Field Programmable Gate Arrays), ASICs (Application-Specific Integrated Circuits), ASSPs (Application-Specific Standard Products), SOCs (System-on-Chips), CPLDs (Complex Programmable Logic Devices), computer hardware, firmware, software, and / or combinations thereof. These various implementations may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0190] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0191] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, RAM, ROM, EPROM (Electrically Programmable Read-Only Memory) or flash memory, optical fiber, CD-ROM (Compact Disc Read-Only Memory), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0192] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0193] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include LANs (Local Area Networks), WANs (Wide Area Networks), the Internet, and blockchain networks.
[0194] Computer systems can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is established by computer programs running on the respective computers and having a client-server relationship with each other. A server can be a cloud server, also known as a cloud computing server or cloud host, a hosting product within the cloud computing service ecosystem, addressing the shortcomings of traditional physical hosts and VPS (Virtual Private Server) services, such as high management difficulty and weak business scalability. Servers can also be servers for distributed systems or servers incorporating blockchain technology.
[0195] According to embodiments of this disclosure, this disclosure also provides a computer program product that, when an instruction processor in the computer program product is executed, performs the multi-scenario model update method proposed in the above embodiments of this disclosure.
[0196] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0197] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A method of updating a multi-scenario model, characterized by, include: Obtain sample data, wherein the sample data includes user behavior data and associated scene identifiers; Based on the user behavior data, the first feature vector corresponding to the scene identifier is updated to obtain the updated second feature vector. The second feature vector is input into the shared network in the model to be updated and the scene network corresponding to the scene identifier, respectively, to obtain the shared features and scene features. The shared features and scene features are input into the expert network in the model to be updated that corresponds to the scene identifier to obtain the first representation output by the expert network. The first representation is input into the prediction network of the model to be updated to obtain the predicted value output by the prediction network; The expert network is updated based on the predicted values to obtain the updated model.
2. The method of claim 1, wherein, The acquisition of sample data includes: If the newly collected user behavior data in any scenario of the business platform meets the model update conditions, the newly collected user behavior data and the scenario identifier of the scenario are associated and determined as sample data.
3. The method of claim 1, wherein, The step of inputting the second feature vector into the shared network in the model to be updated and the scene network corresponding to the scene identifier to obtain shared features and scene features includes: Determine the scene type to which the scene identifier belongs; Determine the scene network corresponding to the scene type in the model to be updated; The second feature vector is input into the shared network and the scene network in the model to be updated, respectively, to obtain the shared features and scene features.
4. The method of claim 3, wherein, The step of inputting the shared features and scene features into the expert network corresponding to the scene identifier in the model to be updated, and obtaining the first representation output by the expert network, includes: Identify the expert networks for each scenario type in the model to be updated; The shared features and scene features are input into each of the expert networks to obtain the first representation output by the corresponding expert network.
5. The method of claim 4, wherein, The step of inputting the first representation into the prediction network of the model to be updated to obtain the predicted value output by the prediction network includes: Determine the scene feature vector mapped by the scene identifier; Based on the scene feature vector and the first representation output by each of the expert networks, the weights corresponding to each of the expert networks are determined. Sort all expert networks in descending order of weight, and retain the first representation of the output of the first k expert networks, where k is a positive integer; The first k first representations are input into the prediction network of the model to be updated to obtain the predicted values output by the prediction network.
6. The method of claim 5, wherein, The step of inputting the first k first representations into the prediction network of the model to be updated to obtain the predicted values output by the prediction network includes: Based on the weights corresponding to the first k expert networks, the first k representations are weighted and fused to obtain the fused second representation; The second representation is input into the prediction network of the model to be updated to obtain the predicted value output by the prediction network.
7. The method of claim 6, wherein, The step of updating the expert network based on the predicted values to obtain the updated model includes: Based on the predicted values, the first k expert networks are updated to obtain the updated model.
8. The method of claim 1, wherein, The step of updating the expert network based on the predicted values to obtain the updated model includes: Determine the data distribution characteristics and importance of the scene corresponding to the scene identifier; When the data distribution characteristics are sparse and / or the importance is less than a preset threshold, the expert network is updated based on the predicted value to obtain the updated model; When the data distribution characteristics are dense and / or the importance is greater than or equal to the threshold, the expert network and the underlying shared feature network of the model to be updated are updated based on the predicted value to obtain the updated model.
9. An updating apparatus of a multi-scenario model, characterized by, include: The first acquisition module is used to acquire sample data, wherein the sample data includes user behavior data and associated scene identifiers; The first update module is used to update the first feature vector corresponding to the scene identifier based on the user behavior data to obtain the updated second feature vector. The first input module is used to input the second feature vector into the shared network in the model to be updated and the scene network corresponding to the scene identifier, respectively, to obtain the shared features and scene features; The second input module is used to input the shared features and scene features into the expert network in the model to be updated that corresponds to the scene identifier, and to obtain the first representation output by the expert network. The third input module is used to input the first representation into the prediction network of the model to be updated, and obtain the predicted value output by the prediction network. The second update module is used to update the expert network based on the predicted values to obtain the updated model.
10. An electronic device, comprising: include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-8.
11. A non-transitory computer-readable storage medium having stored thereon computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-8.
12. A computer program product comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-8.
