User classification method and apparatus, electronic device, and storage medium

By employing multi-branch parallel inference and a pruning strategy, the problem of low robustness of single neural network models in user classification is solved, achieving higher classification accuracy and lightweight model deployment.

CN123179155APending Publication Date: 2026-11-27DUXIAOMAN TECH (BEIJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611129317.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-28
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

In existing technologies, single neural network models have low robustness in user classification due to the shift in user feature distribution across the time window.

Method used

Multi-branch parallel inference and multiple decision differentiation factors are used to predict features through K prediction branch networks. After training, M trained prediction branch networks are obtained for user classification.

Benefits of technology

It improves the accuracy of user classification and enables lightweight deployment of the model, reducing memory usage and improving classification efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123179155A_ABST
    Figure CN123179155A_ABST
Patent Text Reader

Abstract

The application provides a user classification method and device, electronic equipment and storage medium. The method comprises: dividing training data into a training set and a validation set; performing feature encoding processing on sample behavior data in the training set to obtain sample initialization representation; inputting the sample initialization representation into K prediction branch networks respectively to obtain sample prediction probabilities output by each prediction branch network; training the K prediction branch networks based on the K sample prediction probabilities and classification labels; after the K prediction branch networks are trained, screening and pruning the K trained prediction branch networks based on sample behavior data and classification labels in the validation set to obtain M trained prediction branch networks; and performing user classification based on target behavior data of a target user through the M trained prediction branch networks to output a target preset category. The method can improve user classification accuracy in a classification scenario of judging whether a user has a default risk.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of classification technology, and in particular to a user classification method, apparatus, electronic device, and storage medium. Background Technology

[0002] With the development of deep learning technology, neural network models can be used to classify users based on their behavioral characteristics in many binary classification scenarios. For example, in recommendation scenarios, it can be used to determine whether a user will click on a product; in risk control scenarios, it can be used to assess whether a user has a risk of default. Currently, this is done by building a single neural network model to fit the distribution based on the user's behavioral characteristics data; however, the distribution of user characteristics often shifts across time windows, and if classification and evaluation are performed using a single decision path, the robustness of the classification and evaluation will be low. Summary of the Invention

[0003] This application provides a user classification method, apparatus, electronic device, and storage medium, which can improve the accuracy of user classification. The technical solution is as follows: According to one aspect of this application, a user classification method is provided, the method comprising: The training data is divided into a training set and a validation set, wherein the training data contains sample behavior data and classification labels of multiple sample users; The sample behavior data in the training set are subjected to feature encoding processing to obtain the sample initialization representation; The initialization representation of the sample is input into K prediction branch networks respectively to obtain the sample prediction probability output by each prediction branch network. Different prediction branch networks have the same linear layer weights and different decision differentiation factors. K is an integer greater than 2. The sample prediction probability indicates the probability that the sample user belongs to a preset category. The K prediction branch networks are trained based on the predicted probabilities of K samples and the classification labels; After the K prediction branch networks are trained, the K trained prediction branch networks are filtered and pruned based on the sample behavior data and classification labels in the validation set to obtain M trained prediction branch networks, where M is an integer greater than 1 and less than K. The M trained prediction branch networks classify users based on the target user's target behavior data and output the target user's preset target category.

[0004] According to another aspect of this application, a user classification device is provided, the device comprising: The partitioning module is used to divide the training data into a training set and a validation set, wherein the training data contains sample behavior data and classification labels of multiple sample users; The feature encoding module is used to perform feature encoding processing on the sample behavior data in the training set to obtain the sample initialization representation; The first prediction module is used to input the sample initialization representation into K prediction branch networks respectively to obtain the sample prediction probability output by each prediction branch network. Different prediction branch networks have the same linear layer weights and different decision differentiation factors. K is an integer greater than 2. The sample prediction probability indicates the probability that the sample user belongs to a preset category. The training module is used to train the K prediction branch networks based on the predicted probabilities of K samples and the classification labels; The network filtering module is used to filter and prune the K trained prediction branch networks based on the sample behavior data and classification labels in the validation set after the K prediction branch networks have been trained, so as to obtain M trained prediction branch networks, where M is an integer greater than 1 and less than K. The second prediction module is used to classify users based on the target user's target behavior data through the M trained prediction branch networks, and output the target preset category to which the target user belongs.

[0005] According to one aspect of this application, an electronic device is provided, comprising: a processor and a memory storing a program, the program including instructions that, when executed by the processor, cause the processor to perform the user classification method as described above.

[0006] According to another aspect of this application, a non-transitory computer-readable storage medium is provided storing computer instructions for causing the computer to perform the user classification method as described above.

[0007] According to another aspect of this application, a computer program product is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the user classification method described above.

[0008] The beneficial effects of the technical solutions provided in this application include at least the following: The training data is divided into a training set and a validation set. The sample behavior data in the training set is processed by feature encoding to obtain sample initialization representations. These initialization representations are then input into K prediction branch networks to obtain the sample prediction probabilities output by each prediction branch network. Different prediction branch networks have the same linear layer weights but different decision differentiation factors. Based on the K sample prediction probabilities and classification labels, K prediction branch networks are trained. After the K prediction branch networks are trained, they are pruned based on the sample behavior data and classification labels in the validation set, resulting in M ​​trained prediction branch networks. These M trained prediction branch networks are then used to classify users based on the target user's target behavior data, outputting the target user's predefined target category. By using multi-branch parallel inference and multiple sets of decision differentiation factors, a single computation can obtain the prediction probabilities of multiple branch networks on different dimensional features. Combining multiple prediction probabilities for classification decision-making improves the accuracy of classification prediction. Furthermore, a pruning strategy is introduced to dynamically trim multiple branches, achieving lightweight model deployment while ensuring classification accuracy. Attached Figure Description

[0009] Further details, features, and advantages of this application are disclosed in the following description of exemplary embodiments in conjunction with the accompanying drawings, in which: Figure 1 A flowchart of a user classification method according to an exemplary embodiment of this application is shown; Figure 2 This is a schematic diagram illustrating the training process of a user classification model provided in an exemplary embodiment of this application; Figure 3 This is a schematic diagram of the structure of a user classification device provided in an embodiment of this application; Figure 4 A structural block diagram of an exemplary electronic device that can be used to implement embodiments of this application is shown. Detailed Implementation

[0010] Embodiments of this application will now be described in more detail with reference to the accompanying drawings. While some embodiments of this application are shown in the drawings, it should be understood that this application can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this application. It should be understood that the drawings and embodiments of this application are for illustrative purposes only and are not intended to limit the scope of protection of this application.

[0011] It should be understood that the steps described in the method embodiments of this application may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this application is not limited in this respect.

[0012] The term "comprising" and its variations as used herein are open-ended, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the following description. It should be noted that the concepts of "first", "second", etc., mentioned in this application are only used to distinguish different devices, modules, or units, and are not intended to limit the order of functions performed by these devices, modules, or units or their interdependencies. It should be noted that the modifications "a" and "a plurality" mentioned in this application are illustrative and not restrictive, and those skilled in the art should understand that unless explicitly indicated in the context, they should be understood as "one or more". The names of messages or information exchanged between multiple devices in the embodiments of this application are for illustrative purposes only and are not intended to limit the scope of these messages or information.

[0013] The present invention will now be described with reference to the accompanying drawings. The technical solutions provided by the embodiments of this application will be explained in detail through specific examples and application scenarios.

[0014] To address the issue of low robustness in classification when determining the existence of default risk due to a single neural network in related technologies, this application's embodiments employ multi-branch parallel inference combined with multiple sets of decision differentiation factors. This allows for the acquisition of prediction probabilities for multiple branch networks across different dimensional features in a single calculation. Combining these multiple prediction probabilities for classification decision-making improves the accuracy of classification prediction. Furthermore, a pruning strategy is introduced to dynamically trim multiple branches, achieving lightweight model deployment while ensuring classification accuracy. Please refer to [reference needed]. Figure 1 The diagram illustrates a flowchart of a user classification method according to an exemplary embodiment of this application. The method is described using an example of its application to an electronic device. Figure 1 As shown, the method includes: Step 101: Divide the training data into a training set and a validation set. The training data contains sample behavior data and classification labels of multiple sample users.

[0015] The user classification method provided in this application is adapted to binary classification scenarios. For example, in recommendation scenarios, this binary classification method can be used to predict whether a user will click on a product, video, or advertisement; or to predict whether a user will place an order; in risk control scenarios, this binary classification method can be used to predict whether a user has a risk of default (or overdue payment); or to predict whether a user's account has a risk of fraud; in medical scenarios, it can be used to predict whether a user has a risk of illness. This embodiment does not limit the specific binary classification scenario corresponding to the user classification method.

[0016] The training data required for training the model varies depending on the binary classification scenario. For example, in a recommendation scenario, the training data might include user behavior data such as clicking, saving, paying, purchasing, and sharing on product recommendation pages. The classification labels would be "yes" or "no," where "yes" indicates the user clicked on a product and "no" indicates the user did not. In a risk control scenario, the training data might include user asset levels (e.g., bank balance, monthly income), behavior frequency (e.g., number of loan applications, transaction frequency in the past 30 days), credit history (e.g., historical overdue days, credit inquiry records), and time-series attributes (e.g., repayment rhythm, periodic consumption fluctuations). The classification labels would be "yes" or "no," where "yes" indicates the user has a default risk and "no" indicates the user does not have a default risk. It should be noted that this embodiment primarily uses a risk control scenario as an example, where the user classification method is used to predict whether a user has a default risk. (0 indicates the user has no default risk, 1 indicates the user has a default risk).

[0017] The model training phase of this application includes two stages: multi-branch parallel prediction training + pruning. After collecting a certain amount of training data, the training data is divided into a training set and a validation set. The training set is used for the multi-branch parallel prediction training stage, and the validation set is used for the multi-branch pruning stage. Both the training set and the validation set contain several sample pairs, each sample pair including sample user behavior data and the corresponding classification label (0 or 1) for that sample user.

[0018] For example, 70% of the training data can be used as the training set, and 30% of the training data can be used as the validation set.

[0019] Step 102: Perform feature encoding on the sample behavior data in the training set to obtain the sample initialization representation.

[0020] Considering that sample behavior data includes heterogeneous features of multiple dimensions, in order for the model to process it, it is first necessary to perform feature encoding on the sample behavior data in the training set. For example, transforms such as piecewise linear mapping can be used to process the numerical features in the sample behavior data to obtain the sample initialization representation, so as to provide a highly expressive initialization representation for the subsequent prediction network.

[0021] Step 103: Input the sample initialization representation into K prediction branch networks respectively to obtain the sample prediction probability output by each prediction branch network. Different prediction branch networks have the same linear layer weights and different decision differentiation factors. K is an integer greater than 2. The sample prediction probability indicates the probability that the sample user belongs to the preset category.

[0022] To improve the accuracy of classification prediction, the binary classification model constructed in this application includes K prediction branch networks. Each prediction branch network, based on shared linear layer weights W, injects independent decision differentiation factors into K implicit sub-models, enabling the parallel generation of multiple risk prediction results (also known as sample prediction probabilities) in a single forward prediction computation. That is, at the initial stage of the binary classification model, the K prediction branch networks have the same linear layer weights but different decision differentiation factors. Furthermore, during subsequent training, when updating the network parameters, the linear layer weights of the K prediction branch networks remain the same, while the decision differentiation factors differ. This allows different prediction branch networks to predict risk probabilities from different perspectives based on input features.

[0023] For example, the value of K can be determined according to business needs. For instance, K can be 32, meaning that the initial binary classification model includes 32 prediction branch networks.

[0024] In each round of training, the sample initialization representation corresponding to each sample user is input into K prediction branch networks. The prediction branch networks process the sample initialization representation based on the linear layer weights and decision factors, and predict the probability that the sample user belongs to the preset category. The sample prediction probability output by each prediction branch network is obtained, and K sample prediction probabilities are obtained simultaneously. Moreover, the different sample prediction probabilities are predicted by different prediction branch networks from different dimensional perspectives.

[0025] For example, the sample prediction probability ranges from 0 to 1; taking the preset category of whether there is a risk of default as an example, 0 indicates that there is no risk of default, and 1 indicates that there is a risk of default.

[0026] Specifically, the sample initialization representation is input into K prediction branch networks respectively to obtain the sample prediction probability output by each prediction branch network, including: in each prediction branch network, the sample prediction probability output by each prediction branch network is determined based on the sample initialization representation, linear layer weights and decision differentiation factors.

[0027] For example, the computation logic for the input and output of each prediction branch network can be as shown in Equation (1): (1) in, Let W be the decision factor and W be the linear layer weight. This indicates element-wise multiplication.

[0028] Based on formula (1), this application simulates the decision-making process of k implicit sub-models in parallel by injecting lightweight "decision differentiation factors" into a network structure with shared weights W. The shared weights W are used by all prediction branch networks to learn the general risk characteristics and patterns in risk control scenarios. The non-shared decision differentiation factors are lightweight factor vectors r, s, and b assigned to each prediction branch network. The final classification prediction logic becomes: output = s⊙(W(r⊙input)) + b, where ⊙ represents element-wise multiplication. This enables multi-perspective prediction generation: by fine-tuning the input and output signals through these differentiation factors, the shared backbone differentiates into decision branches with different perspectives, allowing the model to simultaneously obtain multiple different risk assessment scores in a single calculation.

[0029] Step 104: Based on the predicted probabilities and classification labels of K samples, train K prediction branch networks.

[0030] In each training round, each sample user is predicted to have K corresponding sample prediction probabilities by the K prediction branch networks. That is, the network parameters (W+s+r+b) of the K prediction branch networks are updated based on the loss between the K sample prediction probabilities and the classification labels to train the K prediction branch networks. After a preset number of training rounds, the training of the K prediction branch networks is considered complete; or, the training of the K prediction branch networks is considered complete when the loss of the K prediction branch networks is less than a preset threshold.

[0031] Specifically, training K prediction branch networks based on the predicted probabilities and classification labels of K samples also includes: determining the total prediction loss of the K prediction branch networks based on the predicted probabilities and classification labels of K samples; and updating the linear layer weights and decision differentiation factors of the K prediction branch networks based on the total prediction loss.

[0032] In one possible implementation, when calculating the total prediction loss of the K prediction branch networks, the sub-loss between the sample prediction probability output by each prediction branch network and the classification label is first calculated separately. Then, the K sub-losses are added together to obtain the total prediction loss. Based on the total prediction loss, the linear layer weights (W) and decision differentiation factors (s+r+b) of the K prediction branch networks are updated.

[0033] Please refer to Figure 2 This is a schematic diagram illustrating the training process of a user classification model provided in an exemplary embodiment of this application. Figure 2 As shown, in the feature embedding module, the original input features (sample behavior data) are input into the segmentation mapping module to obtain the sample initialization representation (embedding). The sample initialization representation is then input into the parameter integration network module (i.e., K prediction branch networks). This module includes a shared parameter W and decision differentiation factors corresponding to the K branches, and obtains the sample prediction probability output by each prediction branch network.

[0034] Step 105: After the K prediction branch networks have been trained, the K trained prediction branch networks are filtered and pruned based on the sample behavior data and classification labels in the validation set to obtain M trained prediction branch networks, where M is an integer greater than 1 and less than K.

[0035] Considering that directly deploying K prediction branch networks during the model application phase would lead to high model memory consumption and affect classification prediction efficiency, this application also requires dynamic pruning of the trained K prediction branch networks to dynamically remove redundant differentiation branches in order to achieve lightweight deployment. One possible implementation is that after the K prediction branch networks are trained, they can be filtered and pruned based on sample behavior data and classification labels in the validation set to obtain M trained prediction branch networks, where M is an integer greater than 1 and less than K.

[0036] Optionally, typically 1 / 4 of the K prediction branch networks are retained for final model deployment. For example, if K is 32, then M can be 8.

[0037] Optionally, a greedy search strategy can be used to filter and prune the K trained prediction branches. In an exemplary example, step 105 may further include steps 105A to 105E.

[0038] Step 105A: Determine the total classification index of the K trained prediction branch networks on the validation set.

[0039] When validating the K trained prediction branch networks, the overall classification metrics that can be used include: classification precision (the proportion of samples that the model predicts to be positive but are actually positive), recall (the proportion of all true positive samples that the model finds), or AUC (a value between 0 and 1, the area under the ROC curve).

[0040] If the binary classification scenario is a risk control scenario, then positive samples can be sample users without default risk, and negative samples can be sample users with default risk. When calculating the total classification index of the K trained prediction branch networks on the validation set, the sample behavior data of each sample user in the validation set is processed by feature encoding to obtain the sample initialization representation. After that, it is input into the K trained prediction branch networks to obtain the K sample prediction probabilities. The average of the K sample prediction probabilities is taken to obtain the validation prediction probability of the sample user. If the sample prediction probability is greater than a preset threshold, the predicted label of the sample user is 1. If the sample prediction probability is less than the preset threshold, the predicted label of the sample user is 0. Then, the predicted label and the classification label are compared to determine whether they are consistent. By predicting all sample users in the validation set, the proportion of samples that are actually positive when the model predicts them to be positive can be statistically analyzed, and the total classification index (classification accuracy) of the K trained prediction branch networks on the validation set can be determined.

[0041] Taking the overall classification metric AUC as an example, when calculating the overall classification metric of the K trained prediction branch networks on the validation set, the sample behavior data of each sample user in the validation set is processed by feature encoding to obtain the sample initialization representation. After that, it is input into the K trained prediction branch networks to obtain the K sample prediction probabilities. The average of the K sample prediction probabilities is taken to obtain the validation prediction probability of the sample user. If the sample prediction probability is greater than a preset threshold, the predicted label of the sample user is 1. If the sample prediction probability is less than the preset threshold, the predicted label of the sample user is 0. Then, the predicted label and the classification label are compared to determine whether they are consistent. By predicting all sample users in the validation set, the predicted labels of all sample users are obtained. Thus, the overall AUC value of the K trained prediction branch networks is calculated as the overall classification metric.

[0042] Step 105B: Determine the subclassification metrics for each trained prediction branch network on the validation set.

[0043] Similar to the calculation of the overall classification metric, when calculating the sub-classification metric for each prediction branch network, the sample behavior data of each sample user in the validation set is processed by feature encoding to obtain the sample initialization representation. After that, it is input into K trained prediction branch networks to obtain K sample prediction probabilities. The relationship between each sample prediction probability and a preset threshold is compared to obtain K prediction labels. Then, each prediction label is compared with the classification label to determine whether they are consistent. By predicting all sample users in the validation set, the prediction labels of all sample users output by each prediction branch network are obtained. Thus, the total AUC value of each trained prediction branch network is calculated as the sub-classification metric.

[0044] Step 105C: Select the prediction branch network with the highest subclassification index after training as the first branch network.

[0045] When pruning and selecting K trained prediction branch networks, the first step is to retain the branch with the highest prediction accuracy and remove redundant branches with lower accuracy. Therefore, we first compare the sub-classification metrics of the K trained prediction branch networks, selecting the branch with the highest sub-classification metric as the first branch. Then, based on the first branch, we add the remaining prediction branch networks to determine if the combined classification metric improves, and ultimately decide whether to retain these added remaining prediction branch networks.

[0046] Step 105D: Combine the first branch network with at least one second branch network to determine the combined classification index of the combined branch network on the validation set. The second branch network is the prediction branch network other than the first branch network among the K trained prediction branch networks.

[0047] In one possible implementation, the prediction branch networks other than the first branch network among the K trained prediction branch networks are defined as second branch networks. Then, at least one second branch network is combined with the first branch network, and the combined classification index of the combined branch network on the validation set is calculated to determine whether the combined branch network can bring about an improvement in classification prediction performance, which serves as the basis for subsequent screening and pruning.

[0048] Step 105E: Based on the combined branch index, the sub-classification index and the total classification index corresponding to the first branch network, the K trained prediction branch networks are filtered and pruned to obtain M trained prediction branch networks. The total classification index of the M trained prediction branch networks on the validation set is greater than or equal to the total classification index of the K trained prediction branch networks on the validation set.

[0049] When performing screening and pruning, two judgment logics are set: (1) If the combined branch index of the combined branch network is better than the classification index before combination, the combined branch network is retained and a new second branch network is added, and the judgment continues; if the combined branch index of the combined branch network is less than or equal to the classification index before combination, it means that the second branch network added in this combination cannot bring about the optimization of the classification index, and is a redundant branch, so the second branch network added in this combination can be removed; or, (2) if the combined branch index of the combined branch network is already better than the classification index (i.e., the total classification index) of all prediction branch networks, the combined branch network is directly used as the M trained prediction branch networks after screening and pruning, and other second branches are directly removed. In one possible implementation, based on the combined branch index, the sub-classification index and the total classification index corresponding to the first branch network, the K trained prediction branch networks are screened and pruned to obtain M trained prediction branch networks. The total classification index of the M trained prediction branch networks on the validation set is greater than or equal to the total classification index of the K trained prediction branch networks on the validation set.

[0050] Specifically, based on the combined branch index, the sub-classification index corresponding to the first branch network, and the total classification index, the K trained prediction branch networks are filtered and pruned to obtain M trained prediction branch networks. This includes: if the combined branch index is greater than or equal to the total classification index, the combined branch network is determined as one of the M trained prediction branch networks; if the combined branch index is less than or equal to the sub-classification index of the first branch network, the second branch network added in this combined branch network is deleted from the K trained prediction branch networks.

[0051] For example, if K is 12, and the overall classification index is A1, the first branch network is the 8th prediction branch network. After multiple rounds of greedy filtering, the 8th prediction branch network + 2nd prediction branch network + 4th prediction branch network + 5th prediction branch network is the current optimal combination branch network, and the classification index of this combination branch network is A2. In the next round of filtering, a 9th prediction branch network is added to this combination branch network, and the classification index of the new combination branch network (8th prediction branch network + 2nd prediction branch network + 4th prediction branch network + 5th prediction branch network + 9th prediction branch network) is calculated to be A3. If A3 is directly greater than the overall classification index A1, then... The combined branch network (8th prediction branch network + 2nd prediction branch network + 4th prediction branch network + 5th prediction branch network + 9th prediction branch network) is directly selected as the M trained prediction branch networks after pruning. After pruning, all other second branch networks are deleted. If A3 is less than or equal to A2, it means that adding the 9th prediction branch network will not improve the classification index. In this case, the 9th prediction branch network is deleted and a new round of pruning is started. The 10th prediction branch network is added to the combined branch network. This process continues until all 12 prediction branch networks have been combined once, or the classification index of the combined branch network is better than the overall classification index. In this way, the pruning stops.

[0052] Please refer to Figure 2 After the K prediction branch networks are trained, the K prediction branch networks are posteriorly pruned by filtering feedback through the validation set. For example, branch 1 and branch 3 are deleted to obtain a simplified model with M prediction branch networks. The M prediction branch networks are then used to output the risk control score (i.e., the probability output of whether it is overdue).

[0053] For example, when K is 32, M can be 1 / 4 of K = 8.

[0054] Step 106: Using M trained prediction branch networks, classify users based on the target user's target behavior data and output the target user's preset target category. After pruning and filtering, M trained prediction branch networks can be deployed during the model application phase. These M networks classify users based on their target behavior data and output the target predefined category to which each user belongs. Specifically, classifying users based on their target behavior data and outputting the target predefined category involves: feature encoding the target behavior data to obtain an initial target representation; inputting the initial target representation into each of the M trained prediction branch networks to obtain the target prediction probability output by each network; and determining the target predefined category to which the user belongs based on the M prediction probabilities. Specifically, the average of the M prediction probabilities can be used as the total prediction probability for the user. This total probability is compared to a preset threshold. If the total probability is less than the threshold, the target predefined category is 0 (i.e., no risk of delinquency); if it is greater than the threshold, the target predefined category is 1 (i.e., there is a risk of delinquency).

[0055] Optionally, in addition to directly using the average of the predicted probabilities of M targets to determine the preset category of the target, each prediction branch network can be normalized according to its sub-classification index to obtain the branch weight of each prediction branch network. Then, the total prediction probability is obtained by weighted summation based on the branch weight and the target prediction probability. Finally, the total prediction probability is compared with the preset threshold to determine the preset category of the target.

[0056] In summary, this application provides a target user classification method: Training data is divided into a training set and a validation set. Feature encoding is performed on the sample behavior data in the training set to obtain sample initialization representations. These initialization representations are then input into K prediction branch networks to obtain the sample prediction probability output by each prediction branch network. Different prediction branch networks have the same linear layer weights and different decision differentiation factors. Based on the K sample prediction probabilities and classification labels, K prediction branch networks are trained. After the K prediction branch networks are trained, they are pruned based on the sample behavior data and classification labels in the validation set to obtain M trained prediction branch networks. These M trained prediction branch networks are then used to classify users based on the target user's target behavior data, outputting the target user's preset target category. By using multi-branch parallel inference and multiple sets of decision differentiation factors, a single calculation can obtain the prediction probabilities of multiple branch networks on features of different dimensions. Combining multiple prediction probabilities for classification decision-making improves the accuracy of classification prediction. Furthermore, a pruning strategy is introduced to dynamically trim multiple branches, achieving lightweight model deployment while ensuring classification accuracy.

[0057] Please refer to Figure 3 This is a schematic diagram of the structure of a user classification device provided in an embodiment of this application. For example, as shown... Figure 3 As shown, the device 300 includes: The partitioning module 301 is used to partition the training data into a training set and a validation set, wherein the training data includes sample behavior data and classification labels of multiple sample users. The feature encoding module 302 is used to perform feature encoding processing on the sample behavior data in the training set to obtain the sample initialization representation; The first prediction module 303 is used to input the sample initialization representation into K prediction branch networks respectively to obtain the sample prediction probability output by each prediction branch network. Different prediction branch networks have the same linear layer weights and different decision differentiation factors. K is an integer greater than 2. The sample prediction probability indicates the probability that the sample user belongs to a preset category. Training module 304 is used to train the K prediction branch networks based on the predicted probabilities of K samples and the classification labels; The network filtering module 305 is used to filter and prune the K trained prediction branch networks based on the sample behavior data and classification labels in the validation set after the K prediction branch networks have been trained, so as to obtain M trained prediction branch networks, where M is an integer greater than 1 and less than K. The second prediction module 306 is used to classify users based on the target user's target behavior data through the M trained prediction branch networks, and output the target preset category to which the target user belongs.

[0058] Optionally, the first prediction module is further configured to: In each prediction branch network, the sample prediction probability output by each prediction branch network is determined based on the sample initialization representation, the linear layer weights, and the decision differentiation factor.

[0059] Optionally, the formula for calculating the sample prediction probability is: ,in, is the decision factor, and W is the linear layer weight.

[0060] Optionally, the network filtering module is further configured to: Determine the total classification index of the K trained prediction branch networks on the validation set; Determine the subclassification metric for each trained prediction branch network on the validation set; The prediction branch network with the highest sub-classification index is selected as the first branch network. The first branch network is combined with at least one second branch network to determine the combined classification index of the combined branch network on the validation set, wherein the second branch network is the prediction branch network other than the first branch network among the K trained prediction branch networks. Based on the combined branch index, the sub-classification index corresponding to the first branch network, and the total classification index, the K trained prediction branch networks are filtered and pruned to obtain the M trained prediction branch networks. The total classification index of the M trained prediction branch networks on the validation set is greater than or equal to the total classification index of the K trained prediction branch networks on the validation set.

[0061] Optionally, the network filtering module is further configured to: If the combined branch index is greater than or equal to the total classification index, the combined branch network is determined as the M trained prediction branch networks; If the combined branch index is less than or equal to the sub-classification index of the first branch network, the second branch network added in this combined branch network is deleted from the K trained prediction branch networks.

[0062] Optionally, the second prediction module is further configured to: The target user's target behavior data is feature-encoded to obtain the target initialization representation; The target initialization representation is input into the M trained prediction branch networks respectively to obtain the target prediction probability output by each trained prediction branch network. Based on the predicted probabilities of M targets, the target user is determined to belong to the preset target category.

[0063] Optionally, the training module is further configured to: Based on the predicted probabilities of the K samples and the classification labels, determine the total prediction loss of the K prediction branch networks; Based on the total prediction loss, update the linear layer weights and the decision differentiation factor of the K prediction branch networks.

[0064] In summary, this application provides a target user classification device: Training data is divided into a training set and a validation set; feature encoding is performed on the sample behavior data in the training set to obtain sample initialization representations; these initialization representations are input into K prediction branch networks to obtain the sample prediction probability output by each prediction branch network. Different prediction branch networks have the same linear layer weights and different decision differentiation factors. Based on the K sample prediction probabilities and classification labels, K prediction branch networks are trained; after the K prediction branch networks are trained, they are pruned based on the sample behavior data and classification labels in the validation set to obtain M trained prediction branch networks; user classification is performed using the M trained prediction branch networks based on the target user's target behavior data, outputting the target user's preset target category. By using multi-branch parallel inference and multiple sets of decision differentiation factors, multiple branch networks can obtain prediction probabilities on different dimensional features in a single calculation. Combining multiple prediction probabilities for classification decision-making can improve the accuracy of classification prediction. Furthermore, a pruning strategy is introduced to dynamically prune multiple branches, achieving lightweight model deployment while ensuring classification accuracy.

[0065] An exemplary embodiment of this application also provides an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor. The memory stores a computer program executable by the at least one processor, the computer program, when executed by the at least one processor, causing the electronic device to perform a user classification method according to an embodiment of this application.

[0066] An exemplary embodiment of this application also provides a non-transitory computer-readable storage medium storing a computer program, wherein the computer program, when executed by a computer's processor, is used to cause the computer to perform a user classification method according to an embodiment of this application.

[0067] An exemplary embodiment of this application also provides a computer program product, including a computer program, wherein, when executed by a computer's processor, the computer program is used to cause the computer to perform a user classification method according to an embodiment of this application.

[0068] refer to Figure 4The present invention describes a structural block diagram of an electronic device 400 that can serve as a server or client of this application, which is an example of a hardware device that can be applied to various aspects of this application. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can 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 examples and are not intended to limit the implementation of the application described and / or claimed herein.

[0069] like Figure 4 As shown, the electronic device 400 includes a computing unit 401, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 402 or a computer program loaded from a storage unit 408 into a random access memory (RAM) 403. The RAM 403 may also store various programs and data required for the operation of the electronic device 400. The computing unit 401, ROM 402, and RAM 403 are interconnected via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0070] Multiple components in electronic device 400 are connected to I / O interface 405, including: input unit 406, output unit 407, storage unit 408, and communication unit 409. Input unit 406 can be any type of device capable of inputting information to electronic device 400. Input unit 406 can receive input digital or character information and generate key signal inputs related to user settings and / or function control of electronic device. Output unit 407 can be any type of device capable of presenting information and may include, but is not limited to, a display, speaker, video / audio output terminal, vibrator, and / or printer. Storage unit 408 may include, but is not limited to, disks and optical discs. Communication unit 409 allows electronic device 400 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers, and / or chipsets, such as Bluetooth devices, WiFi devices, WiMax devices, cellular communication devices, and / or the like.

