Method and device for processing user data in multiple scenes
By calculating the similarity between user features and scene vectors in multiple scenarios and then performing weighted fusion, the problems of high model development cost and sparse samples in user data processing under multiple scenarios are solved, and the model achieves high efficiency, flexible adaptation and accurate prediction.
Patent Information
- Application Number
- CN202511519031.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-22
- Publication Date
- 2026-01-30
AI Technical Summary
When processing user data in multiple scenarios, existing technologies face problems such as high model development and maintenance costs, insufficient model training due to sparse samples, and inadequate generalization ability. This is especially true in the field of intelligent marketing campaigns, where it is difficult to iterate quickly and adapt to diverse business scenarios.
A multi-scenario joint modeling scheme is adopted. By calculating the similarity between user features and scene vectors, the target weight is determined and weighted fusion is performed. User data is processed using the same model differentiation. Combined with learnable scene vectors and dynamic clustering mechanism, it automatically adapts to the distribution characteristics of different scenarios.
It significantly reduces the costs of model development, maintenance, and iteration, improves the robustness and generalization ability of the model, and enhances the prediction accuracy and adaptability to complex business scenarios.
Smart Images

Figure CN121434883A_ABST
Abstract
Description
Technical Field
[0001] The embodiments in this specification pertain to the field of multi-scenario modeling, and particularly relate to a method and apparatus for processing user data in multiple scenarios. Background Technology
[0002] In today's digital age, real-world business operations, especially large-scale and wide-ranging ones, typically involve multiple scenarios. Different domains, different channels and modules of an app, and different clients can all be considered different scenarios. Users in different business scenarios differ, and even the same user's mindset and behavioral patterns vary across different scenarios. Therefore, it is necessary to adopt differentiated processing methods for user data in different scenarios to adapt to different business situations.
[0003] Taking intelligent marketing campaigns as an example, these products aim to provide advertisers with precise marketing services. Due to differences in industries, advertisers, product types, and traffic channels, multiple intelligent marketing campaign scenarios exist in actual business operations. While building and maintaining a separate business model for each scenario can adapt to scenario specificity to some extent, it inevitably faces the following drawbacks: Firstly, as the number of scenarios increases, the number of corresponding models also increases, leading to a sharp increase in model development and maintenance costs. This requires significant investment of computing and human resources, resulting in low efficiency in subsequent model iteration and maintenance, making it difficult to support rapid business iteration and large-scale expansion. Secondly, the total sample size of user data is limited. As the number of scenarios increases, the sample size within a single scenario becomes sparse, leading to insufficient model training and difficulty in effectively improving the model's accuracy and generalization ability.
[0004] Therefore, there is an urgent need for a method that balances efficiency, accuracy, and generalization ability to model user data in multiple scenarios in order to meet the differentiated needs of various scenarios. Summary of the Invention
[0005] The purpose of this invention is to provide a solution for processing user data in multiple scenarios, so as to use the same model to perform differentiated processing on user data in multiple scenarios and meet the differentiated needs of multiple scenarios.
[0006] This specification provides a method for processing user data in multiple scenarios, comprising: acquiring user features related to the first user based on user data of the first user; determining target weights corresponding to the multiple scene vectors based on the similarity between the user features and multiple scene vectors; inputting the user features into multiple expert subnetworks to obtain first representations output by the multiple expert subnetworks, wherein there is a one-to-one correspondence between the multiple scene vectors and the multiple expert subnetworks; performing weighted fusion of the first representations output by the multiple expert subnetworks according to the target weights corresponding to the multiple scene vectors to obtain a second representation; and determining a prediction result based on the second representation.
[0007] In some embodiments, determining the target weights corresponding to the multiple scene vectors based on the similarity between the user features and the multiple scene vectors includes: projecting the user features into a space of the same dimension as the scene vectors to obtain an alignment vector; and calculating the similarity between the alignment vector and the multiple scene vectors to obtain the target weights corresponding to the multiple scene vectors.
[0008] In some embodiments, obtaining user features related to the first user based on the user data of the first user includes: extracting features from the user data of the first user by a first network layer to obtain user features; determining the prediction result based on the second representation includes: determining the prediction result based on the second representation by a second network layer.
[0009] In some embodiments, after determining the prediction result, the method further includes: adjusting the network parameters of the expert subnetwork, the first network layer, and the second network layer based on the difference between the prediction result and the label of the first user.
[0010] In some embodiments, after adjusting the network parameters of the expert sub-network, the first network layer, and the second network layer, the method further includes: extracting features from the user data using the adjusted first network layer to obtain updated features; determining the scene vector with the highest similarity to the updated features based on the similarity between the updated features and multiple scene vectors, and using it as the cluster center of the cluster to which the updated features belong; updating the cluster center based on the updated features in the cluster to obtain the updated cluster center, and using it as the updated scene vector.
[0011] In some embodiments, after determining the prediction result, the method further includes: adjusting the network parameters of the expert subnetwork, the first network layer, and the second network layer based on the difference between the prediction result and the label of the first user, and updating the scene vector.
[0012] In some embodiments, the prediction result is used to indicate the probability that the first user will perform a specific action on the first object, the specific action including at least one of the following: the first user clicks on the first object, the first user purchases the first object, or the first user continues to use the first object.
[0013] A second aspect of this specification provides an apparatus for processing user data in multiple scenarios, comprising: a feature acquisition module for acquiring user features related to the first user based on user data of a first user; a weight determination module for determining target weights corresponding to multiple scene vectors based on the similarity between the user features and multiple scene vectors; an expert network module for inputting the user features into multiple expert subnetworks to obtain first representations output by the multiple expert subnetworks, wherein there is a one-to-one correspondence between the multiple scene vectors and the multiple expert subnetworks; a representation fusion module for weighted fusion of the first representations output by the multiple expert subnetworks according to the target weights corresponding to the multiple scene vectors to obtain a second representation; and a prediction output module for determining a prediction result based on the second representation.
[0014] A third aspect of this specification provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of the method as described in any implementation of the first aspect.
[0015] A fourth aspect of this specification provides a computing device including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, it implements the steps of a method as described in any implementation of the first aspect.
[0016] In the scheme provided by the above embodiments of this specification, after obtaining user features related to the first user through user data, these features are input into expert subnetworks corresponding to different scene vectors to obtain a first representation. The target weights are determined based on the similarity between the user features and different scene vectors. Then, the prediction result is obtained through the weighted fusion of the target weights and the first representation. In this way, this scheme can assign different weights to the first representation based on the similarity between user features and scene vectors corresponding to different scenes without explicit task partitioning. This implicit multi-scene modeling approach differentiates the processing of multi-scene data according to the distribution characteristics of user data in different scenes, effectively avoiding the problem of sparse sample size within a single scene as the number of scenes increases. This ensures training stability and improves the robustness and generalization ability of the model in practical applications. Furthermore, only one model needs to be developed and maintained for multiple scenarios, significantly reducing the overall cost of model development, maintenance, iteration, and inference, and possessing good scalability and commercial value. Attached Figure Description
[0017] To more clearly illustrate the technical solutions of the embodiments in this specification, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a schematic diagram of the network architecture of a model in one embodiment of this specification;
[0019] Figure 2 This is a schematic diagram of a process for processing user data in multiple scenarios according to one embodiment of this specification;
[0020] Figure 3 This is a schematic diagram of another process for processing user data in multiple scenarios in one embodiment of this specification;
[0021] Figure 4 This is a schematic diagram of another process for processing user data in multiple scenarios in one embodiment of this specification;
[0022] Figure 5 This is a schematic diagram of the structure of a device for processing user data in multiple scenarios according to one embodiment of this specification. Detailed Implementation
[0023] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this specification.
[0024] As mentioned earlier, user data in different scenarios requires different processing to meet the specific business needs. Taking intelligent marketing campaigns as an example, this field typically uses user value segmentation models to achieve precise ad targeting, thereby improving campaign effectiveness and resource utilization. These models predict the probability of a user converting after viewing specific ad creatives, based on user profile characteristics and other user-related data. These conversion behaviors include clicks, purchases, and retention, depending on the advertiser's marketing goals. This predicted probability value can be used to segment users, enabling advertisers to conduct refined operations for different user tiers. In practical business applications, due to differences in industries, advertisers, product types, and traffic channels, various intelligent marketing campaign scenarios exist.
[0025] Current solutions typically treat different scenarios as independent tasks. For example, marketing campaigns for products in categories A, B, C, and D are treated as four independent tasks and modeled separately. This requires a lot of resources to train and maintain four user value stratification models. Furthermore, with a limited total sample size, the sample size for each task in each scenario is relatively sparse, making it difficult to effectively improve the accuracy and generalization ability of each model.
[0026] Currently, multi-task learning (MTL) is also used for modeling. MTL frameworks widely employ a shared-bottom structure, where multiple tasks share a single underlying network, with each task corresponding to an independent task tower. While this approach addresses the resource-intensive nature of building and maintaining a separate model for each scene to some extent, it still treats different scenes as independent tasks, with each task tower's network parameters trained only on samples from its corresponding scene. When using optimization algorithms such as BGD (Batch Gradient Descent), as the number of scenes increases, the sample size for a single task becomes sparse, leading to training instability, difficulty in model convergence, and ultimately impacting overall performance.
[0027] Therefore, this specification proposes a solution for processing user data in multiple scenarios, addressing the aforementioned problems. In one embodiment, the network architecture of the model constructed by this solution can be as follows: Figure 1 As shown. In Figure 1The model consists of a first network layer, k expert sub-networks, k scene vectors, and a second network layer, where k is any positive integer. The first network layer takes user data as input and outputs user features related to the first user. The k expert sub-networks take user features as input and output k first representations. The k scene vectors are used to perform similarity comparisons with the user features to obtain corresponding k target weights. The second network layer takes the weighted aggregation of the k first representations and their corresponding target weights as input and outputs the prediction result.
[0028] The following is combined Figure 1 The network architecture of the model shown illustrates how the solution provided in this manual processes user data in multiple scenarios. Among them, Figure 2 This is a flowchart illustrating a method for processing user data in multiple scenarios as described in the embodiments of this specification. This method can be executed by any device, platform, or cluster of devices with computing and processing capabilities, including steps 201-205 as shown below.
[0029] First, in step 201, user characteristics related to the first user are obtained based on the user data of the first user.
[0030] The first user can be any user in any business scenario. User data can be user profile information, specifically including user attribute information, behavioral information, etc. User attribute information can include information such as the user's education level, address, and interests, while behavioral information can include web browsing history, click history, and purchase history. User features are vectorized features extracted from user data.
[0031] This embodiment does not limit the method of obtaining user characteristics based on user data. For example, such as... Figure 1 The example illustrates how a first network layer can be used to obtain user features related to the first user based on the user data of the first user. The first network layer is a neural network with feature extraction capabilities. This embodiment does not limit the specific network layer used. For example, a convolutional neural network can be used to extract features from the user data to obtain user features; or, for example, the user data can be preprocessed and then input into the embedding layer to obtain a user representation vector as user features.
[0032] Next, in step 202, target weights corresponding to multiple scene vectors are determined based on the similarity between user features and multiple scene vectors.
[0033] In this model, scene vectors can be features in vector form. There is a one-to-one correspondence between multiple scene vectors and multiple expert subnetworks, with each scene vector corresponding to a different scene. For example, when there are k scenes, the model will have k expert subnetworks and k scene vectors.
[0034] It should be noted that the scene vectors in this embodiment can be manually constructed. For example, scene vectors for different scenarios can be designed based on expert experience. Alternatively, the scene vectors can be automatically learned during the model training process. The update process of learnable scene vectors during model training will be explained in detail later, but will not be discussed here.
[0035] In this step, user features can be compared one by one with multiple scene vectors to calculate the similarity between the user features and each scene vector, and this similarity is used as the target weight corresponding to the scene vector. This embodiment does not limit the method of calculating similarity. For example, it can be to calculate the cosine similarity between user features and scene vectors, the Euclidean distance between user features and scene vectors, or the Pearson correlation coefficient between user features and scene vectors.
[0036] In one example, when the user features and scene vectors have different dimensions, to accurately calculate their similarity, this step involves projecting the user features into a space with the same dimensions as the scene vectors, resulting in an alignment vector with the same dimensions as the scene vectors. It's important to note that if each scene vector has the same dimensions, this projection operation can be performed once to obtain one alignment vector; if the dimensions of each scene vector are different, the projection operation needs to be performed multiple times to obtain separate alignment vectors with the same dimensions for each scene vector. Then, the similarity between the alignment vectors and multiple scene vectors is calculated to obtain the target weights corresponding to the multiple scene vectors. The projection operation is a linear transformation of the user features, which can be implemented, for example, using matrix multiplication.
[0037] In step 203, user features are input into multiple expert subnetworks to obtain the first representations output by the multiple expert subnetworks.
[0038] In this step, user features are input into different expert sub-networks to obtain multiple first representations. For example, if there are k expert sub-networks, k first representations will be obtained. The network structure of each expert sub-network can be the same or different. This embodiment does not restrict the network structure of the expert sub-networks; for example, each expert sub-network can use a feedforward neural network structure, specifically an MLP (Multilayer Perceptron).
[0039] It should be noted that, after obtaining the user features, this embodiment processes them through two paths. Firstly, in step 202, the user features are input into multiple expert subnetworks to obtain the first representation. Secondly, in step 203, the corresponding target weights are determined based on the similarity between the user features and different scene vectors. Each scene vector corresponds one-to-one with an expert subnetwork. This embodiment does not restrict the execution order of steps 202 and 203; steps 202 and 203 can be executed in any order or in parallel.
[0040] Then, in step 204, the first representations output by multiple expert subnetworks are weighted and fused according to the target weights corresponding to multiple scene vectors to obtain the second representation.
[0041] Specifically, the target weight corresponding to the j-th scene vector can be used as the weight to perform weighted aggregation on the first representation output by the j-th expert sub-network to obtain the second representation, where j is a positive integer not greater than k.
[0042] In step 205, the prediction result is determined based on the second characterization.
[0043] In this step, the second representation can be input into the second network layer to obtain the prediction result. This embodiment does not limit the network structure of the second network layer; for example, a fully connected layer (FCN) can be used.
[0044] The prediction results can be configured according to business needs. For example, when used in recommendation systems or intelligent marketing campaigns, the prediction results can indicate the probability that a first user will perform a specific action on a first object. The specific action includes at least one of the following: the first user clicks on the first object, the first user purchases the first object, or the first user continues to use (also known as retention) the first object. The first object can be a product, advertisement, webpage, or application, etc. For example, when the specific action is that the first user clicks on the first object, the prediction result can be the probability that the first user clicks on the first object. When there are multiple specific actions to be predicted, multiple fully connected layers can be set up to predict different specific actions, resulting in multiple prediction results.
[0045] To address the challenges of numerous scenarios and sparse sample sizes in enterprise marketing and other business operations, this specification proposes a multi-scenario joint modeling scheme. This scheme calculates the similarity between user features and scenario vectors, using this similarity as weights to weight and aggregate the outputs of each expert sub-network, thus achieving an implicit multi-scenario modeling mechanism. This mechanism does not explicitly divide different scenarios into independent tasks; instead, it uses the same model to differentiate user data across different scenarios. The model's network parameters can be trained using samples from all scenarios, avoiding training instability and model convergence difficulties caused by data sparsity, significantly improving the model's robustness and generalization ability in practical applications. Furthermore, the model used in this scheme can adaptively adjust the data processing method according to the data distribution, thus providing differentiated processing for data in different scenarios. Compared to traditional methods that use equivalent scenario data to train a single model, this scheme demonstrates superior prediction accuracy.
[0046] The solution proposed in this specification can be applied to various fields, such as recommendation systems and user behavior analysis. For example, when applied to intelligent marketing campaigns, it can integrate user data from different scenarios to train a unified user value stratification model applicable to multiple business scenarios. This enables efficient identification and stratification of user value in each scenario, and the model can flexibly adapt to the personalized needs of each scenario, thereby providing more precise marketing support. Through multi-scenario joint modeling, not only is the marketing accuracy of advertisers improved, but the overall cost of model development, maintenance, iteration, and inference is also reduced, demonstrating good scalability and commercial viability.
[0047] In multi-scenario problems, traditional methods typically rely on business rules (such as industry, advertiser, product category, traffic channel, etc.) to explicitly divide scenarios. Examples include the previously mentioned methods of building and maintaining models separately for each scenario and multi-task learning methods. However, samples within the same scenario may exhibit diverse distributions, and different scenarios may also have similar data distributions. This rule-based hard partitioning approach cannot fully reflect the complexity and dynamic changes of the data itself. It struggles to accurately characterize the distribution differences between different samples under the same rule and fails to identify potential similarities between data across rule-based scenarios, thus limiting the model's generalization ability and adaptability. To address this issue, this specification proposes a clustering-based implicit scenario sample clustering scheme. Through learnable scenario vectors and a dynamic clustering mechanism, it achieves automatic discovery and refined modeling of scenario distributions. This allows the model to automatically learn and adapt to the distribution characteristics of different scenarios without explicit partitioning tasks, improving the model's generalization ability and robustness, and significantly enhancing its adaptability and prediction accuracy for complex business scenarios.
[0048] The following is about... Figure 1 The training process of the model and the update process of the learnable scene vectors are explained below. As shown, this manual provides two training methods:
[0049] Training Method 1:
[0050] The training method shown in this embodiment is applicable to situations where the scene vectors are learnable, and also applicable to situations where the scene vectors are not learnable (i.e., fixed scene vectors constructed based on expert experience).
[0051] like Figure 3 As shown, in step 301, user features related to the first user are obtained based on the user data of the first user.
[0052] In step 302, target weights corresponding to multiple scene vectors are determined based on the similarity between user features and multiple scene vectors.
[0053] If the scene vectors are not learnable, scene vectors constructed based on expert experience can be used in this step.
[0054] Alternatively, if the scene vectors are learnable, randomly initialized scene vectors can be used in the initial training phase, and updated in each training epoch after the model parameters are updated. In some embodiments, scene vectors constructed based on expert experience can also be used.
[0055] The number of scene vectors can be specified by relevant staff or generated randomly.
[0056] In step 303, the user features are input into multiple expert subnetworks, and the first representations output by the multiple expert subnetworks are obtained respectively.
[0057] In step 304, the first representations output by multiple expert subnetworks are weighted and fused according to the target weights corresponding to multiple scene vectors to obtain the second representation.
[0058] In step 305, the prediction result is determined based on the second characterization.
[0059] In this embodiment, the first user refers to a sample user, such as a user in a pre-built training dataset. Each first user's user data in the training dataset has a label. For example, when the prediction result is used to indicate the probability that the first user will perform a specific action on a first object, this label can be used to indicate whether the user performed the specific action.
[0060] For an explanation of steps 301-305, please refer to the relevant explanations of steps 201-205 in the previous text, which will not be repeated here.
[0061] In step 306, based on the difference between the prediction result and the first user's label, the network parameters of the expert subnetwork, the first network layer, and the second network layer are adjusted.
[0062] In this step, a loss function can be determined based on the difference between the prediction result and the first user's label. For example, the cross-entropy loss function can be used. Then, the model is trained with the goal of minimizing the loss value of the loss function. For example, the network parameters of each expert subnetwork, the first network layer, and the second network layer can be updated using the Batch Gradient Descent (BGD) algorithm.
[0063] When the scene vector is not learnable, training can be stopped when the number of iterations of the above steps reaches a preset number, or when the loss value is less than a preset threshold, and the trained model can be obtained.
[0064] When the scene vector is learnable, in the above steps in each training round, the scene vector is temporarily fixed, the user data of the current batch of samples is input into the model, the model parameters are updated through the backpropagation algorithm, and then the following steps are performed to update the scene vector. This update method combines a clustering algorithm similar to Exponential Moving Average (EMA) to dynamically update the scene vector.
[0065] Then, in step 307, the adjusted first network layer extracts features from the user data to obtain updated features.
[0066] In this step, the network parameters of each expert subnetwork, the first network layer, and the second network layer in the model remain unchanged after adjustment. The user data of the current batch of samples is input into the model again, and the updated features related to the user are extracted by the first network layer.
[0067] In step 308, based on the similarity between the updated feature and multiple scene vectors, the scene vector with the highest similarity to the updated feature is determined and used as the cluster center of the cluster to which the updated feature belongs.
[0068] Specifically, the similarity between each updated feature and all scene vectors is calculated. Then, for each updated feature, the scene vector with the highest similarity is found and considered as the cluster center to which the updated feature belongs. In this way, multiple clusters are obtained, with the scene vector as the cluster center of each cluster and the samples within each cluster as the updated features.
[0069] In step 309, the cluster center is updated based on the updated features in the cluster to obtain the updated cluster center, which is then used as the updated scene vector.
[0070] This embodiment does not restrict the clustering method used. For example, the K-means clustering method can be used. Specifically, for each cluster, the mean of its internal samples is calculated to obtain the current mean, and the corresponding cluster center is updated according to the following formula:
[0071] New cluster center = α·current mean + (1-α)·old cluster center (1)
[0072] Here, α is a smoothing factor used to control the step size and stability of each update.
[0073] The new cluster centers obtained after the update are used as the updated scene vectors.
[0074] Once the current training round is complete, steps 301-309 above can be executed iteratively until training is finished.
[0075] Training Method Two:
[0076] The training method shown in this embodiment is applicable to situations where the scene vector is learnable. The scene vector is also regarded as part of the model parameters, that is, when adjusting the network parameters of the model according to the loss function, the scene vector will also be adjusted.
[0077] like Figure 4 As shown, in step 401, user features related to the first user are obtained based on the user data of the first user.
[0078] In step 402, target weights corresponding to multiple scene vectors are determined based on the similarity between user features and multiple scene vectors.
[0079] In the initial training phase, either randomly initialized scene vectors or scene vectors constructed based on expert experience can be used. In each training epoch, both the scene vectors and model parameters will be updated simultaneously.
[0080] In step 403, the user features are input into multiple expert subnetworks, and the first representations output by the multiple expert subnetworks are obtained respectively.
[0081] In step 404, the first representations output by multiple expert subnetworks are weighted and fused according to the target weights corresponding to multiple scene vectors to obtain the second representation.
[0082] In step 405, the prediction result is determined based on the second characterization.
[0083] In this embodiment, the first user refers to a sample user, such as a user in a pre-built training dataset. Each first user's user data in the training dataset has a label. For example, when the prediction result is used to indicate the probability that the first user will perform a specific action on a first object, this label can be used to indicate whether the user performed the specific action.
[0084] For an explanation of steps 401-405, please refer to the relevant explanations of steps 201-205 in the previous text, which will not be repeated here.
[0085] In step 406, based on the difference between the prediction result and the first user's label, the network parameters of the expert subnetwork, the first network layer, and the second network layer are adjusted, and the scene vector is updated.
[0086] In this step, a loss function can be determined based on the difference between the prediction result and the first user's label. For example, the cross-entropy loss function can be used. Then, the model is trained with the goal of minimizing the loss value of the loss function. For example, batch gradient descent can be used to update the network parameters of each expert subnetwork, the first network layer, and the second network layer, while also updating the parameters of the scene vector. The parameters of the scene vector can also be updated using gradient descent. During the update, the same learning rate (also called step size) as the model parameters can be used, or a different learning rate can be used.
[0087] When the number of iterations in the above steps reaches the preset number, or when the loss value is less than the preset threshold, training can be stopped, and the trained model can be obtained.
[0088] The above solution introduces learnable implicit scene vectors and combines them with clustering algorithms to dynamically group user samples from different scenes. Compared with static partitioning methods that rely on business rules, this solution can more accurately capture the essential characteristics of data distribution, achieve more reasonable and adaptive scene partitioning, and thus improve the model's generalization ability and performance.
[0089] Figure 5 This is a schematic diagram of the device for processing user data in multiple scenarios, as described in the embodiments of this specification. This device can be applied to any device, platform, or device cluster with computing and processing capabilities. The device includes:
[0090] Feature acquisition module 51 is used to acquire user features related to the first user based on the user data of the first user;
[0091] The weight determination module 52 is used to determine the target weights corresponding to multiple scene vectors based on the similarity between user features and multiple scene vectors.
[0092] Expert network module 53 is used to input user features into multiple expert sub-networks and obtain the first representations output by multiple expert sub-networks respectively. There is a one-to-one correspondence between multiple scene vectors and multiple expert sub-networks.
[0093] The representation fusion module 54 is used to perform weighted fusion of the first representations output by multiple expert subnetworks according to the target weights corresponding to multiple scene vectors to obtain the second representation.
[0094] The prediction output module 55 is used to determine the prediction result based on the second representation.
[0095] In one implementation, the weight determination module 52 is specifically used to project user features into a space with the same dimension as the scene vector to obtain an alignment vector; and calculate the similarity between the alignment vector and multiple scene vectors to obtain the target weights corresponding to the multiple scene vectors.
[0096] In one implementation, the feature acquisition module 51 is specifically used to extract features from the user data of the first user by the first network layer to obtain user features; and to determine the prediction result based on the second representation, including: determining the prediction result by the second network layer based on the second representation.
[0097] In one embodiment, the apparatus further includes a training module (not shown) for adjusting the network parameters of the expert subnetwork, the first network layer, and the second network layer based on the difference between the prediction result and the label of the first user after the prediction result is determined.
[0098] In one implementation, after adjusting the network parameters of the expert sub-network, the first network layer, and the second network layer, the training module is further used to extract features from user data using the adjusted first network layer to obtain updated features; based on the similarity between the updated features and multiple scene vectors, the scene vector with the highest similarity to the updated features is determined and used as the cluster center of the cluster to which the updated features belong; based on the updated features in the cluster, the cluster center is updated to obtain the updated cluster center and used as the updated scene vector.
[0099] In one implementation, after determining the prediction result, the training module is further used to adjust the network parameters of the expert subnetwork, the first network layer, and the second network layer, and update the scene vector based on the difference between the prediction result and the label of the first user.
[0100] In one implementation, the prediction result is used to indicate the probability that a first user will perform a specific action on a first object, the specific action including at least one of the following: the first user clicks on the first object, the first user purchases the first object, or the first user continues to use the first object.
[0101] This specification also provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed in a computer, it causes the computer to perform actions such as... Figures 2 to 4 The method described.
[0102] This specification also provides a computing device, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, it implements, as shown in the embodiment. Figures 2 to 4 The method described.
[0103] This specification also provides a computer program product, including a computer program / instructions, which, when executed by a processor, implements... Figures 2 to 4 The steps of the described method.
[0104] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the methodology). However, with technological advancements, many methodological improvements today can be considered direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that a methodological improvement cannot be implemented using hardware physical modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program and "integrate" a digital system onto a PLD themselves, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must be written in a specific programming language, called a Hardware Description Language (HDL). There are many HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should understand that by simply performing some logic programming on the method flow using one of these hardware description languages and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.
[0105] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.
[0106] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or physical entities, or by products with certain functions. A typical implementation device is a server system. Of course, this application does not exclude the possibility that, with the future development of computer technology, the computer implementing the functions of the above embodiments can be, for example, a personal computer, a laptop computer, an in-vehicle human-machine interaction device, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or any combination of these devices.
[0107] While one or more embodiments of this specification provide the operational steps of the methods described in the embodiments or flowcharts, more or fewer operational steps may be included based on conventional or non-inventive means. The order of steps listed in the embodiments is merely one possible order of execution among many steps and does not represent the only possible order. In actual device or end product execution, the methods shown in the embodiments or drawings may be executed sequentially or in parallel (e.g., in a parallel processor or multi-threaded processing environment, or even a distributed data processing environment). The terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, product, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, product, or apparatus. Without further limitations, the presence of other identical or equivalent elements in the process, method, product, or apparatus that includes the elements is not excluded. For example, the use of terms such as "first," "second," etc., is to denote names and does not indicate any particular order.
[0108] For ease of description, the above devices are described in terms of function, divided into various modules. Of course, when implementing one or more of these specifications, the functions of each module can be implemented in one or more software and / or hardware components, or a module that performs the same function can be implemented by a combination of multiple sub-modules or sub-units. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between devices or units, and may be electrical, mechanical, or other forms.
[0109] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0110] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0111] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0112] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0113] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0114] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage, graphene storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0115] Those skilled in the art will understand that one or more embodiments of this specification can be provided as a method, system, or computer program product. Therefore, one or more embodiments of this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, one or more embodiments of this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0116] One or more embodiments of this specification can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a particular task or implement a particular abstract data type. One or more embodiments of this specification can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0117] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, system embodiments are basically similar to method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments. In the description of this specification, the terms "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this specification. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described can be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification and the features of different embodiments or examples.
[0118] The above description is merely an embodiment of one or more embodiments of this specification and is not intended to limit the scope of these embodiments. Various modifications and variations can be made to these embodiments by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of the claims.
Claims
1. A method for processing user data in multiple scenarios, the method comprising: obtaining, based on user data of a first user, a user feature related to the first user; determining, based on similarity between the user feature and multiple scenario vectors, a target weight corresponding to each of the multiple scenario vectors; inputting the user feature into multiple expert sub-networks to obtain first representations output by the multiple expert sub-networks, the multiple scenario vectors and the multiple expert sub-networks being one-to-one corresponding; performing weighted fusion on the first representations output by the multiple expert sub-networks according to the target weights corresponding to the multiple scenario vectors to obtain a second representation; and determining a prediction result based on the second representation.
2. The method of claim 1, wherein, The determining, based on similarity between the user feature and multiple scenario vectors, a target weight corresponding to each of the multiple scenario vectors comprises: projecting the user feature into a space of the same dimension as the scenario vectors to obtain an aligned vector; and calculating similarity between the aligned vector and each of the multiple scenario vectors to obtain the target weight corresponding to each of the multiple scenario vectors.
3. The method of claim 1, wherein The obtaining, based on user data of a first user, a user feature related to the first user comprises: performing feature extraction on the user data of the first user by a first network layer to obtain the user feature; and The determining a prediction result based on the second representation comprises: determining the prediction result based on the second representation by a second network layer.
4. The method of claim 3, wherein, After the determining the prediction result, the method further comprises: adjusting network parameters of the expert sub-networks, the first network layer and the second network layer based on difference between the prediction result and a label of the first user.
5. The method of claim 4, wherein, After the adjusting network parameters of the expert sub-networks, the first network layer and the second network layer, the method further comprises: performing feature extraction on the user data by the adjusted first network layer to obtain updated features; determining, based on similarity between the updated features and multiple scenario vectors, a scenario vector having the highest similarity with the updated features as a cluster center of a cluster to which the updated features belong; and updating the cluster center based on updated features in the cluster to obtain an updated cluster center as an updated scenario vector.
6. The method of claim 3, wherein, After the determining the prediction result, the method further comprises: adjusting network parameters of the expert sub-networks, the first network layer and the second network layer based on difference between the prediction result and a label of the first user, and updating the scenario vectors.
7. The method of claim 1, wherein, The prediction result is used to indicate a probability of the first user making a specific behavior on a first object, the specific behavior including at least one of the following: the first user clicking the first object, the first user purchasing the first object, and the first user continuing to use the first object.
8. An apparatus for processing user data in multiple scenarios, the apparatus comprising: a feature obtaining module configured to obtain, based on user data of a first user, a user feature related to the first user. a weight determination module, configured to determine target weights corresponding to a plurality of scene vectors respectively based on similarities between the user feature and the plurality of scene vectors; an expert network module, configured to input the user feature into a plurality of expert sub-networks to obtain first representations output by the plurality of expert sub-networks respectively, the plurality of scene vectors and the plurality of expert sub-networks being in one-to-one correspondence; a representation fusion module, configured to perform weighted fusion on the first representations output by the plurality of expert sub-networks according to the target weights corresponding to the plurality of scene vectors to obtain a second representation; a prediction output module, configured to determine a prediction result based on the second representation.
9. A computer program product, comprising computer programs / instructions, which, when executed by a processor, implement the steps of the method of any one of claims 1-7.
10. A computing device, comprising a memory and a processor, wherein the memory stores executable codes, and the processor, when executing the executable codes, implements the method of any one of claims 1-7.