[0071] The computing unit 401 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 401 performs the various methods and processes described above. For example, in some embodiments, the methods shown in the above embodiments can be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as storage unit 408. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 400 via ROM 402 and / or communication unit 409. In some embodiments, the computing unit 401 can be configured to perform the methods shown in the above embodiments by any other suitable means (e.g., by means of firmware).

[0072] The program code used to implement the methods of this application 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 device, such that when executed by the processor or controller, the functions / operations specified in the flowcharts and / or block diagrams are 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.

[0073] In the context of this application, 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. Machine-readable media 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, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0074] As used in this application, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and / or apparatus (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including machine-readable media that receive machine instructions as machine-readable signals. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.

[0075] 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).

[0076] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user 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., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0077] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other.

Claims

1. A user classification method, characterized in that, The method includes: The training data is divided into a training set and a validation set, wherein the training data contains sample behavior data and classification labels of multiple sample users; The sample behavior data in the training set are subjected to feature encoding processing to obtain the sample initialization representation; The initialization representation of the sample is input into K prediction branch networks respectively to obtain the sample prediction probability output by each prediction branch network. Different prediction branch networks have the same linear layer weights and different decision differentiation factors. K is an integer greater than 2. The sample prediction probability indicates the probability that the sample user belongs to a preset category. The K prediction branch networks are trained based on the predicted probabilities of K samples and the classification labels; After the K prediction branch networks are trained, the K trained prediction branch networks are filtered and pruned based on the sample behavior data and classification labels in the validation set to obtain M trained prediction branch networks, where M is an integer greater than 1 and less than K. The M trained prediction branch networks classify users based on the target user's target behavior data and output the target user's preset target category.

2. The method according to claim 1, characterized in that, The step of inputting the sample initialization representation into K prediction branch networks respectively to obtain the sample prediction probability output by each prediction branch network includes: In each prediction branch network, the sample prediction probability output by each prediction branch network is determined based on the sample initialization representation, the linear layer weights, and the decision differentiation factor.

3. The method according to claim 2, characterized in that, The formula for calculating the predicted probability of the sample is: ,in, Let W be the decision factor and W be the linear layer weight. This indicates element-wise multiplication.

4. The method according to any one of claims 1 to 3, characterized in that, The step of filtering and pruning the K trained prediction branch networks based on the sample behavior data and classification labels in the validation set to obtain M trained prediction branch networks includes: Determine the total classification index of the K trained prediction branch networks on the validation set; Determine the subclassification metric for each trained prediction branch network on the validation set; The prediction branch network with the highest sub-classification index is selected as the first branch network. The first branch network is combined with at least one second branch network to determine the combined classification index of the combined branch network on the validation set, wherein the second branch network is the prediction branch network other than the first branch network among the K trained prediction branch networks. Based on the combined branch index, the sub-classification index corresponding to the first branch network, and the total classification index, the K trained prediction branch networks are filtered and pruned to obtain the M trained prediction branch networks. The total classification index of the M trained prediction branch networks on the validation set is greater than or equal to the total classification index of the K trained prediction branch networks on the validation set.

5. The method according to claim 4, characterized in that, The step of filtering and pruning the K trained prediction branch networks based on the combined branch index, the sub-classification index corresponding to the first branch network, and the total classification index to obtain the M trained prediction branch networks includes: If the combined branch index is greater than or equal to the total classification index, the combined branch network is determined as the M trained prediction branch networks; If the combined branch index is less than or equal to the sub-classification index of the first branch network, the second branch network added in this combined branch network is deleted from the K trained prediction branch networks.

6. The method according to any one of claims 1 to 3, characterized in that, The prediction branch network trained through the M networks classifies users based on the target user's target behavior data and outputs the target user's pre-defined target category, including: The target user's target behavior data is feature-encoded to obtain the target initialization representation; The target initialization representation is input into the M trained prediction branch networks respectively to obtain the target prediction probability output by each trained prediction branch network. Based on the predicted probabilities of M targets, the target user is determined to belong to the preset target category.

7. The method according to any one of claims 1 to 3, characterized in that, The step of training the K prediction branch networks based on the predicted probabilities of K samples and the classification labels includes: Based on the predicted probabilities of the K samples and the classification labels, determine the total prediction loss of the K prediction branch networks; Based on the total prediction loss, update the linear layer weights and the decision differentiation factor of the K prediction branch networks.

8. A user classification device, characterized in that, The device includes: The partitioning module is used to divide the training data into a training set and a validation set, wherein the training data contains sample behavior data and classification labels of multiple sample users; The feature encoding module is used to perform feature encoding processing on the sample behavior data in the training set to obtain the sample initialization representation; The first prediction module is used to input the sample initialization representation into K prediction branch networks respectively to obtain the sample prediction probability output by each prediction branch network. Different prediction branch networks have the same linear layer weights and different decision differentiation factors. K is an integer greater than 2. The sample prediction probability indicates the probability that the sample user belongs to a preset category. The training module is used to train the K prediction branch networks based on the predicted probabilities of K samples and the classification labels; The network filtering module is used to filter and prune the K trained prediction branch networks based on the sample behavior data and classification labels in the validation set after the K prediction branch networks have been trained, so as to obtain M trained prediction branch networks, where M is an integer greater than 1 and less than K. The second prediction module is used to classify users based on the target user's target behavior data through the M trained prediction branch networks, and output the target preset category to which the target user belongs.

9. An electronic device, comprising: processor; And the memory for storing programs, The program includes instructions that, when executed by the processor, cause the processor to perform the user classification method according to any one of claims 1-7.

10. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to execute the user classification method according to any one of claims 1-7.